www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
EigenProblem Class Reference

Problem for solving eigenvalue problems. More...

#include <EigenProblem.h>

Inheritance diagram for EigenProblem:
[legend]

Public Types

using DataFileParameterType = DataFileName
 The parameter type this interface expects for a data file name. More...
 

Public Member Functions

 EigenProblem (const InputParameters &parameters)
 
virtual std::string solverTypeString () override
 Return solver type as a human readable string. More...
 
virtual void solve (const unsigned int nl_sys_num) override
 
virtual void init () override
 
virtual bool nlConverged (const unsigned int nl_sys_num) override
 
unsigned int getNEigenPairsRequired () const
 
void setNEigenPairsRequired (unsigned int n_eigen_pairs)
 
bool isGeneralizedEigenvalueProblem () const
 
bool isNonlinearEigenvalueSolver () const
 
NonlinearEigenSystemgetNonlinearEigenSystem (const unsigned int nl_sys_num)
 
NonlinearEigenSystemgetCurrentNonlinearEigenSystem ()
 
virtual void checkProblemIntegrity () override
 Method called to perform a series of sanity checks before a simulation is run. More...
 
bool negativeSignEigenKernel () const
 A flag indicates if a negative sign is used in eigen kernels. More...
 
void setNormalization (const PostprocessorName &pp, const Real value=std::numeric_limits< Real >::max())
 Set postprocessor and normalization factor 'Postprocessor' is often used to compute an integral of physics variables. More...
 
void setInitialEigenvalue (const Real initial_eigenvalue)
 Set an initial eigenvalue for initial normalization. More...
 
bool doFreePowerIteration () const
 Whether or not we are doing free power iteration. More...
 
void doFreePowerIteration (bool do_power)
 Set a flag to indicate whether or not we are doing free power iterations. More...
 
void preScaleEigenVector (const std::pair< Real, Real > &eig)
 Eigenvector need to be scaled back if it was scaled in an earlier stage Scaling eigen vector does not affect solution (eigenvalue, eigenvector), but it does affect the convergence rate. More...
 
void postScaleEigenVector ()
 Normalize eigen vector. More...
 
void scaleEigenvector (const Real scaling_factor)
 Scale eigenvector. More...
 
void setEigenproblemType (Moose::EigenProblemType eigen_problem_type)
 Set eigen problem type. More...
 
virtual Real computeResidualL2Norm () override
 Compute the residual of Ax - Bx. More...
 
virtual void computeJacobianTag (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag) override
 Form a Jacobian matrix for all kernels and BCs with a given tag. More...
 
void computeMatricesTags (const NumericVector< Number > &soln, const std::vector< std::unique_ptr< SparseMatrix< Number >>> &jacobians, const std::set< TagID > &tags)
 Form several matrices simultaneously. More...
 
void computeJacobianAB (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobianA, SparseMatrix< Number > &jacobianB, TagID tagA, TagID tagB)
 Form two Jacobian matrices, where each is associated with one tag, through one element-loop. More...
 
virtual void computeJacobianBlocks (std::vector< JacobianBlock *> &blocks, const unsigned int nl_sys_num) override
 Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices. More...
 
virtual void computeResidualTag (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag) override
 Form a vector for all kernels and BCs with a given tag. More...
 
void computeResidualAB (const NumericVector< Number > &soln, NumericVector< Number > &residualA, NumericVector< Number > &residualB, TagID tagA, TagID tagB)
 Form two vetors, where each is associated with one tag, through one element-loop. More...
 
virtual void execute (const ExecFlagType &exec_type) override
 Convenience function for performing execution of MOOSE systems. More...
 
void initEigenvector (const Real initial_value)
 For nonlinear eigen solver, a good initial value can help convergence. More...
 
unsigned int activeEigenvalueIndex () const
 Which eigenvalue is active. More...
 
virtual void initPetscOutputAndSomeSolverSettings () override
 Hook up monitors for SNES and KSP. More...
 
bool outputInverseEigenvalue () const
 Whether or not to output eigenvalue inverse. More...
 
void outputInverseEigenvalue (bool inverse)
 Set a flag to indicate whether or not to output eigenvalue inverse. More...
 
bool onLinearSolver () const
 Whether or not we are in a linear solver iteration. More...
 
void onLinearSolver (bool ols)
 Set a flag to indicate whether or not we are in a linear solver iteration. More...
 
bool constantMatrices () const
 Whether or not matrices are constant. More...
 
void constantMatrices (bool cm)
 Set a flag to indicate whether or not we use constant matrices. More...
 
bool wereMatricesFormed () const
 Whether or not constant matrices were already formed. More...
 
void wereMatricesFormed (bool mf)
 Set a flag to indicate whether or not constant matrices were already formed. More...
 
Real formNorm ()
 Form the Bx norm. More...
 
bool bxNormProvided () const
 Whether a Bx norm postprocessor has been provided. More...
 
void setBxNorm (const PostprocessorName &bx_norm)
 Set the Bx norm postprocessor programatically. 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 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 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...
 
virtual const MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const=0
 Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs. More...
 
virtual MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
virtual MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
MooseVariableFieldBasegetActualFieldVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariableField which may be in any system. More...
 
virtual MooseVariablegetStandardVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariable which may be in any system. More...
 
virtual VectorMooseVariablegetVectorVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested VectorMooseVariable which may be in any system. More...
 
virtual ArrayMooseVariablegetArrayVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested ArrayMooseVariable which may be in any system. More...
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 Returns a Boolean indicating whether any system contains a variable with the name provided. More...
 
virtual MooseVariableScalargetScalarVariable (const THREAD_ID tid, const std::string &var_name) override
 Returns the scalar variable reference from whichever system contains it. More...
 
virtual 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
 
virtual Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) override
 
virtual const Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) const override
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems. More...
 
void initialSetup () override
 
void checkDuplicatePostprocessorVariableNames ()
 
void timestepSetup () override
 
void customSetup (const ExecFlagType &exec_type) override
 
void residualSetup () override
 
void jacobianSetup () override
 
virtual void prepare (const Elem *elem, const THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, const THREAD_ID tid) override
 
virtual void prepareFace (const Elem *elem, const THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, const THREAD_ID tid)
 
virtual void prepareAssembly (const THREAD_ID tid) override
 
virtual void addGhostedElem (dof_id_type elem_id) override
 Will make sure that all dofs connected to elem_id are ghosted to this processor. More...
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 Will make sure that all necessary elements from boundary_id are ghosted to this processor. More...
 
virtual void ghostGhostedBoundaries () override
 Causes the boundaries added using addGhostedBoundary to actually be ghosted. More...
 
virtual void sizeZeroes (unsigned int size, const THREAD_ID tid)
 
virtual bool reinitDirac (const Elem *elem, const THREAD_ID tid) override
 Returns true if the Problem has Dirac kernels it needs to compute on elem. More...
 
virtual void reinitElem (const Elem *elem, const THREAD_ID tid) override
 
virtual void reinitElemPhys (const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
 
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< SolverSystem >> &solver_systems)
 
virtual void initNullSpaceVectors (const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
 
void solveLinearSystem (const unsigned int linear_sys_num, const Moose::PetscSupport::PetscOptions *po=nullptr)
 Build and solve a linear system. More...
 
virtual void setException (const std::string &message)
 Set an exception, which is stored at this point by toggling a member variable in this class, and which must be followed up with by a call to checkExceptionAndStopSolve(). More...
 
virtual bool hasException ()
 Whether or not an exception has occurred. More...
 
virtual void checkExceptionAndStopSolve (bool print_message=true)
 Check to see if an exception has occurred on any processor and, if possible, force the solve to fail, which will result in the time step being cut. More...
 
virtual unsigned int nNonlinearIterations (const unsigned int nl_sys_num) const override
 
virtual unsigned int nLinearIterations (const unsigned int nl_sys_num) const override
 
virtual Real finalNonlinearResidual (const unsigned int nl_sys_num) const override
 
virtual bool computingPreSMOResidual (const unsigned int nl_sys_num) const override
 Returns true if the problem is in the process of computing it's initial residual. More...
 
virtual 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...
 
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)
 
LinearSystemgetLinearSystem (unsigned int sys_num)
 Get non-constant reference to a linear system. More...
 
const LinearSystemgetLinearSystem (unsigned int sys_num) const
 Get a constant reference to a linear system. More...
 
SolverSystemgetSolverSystem (unsigned int sys_num)
 Get non-constant reference to a solver system. More...
 
const SolverSystemgetSolverSystem (unsigned int sys_num) const
 Get a constant reference to a solver system. More...
 
void setCurrentLinearSystem (unsigned int sys_num)
 Set the current linear system pointer. More...
 
LinearSystemcurrentLinearSystem ()
 Get a non-constant reference to the current linear system. More...
 
const LinearSystemcurrentLinearSystem () const
 Get a constant reference to the current linear system. More...
 
virtual const SystemBasesystemBaseLinear (unsigned int sys_num) const override
 Get a constant base class reference to a linear system. More...
 
virtual SystemBasesystemBaseLinear (unsigned int sys_num) override
 Get a non-constant base class reference to a linear system. More...
 
virtual void addVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 Canonical method for adding a non-linear variable. More...
 
virtual void addKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void 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 addLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInterfaceKernel (const std::string &fv_ik_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 Add an initial condition for a finite volume variables. More...
 
void projectSolution ()
 
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 std::vector< std::shared_ptr< UserObject > > addUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects () const
 
template<class T >
T & getUserObject (const std::string &name, unsigned int tid=0) const
 Get the user object by its name. More...
 
const UserObjectgetUserObjectBase (const std::string &name, const THREAD_ID tid=0) const
 Get the user object by its name. More...
 
const PositionsgetPositionsObject (const std::string &name) const
 Get the Positions object by its name. More...
 
bool hasUserObject (const std::string &name) const
 Check if there if a user object of given name. More...
 
bool hasPostprocessorValueByName (const PostprocessorName &name) const
 Whether or not a Postprocessor value exists by a given name. More...
 
const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name, std::size_t t_index=0) const
 Get a read-only reference to the value associated with a Postprocessor that exists. More...
 
void setPostprocessorValueByName (const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
 Set the value of a PostprocessorValue. More...
 
bool hasPostprocessor (const std::string &name) const
 Deprecated. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, std::size_t t_index=0) const
 Get a read-only reference to the vector value associated with the VectorPostprocessor. More...
 
void setVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, const VectorPostprocessorValue &value, std::size_t t_index=0)
 Set the value of a VectorPostprocessor vector. More...
 
const VectorPostprocessorgetVectorPostprocessorObjectByName (const std::string &object_name, const THREAD_ID tid=0) const
 Return the VPP object given the name. More...
 
virtual void addDamper (const std::string &damper_name, const std::string &name, InputParameters &parameters)
 
void setupDampers ()
 
bool hasDampers ()
 Whether or not this system has dampers. More...
 
virtual void addIndicator (const std::string &indicator_name, const std::string &name, InputParameters &parameters)
 
virtual void addMarker (const std::string &marker_name, const std::string &name, InputParameters &parameters)
 
virtual void addMultiApp (const std::string &multi_app_name, const std::string &name, InputParameters &parameters)
 Add a MultiApp to the problem. More...
 
std::shared_ptr< MultiAppgetMultiApp (const std::string &multi_app_name) const
 Get a MultiApp object by name. More...
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, Transfer::DIRECTION direction) const
 Get Transfers by ExecFlagType and direction. More...
 
std::vector< std::shared_ptr< Transfer > > getTransfers (Transfer::DIRECTION direction) const
 
const ExecuteMooseObjectWarehouse< Transfer > & getMultiAppTransferWarehouse (Transfer::DIRECTION direction) const
 Return the complete warehouse for MultiAppTransfer object for the given direction. More...
 
void execMultiAppTransfers (ExecFlagType type, Transfer::DIRECTION direction)
 Execute MultiAppTransfers associated with execution flag and direction. More...
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 Execute the MultiApps associated with the ExecFlagType. More...
 
void finalizeMultiApps ()
 
void incrementMultiAppTStep (ExecFlagType type)
 Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType. More...
 
void advanceMultiApps (ExecFlagType type)
 Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose. More...
 
void finishMultiAppStep (ExecFlagType type, bool recurse_through_multiapp_levels=false)
 Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType. More...
 
void backupMultiApps (ExecFlagType type)
 Backup the MultiApps associated with the ExecFlagType. More...
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 Restore the MultiApps associated with the ExecFlagType. More...
 
Real computeMultiAppsDT (ExecFlagType type)
 Find the smallest timestep over all MultiApps. More...
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters &parameters)
 Add a Transfer to the problem. More...
 
void execTransfers (ExecFlagType type)
 Execute the Transfers associated with the ExecFlagType. More...
 
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 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 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 computeJacobianBlock (SparseMatrix< Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 Really not a good idea to use this. More...
 
void computeLinearSystemSys (LinearImplicitSystem &sys, SparseMatrix< Number > &system_matrix, NumericVector< Number > &rhs)
 Assemble both the right hand side and the system matrix of a given linear system. More...
 
void computeLinearSystemTags (const NumericVector< Number > &soln, SparseMatrix< Number > &system_matrix, NumericVector< Number > &rhs, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
 Assemble the current linear system given a set of vector and matrix tags. 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 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 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 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...
 
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 executeAllObjects (const ExecFlagType &exec_type)
 
virtual ExecutorgetExecutor (const std::string &name)
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 Call compute methods on UserObjects. More...
 
virtual void computeUserObjectByName (const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
 Compute an user object with the given name. More...
 
void needsPreviousNewtonIteration (bool state)
 Set a flag that indicated that user required values for the previous Newton iterate. More...
 
bool needsPreviousNewtonIteration () const
 Check to see whether we need to compute the variable values of the previous Newton iterate. More...
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 Reference to the control logic warehouse. More...
 
void executeControls (const ExecFlagType &exec_type)
 Performs setup and execute calls for Control objects. More...
 
void executeSamplers (const ExecFlagType &exec_type)
 Performs setup and execute calls for Sampler objects. More...
 
virtual void updateActiveObjects ()
 Update the active objects in the warehouses. More...
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 Register a MOOSE object dependency so we can either order operations properly or report when we cannot. More...
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
bool hasJacobian () const
 Returns _has_jacobian. More...
 
bool constJacobian () const
 Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the previous time it was computed) More...
 
void addOutput (const std::string &, const std::string &, InputParameters &)
 Adds an Output object. More...
 
TheWarehousetheWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 If or not to reuse the base vector for matrix-free calculation. More...
 
bool useSNESMFReuseBase ()
 Return a flag that indicates if we are reusing the vector base. More...
 
void skipExceptionCheck (bool skip_exception_check)
 Set a flag that indicates if we want to skip exception and stop solve. More...
 
bool isSNESMFReuseBaseSetbyUser ()
 Return a flag to indicate if _snesmf_reuse_base is set by users. More...
 
bool & petscOptionsInserted ()
 If PETSc options are already inserted. More...
 
PetscOptions & petscOptionsDatabase ()
 
virtual void setUDotRequested (const bool u_dot_requested)
 Set boolean flag to true to store solution time derivative. More...
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 Set boolean flag to true to store solution second time derivative. More...
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 Set boolean flag to true to store old solution time derivative. More...
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 Set boolean flag to true to store old solution second time derivative. More...
 
virtual bool uDotRequested ()
 Get boolean flag to check whether solution time derivative needs to be stored. More...
 
virtual bool uDotDotRequested ()
 Get boolean flag to check whether solution second time derivative needs to be stored. More...
 
virtual bool uDotOldRequested ()
 Get boolean flag to check whether old solution time derivative needs to be stored. More...
 
virtual bool uDotDotOldRequested ()
 Get boolean flag to check whether old solution second time derivative needs to be stored. More...
 
void haveADObjects (bool have_ad_objects) override
 Method for setting whether we have any ad objects. More...
 
virtual void haveADObjects (bool have_ad_objects)
 Method for setting whether we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
bool shouldSolve () const
 
const MortarDatamortarData () const
 Returns the mortar data object. More...
 
MortarDatamortarData ()
 
virtual bool hasNeighborCoupling () const
 Whether the simulation has neighbor coupling. More...
 
virtual bool hasMortarCoupling () const
 Whether the simulation has mortar coupling. More...
 
void computingNonlinearResid (bool computing_nonlinear_residual) final
 Set whether or not the problem is in the process of computing the nonlinear residual. More...
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual. More...
 
virtual void computingNonlinearResid (const bool computing_nonlinear_residual)
 Set whether or not the problem is in the process of computing the nonlinear residual. More...
 
bool computingNonlinearResid () const
 Returns true if the problem is in the process of computing the nonlinear residual. More...
 
void setCurrentlyComputingResidual (bool currently_computing_residual) final
 Set whether or not the problem is in the process of computing the residual. More...
 
void numGridSteps (unsigned int num_grid_steps)
 Set the number of steps in a grid sequences. More...
 
void uniformRefine ()
 uniformly refine the problem mesh(es). More...
 
void automaticScaling (bool automatic_scaling) override
 Automatic scaling setter. More...
 
virtual void automaticScaling (bool automatic_scaling)
 Automatic scaling setter. More...
 
bool automaticScaling () const
 Automatic scaling getter. More...
 
bool automaticScaling () const
 Automatic scaling getter. More...
 
virtual void reinitElemFaceRef (const Elem *elem, unsigned int side, 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 std::size_t numLinearSystems () const override
 
virtual std::size_t numSolverSystems () const override
 
bool isSolverSystemNonlinear (const unsigned int sys_num)
 Check if the solver system is nonlinear. More...
 
virtual unsigned int currentNlSysNum () const override
 
virtual unsigned int currentLinearSysNum () const override
 
virtual unsigned int nlSysNum (const NonlinearSystemName &nl_sys_name) const override
 
unsigned int linearSysNum (const LinearSystemName &linear_sys_name) const override
 
unsigned int solverSysNum (const SolverSystemName &solver_sys_name) const override
 
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 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
 
bool doingPRefinement () const
 
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...
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. More...
 
const bool & currentlyComputingResidual () const
 Returns true if the problem is in the process of computing the residual. More...
 
virtual bool 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 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...
 
virtual bool safeAccessTaggedMatrices () const
 Is it safe to access the tagged matrices. More...
 
virtual bool safeAccessTaggedVectors () const
 Is it safe to access the tagged vectors. More...
 
const std::set< TagID > & getActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
void addAlgebraicGhostingFunctor (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...
 
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 havePRefinement () const
 Query whether p-refinement has been requested at any point during the simulation. More...
 
template<typename T >
MooseVariableFEBasegetVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &systems, const SystemBase &aux) const
 
void _setCLIOption ()
 For Internal Use. More...
 
virtual void terminateSolve ()
 Allow objects to request clean termination of the solve. More...
 
virtual bool isSolveTerminationRequested () const
 Check of termination has been requested. More...
 
const ConsoleStreamconsole () const
 Return console handle. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 Get another shared pointer to this object that has the same ownership group. More...
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
virtual const std::string & name () const
 Get the name of the class. More...
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling. More...
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 Calls moose error with the message msg. More...
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 The unique parameter name of a valid parameter of this object for accessing parameter controls. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
MooseObjectName uniqueName () const
 The unique name for accessing input parameters of this object in the InputParameterWarehouse. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
bool isParamSetByUser (const std::string &nm) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type. More...
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError(). More...
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 Emits a documented error with object name and type. More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type. More...
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning(). More...
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
const Parallel::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...
 
static void selectMatrixTagsFromSystem (const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
 Select the matrix tags which belong to a specific system. More...
 
template<typename T >
static void objectSetupHelper (const std::vector< T *> &objects, const ExecFlagType &exec_flag)
 Helpers for calling the necessary setup/execute functions for the supplied objects. More...
 
template<typename T >
static void objectExecuteHelper (const std::vector< T *> &objects)
 

Public Attributes

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

Protected Member Functions

void createTagVectors ()
 Create extra tagged vectors and matrices. More...
 
void createTagSolutions ()
 Create extra tagged solution vectors. More...
 
void computeSystems (const ExecFlagType &type)
 Do generic system computations. 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

unsigned int _n_eigen_pairs_required
 
bool _generalized_eigenvalue_problem
 
std::shared_ptr< NonlinearEigenSystem_nl_eigen
 
bool _negative_sign_eigen_kernel
 Whether or not use negative sign for Bx. More...
 
unsigned int _active_eigen_index
 Which eigenvalue is used to compute residual. More...
 
bool _do_free_power_iteration
 Whether or not we are doing free power iteration. More...
 
bool _output_inverse_eigenvalue
 Whether or not output eigenvalue as its inverse. By default, we output regular eigenvalue. More...
 
bool _on_linear_solver
 Whether or not we are in linear solver. More...
 
bool _matrices_formed
 Whether or not matrices had been formed. More...
 
bool _constant_matrices
 Whether or not require constant matrices. More...
 
bool _has_normalization
 Whether or not we normalize eigenvector. More...
 
PostprocessorName _normalization
 Postprocessor used to compute a factor from eigenvector. More...
 
Real _normal_factor
 Postprocessor target value. More...
 
bool & _first_solve
 A flag to indicate if it is the first time calling the solve. More...
 
Real _initial_eigenvalue
 A value used for initial normalization. More...
 
MooseMesh_mesh
 
bool _initialized
 
std::set< TagID_fe_vector_tags
 
std::set< TagID_fe_matrix_tags
 
std::set< TagID_linear_vector_tags
 Temporary storage for filtered vector tags for linear systems. More...
 
std::set< TagID_linear_matrix_tags
 Temporary storage for filtered matrix tags for linear systems. More...
 
const bool & _solve
 Whether or not to actually solve the nonlinear system. More...
 
bool _transient
 
Real_time
 
Real_time_old
 
int_t_step
 
Real_dt
 
Real_dt_old
 
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< LinearSystemName > _linear_sys_names
 The linear system names. More...
 
const std::size_t _num_linear_sys
 The number of linear systems. More...
 
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
 The vector of linear systems. More...
 
std::map< LinearSystemName, unsigned int_linear_sys_name_to_num
 Map from linear system name to number. More...
 
LinearSystem_current_linear_sys
 The current linear system that we are solving. More...
 
const bool _using_default_nl
 Boolean to check if we have the default nonlinear system. More...
 
const std::vector< NonlinearSystemName > _nl_sys_names
 The nonlinear system names. More...
 
const std::size_t _num_nl_sys
 The number of nonlinear systems. More...
 
std::map< NonlinearSystemName, unsigned int_nl_sys_name_to_num
 Map from nonlinear system name to number. More...
 
NonlinearSystemBase_current_nl_sys
 The current nonlinear system that we are solving. More...
 
SolverSystem_current_solver_sys
 The current solver system. More...
 
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
 Combined container to base pointer of every solver system. More...
 
std::map< SolverVariableName, unsigned int_solver_var_to_sys_num
 Map connecting variable names with their respective solver systems. More...
 
std::map< SolverSystemName, unsigned int_solver_sys_name_to_num
 Map connecting solver system names with their respective systems. More...
 
std::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. 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 doFreeNonlinearPowerIterations (unsigned int free_power_iterations)
 Do some free/extra power iterations. More...
 
void adjustEigenVector (const Real value, bool scaling)
 Adjust eigen vector by either scaling the existing values or setting new values The operations are applied for only eigen variables. More...
 

Private Attributes

std::optional< PostprocessorName > _bx_norm_name
 The name of the Postprocessor providing the Bx norm. More...
 
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
 The nonlinear systems. More...
 

Detailed Description

Problem for solving eigenvalue problems.

Definition at line 21 of file EigenProblem.h.

Member Typedef Documentation

◆ DataFileParameterType

using DataFileInterface< MooseObject >::DataFileParameterType = DataFileName
inherited

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

Definition at line 26 of file DataFileInterface.h.

Constructor & Destructor Documentation

◆ EigenProblem()

EigenProblem::EigenProblem ( const InputParameters parameters)

Definition at line 50 of file EigenProblem.C.

52 #ifdef LIBMESH_HAVE_SLEPC
53  ,
54  // By default, we want to compute an eigenvalue only (smallest or largest)
57  _negative_sign_eigen_kernel(getParam<bool>("negative_sign_eigen_kernel")),
58  _active_eigen_index(getParam<unsigned int>("active_eigen_index")),
61  _on_linear_solver(false),
62  _matrices_formed(false),
63  _constant_matrices(false),
64  _has_normalization(false),
65  _normal_factor(1.0),
66  _first_solve(declareRestartableData<bool>("first_solve", true)),
67  _bx_norm_name(isParamValid("bx_norm")
68  ? std::make_optional(getParam<PostprocessorName>("bx_norm"))
69  : std::nullopt)
70 #endif
71 {
72 #ifdef LIBMESH_HAVE_SLEPC
73  if (_nl_sys_names.size() > 1)
74  paramError("nl_sys_names",
75  "eigen problems do not currently support multiple nonlinear eigen systems");
76 
77  for (const auto i : index_range(_nl_sys_names))
78  {
79  const auto & sys_name = _nl_sys_names[i];
80  auto & nl = _nl[i];
81  nl = std::make_shared<NonlinearEigenSystem>(*this, sys_name);
83  _current_nl_sys = nl.get();
85  }
86 
87  _aux = std::make_shared<AuxiliarySystem>(*this, "aux0");
88 
90 
92 
93  es().parameters.set<EigenProblem *>("_eigen_problem") = this;
94 #else
95  mooseError("Need to install SLEPc to solve eigenvalue problems, please reconfigure\n");
96 #endif /* LIBMESH_HAVE_SLEPC */
97 
98  // SLEPc older than 3.13.0 can not take initial guess from moose
99 #if PETSC_RELEASE_LESS_THAN(3, 13, 0)
101  "Please use SLEPc-3.13.0 or higher. Old versions of SLEPc likely produce bad convergence");
102 #endif
103  // Create extra vectors and matrices if any
105 
106  // Create extra solution vectors if any
108 }
109 
110 #ifdef LIBMESH_HAVE_SLEPC
111 void
113 {
114  switch (eigen_problem_type)
115  {
117  _nl_eigen->sys().set_eigenproblem_type(libMesh::HEP);
119  break;
120 
122  _nl_eigen->sys().set_eigenproblem_type(libMesh::NHEP);
124  break;
125 
127  _nl_eigen->sys().set_eigenproblem_type(libMesh::GHEP);
129  break;
130 
132  _nl_eigen->sys().set_eigenproblem_type(libMesh::GHIEP);
134  break;
135 
137  _nl_eigen->sys().set_eigenproblem_type(libMesh::GNHEP);
139  break;
140 
142  mooseError("libMesh does not support EPT_POS_GEN_NON_HERMITIAN currently \n");
143  break;
144 
147  break;
148 
149  default:
150  mooseError("Unknown eigen solver type \n");
151  }
152 }
Nonlinear eigenvalue system to be solved.
Generalized Non-Hermitian.
Definition: MooseTypes.h:789
bool _matrices_formed
Whether or not matrices had been formed.
Definition: EigenProblem.h:263
Generalized Hermitian indefinite.
Definition: MooseTypes.h:788
void mooseDeprecated(Args &&... args) const
bool _on_linear_solver
Whether or not we are in linear solver.
Definition: EigenProblem.h:261
virtual void newAssemblyArray(std::vector< std::shared_ptr< SolverSystem >> &solver_systems)
bool _has_normalization
Whether or not we normalize eigenvector.
Definition: EigenProblem.h:267
unsigned int _n_eigen_pairs_required
Definition: EigenProblem.h:243
bool _output_inverse_eigenvalue
Whether or not output eigenvalue as its inverse. By default, we output regular eigenvalue.
Definition: EigenProblem.h:259
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
use whatever SLPEC has by default
Definition: MooseTypes.h:791
bool _negative_sign_eigen_kernel
Whether or not use negative sign for Bx.
Definition: EigenProblem.h:249
bool _constant_matrices
Whether or not require constant matrices.
Definition: EigenProblem.h:265
Generalized Non-Hermitian with positive (semi-)definite B.
Definition: MooseTypes.h:790
FEProblemBase(const InputParameters &parameters)
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
bool _generalized_eigenvalue_problem
Definition: EigenProblem.h:244
virtual EquationSystems & es() override
bool _do_free_power_iteration
Whether or not we are doing free power iteration.
Definition: EigenProblem.h:257
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool & _first_solve
A flag to indicate if it is the first time calling the solve.
Definition: EigenProblem.h:274
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
void createTagSolutions()
Create extra tagged solution vectors.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void createTagVectors()
Create extra tagged vectors and matrices.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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 ...
unsigned int _active_eigen_index
Which eigenvalue is used to compute residual.
Definition: EigenProblem.h:252
virtual void initNullSpaceVectors(const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase >> &nl)
const std::vector< NonlinearSystemName > _nl_sys_names
The nonlinear system names.
Non-Hermitian.
Definition: MooseTypes.h:786
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
Real _normal_factor
Postprocessor target value.
Definition: EigenProblem.h:272
std::optional< PostprocessorName > _bx_norm_name
The name of the Postprocessor providing the Bx norm.
Definition: EigenProblem.h:292
Problem for solving eigenvalue problems.
Definition: EigenProblem.h:21
EigenProblemType
Type of the eigen problem.
Definition: MooseTypes.h:783
void setEigenproblemType(Moose::EigenProblemType eigen_problem_type)
Set eigen problem type.
auto index_range(const T &sizable)
Generalized Hermitian.
Definition: MooseTypes.h:787

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

◆ activeEigenvalueIndex()

unsigned int EigenProblem::activeEigenvalueIndex ( ) const
inline

Which eigenvalue is active.

Definition at line 179 of file EigenProblem.h.

Referenced by NonlinearEigenSystem::solve().

179 { return _active_eigen_index; }
unsigned int _active_eigen_index
Which eigenvalue is used to compute residual.
Definition: EigenProblem.h:252

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inlineinherited

◆ adaptMesh()

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

Reimplemented in DumpObjectsProblem.

Definition at line 7426 of file FEProblemBase.C.

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

7427 {
7428  // reset cycle counter
7429  _cycles_completed = 0;
7430 
7432  return false;
7433 
7434  TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
7435 
7436  unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
7437 
7438  bool mesh_changed = false;
7439 
7440  for (unsigned int i = 0; i < cycles_per_step; ++i)
7441  {
7444  mooseError("HFEM does not support mesh adaptivity currently.");
7445 
7446  // Markers were already computed once by Executioner
7447  if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
7448  computeMarkers();
7449 
7450  bool mesh_changed_this_step;
7451  mesh_changed_this_step = _adaptivity.adaptMesh();
7452 
7453  if (mesh_changed_this_step)
7454  {
7455  mesh_changed = true;
7456 
7457  meshChangedHelper(true); // This may be an intermediate change
7459  }
7460  else
7461  {
7462  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7463  break;
7464  }
7465 
7466  // Show adaptivity progress
7467  _console << std::flush;
7468  }
7469 
7470  // We're done with all intermediate changes; now get systems ready
7471  // for real if necessary.
7472  if (mesh_changed)
7473  es().reinit_systems();
7474 
7475  return mesh_changed;
7476 }
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:2922

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

987 {
988  EquationSystems & eq = es();
989  const auto n_sys = eq.n_systems();
990  if (!n_sys)
991  return;
992 
993  eq.get_system(0).get_dof_map().add_algebraic_ghosting_functor(algebraic_gf, to_mesh);
994  cloneAlgebraicGhostingFunctor(algebraic_gf, to_mesh);
995 }
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:964

◆ addAuxArrayVariable()

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

Definition at line 2808 of file FEProblemBase.C.

2812 {
2813  parallel_object_only();
2814 
2815  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2816 
2817  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2818  return;
2819 
2820  InputParameters params = _factory.getValidParams("ArrayMooseVariable");
2821  params.set<FEProblemBase *>("_fe_problem_base") = this;
2823  params.set<MooseEnum>("order") = type.order.get_order();
2824  params.set<MooseEnum>("family") = Moose::stringify(type.family);
2825  params.set<unsigned int>("components") = components;
2826 
2827  if (active_subdomains)
2828  for (const SubdomainID & id : *active_subdomains)
2829  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2830 
2831  logAdd("Variable", var_name, "ArrayMooseVariable");
2832  _aux->addVariable("ArrayMooseVariable", var_name, params);
2833  if (_displaced_problem)
2834  _displaced_problem->addAuxVariable("ArrayMooseVariable", var_name, params);
2835 }
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:1012
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:51
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 
)
virtualinherited

Definition at line 2872 of file FEProblemBase.C.

2875 {
2876  parallel_object_only();
2877 
2878  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2879  {
2880  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2881  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
2882  parameters.set<SystemBase *>("_nl_sys") = &_displaced_problem->solverSys(0);
2883  if (!parameters.get<std::vector<BoundaryName>>("boundary").empty())
2884  _reinit_displaced_face = true;
2885  else
2886  _reinit_displaced_elem = true;
2887  }
2888  else
2889  {
2890  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2891  {
2892  // We allow AuxKernels to request that they use_displaced_mesh,
2893  // but then be overridden when no displacements variables are
2894  // provided in the Mesh block. If that happened, update the value
2895  // of use_displaced_mesh appropriately for this AuxKernel.
2896  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2897  parameters.set<bool>("use_displaced_mesh") = false;
2898  }
2899 
2900  parameters.set<SubProblem *>("_subproblem") = this;
2901  parameters.set<SystemBase *>("_sys") = _aux.get();
2902  parameters.set<SystemBase *>("_nl_sys") = _solver_systems[0].get();
2903  }
2904 
2905  logAdd("AuxKernel", name, kernel_name);
2906  _aux->addKernel(kernel_name, name, parameters);
2907 }
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.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Definition at line 2910 of file FEProblemBase.C.

2913 {
2914  parallel_object_only();
2915 
2916  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2917  {
2918  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2919  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
2920  }
2921  else
2922  {
2923  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2924  {
2925  // We allow AuxScalarKernels to request that they use_displaced_mesh,
2926  // but then be overridden when no displacements variables are
2927  // provided in the Mesh block. If that happened, update the value
2928  // of use_displaced_mesh appropriately for this AuxScalarKernel.
2929  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2930  parameters.set<bool>("use_displaced_mesh") = false;
2931  }
2932 
2933  parameters.set<SubProblem *>("_subproblem") = this;
2934  parameters.set<SystemBase *>("_sys") = _aux.get();
2935  }
2936 
2937  logAdd("AuxScalarKernel", name, kernel_name);
2938  _aux->addScalarKernel(kernel_name, name, parameters);
2939 }
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:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Definition at line 2838 of file FEProblemBase.C.

2842 {
2843  parallel_object_only();
2844 
2845  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2846 
2847  if (order > _max_scalar_order)
2848  _max_scalar_order = order;
2849 
2850  FEType type(order, SCALAR);
2851  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2852  return;
2853 
2854  InputParameters params = _factory.getValidParams("MooseVariableScalar");
2855  params.set<FEProblemBase *>("_fe_problem_base") = this;
2857 
2858  params.set<MooseEnum>("order") = type.order.get_order();
2859  params.set<MooseEnum>("family") = "SCALAR";
2860  params.set<std::vector<Real>>("scaling") = {1};
2861  if (active_subdomains)
2862  for (const SubdomainID & id : *active_subdomains)
2863  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2864 
2865  logAdd("ScalarVariable", var_name, "MooseVariableScalar");
2866  _aux->addVariable("MooseVariableScalar", var_name, params);
2867  if (_displaced_problem)
2868  _displaced_problem->addAuxVariable("MooseVariableScalar", var_name, params);
2869 }
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:1012
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:51
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 
)
virtualinherited

Canonical method for adding an auxiliary variable.

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

Definition at line 2746 of file FEProblemBase.C.

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

2749 {
2750  parallel_object_only();
2751 
2752  auto fe_type = FEType(Utility::string_to_enum<Order>(params.get<MooseEnum>("order")),
2753  Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family")));
2754 
2755  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ true))
2756  return;
2757 
2758  params.set<FEProblemBase *>("_fe_problem_base") = this;
2760 
2761  logAdd("AuxVariable", var_name, var_type);
2762  _aux->addVariable(var_type, var_name, params);
2763  if (_displaced_problem)
2764  // MooseObjects need to be unique so change the name here
2765  _displaced_problem->addAuxVariable(var_type, var_name, params);
2766 }
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 
)
virtualinherited

Definition at line 2769 of file FEProblemBase.C.

2772 {
2773  parallel_object_only();
2774 
2775  mooseDeprecated("Please use the addAuxVariable(var_type, var_name, params) API instead");
2776 
2777  if (duplicateVariableCheck(var_name, type, /* is_aux = */ true))
2778  return;
2779 
2780  std::string var_type;
2781  if (type == FEType(0, MONOMIAL))
2782  var_type = "MooseVariableConstMonomial";
2783  else if (type.family == SCALAR)
2784  var_type = "MooseVariableScalar";
2785  else if (type.family == LAGRANGE_VEC || type.family == NEDELEC_ONE ||
2786  type.family == MONOMIAL_VEC || type.family == RAVIART_THOMAS)
2787  var_type = "VectorMooseVariable";
2788  else
2789  var_type = "MooseVariable";
2790 
2791  InputParameters params = _factory.getValidParams(var_type);
2792  params.set<FEProblemBase *>("_fe_problem_base") = this;
2794  params.set<MooseEnum>("order") = type.order.get_order();
2795  params.set<MooseEnum>("family") = Moose::stringify(type.family);
2796 
2797  if (active_subdomains)
2798  for (const SubdomainID & id : *active_subdomains)
2799  params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
2800 
2801  logAdd("AuxVariable", var_name, var_type);
2802  _aux->addVariable(var_type, var_name, params);
2803  if (_displaced_problem)
2804  _displaced_problem->addAuxVariable("MooseVariable", var_name, params);
2805 }
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:1012
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:51
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 
)
virtualinherited

Definition at line 2654 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEBCs().

2657 {
2658  parallel_object_only();
2659 
2660  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2661  if (!isSolverSystemNonlinear(nl_sys_num))
2662  mooseError(
2663  "You are trying to add a BoundaryCondition to a linear variable/system, which is not "
2664  "supported at the moment!");
2665 
2666  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2667  {
2668  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2669  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2670  _reinit_displaced_face = true;
2671  }
2672  else
2673  {
2674  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2675  {
2676  // We allow Materials to request that they use_displaced_mesh,
2677  // but then be overridden when no displacements variables are
2678  // provided in the Mesh block. If that happened, update the value
2679  // of use_displaced_mesh appropriately for this Material.
2680  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2681  parameters.set<bool>("use_displaced_mesh") = false;
2682  }
2683 
2684  parameters.set<SubProblem *>("_subproblem") = this;
2685  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2686  }
2687 
2688  logAdd("BoundaryCondition", name, bc_name);
2689  _nl[nl_sys_num]->addBoundaryCondition(bc_name, name, parameters);
2690 }
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 isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( const THREAD_ID  tid)
overridevirtualinherited

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( const THREAD_ID  tid)
overridevirtualinherited

◆ addCachedResidualDirectly()

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

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

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

Definition at line 1682 of file FEProblemBase.C.

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

1683 {
1685  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1687 
1689  _assembly[tid][_current_nl_sys->number()]->addCachedResidualDirectly(
1691 
1692  // We do this because by adding the cached residual directly, we cannot ensure that all of the
1693  // cached residuals are emptied after only the two add calls above
1694  _assembly[tid][_current_nl_sys->number()]->clearCachedResiduals(Assembly::GlobalDataKey{});
1695 
1696  if (_displaced_problem)
1697  _displaced_problem->addCachedResidualDirectly(residual, tid);
1698 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:880
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:1132
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:139
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 
)
virtualinherited

Definition at line 2693 of file FEProblemBase.C.

2696 {
2697  parallel_object_only();
2698 
2699  _has_constraints = true;
2700 
2701  auto determine_var_param_name = [&parameters, this]()
2702  {
2703  if (parameters.isParamValid("variable"))
2704  return "variable";
2705  else
2706  {
2707  // must be a mortar constraint
2708  const bool has_secondary_var = parameters.isParamValid("secondary_variable");
2709  const bool has_primary_var = parameters.isParamValid("primary_variable");
2710  if (!has_secondary_var && !has_primary_var)
2711  mooseError(
2712  "Either a 'secondary_variable' or 'primary_variable' parameter must be supplied for '",
2713  parameters.get<std::string>("_object_name"),
2714  "'");
2715  return has_secondary_var ? "secondary_variable" : "primary_variable";
2716  }
2717  };
2718 
2719  const auto nl_sys_num =
2720  determineSolverSystem(parameters.varName(determine_var_param_name(), name), true).second;
2721  if (!isSolverSystemNonlinear(nl_sys_num))
2722  mooseError("You are trying to add a Constraint to a linear variable/system, which is not "
2723  "supported at the moment!");
2724 
2725  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2726  {
2727  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2728  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2729  _reinit_displaced_face = true;
2730  }
2731  else
2732  {
2733  // It might _want_ to use a displaced mesh... but we're not so set it to false
2734  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2735  parameters.set<bool>("use_displaced_mesh") = false;
2736 
2737  parameters.set<SubProblem *>("_subproblem") = this;
2738  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2739  }
2740 
2741  logAdd("Constraint", name, c_name);
2742  _nl[nl_sys_num]->addConstraint(c_name, name, parameters);
2743 }
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 isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.
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 706 of file SubProblem.C.

Referenced by MaterialPropertyInterface::addConsumedPropertyName().

707 {
708  _consumed_material_properties[obj_name].insert(prop_name);
709 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1152

◆ addCouplingGhostingFunctor()

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

Add a coupling functor to this problem's DofMaps.

Definition at line 1019 of file SubProblem.C.

1020 {
1021  const auto num_nl_sys = numNonlinearSystems();
1022  if (!num_nl_sys)
1023  return;
1024 
1025  systemBaseNonlinear(0).system().get_dof_map().add_coupling_functor(coupling_gf, to_mesh);
1026  cloneCouplingGhostingFunctor(coupling_gf, to_mesh);
1027 }
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:998
virtual std::size_t numNonlinearSystems() const =0

◆ addDamper()

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

Definition at line 4716 of file FEProblemBase.C.

4719 {
4720  parallel_object_only();
4721 
4722  const auto nl_sys_num =
4723  parameters.isParamValid("variable")
4724  ? determineSolverSystem(parameters.varName("variable", name), true).second
4725  : (unsigned int)0;
4726 
4727  if (!isSolverSystemNonlinear(nl_sys_num))
4728  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
4729  "supported at the moment!");
4730 
4731  parameters.set<SubProblem *>("_subproblem") = this;
4732  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
4733 
4734  _has_dampers = true;
4735  logAdd("Damper", name, damper_name);
4736  _nl[nl_sys_num]->addDamper(damper_name, name, parameters);
4737 }
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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.
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 
)
virtualinherited

Definition at line 2982 of file FEProblemBase.C.

2985 {
2986  parallel_object_only();
2987 
2988  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2989  if (!isSolverSystemNonlinear(nl_sys_num))
2990  mooseError("You are trying to add a DGKernel to a linear variable/system, which is not "
2991  "supported at the moment!");
2992 
2993  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2994  {
2995  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2996  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2998  }
2999  else
3000  {
3001  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3002  {
3003  // We allow DGKernels to request that they use_displaced_mesh,
3004  // but then be overridden when no displacements variables are
3005  // provided in the Mesh block. If that happened, update the value
3006  // of use_displaced_mesh appropriately for this DGKernel.
3007  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3008  parameters.set<bool>("use_displaced_mesh") = false;
3009  }
3010 
3011  parameters.set<SubProblem *>("_subproblem") = this;
3012  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3013  }
3014 
3015  logAdd("DGKernel", name, dg_kernel_name);
3016  _nl[nl_sys_num]->addDGKernel(dg_kernel_name, name, parameters);
3017 
3019 }
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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addDiracKernel()

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

Definition at line 2942 of file FEProblemBase.C.

2945 {
2946  parallel_object_only();
2947 
2948  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2949  if (!isSolverSystemNonlinear(nl_sys_num))
2950  mooseError("You are trying to add a DiracKernel to a linear variable/system, which is not "
2951  "supported at the moment!");
2952 
2953  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2954  {
2955  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2956  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2957  _reinit_displaced_elem = true;
2958  }
2959  else
2960  {
2961  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2962  {
2963  // We allow DiracKernels to request that they use_displaced_mesh,
2964  // but then be overridden when no displacements variables are
2965  // provided in the Mesh block. If that happened, update the value
2966  // of use_displaced_mesh appropriately for this DiracKernel.
2967  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2968  parameters.set<bool>("use_displaced_mesh") = false;
2969  }
2970 
2971  parameters.set<SubProblem *>("_subproblem") = this;
2972  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2973  }
2974 
2975  logAdd("DiracKernel", name, kernel_name);
2976  _nl[nl_sys_num]->addDiracKernel(kernel_name, name, parameters);
2977 }
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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.

◆ addDisplacedProblem()

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

Definition at line 7240 of file FEProblemBase.C.

7241 {
7242  parallel_object_only();
7243 
7244  _displaced_mesh = &displaced_problem->mesh();
7245  _displaced_problem = displaced_problem;
7246 }
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ addDistribution()

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

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

Definition at line 2402 of file FEProblemBase.C.

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

◆ addFunction()

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

Definition at line 2280 of file FEProblemBase.C.

Referenced by FEProblemBase::getFunction().

2283 {
2284  parallel_object_only();
2285 
2286  parameters.set<SubProblem *>("_subproblem") = this;
2287 
2288  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2289  {
2290  std::shared_ptr<Function> func = _factory.create<Function>(type, name, parameters, tid);
2291  logAdd("Function", name, type);
2292  _functions.addObject(func, tid);
2293 
2294  if (auto * const functor = dynamic_cast<Moose::FunctorBase<Real> *>(func.get()))
2295  {
2296  this->addFunctor(name, *functor, tid);
2297  if (_displaced_problem)
2298  _displaced_problem->addFunctor(name, *functor, tid);
2299  }
2300  else
2301  mooseError("Unrecognized function functor type");
2302  }
2303 }
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:1012
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)
Definition: Factory.C:110
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:1332
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
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 1332 of file SubProblem.h.

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

1335 {
1336  constexpr bool added_functor_is_ad =
1337  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1338 
1339  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1340 
1341  auto & functor_to_request_info = _functor_to_request_info[tid];
1342  auto & functors = _functors[tid];
1343  auto it = functors.find("wraps_" + name);
1344  if (it != functors.end())
1345  {
1346  // We have this functor already. If it's a null functor, we want to replace it with the valid
1347  // functor we have now. If it's not then we'll add a new entry into the multimap and then we'll
1348  // error later if a user requests a functor because their request is ambiguous. This is the
1349  // reason that the functors container is a multimap: for nice error messages
1350  auto * const existing_wrapper_base =
1351  added_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get();
1352  auto * const existing_wrapper = dynamic_cast<Moose::Functor<T> *>(existing_wrapper_base);
1353  if (existing_wrapper && existing_wrapper->template wrapsType<Moose::NullFunctor<T>>())
1354  {
1355  // Sanity check
1356  auto [request_info_it, request_info_end_it] = functor_to_request_info.equal_range(name);
1357  if (request_info_it == request_info_end_it)
1358  mooseError("We are wrapping a NullFunctor but we don't have any unfilled functor request "
1359  "info. This doesn't make sense.");
1360 
1361  // Check for valid requests
1362  while (request_info_it != request_info_end_it)
1363  {
1364  auto & [requested_functor_is_ad, requestor_is_ad] = request_info_it->second;
1365  if (!requested_functor_is_ad && requestor_is_ad && added_functor_is_ad)
1366  mooseError("We are requesting a non-AD functor from an AD object, but the true functor "
1367  "is AD. This means we could be dropping important derivatives. We will not "
1368  "allow this");
1369  // We're going to eventually check whether we've fulfilled all functor requests and our
1370  // check will be that the multimap is empty. This request is fulfilled, so erase it from the
1371  // map now
1372  request_info_it = functor_to_request_info.erase(request_info_it);
1373  }
1374 
1375  // Ok we didn't have the functor before, so we will add it now
1376  std::get<0>(it->second) =
1378  existing_wrapper->assign(functor);
1379  // Finally we create the non-AD or AD complement of the just added functor
1380  if constexpr (added_functor_is_ad)
1381  {
1382  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1383  auto * const existing_non_ad_wrapper_base = std::get<1>(it->second).get();
1384  auto * const existing_non_ad_wrapper =
1385  dynamic_cast<Moose::Functor<NonADType> *>(existing_non_ad_wrapper_base);
1386  mooseAssert(existing_non_ad_wrapper->template wrapsType<Moose::NullFunctor<NonADType>>(),
1387  "Both members of pair should have been wrapping a NullFunctor");
1388  existing_non_ad_wrapper->assign(
1389  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1390  }
1391  else
1392  {
1393  typedef typename Moose::ADType<T>::type ADType;
1394  auto * const existing_ad_wrapper_base = std::get<2>(it->second).get();
1395  auto * const existing_ad_wrapper =
1396  dynamic_cast<Moose::Functor<ADType> *>(existing_ad_wrapper_base);
1397  mooseAssert(existing_ad_wrapper->template wrapsType<Moose::NullFunctor<ADType>>(),
1398  "Both members of pair should have been wrapping a NullFunctor");
1399  existing_ad_wrapper->assign(std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1400  }
1401  return;
1402  }
1403  }
1404 
1405  // We are a new functor, create the opposite ADType one and store it with other functors
1406  if constexpr (added_functor_is_ad)
1407  {
1408  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1409  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<NonADType>>(
1410  std::make_unique<Moose::RawValueFunctor<NonADType>>(functor));
1411  auto new_ad_wrapper = std::make_unique<Moose::Functor<T>>(functor);
1412  _functors[tid].emplace("wraps_" + name,
1413  std::make_tuple(SubProblem::TrueFunctorIs::AD,
1414  std::move(new_non_ad_wrapper),
1415  std::move(new_ad_wrapper)));
1416  }
1417  else
1418  {
1419  typedef typename Moose::ADType<T>::type ADType;
1420  auto new_non_ad_wrapper = std::make_unique<Moose::Functor<T>>((functor));
1421  auto new_ad_wrapper = std::make_unique<Moose::Functor<ADType>>(
1422  std::make_unique<Moose::ADWrapperFunctor<ADType>>(functor));
1423  _functors[tid].emplace("wraps_" + name,
1424  std::make_tuple(SubProblem::TrueFunctorIs::NONAD,
1425  std::move(new_non_ad_wrapper),
1426  std::move(new_ad_wrapper)));
1427  }
1428 }
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:57
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
A multimap (for each thread) from unfilled functor requests to whether the requests were for AD funct...
Definition: SubProblem.h:1128
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:1111
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 
)
inherited

Definition at line 3414 of file FEProblemBase.C.

3417 {
3418  parallel_object_only();
3419 
3420  auto add_functor_materials = [&](const auto & parameters, const auto & name)
3421  {
3422  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3423  {
3424  // Create the general Block/Boundary MaterialBase object
3425  std::shared_ptr<MaterialBase> material =
3426  _factory.create<MaterialBase>(functor_material_name, name, parameters, tid);
3427  logAdd("FunctorMaterial", name, functor_material_name);
3428  _all_materials.addObject(material, tid);
3429  _materials.addObject(material, tid);
3430  }
3431  };
3432 
3433  parameters.set<SubProblem *>("_subproblem") = this;
3434  add_functor_materials(parameters, name);
3435  if (_displaced_problem)
3436  {
3437  auto disp_params = parameters;
3438  disp_params.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3439  add_functor_materials(disp_params, name + "_displaced");
3440  }
3441 }
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:1012
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)
Definition: Factory.C:110
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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 
)
virtualinherited

Definition at line 3036 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVBCs().

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

◆ addFVInitialCondition()

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

Add an initial condition for a finite volume variables.

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

Definition at line 3205 of file FEProblemBase.C.

3208 {
3209  parallel_object_only();
3210 
3211  // before we start to mess with the initial condition, we need to check parameters for errors.
3213  const std::string & var_name = parameters.get<VariableName>("variable");
3214 
3215  // Forbid initial conditions on a restarted problem, as they would override the restart
3216  checkICRestartError(ic_name, name, var_name);
3217 
3218  parameters.set<SubProblem *>("_subproblem") = this;
3219 
3220  // field IC
3221  if (hasVariable(var_name))
3222  {
3223  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3224  {
3225  auto & var = getVariable(
3227  parameters.set<SystemBase *>("_sys") = &var.sys();
3228  std::shared_ptr<FVInitialConditionBase> ic;
3229  if (var.isFV())
3230  ic = _factory.create<FVInitialCondition>(ic_name, name, parameters, tid);
3231  else
3232  mooseError(
3233  "Your variable for an FVInitialCondition needs to be an a finite volume variable!");
3234  _fv_ics.addObject(ic, tid);
3235  }
3236  }
3237  else
3238  mooseError("Variable '",
3239  var_name,
3240  "' requested in finite volume initial condition '",
3241  name,
3242  "' does not exist.");
3243 }
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:1012
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)
Definition: Factory.C:110
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
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 
)
virtualinherited

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

Definition at line 3044 of file FEProblemBase.C.

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

◆ addFVKernel()

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

Definition at line 3022 of file FEProblemBase.C.

Referenced by DiffusionFV::addFVKernels().

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

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 1884 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedBoundary().

1885 {
1886  _mesh.addGhostedBoundary(boundary_id);
1887  if (_displaced_problem)
1888  _displaced_mesh->addGhostedBoundary(boundary_id);
1889 }
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:2980
MooseMesh * _displaced_mesh

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 1877 of file FEProblemBase.C.

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

1878 {
1879  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
1880  _ghosted_elems.insert(elem_id);
1881 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1063
MooseMesh & _mesh
processor_id_type processor_id() const

◆ addIndicator()

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

Definition at line 4747 of file FEProblemBase.C.

4750 {
4751  parallel_object_only();
4752 
4753  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4754  {
4755  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4756  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4757  _reinit_displaced_elem = true;
4758  }
4759  else
4760  {
4761  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4762  {
4763  // We allow Indicators to request that they use_displaced_mesh,
4764  // but then be overridden when no displacements variables are
4765  // provided in the Mesh block. If that happened, update the value
4766  // of use_displaced_mesh appropriately for this Indicator.
4767  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4768  parameters.set<bool>("use_displaced_mesh") = false;
4769  }
4770 
4771  parameters.set<SubProblem *>("_subproblem") = this;
4772  parameters.set<SystemBase *>("_sys") = _aux.get();
4773  }
4774 
4775  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4776  {
4777  std::shared_ptr<Indicator> indicator =
4778  _factory.create<Indicator>(indicator_name, name, parameters, tid);
4779  logAdd("Indicator", name, indicator_name);
4780  std::shared_ptr<InternalSideIndicator> isi =
4782  if (isi)
4784  else
4785  _indicators.addObject(indicator, tid);
4786  }
4787 }
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:1012
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)
Definition: Factory.C:110
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:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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 
)
virtualinherited

Definition at line 3145 of file FEProblemBase.C.

3148 {
3149  parallel_object_only();
3150 
3151  // before we start to mess with the initial condition, we need to check parameters for errors.
3153  const std::string & var_name = parameters.get<VariableName>("variable");
3154 
3155  // Forbid initial conditions on a restarted problem, as they would override the restart
3156  checkICRestartError(ic_name, name, var_name);
3157 
3158  parameters.set<SubProblem *>("_subproblem") = this;
3159 
3160  // field IC
3161  if (hasVariable(var_name))
3162  {
3163  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
3164  {
3167  parameters.set<SystemBase *>("_sys") = &var.sys();
3168  std::shared_ptr<InitialConditionBase> ic;
3169  if (dynamic_cast<MooseVariable *>(&var))
3170  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3171  else if (dynamic_cast<VectorMooseVariable *>(&var))
3172  ic = _factory.create<VectorInitialCondition>(ic_name, name, parameters, tid);
3173  else if (dynamic_cast<ArrayMooseVariable *>(&var))
3174  ic = _factory.create<ArrayInitialCondition>(ic_name, name, parameters, tid);
3175  else if (dynamic_cast<MooseVariableFVReal *>(&var))
3176  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3177  else if (dynamic_cast<MooseLinearVariableFVReal *>(&var))
3178  ic = _factory.create<InitialCondition>(ic_name, name, parameters, tid);
3179  else
3180  mooseError("Your FE variable in initial condition ",
3181  name,
3182  " must be either of scalar or vector type");
3183  logAdd("IC", name, ic_name);
3184  _ics.addObject(ic, tid);
3185  }
3186  }
3187 
3188  // scalar IC
3189  else if (hasScalarVariable(var_name))
3190  {
3191  MooseVariableScalar & var = getScalarVariable(0, var_name);
3192  parameters.set<SystemBase *>("_sys") = &var.sys();
3193  std::shared_ptr<ScalarInitialCondition> ic =
3195  logAdd("ScalarIC", name, ic_name);
3196  _scalar_ics.addObject(ic);
3197  }
3198 
3199  else
3200  mooseError(
3201  "Variable '", var_name, "' requested in initial condition '", name, "' does not exist.");
3202 }
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:1012
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)
Definition: Factory.C:110
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:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
ScalarInitialConditionWarehouse _scalar_ics
virtual 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 
)
virtualinherited

Definition at line 3073 of file FEProblemBase.C.

3076 {
3077  parallel_object_only();
3078 
3079  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
3080  if (!isSolverSystemNonlinear(nl_sys_num))
3081  mooseError("You are trying to add a InterfaceKernel to a linear variable/system, which is not "
3082  "supported at the moment!");
3083 
3084  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3085  {
3086  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3087  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
3089  }
3090  else
3091  {
3092  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3093  {
3094  // We allow InterfaceKernels to request that they use_displaced_mesh,
3095  // but then be overridden when no displacements variables are
3096  // provided in the Mesh block. If that happened, update the value
3097  // of use_displaced_mesh appropriately for this InterfaceKernel.
3098  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3099  parameters.set<bool>("use_displaced_mesh") = false;
3100  }
3101 
3102  parameters.set<SubProblem *>("_subproblem") = this;
3103  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
3104  }
3105 
3106  logAdd("InterfaceKernel", name, interface_kernel_name);
3107  _nl[nl_sys_num]->addInterfaceKernel(interface_kernel_name, name, parameters);
3108 
3110 }
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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.
bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ addInterfaceMaterial()

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

Definition at line 3452 of file FEProblemBase.C.

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

◆ addJacobian()

void FEProblemBase::addJacobian ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1721 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1722 {
1723  _assembly[tid][_current_nl_sys->number()]->addJacobian(Assembly::GlobalDataKey{});
1725  _assembly[tid][_current_nl_sys->number()]->addJacobianNonlocal(Assembly::GlobalDataKey{});
1726  if (_displaced_problem)
1727  {
1728  _displaced_problem->addJacobian(tid);
1730  _displaced_problem->addJacobianNonlocal(tid);
1731  }
1732 }
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:1132
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 
)
virtualinherited

Definition at line 1796 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

1803 {
1804  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockTags(
1805  jacobian, ivar, jvar, dof_map, dof_indices, Assembly::GlobalDataKey{}, tags);
1806 
1808  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
1809  {
1810  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1811  _assembly[tid][_current_nl_sys->number()]->addJacobianBlockNonlocalTags(
1812  jacobian,
1813  ivar,
1814  jvar,
1815  dof_map,
1816  dof_indices,
1817  jv.allDofIndices(),
1819  tags);
1820  }
1821 
1822  if (_displaced_problem)
1823  {
1824  _displaced_problem->addJacobianBlockTags(jacobian, ivar, jvar, dof_map, dof_indices, tags, tid);
1826  if (_nonlocal_cm[_current_nl_sys->number()](ivar, jvar) != 0)
1827  {
1828  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1829  _displaced_problem->addJacobianBlockNonlocal(
1830  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tags, tid);
1831  }
1832  }
1833 }
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:1014
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:1132
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:86
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ addJacobianLowerD()

void FEProblemBase::addJacobianLowerD ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1751 of file FEProblemBase.C.

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

1752 {
1753  _assembly[tid][_current_nl_sys->number()]->addJacobianLowerD(Assembly::GlobalDataKey{});
1754  if (_displaced_problem)
1755  _displaced_problem->addJacobianLowerD(tid);
1756 }
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:1132
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)
overridevirtualinherited

Implements SubProblem.

Definition at line 1735 of file FEProblemBase.C.

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

1736 {
1737  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighbor(Assembly::GlobalDataKey{});
1738  if (_displaced_problem)
1739  _displaced_problem->addJacobianNeighbor(tid);
1740 }
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:1132
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1836 of file FEProblemBase.C.

1844 {
1845  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborTags(jacobian,
1846  ivar,
1847  jvar,
1848  dof_map,
1849  dof_indices,
1850  neighbor_dof_indices,
1852  tags);
1853  if (_displaced_problem)
1854  _displaced_problem->addJacobianNeighbor(
1855  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, tags, tid);
1856 }
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:1132
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)
overridevirtualinherited

Implements SubProblem.

Definition at line 1743 of file FEProblemBase.C.

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

1744 {
1745  _assembly[tid][_current_nl_sys->number()]->addJacobianNeighborLowerD(Assembly::GlobalDataKey{});
1746  if (_displaced_problem)
1747  _displaced_problem->addJacobianNeighborLowerD(tid);
1748 }
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:1132
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 
)
virtualinherited

Definition at line 1765 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1766 {
1767  _assembly[tid][_current_nl_sys->number()]->addJacobianOffDiagScalar(ivar,
1769 }
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:1132
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)
virtualinherited

Definition at line 1759 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1760 {
1761  _assembly[tid][_current_nl_sys->number()]->addJacobianScalar(Assembly::GlobalDataKey{});
1762 }
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:1132
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 
)
virtualinherited

Definition at line 2546 of file FEProblemBase.C.

Referenced by DiffusionCG::addFEKernels().

2549 {
2550  parallel_object_only();
2551 
2552  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2553  if (!isSolverSystemNonlinear(nl_sys_num))
2554  mooseError("You are trying to add a Kernel to a linear variable/system, which is not "
2555  "supported at the moment!");
2556 
2557  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2558  {
2559  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2560  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2561  _reinit_displaced_elem = true;
2562  }
2563  else
2564  {
2565  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2566  {
2567  // We allow Kernels to request that they use_displaced_mesh,
2568  // but then be overridden when no displacements variables are
2569  // provided in the Mesh block. If that happened, update the value
2570  // of use_displaced_mesh appropriately for this Kernel.
2571  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2572  parameters.set<bool>("use_displaced_mesh") = false;
2573  }
2574 
2575  parameters.set<SubProblem *>("_subproblem") = this;
2576  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2577  }
2578 
2579  logAdd("Kernel", name, kernel_name);
2580  _nl[nl_sys_num]->addKernel(kernel_name, name, parameters);
2581 }
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.
bool isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.

◆ addLinearFVBC()

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

Definition at line 3063 of file FEProblemBase.C.

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

◆ addLinearFVKernel()

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

Definition at line 3055 of file FEProblemBase.C.

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

◆ addLineSearch()

virtual void FEProblemBase::addLineSearch ( const InputParameters )
inlinevirtualinherited

add a MOOSE line search

Reimplemented in DumpObjectsProblem, and FEProblem.

Definition at line 630 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

631  {
632  mooseError("Line search not implemented for this problem type yet.");
633  }
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 
)
virtualinherited

Definition at line 4790 of file FEProblemBase.C.

4793 {
4794  parallel_object_only();
4795 
4796  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4797  {
4798  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4799  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4800  _reinit_displaced_elem = true;
4801  }
4802  else
4803  {
4804  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4805  {
4806  // We allow Markers to request that they use_displaced_mesh,
4807  // but then be overridden when no displacements variables are
4808  // provided in the Mesh block. If that happened, update the value
4809  // of use_displaced_mesh appropriately for this Marker.
4810  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4811  parameters.set<bool>("use_displaced_mesh") = false;
4812  }
4813 
4814  parameters.set<SubProblem *>("_subproblem") = this;
4815  parameters.set<SystemBase *>("_sys") = _aux.get();
4816  }
4817 
4818  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4819  {
4820  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
4821  logAdd("Marker", name, marker_name);
4822  _markers.addObject(marker, tid);
4823  }
4824 }
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:1012
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)
Definition: Factory.C:110
Definition: Marker.h:35
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Definition at line 3444 of file FEProblemBase.C.

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

◆ addMaterialHelper()

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

Definition at line 3460 of file FEProblemBase.C.

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

3464 {
3465  parallel_object_only();
3466 
3467  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3468  {
3469  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3471  }
3472  else
3473  {
3474  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
3475  {
3476  // We allow Materials to request that they use_displaced_mesh,
3477  // but then be overridden when no displacements variables are
3478  // provided in the Mesh block. If that happened, update the value
3479  // of use_displaced_mesh appropriately for this Material.
3480  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3481  parameters.set<bool>("use_displaced_mesh") = false;
3482  }
3483 
3484  parameters.set<SubProblem *>("_subproblem") = this;
3485  }
3486 
3487  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3488  {
3489  // Create the general Block/Boundary MaterialBase object
3490  std::shared_ptr<MaterialBase> material =
3491  _factory.create<MaterialBase>(mat_name, name, parameters, tid);
3492  logAdd("Material", name, mat_name);
3493  bool discrete = !material->getParam<bool>("compute");
3494 
3495  // If the object is boundary restricted or if it is a functor material we do not create the
3496  // neighbor and face objects
3497  if (material->boundaryRestricted() || dynamic_cast<FunctorMaterial *>(material.get()))
3498  {
3499  _all_materials.addObject(material, tid);
3500  if (discrete)
3501  _discrete_materials.addObject(material, tid);
3502  else
3503  for (auto && warehouse : warehouses)
3504  warehouse->addObject(material, tid);
3505  }
3506 
3507  // Non-boundary restricted require face and neighbor objects
3508  else
3509  {
3510  // TODO: we only need to do this if we have needs for face materials (e.g.
3511  // FV, DG, etc.) - but currently we always do it. Figure out how to fix
3512  // this.
3513 
3514  // The name of the object being created, this is changed multiple times as objects are
3515  // created below
3516  std::string object_name;
3517 
3518  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
3519  // used from a previous tid loop
3520  InputParameters current_parameters = parameters;
3521 
3522  // face material
3523  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3525  object_name = name + "_face";
3526  std::shared_ptr<MaterialBase> face_material =
3527  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3528 
3529  // neighbor material
3530  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
3532  current_parameters.set<bool>("_neighbor") = true;
3533  object_name = name + "_neighbor";
3534  std::shared_ptr<MaterialBase> neighbor_material =
3535  _factory.create<MaterialBase>(mat_name, object_name, current_parameters, tid);
3536 
3537  // Store the material objects
3538  _all_materials.addObjects(material, neighbor_material, face_material, tid);
3539 
3540  if (discrete)
3541  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
3542  else
3543  for (auto && warehouse : warehouses)
3544  warehouse->addObjects(material, neighbor_material, face_material, tid);
3545 
3546  // Names of all controllable parameters for this Material object
3547  const std::string & base = parameters.get<std::string>("_moose_base");
3548  MooseObjectParameterName name(MooseObjectName(base, material->name()), "*");
3549  const auto param_names =
3551 
3552  // Connect parameters of the primary Material object to those on the face and neighbor
3553  // objects
3554  for (const auto & p_name : param_names)
3555  {
3556  MooseObjectParameterName primary_name(MooseObjectName(base, material->name()),
3557  p_name.parameter());
3558  MooseObjectParameterName face_name(MooseObjectName(base, face_material->name()),
3559  p_name.parameter());
3560  MooseObjectParameterName neighbor_name(MooseObjectName(base, neighbor_material->name()),
3561  p_name.parameter());
3563  primary_name, face_name, false);
3565  primary_name, neighbor_name, false);
3566  }
3567  }
3568  }
3569 }
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:1012
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:2225
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)
Definition: Factory.C:110
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::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:84
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
MaterialWarehouse _discrete_materials
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 289 of file SubProblem.C.

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

290 {
291  auto tag_name_upper = MooseUtils::toUpper(tag_name);
292  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
293  if (existing_tag == _matrix_tag_name_to_tag_id.end())
294  {
295  auto tag_id = _matrix_tag_name_to_tag_id.size();
296 
297  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
298 
299  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
300  }
301 
302  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
303 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1006
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1040
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1009

◆ addMeshDivision()

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

Add a MeshDivision.

Definition at line 2357 of file FEProblemBase.C.

2360 {
2361  parallel_object_only();
2362  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
2363  parameters.set<SubProblem *>("_subproblem") = this;
2364  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2365  {
2366  std::shared_ptr<MeshDivision> func = _factory.create<MeshDivision>(type, name, parameters, tid);
2367  _mesh_divisions.addObject(func, tid);
2368  }
2369 }
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1012
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)
Definition: Factory.C:110
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MooseObjectWarehouse< MeshDivision > _mesh_divisions
Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the ...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Add a MultiApp to the problem.

Definition at line 4827 of file FEProblemBase.C.

4830 {
4831  parallel_object_only();
4832 
4833  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
4834  parameters.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
4835 
4836  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
4837  {
4838  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
4839  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
4840  _reinit_displaced_elem = true;
4841  }
4842  else
4843  {
4844  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
4845  {
4846  // We allow MultiApps to request that they use_displaced_mesh,
4847  // but then be overridden when no displacements variables are
4848  // provided in the Mesh block. If that happened, update the value
4849  // of use_displaced_mesh appropriately for this MultiApp.
4850  if (parameters.have_parameter<bool>("use_displaced_mesh"))
4851  parameters.set<bool>("use_displaced_mesh") = false;
4852  }
4853 
4854  parameters.set<SubProblem *>("_subproblem") = this;
4855  parameters.set<SystemBase *>("_sys") = _aux.get();
4856  }
4857 
4858  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
4859  logAdd("MultiApp", name, multi_app_name);
4860  multi_app->setupPositions();
4861 
4862  _multi_apps.addObject(multi_app);
4863 
4864  // Store TransientMultiApp objects in another container, this is needed for calling computeDT
4865  std::shared_ptr<TransientMultiApp> trans_multi_app =
4867  if (trans_multi_app)
4868  _transient_multi_apps.addObject(trans_multi_app);
4869 }
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:1012
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:413
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:110
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:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Definition at line 2584 of file FEProblemBase.C.

2587 {
2588  parallel_object_only();
2589 
2590  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2591  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2592  {
2593  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2594  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2595  _reinit_displaced_elem = true;
2596  }
2597  else
2598  {
2599  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2600  {
2601  // We allow NodalKernels to request that they use_displaced_mesh,
2602  // but then be overridden when no displacements variables are
2603  // provided in the Mesh block. If that happened, update the value
2604  // of use_displaced_mesh appropriately for this NodalKernel.
2605  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2606  parameters.set<bool>("use_displaced_mesh") = false;
2607  }
2608 
2609  parameters.set<SubProblem *>("_subproblem") = this;
2610  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2611  }
2612  logAdd("NodalKernel", name, kernel_name);
2613  _nl[nl_sys_num]->addNodalKernel(kernel_name, name, parameters);
2614 }
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.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
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" 
)
inherited

Method for creating and adding an object to the warehouse.

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

Definition at line 2834 of file FEProblemBase.h.

2839 {
2840  parallel_object_only();
2841 
2842  logAdd(MooseUtils::prettyCppType<T>(), name, type);
2843  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
2844  addObjectParamsHelper(parameters, name, var_param_name);
2845 
2846  const auto n_threads = threaded ? libMesh::n_threads() : 1;
2847  std::vector<std::shared_ptr<T>> objects(n_threads);
2848  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
2849  {
2850  std::shared_ptr<T> obj = _factory.create<T>(type, name, parameters, tid);
2851  theWarehouse().add(obj);
2852  objects[tid] = std::move(obj);
2853  }
2854 
2855  return objects;
2856 }
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:1012
unsigned int n_threads()
void add(std::shared_ptr< MooseObject > obj)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
Definition: TheWarehouse.C:116
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:110
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void addObjectParamsHelper(InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
Helper for setting the "_subproblem" and "_sys" parameters in addObject() and in addUserObject().
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ addObjectParamsHelper()

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

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

This is needed due to header includes/forward declaration issues

Definition at line 3799 of file FEProblemBase.C.

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

3802 {
3803  const auto solver_sys_num =
3804  parameters.isParamValid(var_param_name) &&
3805  determineSolverSystem(parameters.varName(var_param_name, object_name)).first
3806  ? determineSolverSystem(parameters.varName(var_param_name, object_name)).second
3807  : (unsigned int)0;
3808 
3809  if (_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
3810  parameters.get<bool>("use_displaced_mesh"))
3811  {
3812  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3813  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(solver_sys_num);
3814  }
3815  else
3816  {
3817  // The object requested use_displaced_mesh, but it was overridden
3818  // due to there being no displacements variables in the [Mesh] block.
3819  // If that happened, update the value of use_displaced_mesh appropriately.
3820  if (!_displaced_problem && parameters.have_parameter<bool>("use_displaced_mesh") &&
3821  parameters.get<bool>("use_displaced_mesh"))
3822  parameters.set<bool>("use_displaced_mesh") = false;
3823 
3824  parameters.set<SubProblem *>("_subproblem") = this;
3825  parameters.set<SystemBase *>("_sys") = _solver_systems[solver_sys_num].get();
3826  }
3827 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:85
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::shared_ptr< DisplacedProblem > _displaced_problem
const InputParameters & parameters() const
Get the parameters of the object.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ addOutput()

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

Adds an Output object.

Definition at line 8296 of file FEProblemBase.C.

8299 {
8300  parallel_object_only();
8301 
8302  // Get a reference to the OutputWarehouse
8303  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
8304 
8305  // Reject the reserved names for objects not built by MOOSE
8306  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
8307  mooseError("The name '", object_name, "' is a reserved name for output objects");
8308 
8309  // Check that an object by the same name does not already exist; this must be done before the
8310  // object is created to avoid getting misleading errors from the Parser
8311  if (output_warehouse.hasOutput(object_name))
8312  mooseError("An output object named '", object_name, "' already exists");
8313 
8314  // Add a pointer to the FEProblemBase class
8315  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
8316 
8317  // Create common parameter exclude list
8318  std::vector<std::string> exclude;
8319  if (object_type == "Console")
8320  {
8321  exclude.push_back("execute_on");
8322 
8323  // --show-input should enable the display of the input file on the screen
8324  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
8325  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
8326  }
8327  // Need this because Checkpoint::validParams changes the default value of
8328  // execute_on
8329  else if (object_type == "Checkpoint")
8330  exclude.push_back("execute_on");
8331 
8332  // Apply the common parameters loaded with Outputs input syntax
8333  const InputParameters * common = output_warehouse.getCommonParameters();
8334  if (common)
8335  parameters.applyParameters(*common, exclude);
8336 
8337  // Set the correct value for the binary flag for XDA/XDR output
8338  if (object_type == "XDR")
8339  parameters.set<bool>("_binary") = true;
8340  else if (object_type == "XDA")
8341  parameters.set<bool>("_binary") = false;
8342 
8343  // Adjust the checkpoint suffix if auto recovery was enabled
8344  if (object_name == "auto_recovery_checkpoint")
8345  parameters.set<std::string>("suffix") = "auto_recovery";
8346 
8347  // Create the object and add it to the warehouse
8348  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
8349  logAdd("Output", object_name, object_type);
8350  output_warehouse.addOutput(output);
8351 }
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:1012
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)
Definition: Factory.C:110
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...
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
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:84
Class for storing and utilizing output objects.
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:1465
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:1773
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 1295 of file SubProblem.h.

Referenced by FunctorMaterial::addFunctorPropertyByBlocks().

1301 {
1302  auto & pbblf_functors = _pbblf_functors[tid];
1303 
1304  auto [it, first_time_added] =
1305  pbblf_functors.emplace(name,
1306  std::make_unique<PiecewiseByBlockLambdaFunctor<T>>(
1307  name, my_lammy, clearance_schedule, mesh, block_ids));
1308 
1309  auto * functor = dynamic_cast<PiecewiseByBlockLambdaFunctor<T> *>(it->second.get());
1310  if (!functor)
1311  {
1312  if (first_time_added)
1313  mooseError("This should be impossible. If this was the first time we added the functor, then "
1314  "the dynamic cast absolutely should have succeeded");
1315  else
1316  mooseError("Attempted to add a lambda functor with the name '",
1317  name,
1318  "' but another lambda functor of that name returns a different type");
1319  }
1320 
1321  if (first_time_added)
1322  addFunctor(name, *functor, tid);
1323  else
1324  // The functor already exists
1325  functor->setFunctor(mesh, block_ids, my_lammy);
1326 
1327  return *functor;
1328 }
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:1332
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
Container to hold PiecewiseByBlockLambdaFunctors.
Definition: SubProblem.h:1114
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ addPostprocessor()

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

Definition at line 3830 of file FEProblemBase.C.

3833 {
3834  // Check for name collision
3835  if (hasUserObject(name))
3836  mooseError("A UserObject with the name \"",
3837  name,
3838  "\" already exists. You may not add a Postprocessor by the same name.");
3839 
3840  addUserObject(pp_name, name, parameters);
3841 }
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addPredictor()

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

Definition at line 6284 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

6287 {
6288  parallel_object_only();
6289 
6291  mooseError("Vector bounds cannot be used with LinearSystems!");
6292 
6293  parameters.set<SubProblem *>("_subproblem") = this;
6294  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
6295  logAdd("Predictor", name, type);
6296 
6297  for (auto & nl : _nl)
6298  nl->setPredictor(predictor);
6299 }
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:1012
virtual std::size_t numNonlinearSystems() const override
Base class for predictors.
Definition: Predictor.h:28
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:110
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.
virtual std::size_t numLinearSystems() const override

◆ addReporter()

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

Add a Reporter object to the simulation.

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

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

Definition at line 3858 of file FEProblemBase.C.

Referenced by MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer().

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

◆ addResidual()

void FEProblemBase::addResidual ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1621 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1622 {
1623  _assembly[tid][_current_nl_sys->number()]->addResidual(Assembly::GlobalDataKey{},
1625 
1626  if (_displaced_problem)
1627  _displaced_problem->addResidual(tid);
1628 }
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:1132
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)
overridevirtualinherited

Implements SubProblem.

Definition at line 1641 of file FEProblemBase.C.

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

1642 {
1643  _assembly[tid][_current_nl_sys->number()]->addResidualLower(Assembly::GlobalDataKey{},
1645 
1646  if (_displaced_problem)
1647  _displaced_problem->addResidualLower(tid);
1648 }
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:1132
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)
overridevirtualinherited

Implements SubProblem.

Definition at line 1631 of file FEProblemBase.C.

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

1632 {
1633  _assembly[tid][_current_nl_sys->number()]->addResidualNeighbor(Assembly::GlobalDataKey{},
1635 
1636  if (_displaced_problem)
1637  _displaced_problem->addResidualNeighbor(tid);
1638 }
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:1132
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)
virtualinherited

Definition at line 1651 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

1652 {
1653  _assembly[tid][_current_nl_sys->number()]->addResidualScalar(Assembly::GlobalDataKey{},
1655 }
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:1132
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 
)
virtualinherited

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

Definition at line 2425 of file FEProblemBase.C.

2428 {
2429  const auto samplers = addObject<Sampler>(type, name, parameters);
2430  for (auto & sampler : samplers)
2431  sampler->init();
2432 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const InputParameters & parameters() const
Get the parameters of the object.

◆ addScalarKernel()

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

Definition at line 2617 of file FEProblemBase.C.

2620 {
2621  parallel_object_only();
2622 
2623  const auto nl_sys_num = determineSolverSystem(parameters.varName("variable", name), true).second;
2624  if (!isSolverSystemNonlinear(nl_sys_num))
2625  mooseError("You are trying to add a ScalarKernel to a linear variable/system, which is not "
2626  "supported at the moment!");
2627 
2628  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
2629  {
2630  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2631  parameters.set<SystemBase *>("_sys") = &_displaced_problem->solverSys(nl_sys_num);
2632  }
2633  else
2634  {
2635  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
2636  {
2637  // We allow ScalarKernels to request that they use_displaced_mesh,
2638  // but then be overridden when no displacements variables are
2639  // provided in the Mesh block. If that happened, update the value
2640  // of use_displaced_mesh appropriately for this ScalarKernel.
2641  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2642  parameters.set<bool>("use_displaced_mesh") = false;
2643  }
2644 
2645  parameters.set<SubProblem *>("_subproblem") = this;
2646  parameters.set<SystemBase *>("_sys") = _nl[nl_sys_num].get();
2647  }
2648 
2649  logAdd("ScalarKernel", name, kernel_name);
2650  _nl[nl_sys_num]->addScalarKernel(kernel_name, name, parameters);
2651 }
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 isSolverSystemNonlinear(const unsigned int sys_num)
Check if the solver system is nonlinear.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string varName(const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
Determine the actual variable name from the given variable parameter name.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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.

◆ addTimeIntegrator()

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

Definition at line 6253 of file FEProblemBase.C.

Referenced by Transient::setupTimeIntegrator().

6256 {
6257  parallel_object_only();
6258 
6259  parameters.set<SubProblem *>("_subproblem") = this;
6260  logAdd("TimeIntegrator", name, type);
6261  _aux->addTimeIntegrator(type, name + ":aux", parameters);
6262  for (auto & sys : _solver_systems)
6263  sys->addTimeIntegrator(type, name + ":" + sys->name(), parameters);
6264  _has_time_integrator = true;
6265 
6266  // add vectors to store u_dot, u_dotdot, udot_old, u_dotdot_old and
6267  // solution vectors older than 2 time steps, if requested by the time
6268  // integrator
6269  _aux->addDotVectors();
6270  for (auto & nl : _nl)
6271  {
6272  nl->addDotVectors();
6273 
6274  auto tag_udot = nl->getTimeIntegrator()->uDotFactorTag();
6275  if (!nl->hasVector(tag_udot))
6276  nl->associateVectorToTag(*nl->solutionUDot(), tag_udot);
6277  auto tag_udotdot = nl->getTimeIntegrator()->uDotDotFactorTag();
6278  if (!nl->hasVector(tag_udotdot) && uDotDotRequested())
6279  nl->associateVectorToTag(*nl->solutionUDotDot(), tag_udotdot);
6280  }
6281 }
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.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h: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 
)
virtualinherited

Add a Transfer to the problem.

Definition at line 5174 of file FEProblemBase.C.

5177 {
5178  parallel_object_only();
5179 
5180  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
5181  {
5182  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
5183  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
5184  _reinit_displaced_elem = true;
5185  }
5186  else
5187  {
5188  if (_displaced_problem == nullptr && parameters.get<bool>("use_displaced_mesh"))
5189  {
5190  // We allow Transfers to request that they use_displaced_mesh,
5191  // but then be overridden when no displacements variables are
5192  // provided in the Mesh block. If that happened, update the value
5193  // of use_displaced_mesh appropriately for this Transfer.
5194  if (parameters.have_parameter<bool>("use_displaced_mesh"))
5195  parameters.set<bool>("use_displaced_mesh") = false;
5196  }
5197 
5198  parameters.set<SubProblem *>("_subproblem") = this;
5199  parameters.set<SystemBase *>("_sys") = _aux.get();
5200  }
5201 
5202  // Handle the "SAME_AS_MULTIAPP" execute option. The get method is used to test for the
5203  // flag so the set by user flag is not reset, calling set with the true flag causes the set
5204  // by user status to be reset, which should only be done if the EXEC_SAME_AS_MULTIAPP is
5205  // being applied to the object.
5207  {
5208  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
5209  std::shared_ptr<MultiApp> multiapp;
5210  if (parameters.isParamValid("multi_app"))
5211  multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
5212  else if (parameters.isParamValid("from_multi_app"))
5213  multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
5214  else if (parameters.isParamValid("to_multi_app"))
5215  multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
5216  // else do nothing because the user has provided invalid input. They should get a nice error
5217  // about this during transfer construction. This necessitates checking for null in this next
5218  // line, however
5219  if (multiapp)
5220  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
5221  }
5222 
5223  // Create the Transfer objects
5224  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
5225  logAdd("Transfer", name, transfer_name);
5226 
5227  // Add MultiAppTransfer object
5228  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
5230  if (multi_app_transfer)
5231  {
5232  if (multi_app_transfer->directions().contains(MultiAppTransfer::TO_MULTIAPP))
5233  _to_multi_app_transfers.addObject(multi_app_transfer);
5234  if (multi_app_transfer->directions().contains(MultiAppTransfer::FROM_MULTIAPP))
5235  _from_multi_app_transfers.addObject(multi_app_transfer);
5236  if (multi_app_transfer->directions().contains(MultiAppTransfer::BETWEEN_MULTIAPP))
5237  _between_multi_app_transfers.addObject(multi_app_transfer);
5238  }
5239  else
5240  _transfers.addObject(transfer);
5241 }
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:1012
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:110
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:85
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
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()

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

Definition at line 3871 of file FEProblemBase.C.

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

3874 {
3875  parallel_object_only();
3876 
3877  std::vector<std::shared_ptr<UserObject>> uos;
3878 
3879  // Add the _subproblem and _sys parameters depending on use_displaced_mesh
3881 
3882  for (const auto tid : make_range(libMesh::n_threads()))
3883  {
3884  // Create the UserObject
3885  std::shared_ptr<UserObject> user_object =
3886  _factory.create<UserObject>(user_object_name, name, parameters, tid);
3887  logAdd("UserObject", name, user_object_name);
3888  uos.push_back(user_object);
3889 
3890  if (tid != 0)
3891  user_object->setPrimaryThreadCopy(uos[0].get());
3892 
3893  // TODO: delete this line after apps have been updated to not call getUserObjects
3894  _all_user_objects.addObject(user_object, tid);
3895 
3896  theWarehouse().add(user_object);
3897 
3898  // Attempt to create all the possible UserObject types
3899  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
3900  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
3901  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
3902  auto iuob = std::dynamic_pointer_cast<InterfaceUserObjectBase>(user_object);
3903  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
3904  auto duo = std::dynamic_pointer_cast<DomainUserObject>(user_object);
3905  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
3906  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
3907  auto muo = std::dynamic_pointer_cast<MortarUserObject>(user_object);
3908 
3909  // Account for displaced mesh use
3910  if (_displaced_problem && parameters.get<bool>("use_displaced_mesh"))
3911  {
3912  if (euo || nuo || duo)
3913  _reinit_displaced_elem = true;
3914  else if (suo)
3915  // shouldn't we add isuo
3916  _reinit_displaced_face = true;
3917  else if (iuob)
3919  }
3920 
3921  // These objects only require one thread
3922  if ((guo && !tguo) || muo)
3923  break;
3924  }
3925 
3926  // Add as a Functor if it is one
3927  // At the timing of adding this, this is only Postprocessors... but technically it
3928  // should enable any UO that is a Real Functor to be used as one
3929  // The ternary operator used in getting the functor is there because some UOs
3930  // are threaded and some are not. When a UO is not threaded, we need to add
3931  // the functor from thread 0 as the registered functor for all threads
3932  for (const auto tid : make_range(libMesh::n_threads()))
3933  if (const auto functor =
3934  dynamic_cast<Moose::FunctorBase<Real> *>(uos[uos.size() == 1 ? 0 : tid].get()))
3935  {
3936  this->addFunctor(name, *functor, tid);
3937  if (_displaced_problem)
3938  _displaced_problem->addFunctor(name, *functor, tid);
3939  }
3940 
3941  return uos;
3942 }
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:1012
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)
Definition: Factory.C:110
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:1332
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Base class for user objects executed one or more sidesets, which may be on the outer boundary of the ...
This user object allows related evaluations on elements, boundaries, internal sides, interfaces in one single place.
Base class for creating new nodally-based mortar user objects.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
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 
)
virtualinherited

Canonical method for adding a non-linear variable.

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

Definition at line 2491 of file FEProblemBase.C.

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

2494 {
2495  parallel_object_only();
2496 
2497  auto fe_type = FEType(Utility::string_to_enum<Order>(params.get<MooseEnum>("order")),
2498  Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family")));
2499 
2500  if (duplicateVariableCheck(var_name, fe_type, /* is_aux = */ false))
2501  return;
2502 
2503  logAdd("Variable", var_name, var_type);
2504 
2505  params.set<FEProblemBase *>("_fe_problem_base") = this;
2506  params.set<Moose::VarKindType>("_var_kind") = Moose::VarKindType::VAR_SOLVER;
2507  SolverSystemName sys_name = params.get<SolverSystemName>("solver_sys");
2508 
2509  const auto solver_system_number = solverSysNum(sys_name);
2510  _solver_systems[solver_system_number]->addVariable(var_type, var_name, params);
2511  if (_displaced_problem)
2512  // MooseObjects need to be unique so change the name here
2513  _displaced_problem->addVariable(var_type, var_name, params, solver_system_number);
2514 
2515  _solver_var_to_sys_num[var_name] = solver_system_number;
2516 }
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.
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
Map connecting variable names with their respective solver systems.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
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
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ addVectorPostprocessor()

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

Definition at line 3844 of file FEProblemBase.C.

Referenced by ExtraIDIntegralReporter::ExtraIDIntegralReporter().

3847 {
3848  // Check for name collision
3849  if (hasUserObject(name))
3850  mooseError("A UserObject with the name \"",
3851  name,
3852  "\" already exists. You may not add a VectorPostprocessor by the same name.");
3853 
3854  addUserObject(pp_name, name, parameters);
3855 }
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.

◆ addVectorTag()

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

Create a Tag.

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

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

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

Reimplemented in DisplacedProblem.

Definition at line 82 of file SubProblem.C.

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

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

◆ adjustEigenVector()

void EigenProblem::adjustEigenVector ( const Real  value,
bool  scaling 
)
private

Adjust eigen vector by either scaling the existing values or setting new values The operations are applied for only eigen variables.

Definition at line 378 of file EigenProblem.C.

Referenced by initEigenvector(), and scaleEigenvector().

379 {
380  std::vector<VariableName> var_names = getVariableNames();
381  for (auto & vn : var_names)
382  {
383  MooseVariableBase * var = nullptr;
384  if (hasScalarVariable(vn))
385  var = &getScalarVariable(0, vn);
386  else
387  var = &getVariable(0, vn);
388  // Do operations for only eigen variable
389  if (var->eigen())
390  for (unsigned int vc = 0; vc < var->count(); ++vc)
391  {
392  std::set<dof_id_type> var_indices;
393  _nl_eigen->system().local_dof_indices(var->number() + vc, var_indices);
394  for (const auto & dof : var_indices)
395  _nl_eigen->solution().set(dof, scaling ? (_nl_eigen->solution()(dof) * value) : value);
396  }
397  }
398 
399  _nl_eigen->solution().close();
400  _nl_eigen->update();
401 }
unsigned int number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
virtual 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...
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
bool eigen() const
Whether or not this variable operates on an eigen kernel.
virtual std::vector< VariableName > getVariableNames()
Returns a list of all the variables in the problem (both from the NL and Aux systems.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inlineinherited

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

Definition at line 1221 of file FEProblemBase.h.

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

◆ advanceState()

void FEProblemBase::advanceState ( )
virtualinherited

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

Reimplemented in DumpObjectsProblem.

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

6122 {
6123  TIME_SECTION("advanceState", 5, "Advancing State");
6124 
6125  for (auto & nl : _nl)
6126  nl->copyOldSolutions();
6127  _aux->copyOldSolutions();
6128 
6129  if (_displaced_problem)
6130  {
6131  for (const auto i : index_range(_nl))
6132  _displaced_problem->solverSys(i).copyOldSolutions();
6133  _displaced_problem->auxSys().copyOldSolutions();
6134  }
6135 
6137 
6140 
6143 
6146 }
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
inlineinherited

Whether or not the invalid solutions are allowed.

Definition at line 1794 of file FEProblemBase.h.

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

1794 { return _allow_invalid_solution; }
const bool & _allow_invalid_solution

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)
inherited

Ability to enable/disable all output calls.

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

Definition at line 6199 of file FEProblemBase.C.

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

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

◆ allowOutput() [2/2]

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

Definition at line 2785 of file FEProblemBase.h.

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

◆ areCoupled()

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

Definition at line 5712 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

5715 {
5716  return (*_cm[nl_sys])(ivar, jvar);
5717 }
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 271 of file SubProblem.h.

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

272  {
273  return var_name + "_" + std::to_string(i);
274  }

◆ assembly() [1/2]

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

Implements SubProblem.

Definition at line 2933 of file FEProblemBase.h.

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

2934 {
2935  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
2936  mooseAssert(sys_num < _assembly[tid].size(),
2937  "System number larger than the assembly container size");
2938  return *_assembly[tid][sys_num];
2939 }
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ assembly() [2/2]

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

Implements SubProblem.

Definition at line 2942 of file FEProblemBase.h.

2943 {
2944  mooseAssert(tid < _assembly.size(), "Assembly objects not initialized");
2945  mooseAssert(sys_num < _assembly[tid].size(),
2946  "System number larger than the assembly container size");
2947  return *_assembly[tid][sys_num];
2948 }
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 1119 of file SubProblem.C.

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

1120 {
1121  // Currently going to assume that we are applying or not applying automatic scaling consistently
1122  // across nonlinear systems
1124 }
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:123

◆ automaticScaling() [2/4]

void SubProblem::automaticScaling
inherited

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 1112 of file SubProblem.C.

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

◆ automaticScaling() [3/4]

bool SubProblem::automaticScaling
inherited

Automatic scaling getter.

Returns
A boolean representing whether we are performing automatic scaling

Definition at line 1119 of file SubProblem.C.

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

◆ automaticScaling() [4/4]

void FEProblemBase::automaticScaling ( bool  automatic_scaling)
overridevirtualinherited

Automatic scaling setter.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Reimplemented from SubProblem.

Definition at line 8436 of file FEProblemBase.C.

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

8437 {
8438  if (_displaced_problem)
8439  _displaced_problem->automaticScaling(automatic_scaling);
8440 
8441  SubProblem::automaticScaling(automatic_scaling);
8442 }
bool automaticScaling() const
Automatic scaling getter.
Definition: SubProblem.C:1119
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)
inherited

Backup the MultiApps associated with the ExecFlagType.

Definition at line 5095 of file FEProblemBase.C.

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

5096 {
5097  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5098 
5099  if (multi_apps.size())
5100  {
5101  TIME_SECTION("backupMultiApps", 5, "Backing Up MultiApp");
5102 
5103  if (_verbose_multiapps)
5104  _console << COLOR_CYAN << "\nBacking Up MultiApps on " << type.name() << COLOR_DEFAULT
5105  << std::endl;
5106 
5107  for (const auto & multi_app : multi_apps)
5108  multi_app->backup();
5109 
5111 
5112  if (_verbose_multiapps)
5113  _console << COLOR_CYAN << "Finished Backing Up MultiApps on " << type.name() << "\n"
5114  << COLOR_DEFAULT << std::endl;
5115  }
5116 }
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:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ bumpAllQRuleOrder()

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

Definition at line 5569 of file FEProblemBase.C.

5570 {
5571  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5572  for (const auto i : index_range(_nl))
5573  _assembly[tid][i]->bumpAllQRuleOrder(order, block);
5574 
5575  if (_displaced_problem)
5576  _displaced_problem->bumpAllQRuleOrder(order, block);
5577 
5578  updateMaxQps();
5579 }
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 
)
inherited

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

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

Definition at line 5556 of file FEProblemBase.C.

5557 {
5558  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5559  for (const auto i : index_range(_nl))
5560  _assembly[tid][i]->bumpVolumeQRuleOrder(order, block);
5561 
5562  if (_displaced_problem)
5563  _displaced_problem->bumpVolumeQRuleOrder(order, block);
5564 
5565  updateMaxQps();
5566 }
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)

◆ bxNormProvided()

bool EigenProblem::bxNormProvided ( ) const
inline

Whether a Bx norm postprocessor has been provided.

Definition at line 235 of file EigenProblem.h.

Referenced by Moose::SlepcSupport::attachCallbacksToMat(), preScaleEigenVector(), and Moose::SlepcSupport::slepcSetOptions().

235 { return _bx_norm_name.has_value(); }
std::optional< PostprocessorName > _bx_norm_name
The name of the Postprocessor providing the Bx norm.
Definition: EigenProblem.h:292

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1772 of file FEProblemBase.C.

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

1773 {
1775  if (_displaced_problem)
1776  _displaced_problem->cacheJacobian(tid);
1777 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheJacobian(const THREAD_ID tid)
Definition: SubProblem.C:1269

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1780 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

1781 {
1783  if (_displaced_problem)
1784  _displaced_problem->cacheJacobianNeighbor(tid);
1785 }
virtual void cacheJacobianNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1277
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidual()

void FEProblemBase::cacheResidual ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1658 of file FEProblemBase.C.

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

1659 {
1661  if (_displaced_problem)
1662  _displaced_problem->cacheResidual(tid);
1663 }
virtual void cacheResidual(const THREAD_ID tid)
Definition: SubProblem.C:1248
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1666 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1667 {
1669  if (_displaced_problem)
1670  _displaced_problem->cacheResidualNeighbor(tid);
1671 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void cacheResidualNeighbor(const THREAD_ID tid)
Definition: SubProblem.C:1255

◆ callMooseError()

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

Calls moose error with the message msg.

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

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

Definition at line 33 of file MooseBase.C.

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

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

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 601 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

602 {
603  // Variable for storing all available blocks/boundaries from the mesh
604  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
605 
606  std::stringstream errors;
607 
608  // Loop through the properties to check
609  for (const auto & check_it : _map_block_material_props_check)
610  {
611  // The current id for the property being checked (BoundaryID || BlockID)
612  SubdomainID check_id = check_it.first;
613 
614  std::set<SubdomainID> check_ids = {check_id};
615 
616  // Loop through all the block/boundary ids
617  for (const auto & id : check_ids)
618  {
619  // Loop through all the stored properties
620  for (const auto & prop_it : check_it.second)
621  {
622  // Produce an error if the material property is not defined on the current block/boundary
623  // and any block/boundary
624  // and not is not a zero material property.
625  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
626  _zero_block_material_props[id].count(prop_it.second) == 0)
627  {
628  std::string check_name = restrictionSubdomainCheckName(id);
629  if (check_name.empty())
630  check_name = std::to_string(id);
631  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
632  << "' is not defined on block " << check_name << "\n";
633  }
634  }
635  }
636  }
637 
638  if (!errors.str().empty())
639  mooseError(errors.str());
640 }
virtual MooseMesh & mesh()=0
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:748
subdomain_id_type SubdomainID
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1025
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:1037
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1019

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 643 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

644 {
645  // Variable for storing the value for ANY_BOUNDARY_ID
647 
648  // Variable for storing all available blocks/boundaries from the mesh
649  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
650 
651  std::stringstream errors;
652 
653  // Loop through the properties to check
654  for (const auto & check_it : _map_boundary_material_props_check)
655  {
656  // The current id for the property being checked (BoundaryID || BlockID)
657  BoundaryID check_id = check_it.first;
658 
659  // In the case when the material being checked has an ID is set to ANY, then loop through all
660  // the possible ids and verify that the material property is defined.
661  std::set<BoundaryID> check_ids{check_id};
662  if (check_id == any_id)
663  check_ids = all_ids;
664 
665  // Loop through all the block/boundary ids
666  for (const auto & id : check_ids)
667  {
668  // Loop through all the stored properties
669  for (const auto & prop_it : check_it.second)
670  {
671  // Produce an error if the material property is not defined on the current block/boundary
672  // and any block/boundary
673  // and not is not a zero material property.
674  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
675  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
676  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
677  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
678  {
679  std::string check_name = restrictionBoundaryCheckName(id);
680  if (check_name.empty())
681  check_name = std::to_string(id);
682  errors << "Material property '" << prop_it.second << "', requested by '" << prop_it.first
683  << "' is not defined on boundary " << check_name << "\n";
684  }
685  }
686  }
687  }
688 
689  if (!errors.str().empty())
690  mooseError(errors.str());
691 }
virtual MooseMesh & mesh()=0
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1038
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:759
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1026
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1022
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 ( )
protectedinherited

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

Definition at line 7980 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

7981 {
7983 }
MooseMesh & _mesh
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4051

◆ checkDependMaterialsHelper()

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

Helper method for checking Material object dependency.

See also
checkProblemIntegrity

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

Definition at line 7855 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

7857 {
7858  for (const auto & it : materials_map)
7859  {
7861  std::set<std::string> block_depend_props, block_supplied_props;
7862 
7863  for (const auto & mat1 : it.second)
7864  {
7865  const std::set<std::string> & depend_props = mat1->getRequestedItems();
7866  block_depend_props.insert(depend_props.begin(), depend_props.end());
7867 
7868  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
7869  for (auto & dep : alldeps)
7870  if (const auto name = _material_props.queryStatefulPropName(dep))
7871  block_depend_props.insert(*name);
7872 
7873  // See if any of the active materials supply this property
7874  for (const auto & mat2 : it.second)
7875  {
7876  const std::set<std::string> & supplied_props = mat2->MaterialBase::getSuppliedItems();
7877  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
7878  }
7879  }
7880 
7881  // Add zero material properties specific to this block and unrestricted
7882  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
7883  _zero_block_material_props[it.first].end());
7884 
7885  // Error check to make sure all properties consumed by materials are supplied on this block
7886  std::set<std::string> difference;
7887  std::set_difference(block_depend_props.begin(),
7888  block_depend_props.end(),
7889  block_supplied_props.begin(),
7890  block_supplied_props.end(),
7891  std::inserter(difference, difference.end()));
7892 
7893  if (!difference.empty())
7894  {
7895  std::ostringstream oss;
7896  oss << "One or more Material Properties were not supplied on block ";
7897  const std::string & subdomain_name = _mesh.getSubdomainName(it.first);
7898  if (subdomain_name.length() > 0)
7899  oss << subdomain_name << " (" << it.first << ")";
7900  else
7901  oss << it.first;
7902  oss << ":\n";
7903  for (const auto & name : difference)
7904  oss << name << "\n";
7905  mooseError(oss.str());
7906  }
7907  }
7908 
7909  // This loop checks that materials are not supplied by multiple Material objects
7910  for (const auto & it : materials_map)
7911  {
7912  const auto & materials = it.second;
7913  std::set<std::string> inner_supplied, outer_supplied;
7914 
7915  for (const auto & outer_mat : materials)
7916  {
7917  // Storage for properties for this material (outer) and all other materials (inner)
7918  outer_supplied = outer_mat->getSuppliedItems();
7919  inner_supplied.clear();
7920 
7921  // Property to material map for error reporting
7922  std::map<std::string, std::set<std::string>> prop_to_mat;
7923  for (const auto & name : outer_supplied)
7924  prop_to_mat[name].insert(outer_mat->name());
7925 
7926  for (const auto & inner_mat : materials)
7927  {
7928  if (outer_mat == inner_mat)
7929  continue;
7930 
7931  // Check whether these materials are an AD pair
7932  auto outer_mat_type = outer_mat->type();
7933  auto inner_mat_type = inner_mat->type();
7934  removeSubstring(outer_mat_type, "<RESIDUAL>");
7935  removeSubstring(outer_mat_type, "<JACOBIAN>");
7936  removeSubstring(inner_mat_type, "<RESIDUAL>");
7937  removeSubstring(inner_mat_type, "<JACOBIAN>");
7938  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
7939  inner_mat_type != inner_mat->type())
7940  continue;
7941 
7942  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
7943  inner_mat->getSuppliedItems().end());
7944 
7945  for (const auto & inner_supplied_name : inner_supplied)
7946  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
7947  }
7948 
7949  // Test that a property isn't supplied on multiple blocks
7950  std::set<std::string> intersection;
7951  std::set_intersection(outer_supplied.begin(),
7952  outer_supplied.end(),
7953  inner_supplied.begin(),
7954  inner_supplied.end(),
7955  std::inserter(intersection, intersection.end()));
7956 
7957  if (!intersection.empty())
7958  {
7959  std::ostringstream oss;
7960  oss << "The following material properties are declared on block " << it.first
7961  << " by multiple materials:\n";
7962  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
7963  << "Material Objects\n";
7964  for (const auto & outer_name : intersection)
7965  {
7966  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
7967  for (const auto & inner_name : prop_to_mat[outer_name])
7968  oss << inner_name << " ";
7969  oss << '\n';
7970  }
7971 
7972  mooseError(oss.str());
7973  break;
7974  }
7975  }
7976  }
7977 }
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:57
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1538
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:1256
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1025
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MaterialPropertyStorage & _material_props

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protectedinherited

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 7779 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

7780 {
7781  if (_displaced_problem)
7782  {
7783  bool mesh_has_second_order_elements = false;
7784  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
7786  {
7787  if (elem->default_order() == SECOND)
7788  {
7789  mesh_has_second_order_elements = true;
7790  break;
7791  }
7792  }
7793 
7794  // We checked our local elements, so take the max over all processors.
7795  _displaced_mesh->comm().max(mesh_has_second_order_elements);
7796 
7797  // If the Mesh has second order elements, make sure the
7798  // displacement variables are second-order.
7799  if (mesh_has_second_order_elements)
7800  {
7801  const std::vector<std::string> & displacement_variables =
7802  _displaced_problem->getDisplacementVarNames();
7803 
7804  for (const auto & var_name : displacement_variables)
7805  {
7806  MooseVariableFEBase & mv =
7807  _displaced_problem->getVariable(/*tid=*/0,
7808  var_name,
7811  if (mv.order() != SECOND)
7812  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
7813  "SECOND order.");
7814  }
7815  }
7816  }
7817 }
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:2802
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:2808
MooseMesh * _displaced_mesh

◆ checkDuplicatePostprocessorVariableNames()

void FEProblemBase::checkDuplicatePostprocessorVariableNames ( )
inherited

Definition at line 1274 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

1275 {
1276  for (const auto & pp : _reporter_data.getPostprocessorNames())
1277  if (hasScalarVariable(pp))
1278  mooseError("Postprocessor \"" + pp +
1279  "\" has the same name as a scalar variable in the system.");
1280 }
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)
virtualinherited

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

Notes:

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

Definition at line 5952 of file FEProblemBase.C.

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

5953 {
5955  return;
5956 
5957  TIME_SECTION("checkExceptionAndStopSolve", 5);
5958 
5959  // See if any processor had an exception. If it did, get back the
5960  // processor that the exception occurred on.
5961  unsigned int processor_id;
5962 
5964 
5965  if (_has_exception)
5966  {
5968 
5971  {
5972  // Print the message
5973  if (_communicator.rank() == 0 && print_message)
5974  {
5975  _console << "\n" << _exception_message << "\n";
5976  if (isTransient())
5977  _console
5978  << "To recover, the solution will fail and then be re-attempted with a reduced time "
5979  "step.\n"
5980  << std::endl;
5981  }
5982 
5983  // Stop the solve -- this entails setting
5984  // SNESSetFunctionDomainError() or directly inserting NaNs in the
5985  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
5986  if (_current_nl_sys)
5988 
5989  if (_current_linear_sys)
5991 
5992  // and close Aux system (we MUST do this here; see #11525)
5993  _aux->solution().close();
5994 
5995  // We've handled this exception, so we no longer have one.
5996  _has_exception = false;
5997 
5998  // Force the next non-linear convergence check to fail (and all further residual evaluation
5999  // to be skipped).
6001 
6002  // Repropagate the exception, so it can be caught at a higher level, typically
6003  // this is NonlinearSystem::computeResidual().
6005  }
6006  else
6007  mooseError("The following parallel-communicated exception was detected during " +
6008  Moose::stringify(_current_execute_on_flag) + " evaluation:\n" +
6010  "\nBecause this did not occur during residual evaluation, there"
6011  " is no way to handle this, so the solution is aborting.\n");
6012  }
6013 }
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.
ExecFlagType _current_execute_on_flag
Current execute_on flag.
processor_id_type rank() const
bool _has_exception
Whether or not an exception has occurred.
const Parallel::Communicator & _communicator
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _fail_next_nonlinear_convergence_check
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
LinearSystem * _current_linear_sys
The current linear system that we are solving.
void maxloc(T &r, unsigned int &max_id) const
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h: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.
virtual void stopSolve(const ExecFlagType &exec_flag)=0
Quit the current solve as soon as possible.
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

◆ checkingUOAuxState()

bool FEProblemBase::checkingUOAuxState ( ) const
inlineinherited

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

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

Definition at line 202 of file FEProblemBase.h.

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

202 { 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  div_threshold 
)
virtualinherited

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
div_thresholdMaximum value of residual before triggering divergence check

Definition at line 8018 of file FEProblemBase.C.

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

8030 {
8031  TIME_SECTION("checkNonlinearConvergence", 5, "Checking Nonlinear Convergence");
8032  mooseAssert(_current_nl_sys, "This should be non-null");
8033 
8035 
8037  {
8040  }
8041 
8044 
8045  Real fnorm_old;
8046  // This is the first residual before any iterations have been done, but after solution-modifying
8047  // objects (if any) have been imposed on the solution vector. We save it, and use it to detect
8048  // convergence if system.usePreSMOResidual() == false.
8049  if (it == 0)
8050  {
8051  system.setInitialResidual(fnorm);
8052  fnorm_old = fnorm;
8053  _n_nl_pingpong = 0;
8054  }
8055  else
8056  fnorm_old = system._last_nl_rnorm;
8057 
8058  // Check for nonlinear residual pingpong.
8059  // Pingpong will always start from a residual increase
8060  if ((_n_nl_pingpong % 2 == 1 && !(fnorm > fnorm_old)) ||
8061  (_n_nl_pingpong % 2 == 0 && fnorm > fnorm_old))
8062  _n_nl_pingpong += 1;
8063  else
8064  _n_nl_pingpong = 0;
8065 
8066  std::ostringstream oss;
8067  if (fnorm != fnorm)
8068  {
8069  oss << "Failed to converge, function norm is NaN\n";
8071  }
8072  else if ((it >= _nl_forced_its) && fnorm < abstol)
8073  {
8074  oss << "Converged due to function norm " << fnorm << " < " << abstol << '\n';
8076  }
8077  else if (nfuncs >= max_funcs)
8078  {
8079  oss << "Exceeded maximum number of function evaluations: " << nfuncs << " > " << max_funcs
8080  << '\n';
8082  }
8083  else if ((it >= _nl_forced_its) && it && fnorm > system._last_nl_rnorm && fnorm >= div_threshold)
8084  {
8085  oss << "Nonlinear solve was blowing up!\n";
8087  }
8088 
8089  if ((it >= _nl_forced_its) && it && reason == MooseNonlinearConvergenceReason::ITERATING)
8090  {
8091  // Set the reference residual depending on what the user asks us to use.
8092  const auto ref_residual = system.referenceResidual();
8093  if (checkRelativeConvergence(it, fnorm, ref_residual, rtol, abstol, oss))
8095  else if (snorm < stol * xnorm)
8096  {
8097  oss << "Converged due to small update length: " << snorm << " < " << stol << " * " << xnorm
8098  << '\n';
8100  }
8101  else if (divtol > 0 && fnorm > ref_residual * divtol)
8102  {
8103  oss << "Diverged due to residual " << fnorm << " > divergence tolerance " << divtol
8104  << " * initial residual " << ref_residual << '\n';
8106  }
8107  else if (_nl_abs_div_tol > 0 && fnorm > _nl_abs_div_tol)
8108  {
8109  oss << "Diverged due to residual " << fnorm << " > absolute divergence tolerance "
8110  << _nl_abs_div_tol << '\n';
8112  }
8114  {
8115  oss << "Diverged due to maximum nonlinear residual pingpong achieved" << '\n';
8117  }
8118  }
8119 
8120  system._last_nl_rnorm = fnorm;
8121  system._current_nl_its = static_cast<unsigned int>(it);
8122 
8123  msg = oss.str();
8124  if (_app.multiAppLevel() > 0)
8126 
8127  return reason;
8128 }
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:794
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
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:724
Real referenceResidual() const
The reference residual used in relative convergence check.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
MooseNonlinearConvergenceReason
Enumeration for nonlinear convergence reasons.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setInitialResidual(Real r)
Record the initial residual (for later relative convergence check)
unsigned int _n_nl_pingpong
maximum numbver

◆ checkNonlocalCoupling()

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

Definition at line 1398 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

1399 {
1400  TIME_SECTION("checkNonlocalCoupling", 5, "Checking Nonlocal Coupling");
1401 
1402  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1403  for (auto & nl : _nl)
1404  {
1405  const auto & all_kernels = nl->getKernelWarehouse();
1406  const auto & kernels = all_kernels.getObjects(tid);
1407  for (const auto & kernel : kernels)
1408  {
1409  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
1411  if (nonlocal_kernel)
1412  {
1415  _nonlocal_kernels.addObject(kernel, tid);
1416  }
1417  }
1418  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
1419  nl->getIntegratedBCWarehouse();
1420  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
1421  for (const auto & integrated_bc : integrated_bcs)
1422  {
1423  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
1425  if (nonlocal_integrated_bc)
1426  {
1429  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
1430  }
1431  }
1432  }
1433 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:1057
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 EigenProblem::checkProblemIntegrity ( )
overridevirtual

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 from FEProblemBase.

Definition at line 490 of file EigenProblem.C.

491 {
493  _nl_eigen->checkIntegrity();
494 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
virtual void checkProblemIntegrity()
Method called to perform a series of sanity checks before a simulation is run.

◆ checkRelativeConvergence()

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

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

Referenced by FEProblemBase::checkNonlinearConvergence().

8137 {
8139  return false;
8140  if (fnorm <= ref_residual * rtol)
8141  {
8142  oss << "Converged due to function norm " << fnorm << " < relative tolerance (" << rtol << ")\n";
8143  return true;
8144  }
8145  return false;
8146 }
bool _fail_next_nonlinear_convergence_check

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)
inherited

Definition at line 1436 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

1437 {
1438  std::set<const MooseVariableFEBase *> uo_jacobian_moose_vars;
1439  {
1440  std::vector<ShapeElementUserObject *> objs;
1441  theWarehouse()
1442  .query()
1444  .condition<AttribThread>(tid)
1445  .queryInto(objs);
1446 
1447  for (const auto & uo : objs)
1448  {
1449  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1450  const auto & mv_deps = uo->jacobianMooseVariables();
1451  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1452  }
1453  }
1454  {
1455  std::vector<ShapeSideUserObject *> objs;
1456  theWarehouse()
1457  .query()
1459  .condition<AttribThread>(tid)
1460  .queryInto(objs);
1461  for (const auto & uo : objs)
1462  {
1463  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1464  const auto & mv_deps = uo->jacobianMooseVariables();
1465  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1466  }
1467  }
1468 
1469  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1470  std::sort(
1471  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1472 }
bool _calculate_jacobian_in_uo
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ checkUserObjects()

void FEProblemBase::checkUserObjects ( )
protectedinherited

Definition at line 7820 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

7821 {
7822  // Check user_objects block coverage
7823  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
7824  std::set<SubdomainID> user_objects_blocks;
7825 
7826  // gather names of all user_objects that were defined in the input file
7827  // and the blocks that they are defined on
7828  std::set<std::string> names;
7829 
7830  std::vector<UserObject *> objects;
7832 
7833  for (const auto & obj : objects)
7834  names.insert(obj->name());
7835 
7836  // See if all referenced blocks are covered
7837  std::set<SubdomainID> difference;
7838  std::set_difference(user_objects_blocks.begin(),
7839  user_objects_blocks.end(),
7840  mesh_subdomains.begin(),
7841  mesh_subdomains.end(),
7842  std::inserter(difference, difference.end()));
7843 
7844  if (!difference.empty())
7845  {
7846  std::ostringstream oss;
7847  oss << "One or more UserObjects is referencing a nonexistent block:\n";
7848  for (const auto & id : difference)
7849  oss << id << "\n";
7850  mooseError(oss.str());
7851  }
7852 }
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:2922

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( const THREAD_ID  tid)
overridevirtualinherited

Clear the active elemental MooseVariableFEBase.

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

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 5398 of file FEProblemBase.C.

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

5399 {
5401 
5402  if (_displaced_problem)
5403  _displaced_problem->clearActiveElementalMooseVariables(tid);
5404 }
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid)
Clear the active elemental MooseVariableFieldBase.
Definition: SubProblem.C:444
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5407 of file FEProblemBase.C.

5408 {
5410 
5411  if (_displaced_problem)
5412  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
5413 }
virtual void clearActiveFEVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:362
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5416 of file FEProblemBase.C.

5417 {
5419 
5420  if (_displaced_problem)
5421  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
5422 }
virtual void clearActiveFEVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:356
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( const THREAD_ID  tid)
inherited

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Definition at line 5464 of file FEProblemBase.C.

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

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

◆ clearActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5425 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5426 {
5428 
5429  if (_displaced_problem)
5430  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
5431 }
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid)
Definition: SubProblem.C:403
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( const THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5434 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

5435 {
5437 
5438  if (_displaced_problem)
5439  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
5440 }
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid)
Definition: SubProblem.C:397
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearAllDofIndices()

void SubProblem::clearAllDofIndices ( )
inherited

Clear dof indices from variables in nl and aux systems.

Definition at line 1134 of file SubProblem.C.

Referenced by FEProblemBase::solve().

1135 {
1136  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
1139 }
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:1538

◆ clearCurrentJacobianVectorTags()

void FEProblemBase::clearCurrentJacobianVectorTags ( )
inlineinherited

Clear the current Jacobian vector tag data structure ...

if someone creates it

Definition at line 2251 of file FEProblemBase.h.

Referenced by FEProblemBase::resetState().

2251 {}

◆ clearCurrentResidualVectorTags()

void FEProblemBase::clearCurrentResidualVectorTags ( )
inlineinherited

Clear the current residual vector tag data structure.

Definition at line 2979 of file FEProblemBase.h.

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

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

◆ clearDiracInfo()

void FEProblemBase::clearDiracInfo ( )
overridevirtualinherited

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

Implements SubProblem.

Definition at line 2249 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2250 {
2252 
2253  if (_displaced_problem)
2254  _displaced_problem->clearDiracInfo();
2255 }
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:1016

◆ computeBounds()

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

Definition at line 6916 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

6919 {
6920  try
6921  {
6922  try
6923  {
6924  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
6925  "I expect these system numbers to be the same");
6926 
6927  if (!_current_nl_sys->hasVector("lower_bound") || !_current_nl_sys->hasVector("upper_bound"))
6928  return;
6929 
6930  TIME_SECTION("computeBounds", 1, "Computing Bounds");
6931 
6932  NumericVector<Number> & _lower = _current_nl_sys->getVector("lower_bound");
6933  NumericVector<Number> & _upper = _current_nl_sys->getVector("upper_bound");
6934  _lower.swap(lower);
6935  _upper.swap(upper);
6936  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
6938 
6939  _aux->residualSetup();
6941  _lower.swap(lower);
6942  _upper.swap(upper);
6943  }
6944  catch (...)
6945  {
6946  handleException("computeBounds");
6947  }
6948  }
6949  catch (MooseException & e)
6950  {
6951  mooseError("Irrecoverable exception: " + std::string(e.what()));
6952  }
6953  catch (...)
6954  {
6955  mooseError("Unexpected exception type");
6956  }
6957 }
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:880
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:1132
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:889
MaterialWarehouse _all_materials
void computeSystems(const ExecFlagType &type)
Do generic system computations.
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 
)
virtualinherited

Definition at line 7193 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

7195 {
7196  // Default to no damping
7197  Real damping = 1.0;
7198 
7199  if (_has_dampers)
7200  {
7201  TIME_SECTION("computeDamping", 1, "Computing Damping");
7202 
7203  // Save pointer to the current solution
7204  const NumericVector<Number> * _saved_current_solution = _current_nl_sys->currentSolution();
7205 
7207  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
7208  // to get to the material models, which may not be able to cope with drastically different
7209  // values. Once more complete dependency checking is in place, auxiliary variables (and
7210  // material properties) will be computed as needed by dampers.
7211  // _aux.compute();
7212  damping = _current_nl_sys->computeDamping(soln, update);
7213 
7214  // restore saved solution
7215  _current_nl_sys->setSolution(*_saved_current_solution);
7216  }
7217 
7218  return damping;
7219 }
Real computeDamping(const NumericVector< Number > &solution, const NumericVector< Number > &update)
Compute damping.
bool _has_dampers
Whether or not this system has any Dampers associated with it.
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:98
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeIndicators()

void FEProblemBase::computeIndicators ( )
virtualinherited

Reimplemented in DumpObjectsProblem.

Definition at line 4064 of file FEProblemBase.C.

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

4065 {
4066  // Initialize indicator aux variable fields
4068  {
4069  TIME_SECTION("computeIndicators", 1, "Computing Indicators");
4070 
4071  // Internal side indicators may lead to creating a much larger sparsity pattern than dictated by
4072  // the actual finite element scheme (e.g. CFEM)
4073  const auto old_do_derivatives = ADReal::do_derivatives;
4074  ADReal::do_derivatives = false;
4075 
4076  std::vector<std::string> fields;
4077 
4078  // Indicator Fields
4079  const auto & indicators = _indicators.getActiveObjects();
4080  for (const auto & indicator : indicators)
4081  fields.push_back(indicator->name());
4082 
4083  // InternalSideIndicator Fields
4084  const auto & internal_indicators = _internal_side_indicators.getActiveObjects();
4085  for (const auto & internal_indicator : internal_indicators)
4086  fields.push_back(internal_indicator->name());
4087 
4088  _aux->zeroVariables(fields);
4089 
4090  // compute Indicators
4091  ComputeIndicatorThread cit(*this);
4092  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cit);
4093  _aux->solution().close();
4094  _aux->update();
4095 
4096  ComputeIndicatorThread finalize_cit(*this, true);
4097  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), finalize_cit);
4098  _aux->solution().close();
4099  _aux->update();
4100 
4101  ADReal::do_derivatives = old_do_derivatives;
4102  }
4103 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1041
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 ( )
virtualinherited

Definition at line 4057 of file FEProblemBase.C.

4058 {
4060  computeMarkers();
4061 }
virtual void computeMarkers()
virtual void computeIndicators()

◆ computeJacobian() [1/2]

void FEProblemBase::computeJacobian

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

Definition at line 6754 of file FEProblemBase.C.

6757 {
6758  setCurrentNonlinearSystem(nl_sys_num);
6759 
6760  _fe_matrix_tags.clear();
6761 
6762  auto & tags = getMatrixTags();
6763  for (auto & tag : tags)
6764  _fe_matrix_tags.insert(tag.second);
6765 
6766  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
6767 }
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:225
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

◆ computeJacobian() [2/2]

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

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

Definition at line 6754 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianSys().

6757 {
6758  setCurrentNonlinearSystem(nl_sys_num);
6759 
6760  _fe_matrix_tags.clear();
6761 
6762  auto & tags = getMatrixTags();
6763  for (auto & tag : tags)
6764  _fe_matrix_tags.insert(tag.second);
6765 
6766  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
6767 }
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:225
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

◆ computeJacobianAB()

void EigenProblem::computeJacobianAB ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobianA,
SparseMatrix< Number > &  jacobianB,
TagID  tagA,
TagID  tagB 
)

Form two Jacobian matrices, where each is associated with one tag, through one element-loop.

Definition at line 250 of file EigenProblem.C.

Referenced by Moose::assemble_matrix().

255 {
256  TIME_SECTION("computeJacobianAB", 3);
257 
258  // Disassociate the default tags because we will associate vectors with only the
259  // specific system tags that we need for this instance
260  _nl_eigen->disassociateDefaultMatrixTags();
261 
262  // Clear FE tags and first add the specific tags associated with the Jacobian
263  _fe_matrix_tags.clear();
264  _fe_matrix_tags.insert(tagA);
265  _fe_matrix_tags.insert(tagB);
266 
267  // Add any other user-added matrix tags if they have associated matrices
268  const auto & matrix_tags = getMatrixTags();
269  for (const auto & matrix_tag : matrix_tags)
270  if (_nl_eigen->hasMatrix(matrix_tag.second))
271  _fe_matrix_tags.insert(matrix_tag.second);
272 
273  _nl_eigen->setSolution(soln);
274 
275  _nl_eigen->associateMatrixToTag(jacobianA, tagA);
276  _nl_eigen->associateMatrixToTag(jacobianB, tagB);
277 
280 
281  _nl_eigen->disassociateMatrixFromTag(jacobianA, tagA);
282  _nl_eigen->disassociateMatrixFromTag(jacobianB, tagB);
283 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
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:225
std::set< TagID > _fe_matrix_tags
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianBlock()

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

Really not a good idea to use this.

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

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

Definition at line 6904 of file FEProblemBase.C.

6908 {
6909  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
6910  std::vector<JacobianBlock *> blocks = {&jac_block};
6911  mooseAssert(_current_nl_sys, "This should be non-null");
6913 }
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:1132

◆ computeJacobianBlocks()

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

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 from FEProblemBase.

Definition at line 231 of file EigenProblem.C.

233 {
234  TIME_SECTION("computeJacobianBlocks", 3);
235  setCurrentNonlinearSystem(nl_sys_num);
236 
237  if (_displaced_problem)
239 
241 
243 
244  _current_nl_sys->computeJacobianBlocks(blocks, {_nl_eigen->precondMatrixTag()});
245 
247 }
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:1066
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C:44
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
std::shared_ptr< DisplacedProblem > _displaced_problem
void computeSystems(const ExecFlagType &type)
Do generic system computations.

◆ computeJacobianInternal()

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

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 6770 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian().

6773 {
6774  TIME_SECTION("computeJacobianInternal", 1);
6775 
6777 
6779 
6780  computeJacobianTags(tags);
6781 
6783 }
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
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:1032
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1044
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 
)
virtualinherited

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 6732 of file FEProblemBase.C.

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

6735 {
6736  computeJacobian(soln, jacobian, sys.number());
6737 }
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 EigenProblem::computeJacobianTag ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
TagID  tag 
)
overridevirtual

Form a Jacobian matrix for all kernels and BCs with a given tag.

Reimplemented from FEProblemBase.

Definition at line 166 of file EigenProblem.C.

Referenced by Moose::assemble_matrix(), NonlinearEigenSystem::computeScalingJacobian(), and Moose::SlepcSupport::moosePetscSNESFormMatrixTag().

169 {
170  TIME_SECTION("computeJacobianTag", 3);
171 
172  // Disassociate the default tags because we will associate vectors with only the
173  // specific system tags that we need for this instance
174  _nl_eigen->disassociateDefaultMatrixTags();
175 
176  // Clear FE tags and first add the specific tag associated with the Jacobian
177  _fe_matrix_tags.clear();
178  _fe_matrix_tags.insert(tag);
179 
180  // Add any other user-added matrix tags if they have associated matrices
181  const auto & matrix_tags = getMatrixTags();
182  for (const auto & matrix_tag : matrix_tags)
183  if (_nl_eigen->hasMatrix(matrix_tag.second))
184  _fe_matrix_tags.insert(matrix_tag.second);
185 
186  _nl_eigen->setSolution(soln);
187 
188  _nl_eigen->associateMatrixToTag(jacobian, tag);
189 
192 
193  _nl_eigen->disassociateMatrixFromTag(jacobian, tag);
194 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
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:225
std::set< TagID > _fe_matrix_tags
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianTags()

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

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

Definition at line 6786 of file FEProblemBase.C.

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

6787 {
6788  try
6789  {
6790  try
6791  {
6792  if (!_has_jacobian || !_const_jacobian)
6793  {
6794  TIME_SECTION("computeJacobianTags", 5, "Computing Jacobian");
6795 
6796  for (auto tag : tags)
6797  if (_current_nl_sys->hasMatrix(tag))
6798  {
6799  auto & matrix = _current_nl_sys->getMatrix(tag);
6800  matrix.zero();
6801  if (haveADObjects())
6802  // PETSc algorithms require diagonal allocations regardless of whether there is
6803  // non-zero diagonal dependence. With global AD indexing we only add non-zero
6804  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
6805  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
6806  matrix.add(index, index, 0);
6807  }
6808 
6809  _aux->zeroVariablesForJacobian();
6810 
6811  unsigned int n_threads = libMesh::n_threads();
6812 
6813  // Random interface objects
6814  for (const auto & it : _random_data_objects)
6815  it.second->updateSeeds(EXEC_NONLINEAR);
6816 
6819  if (_displaced_problem)
6820  _displaced_problem->setCurrentlyComputingJacobian(true);
6821 
6824 
6825  for (unsigned int tid = 0; tid < n_threads; tid++)
6826  reinitScalars(tid);
6827 
6829 
6830  _aux->jacobianSetup();
6831 
6832  if (_displaced_problem)
6833  {
6835  _displaced_problem->updateMesh();
6836  }
6837 
6838  for (unsigned int tid = 0; tid < n_threads; tid++)
6839  {
6842  }
6843 
6845 
6847 
6849 
6851 
6853 
6855 
6856  // For explicit Euler calculations for example we often compute the Jacobian one time and
6857  // then re-use it over and over. If we're performing automatic scaling, we don't want to
6858  // use that kernel, diagonal-block only Jacobian for our actual matrix when performing
6859  // solves!
6861  _has_jacobian = true;
6862  }
6863  }
6864  catch (...)
6865  {
6866  handleException("computeJacobianTags");
6867  }
6868  }
6869  catch (const MooseException &)
6870  {
6871  // The buck stops here, we have already handled the exception by
6872  // calling the system's stopSolve() method, it is now up to PETSc to return a
6873  // "diverged" reason during the next solve.
6874  }
6875  catch (...)
6876  {
6877  mooseError("Unexpected exception type");
6878  }
6879 
6880  resetState();
6881 }
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:1066
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:1477
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:338
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 computeJacobianTags(const std::set< TagID > &tags)
Computes multiple (tag associated) Jacobian matricese.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:741
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:980
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:1078
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.

◆ computeLinearSystemSys()

void FEProblemBase::computeLinearSystemSys ( LinearImplicitSystem &  sys,
SparseMatrix< Number > &  system_matrix,
NumericVector< Number > &  rhs 
)
inherited

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

Parameters
sysThe linear system which should be assembled
system_matrixThe sparse matrix which should hold the system matrix
rhsThe vector which should hold the right hand side

Definition at line 6960 of file FEProblemBase.C.

Referenced by Moose::compute_linear_system().

6963 {
6964  TIME_SECTION("computeLinearSystemSys", 5);
6965 
6966  setCurrentLinearSystem(linearSysNum(sys.name()));
6967 
6968  // We are using the residual tag system for right hand sides so we fetch everything
6969  const auto & vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6970 
6971  // We filter out tags which do not have associated vectors in the current
6972  // system. This is essential to be able to use system-dependent vector tags.
6975 
6977  system_matrix,
6978  rhs,
6981 }
void computeLinearSystemTags(const NumericVector< Number > &soln, SparseMatrix< Number > &system_matrix, NumericVector< Number > &rhs, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Assemble the current linear system given a set of vector and matrix tags.
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:267
std::set< TagID > _linear_matrix_tags
Temporary storage for filtered matrix tags for linear systems.
virtual const NumericVector< Number > *const & currentSolution() const override final
The solution vector that is currently being operated on.
Definition: SolverSystem.h:98
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:150
LinearSystem * _current_linear_sys
The current linear system that we are solving.
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the system, where a tag is represented by a map from name to ID...
Definition: SubProblem.h:225
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
static void selectMatrixTagsFromSystem(const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
Select the matrix tags which belong to a specific system.
Definition: SubProblem.C:278
unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const override
std::set< TagID > _linear_vector_tags
Temporary storage for filtered vector tags for linear systems.

◆ computeLinearSystemTags()

void FEProblemBase::computeLinearSystemTags ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  system_matrix,
NumericVector< Number > &  rhs,
const std::set< TagID > &  vector_tags,
const std::set< TagID > &  matrix_tags 
)
inherited

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

Parameters
solnThe solution which should be used for the system assembly
system_matrixThe sparse matrix which should hold the system matrix
rhsThe vector which should hold the right hand side
vector_tagsThe vector tags for the right hand side
matrix_tagsThe matrix tags for the matrix

Definition at line 6984 of file FEProblemBase.C.

Referenced by FEProblemBase::computeLinearSystemSys().

6989 {
6990  TIME_SECTION("computeLinearSystemTags", 5, "Computing Linear System");
6991 
6993 
6996 
6997  for (const auto tag : matrix_tags)
6998  {
6999  auto & matrix = _current_linear_sys->getMatrix(tag);
7000  matrix.zero();
7001  }
7002 
7003  unsigned int n_threads = libMesh::n_threads();
7004 
7006 
7007  // Random interface objects
7008  for (const auto & it : _random_data_objects)
7009  it.second->updateSeeds(EXEC_NONLINEAR);
7010 
7013 
7015 
7016  _aux->jacobianSetup();
7017 
7018  for (THREAD_ID tid = 0; tid < n_threads; tid++)
7019  {
7021  }
7022 
7023  try
7024  {
7026  }
7027  catch (MooseException & e)
7028  {
7029  _console << "\nA MooseException was raised during Auxiliary variable computation.\n"
7030  << "The next solve will fail, the timestep will be reduced, and we will try again.\n"
7031  << std::endl;
7032 
7033  // We know the next solve is going to fail, so there's no point in
7034  // computing anything else after this. Plus, using incompletely
7035  // computed AuxVariables in subsequent calculations could lead to
7036  // other errors or unhandled exceptions being thrown.
7037  return;
7038  }
7039 
7042 
7044 
7047 
7048  _current_linear_sys->computeLinearSystemTags(vector_tags, matrix_tags);
7049 
7052 
7057 
7058  // Reset execution flag as after this point we are no longer on LINEAR
7060 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:949
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
TagID rightHandSideVectorTag() const
Definition: LinearSystem.h:100
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
virtual TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
Definition: LinearSystem.h:101
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:937
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
void jacobianSetup()
Calls the jacobianSetup function for each of the output objects.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void computeLinearSystemTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Compute the right hand side and the system matrix of the system for given tags.
Definition: LinearSystem.C:116
virtual void zero()=0
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1081
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:1032
LinearSystem * _current_linear_sys
The current linear system that we are solving.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
virtual void jacobianSetup(THREAD_ID tid=0) const
virtual void disassociateMatrixFromTag(SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1044
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:980
void executeControls(const ExecFlagType &exec_type)
Performs setup and execute calls for Control objects.
MooseObjectWarehouse< Function > _functions
functions
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
bool _safe_access_tagged_matrices
Is it safe to retrieve data from tagged matrices.
Definition: SubProblem.h:1078
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ computeMarkers()

void FEProblemBase::computeMarkers ( )
virtualinherited

Reimplemented in DumpObjectsProblem.

Definition at line 4106 of file FEProblemBase.C.

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

4107 {
4108  if (_markers.hasActiveObjects())
4109  {
4110  TIME_SECTION("computeMarkers", 1, "Computing Markers");
4111 
4112  std::vector<std::string> fields;
4113 
4114  // Marker Fields
4115  const auto & markers = _markers.getActiveObjects();
4116  for (const auto & marker : markers)
4117  fields.push_back(marker->name());
4118 
4119  _aux->zeroVariables(fields);
4120 
4122 
4123  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4124  {
4125  const auto & markers = _markers.getActiveObjects(tid);
4126  for (const auto & marker : markers)
4127  marker->markerSetup();
4128  }
4129 
4130  ComputeMarkerThread cmt(*this);
4131  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cmt);
4132 
4133  _aux->solution().close();
4134  _aux->update();
4135  }
4136 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1041
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

◆ computeMatricesTags()

void EigenProblem::computeMatricesTags ( const NumericVector< Number > &  soln,
const std::vector< std::unique_ptr< SparseMatrix< Number >>> &  jacobians,
const std::set< TagID > &  tags 
)

Form several matrices simultaneously.

Definition at line 197 of file EigenProblem.C.

Referenced by Moose::SlepcSupport::moosePetscSNESFormMatricesTags().

201 {
202  TIME_SECTION("computeMatricesTags", 3);
203 
204  if (jacobians.size() != tags.size())
205  mooseError("The number of matrices ",
206  jacobians.size(),
207  " does not equal the number of tags ",
208  tags.size());
209 
210  // Disassociate the default tags because we will associate vectors with only the
211  // specific system tags that we need for this instance
212  _nl_eigen->disassociateDefaultMatrixTags();
213 
214  _fe_matrix_tags.clear();
215 
216  _nl_eigen->setSolution(soln);
217 
218  unsigned int i = 0;
219  for (auto tag : tags)
220  _nl_eigen->associateMatrixToTag(*(jacobians[i++]), tag);
221 
223  computeJacobianTags(tags);
224 
225  i = 0;
226  for (auto tag : tags)
227  _nl_eigen->disassociateMatrixFromTag(*(jacobians[i++]), tag);
228 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
std::set< TagID > _fe_matrix_tags
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeMultiAppsDT()

Real FEProblemBase::computeMultiAppsDT ( ExecFlagType  type)
inherited

Find the smallest timestep over all MultiApps.

Definition at line 5147 of file FEProblemBase.C.

Referenced by Transient::constrainDTFromMultiApp().

5148 {
5149  const auto & multi_apps = _transient_multi_apps[type].getActiveObjects();
5150 
5151  Real smallest_dt = std::numeric_limits<Real>::max();
5152 
5153  for (const auto & multi_app : multi_apps)
5154  smallest_dt = std::min(smallest_dt, multi_app->computeDT());
5155 
5156  return smallest_dt;
5157 }
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
auto max(const L &left, const R &right)
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
auto min(const L &left, const R &right)

◆ computeNearNullSpace()

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

Definition at line 7063 of file FEProblemBase.C.

Referenced by Moose::compute_nearnullspace().

7065 {
7066  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7067  "I expect these system numbers to be the same");
7068 
7069  sp.clear();
7070  for (unsigned int i = 0; i < subspaceDim("NearNullSpace"); ++i)
7071  {
7072  std::stringstream postfix;
7073  postfix << "_" << i;
7074  std::string modename = "NearNullSpace" + postfix.str();
7075  sp.push_back(&_current_nl_sys->getVector(modename));
7076  }
7077 }
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:1132
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:889

◆ computeNullSpace()

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

Definition at line 7080 of file FEProblemBase.C.

Referenced by Moose::compute_nullspace().

7082 {
7083  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7084  "I expect these system numbers to be the same");
7085  sp.clear();
7086  for (unsigned int i = 0; i < subspaceDim("NullSpace"); ++i)
7087  {
7088  std::stringstream postfix;
7089  postfix << "_" << i;
7090  sp.push_back(&_current_nl_sys->getVector("NullSpace" + postfix.str()));
7091  }
7092 }
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:1132
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:889

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

Definition at line 7110 of file FEProblemBase.C.

Referenced by Moose::compute_postcheck().

7116 {
7117  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7118  "I expect these system numbers to be the same");
7119 
7120  // This function replaces the old PetscSupport::dampedCheck() function.
7121  //
7122  // 1.) Recreate code in PetscSupport::dampedCheck() for constructing
7123  // ghosted "soln" and "update" vectors.
7124  // 2.) Call FEProblemBase::computeDamping() with these ghost vectors.
7125  // 3.) Recreate the code in PetscSupport::dampedCheck() to actually update
7126  // the solution vector based on the damping, and set the "changed" flags
7127  // appropriately.
7128 
7129  TIME_SECTION("computePostCheck", 2, "Computing Post Check");
7130 
7132 
7133  // MOOSE's FEProblemBase doesn't update the solution during the
7134  // postcheck, but FEProblemBase-derived classes might.
7136  {
7137  // We need ghosted versions of new_soln and search_direction (the
7138  // ones we get from libmesh/PETSc are PARALLEL vectors. To make
7139  // our lives simpler, we use the same ghosting pattern as the
7140  // system's current_local_solution to create new ghosted vectors.
7141 
7142  // Construct zeroed-out clones with the same ghosted dofs as the
7143  // System's current_local_solution.
7144  std::unique_ptr<NumericVector<Number>> ghosted_solution =
7145  sys.current_local_solution->zero_clone(),
7146  ghosted_search_direction =
7147  sys.current_local_solution->zero_clone();
7148 
7149  // Copy values from input vectors into clones with ghosted values.
7150  *ghosted_solution = new_soln;
7151  *ghosted_search_direction = search_direction;
7152 
7153  if (_has_dampers)
7154  {
7155  // Compute the damping coefficient using the ghosted vectors
7156  Real damping = computeDamping(*ghosted_solution, *ghosted_search_direction);
7157 
7158  // If some non-trivial damping was computed, update the new_soln
7159  // vector accordingly.
7160  if (damping < 1.0)
7161  {
7162  new_soln = old_soln;
7163  new_soln.add(-damping, search_direction);
7164  changed_new_soln = true;
7165  }
7166  }
7167 
7168  if (shouldUpdateSolution())
7169  {
7170  // Update the ghosted copy of the new solution, if necessary.
7171  if (changed_new_soln)
7172  *ghosted_solution = new_soln;
7173 
7174  bool updated_solution = updateSolution(new_soln, *ghosted_solution);
7175  if (updated_solution)
7176  changed_new_soln = true;
7177  }
7178  }
7179 
7181  {
7183  _aux->setPreviousNewtonSolution();
7184  }
7185 
7186  // MOOSE doesn't change the search_direction
7187  changed_search_direction = false;
7188 
7190 }
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:173
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1132
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 
)
inherited

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

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

6332 {
6333  mooseDeprecated("Please use computeResidualSys");
6334 
6335  computeResidualSys(sys, soln, residual);
6336 }
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 
)
virtualinherited

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

Definition at line 6339 of file FEProblemBase.C.

6342 {
6343  setCurrentNonlinearSystem(nl_sys_num);
6344 
6345  // We associate the residual tag with the given residual vector to make sure we
6346  // don't filter it out below
6348  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6349 
6350  // We filter out tags which do not have associated vectors in the current nonlinear
6351  // system. This is essential to be able to use system-dependent residual tags.
6353 
6354  computeResidualInternal(soln, residual, _fe_vector_tags);
6355 }
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:937
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:267
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:150
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.

◆ computeResidualAB()

void EigenProblem::computeResidualAB ( const NumericVector< Number > &  soln,
NumericVector< Number > &  residualA,
NumericVector< Number > &  residualB,
TagID  tagA,
TagID  tagB 
)

Form two vetors, where each is associated with one tag, through one element-loop.

Definition at line 317 of file EigenProblem.C.

Referenced by computeResidualL2Norm(), and Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB().

322 {
323  TIME_SECTION("computeResidualAB", 3);
324 
325  // Disassociate the default tags because we will associate vectors with only the
326  // specific system tags that we need for this instance
327  _nl_eigen->disassociateDefaultVectorTags();
328 
329  // Clear FE tags and first add the specific tags associated with the residual
330  _fe_vector_tags.clear();
331  _fe_vector_tags.insert(tagA);
332  _fe_vector_tags.insert(tagB);
333 
334  // Add any other user-added vector residual tags if they have associated vectors
335  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
336  for (const auto & vector_tag : residual_vector_tags)
337  if (_nl_eigen->hasVector(vector_tag._id))
338  _fe_vector_tags.insert(vector_tag._id);
339 
340  _nl_eigen->associateVectorToTag(residualA, tagA);
341  _nl_eigen->associateVectorToTag(residualB, tagB);
342 
343  _nl_eigen->setSolution(soln);
344 
346 
347  _nl_eigen->disassociateVectorFromTag(residualA, tagA);
348  _nl_eigen->disassociateVectorFromTag(residualB, tagB);
349 }
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:150
std::set< TagID > _fe_vector_tags

◆ computeResidualAndJacobian()

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

Form a residual and Jacobian with default tags.

Definition at line 6358 of file FEProblemBase.C.

Referenced by ComputeResidualAndJacobian::residual_and_jacobian().

6361 {
6362  // vector tags
6363  {
6365  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6366 
6367  // We filter out tags which do not have associated vectors in the current nonlinear
6368  // system. This is essential to be able to use system-dependent residual tags.
6370 
6372  }
6373 
6374  // matrix tags
6375  {
6376  _fe_matrix_tags.clear();
6377 
6378  auto & tags = getMatrixTags();
6379  for (auto & tag : tags)
6380  _fe_matrix_tags.insert(tag.second);
6381  }
6382 
6383  try
6384  {
6385  try
6386  {
6387  // vector tags
6388  {
6390  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
6391 
6392  // We filter out tags which do not have associated vectors in the current nonlinear
6393  // system. This is essential to be able to use system-dependent residual tags.
6395 
6397  }
6398 
6399  // matrix tags
6400  {
6401  _fe_matrix_tags.clear();
6402 
6403  auto & tags = getMatrixTags();
6404  for (auto & tag : tags)
6405  _fe_matrix_tags.insert(tag.second);
6406  }
6407 
6409 
6412 
6413  for (const auto tag : _fe_matrix_tags)
6414  if (_current_nl_sys->hasMatrix(tag))
6415  {
6416  auto & matrix = _current_nl_sys->getMatrix(tag);
6417  matrix.zero();
6418  if (haveADObjects())
6419  // PETSc algorithms require diagonal allocations regardless of whether there is non-zero
6420  // diagonal dependence. With global AD indexing we only add non-zero
6421  // dependence, so PETSc will scream at us unless we artificially add the diagonals.
6422  for (auto index : make_range(matrix.row_start(), matrix.row_stop()))
6423  matrix.add(index, index, 0);
6424  }
6425 
6426  _aux->zeroVariablesForResidual();
6427 
6428  unsigned int n_threads = libMesh::n_threads();
6429 
6431 
6432  // Random interface objects
6433  for (const auto & it : _random_data_objects)
6434  it.second->updateSeeds(EXEC_LINEAR);
6435 
6439  if (_displaced_problem)
6440  {
6441  _displaced_problem->setCurrentlyComputingResidual(true);
6442  _displaced_problem->setCurrentlyComputingJacobian(true);
6443  _displaced_problem->setCurrentlyComputingResidualAndJacobian(true);
6444  }
6445 
6447 
6449 
6450  for (unsigned int tid = 0; tid < n_threads; tid++)
6451  reinitScalars(tid);
6452 
6454 
6455  _aux->residualSetup();
6456 
6457  if (_displaced_problem)
6458  {
6460  _displaced_problem->updateMesh();
6462  updateMortarMesh();
6463  }
6464 
6465  for (THREAD_ID tid = 0; tid < n_threads; tid++)
6466  {
6469  }
6470 
6472 
6474 
6476 
6478 
6481 
6483 
6486  }
6487  catch (...)
6488  {
6489  handleException("computeResidualAndJacobian");
6490  }
6491  }
6492  catch (const MooseException &)
6493  {
6494  // The buck stops here, we have already handled the exception by
6495  // calling the system's stopSolve() method, it is now up to PETSc to return a
6496  // "diverged" reason during the next solve.
6497  }
6498  catch (...)
6499  {
6500  mooseError("Unexpected exception type");
6501  }
6502 
6503  resetState();
6504 }
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:949
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
TagID systemMatrixTag() const override
Return the Matrix Tag ID for System.
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
void setCurrentlyComputingResidual(bool currently_computing_residual) final
Set whether or not the problem is in the process of computing the residual.
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:937
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:338
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:267
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:1437
void setCurrentlyComputingJacobian(const bool currently_computing_jacobian)
Set whether or not the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:659
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void computeResidualAndJacobianTags(const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Form possibly multiple tag-associated vectors and matrices.
void handleException(const std::string &calling_method)
Handle exceptions.
virtual void zero()=0
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1081
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:1032
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:150
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
bool haveADObjects() const
Method for reading wehther we have any ad objects.
Definition: SubProblem.h:741
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:225
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:1044
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:980
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:1078
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h: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 
)
virtualinherited

Form a residual vector for a set of tags.

It should not be called directly by users.

Definition at line 6536 of file FEProblemBase.C.

Referenced by FEProblemBase::computeResidual().

6539 {
6540  parallel_object_only();
6541 
6542  TIME_SECTION("computeResidualInternal", 1);
6543 
6544  try
6545  {
6547 
6549 
6550  computeResidualTags(tags);
6551 
6553  }
6554  catch (MooseException & e)
6555  {
6556  // If a MooseException propagates all the way to here, it means
6557  // that it was thrown from a MOOSE system where we do not
6558  // (currently) properly support the throwing of exceptions, and
6559  // therefore we have no choice but to error out. It may be
6560  // *possible* to handle exceptions from other systems, but in the
6561  // meantime, we don't want to silently swallow any unhandled
6562  // exceptions here.
6563  mooseError("An unhandled MooseException was raised during residual computation. Please "
6564  "contact the MOOSE team for assistance.");
6565  }
6566 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:949
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:937
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
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 EigenProblem::computeResidualL2Norm ( )
overridevirtual

Compute the residual of Ax - Bx.

If there is no yet, "1" will be used.

Reimplemented from FEProblemBase.

Definition at line 352 of file EigenProblem.C.

353 {
354  computeResidualAB(*_nl_eigen->currentSolution(),
355  _nl_eigen->residualVectorAX(),
356  _nl_eigen->residualVectorBX(),
357  _nl_eigen->nonEigenVectorTag(),
358  _nl_eigen->eigenVectorTag());
359 
360  Real eigenvalue = 1.0;
361 
362  if (_active_eigen_index < _nl_eigen->getNumConvergedEigenvalues())
363  eigenvalue = _nl_eigen->getConvergedEigenvalue(_active_eigen_index).first;
364 
365  // Scale BX with eigenvalue
366  _nl_eigen->residualVectorBX() *= eigenvalue;
367 
368  // Compute entire residual
370  _nl_eigen->residualVectorAX() += _nl_eigen->residualVectorBX();
371  else
372  _nl_eigen->residualVectorAX() -= _nl_eigen->residualVectorBX();
373 
374  return _nl_eigen->residualVectorAX().l2_norm();
375 }
bool _negative_sign_eigen_kernel
Whether or not use negative sign for Bx.
Definition: EigenProblem.h:249
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
void computeResidualAB(const NumericVector< Number > &soln, NumericVector< Number > &residualA, NumericVector< Number > &residualB, TagID tagA, TagID tagB)
Form two vetors, where each is associated with one tag, through one element-loop. ...
Definition: EigenProblem.C:317
unsigned int _active_eigen_index
Which eigenvalue is used to compute residual.
Definition: EigenProblem.h:252
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeResidualSys()

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

This function is called by Libmesh to form a residual.

Definition at line 6317 of file FEProblemBase.C.

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

6320 {
6321  parallel_object_only();
6322 
6323  TIME_SECTION("computeResidualSys", 5);
6324 
6325  computeResidual(soln, residual, sys.number());
6326 }
void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
This function is called by Libmesh to form a residual.

◆ computeResidualTag()

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

Form a vector for all kernels and BCs with a given tag.

Reimplemented from FEProblemBase.

Definition at line 286 of file EigenProblem.C.

Referenced by NonlinearEigenSystem::computeScalingResidual(), Moose::SlepcSupport::mooseMatMult(), Moose::SlepcSupport::moosePetscSNESFormFunction(), and preScaleEigenVector().

289 {
290  TIME_SECTION("computeResidualTag", 3);
291 
292  // Disassociate the default tags because we will associate vectors with only the
293  // specific system tags that we need for this instance
294  _nl_eigen->disassociateDefaultVectorTags();
295 
296  // Clear FE tags and first add the specific tag associated with the residual
297  _fe_vector_tags.clear();
298  _fe_vector_tags.insert(tag);
299 
300  // Add any other user-added vector residual tags if they have associated vectors
301  const auto & residual_vector_tags = getVectorTags(Moose::VECTOR_TAG_RESIDUAL);
302  for (const auto & vector_tag : residual_vector_tags)
303  if (_nl_eigen->hasVector(vector_tag._id))
304  _fe_vector_tags.insert(vector_tag._id);
305 
306  _nl_eigen->associateVectorToTag(residual, tag);
307 
308  _nl_eigen->setSolution(soln);
309 
312 
313  _nl_eigen->disassociateVectorFromTag(residual, tag);
314 }
virtual void computeResidualTags(const std::set< TagID > &tags)
Form multiple residual vectors and each is associated with one tag.
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:150
std::set< TagID > _fe_vector_tags

◆ computeResidualTags()

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

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

Definition at line 6652 of file FEProblemBase.C.

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

6653 {
6654  parallel_object_only();
6655 
6656  try
6657  {
6658  try
6659  {
6660  TIME_SECTION("computeResidualTags", 5, "Computing Residual");
6661 
6662  ADReal::do_derivatives = false;
6663 
6665 
6666  _aux->zeroVariablesForResidual();
6667 
6668  unsigned int n_threads = libMesh::n_threads();
6669 
6671 
6672  // Random interface objects
6673  for (const auto & it : _random_data_objects)
6674  it.second->updateSeeds(EXEC_LINEAR);
6675 
6677 
6679 
6680  for (unsigned int tid = 0; tid < n_threads; tid++)
6681  reinitScalars(tid);
6682 
6684 
6685  _aux->residualSetup();
6686 
6687  if (_displaced_problem)
6688  {
6690  _displaced_problem->updateMesh();
6692  updateMortarMesh();
6693  }
6694 
6695  for (THREAD_ID tid = 0; tid < n_threads; tid++)
6696  {
6699  }
6700 
6702 
6704 
6706 
6708 
6711  }
6712  catch (...)
6713  {
6714  handleException("computeResidualTags");
6715  }
6716  }
6717  catch (const MooseException &)
6718  {
6719  // The buck stops here, we have already handled the exception by
6720  // calling the system's stopSolve() method, it is now up to PETSc to return a
6721  // "diverged" reason during the next solve.
6722  }
6723  catch (...)
6724  {
6725  mooseError("Unexpected exception type");
6726  }
6727 
6728  resetState();
6729 }
virtual void residualSetup(THREAD_ID tid=0) const
unsigned int n_threads()
ExecFlagType _current_execute_on_flag
Current execute_on flag.
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
void computeResidualTags(const std::set< TagID > &tags)
Form multiple tag-associated residual vectors for all the given tags.
virtual void resetState()
Reset state of this object in preparation for the next evaluation.
virtual void computeUserObjects(const ExecFlagType &type, const Moose::AuxGroup &group)
Call compute methods on UserObjects.
void handleException(const std::string &calling_method)
Handle exceptions.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1081
MortarData _mortar_data
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
void residualSetup()
Calls the residualSetup function for each of the output objects.
const ExecFlagType EXEC_PRE_DISPLACE
Definition: Moose.C: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:1773
void computeSystems(const ExecFlagType &type)
Do generic system computations.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
unsigned int THREAD_ID
Definition: MooseTypes.h:198
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeResidualType()

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

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

Definition at line 6569 of file FEProblemBase.C.

6572 {
6573  TIME_SECTION("computeResidualType", 5);
6574 
6575  try
6576  {
6578 
6580 
6582 
6584  }
6585  catch (MooseException & e)
6586  {
6587  // If a MooseException propagates all the way to here, it means
6588  // that it was thrown from a MOOSE system where we do not
6589  // (currently) properly support the throwing of exceptions, and
6590  // therefore we have no choice but to error out. It may be
6591  // *possible* to handle exceptions from other systems, but in the
6592  // meantime, we don't want to silently swallow any unhandled
6593  // exceptions here.
6594  mooseError("An unhandled MooseException was raised during residual computation. Please "
6595  "contact the MOOSE team for assistance.");
6596  }
6597 }
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
Definition: SystemBase.C:949
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
Definition: SystemBase.C:937
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Definition: SolverSystem.C:65
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.

◆ computeSystems()

void FEProblemBase::computeSystems ( const ExecFlagType type)
protectedinherited

Do generic system computations.

Definition at line 8702 of file FEProblemBase.C.

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

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

◆ computeTransposeNullSpace()

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

Definition at line 7095 of file FEProblemBase.C.

Referenced by Moose::compute_transpose_nullspace().

7097 {
7098  mooseAssert(_current_nl_sys && (sys.number() == _current_nl_sys->number()),
7099  "I expect these system numbers to be the same");
7100  sp.clear();
7101  for (unsigned int i = 0; i < subspaceDim("TransposeNullSpace"); ++i)
7102  {
7103  std::stringstream postfix;
7104  postfix << "_" << i;
7105  sp.push_back(&_current_nl_sys->getVector("TransposeNullSpace" + postfix.str()));
7106  }
7107 }
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:1132
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:889

◆ computeUserObjectByName()

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

Compute an user object with the given name.

Definition at line 4349 of file FEProblemBase.C.

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

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

◆ computeUserObjects()

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

Call compute methods on UserObjects.

Definition at line 4365 of file FEProblemBase.C.

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

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

◆ computeUserObjectsInternal()

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

Definition at line 4373 of file FEProblemBase.C.

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

4376 {
4377  try
4378  {
4379  TIME_SECTION("computeUserObjects", 1, "Computing User Objects");
4380 
4381  // Add group to query
4382  if (group == Moose::PRE_IC)
4383  primary_query.condition<AttribPreIC>(true);
4384  else if (group == Moose::PRE_AUX)
4385  primary_query.condition<AttribPreAux>(type);
4386  else if (group == Moose::POST_AUX)
4387  primary_query.condition<AttribPostAux>(type);
4388 
4389  // query everything first to obtain a list of execution groups
4390  std::vector<UserObject *> uos;
4391  primary_query.clone().queryIntoUnsorted(uos);
4392  std::set<int> execution_groups;
4393  for (const auto & uo : uos)
4394  execution_groups.insert(uo->getParam<int>("execution_order_group"));
4395 
4396  // iterate over execution order groups
4397  for (const auto execution_group : execution_groups)
4398  {
4399  auto query = primary_query.clone().condition<AttribExecutionOrderGroup>(execution_group);
4400 
4401  std::vector<GeneralUserObject *> genobjs;
4402  query.clone().condition<AttribInterfaces>(Interfaces::GeneralUserObject).queryInto(genobjs);
4403 
4404  std::vector<UserObject *> userobjs;
4405  query.clone()
4410  .queryInto(userobjs);
4411 
4412  std::vector<UserObject *> tgobjs;
4413  query.clone()
4415  .queryInto(tgobjs);
4416 
4417  std::vector<UserObject *> nodal;
4418  query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).queryInto(nodal);
4419 
4420  std::vector<MortarUserObject *> mortar;
4421  query.clone().condition<AttribInterfaces>(Interfaces::MortarUserObject).queryInto(mortar);
4422 
4423  if (userobjs.empty() && genobjs.empty() && tgobjs.empty() && nodal.empty() && mortar.empty())
4424  continue;
4425 
4426  // Start the timer here since we have at least one active user object
4427  std::string compute_uo_tag = "computeUserObjects(" + Moose::stringify(type) + ")";
4428 
4429  // Perform Residual/Jacobian setups
4430  if (type == EXEC_LINEAR)
4431  {
4432  for (auto obj : userobjs)
4433  obj->residualSetup();
4434  for (auto obj : nodal)
4435  obj->residualSetup();
4436  for (auto obj : mortar)
4437  obj->residualSetup();
4438  for (auto obj : tgobjs)
4439  obj->residualSetup();
4440  for (auto obj : genobjs)
4441  obj->residualSetup();
4442  }
4443  else if (type == EXEC_NONLINEAR)
4444  {
4445  for (auto obj : userobjs)
4446  obj->jacobianSetup();
4447  for (auto obj : nodal)
4448  obj->jacobianSetup();
4449  for (auto obj : mortar)
4450  obj->jacobianSetup();
4451  for (auto obj : tgobjs)
4452  obj->jacobianSetup();
4453  for (auto obj : genobjs)
4454  obj->jacobianSetup();
4455  }
4456 
4457  for (auto obj : userobjs)
4458  obj->initialize();
4459 
4460  // Execute Side/InternalSide/Interface/Elemental/DomainUserObjects
4461  if (!userobjs.empty())
4462  {
4463  // non-nodal user objects have to be run separately before the nodal user objects run
4464  // because some nodal user objects (NodalNormal related) depend on elemental user objects
4465  // :-(
4466  ComputeUserObjectsThread cppt(*this, query);
4467  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), cppt);
4468 
4469  // There is one instance in rattlesnake where an elemental user object's finalize depends
4470  // on a side user object having been finalized first :-(
4477  }
4478 
4479  // if any userobject may have written to variables we need to close the aux solution
4480  for (const auto & uo : userobjs)
4481  if (auto euo = dynamic_cast<const ElementUserObject *>(uo);
4482  euo && euo->hasWritableCoupledVariables())
4483  {
4484  _aux->solution().close();
4485  _aux->system().update();
4486  break;
4487  }
4488 
4489  // Execute NodalUserObjects
4490  // BISON has an axial reloc elemental user object that has a finalize func that depends on a
4491  // nodal user object's prev value. So we can't initialize this until after elemental objects
4492  // have been finalized :-(
4493  for (auto obj : nodal)
4494  obj->initialize();
4495  if (query.clone().condition<AttribInterfaces>(Interfaces::NodalUserObject).count() > 0)
4496  {
4497  ComputeNodalUserObjectsThread cnppt(*this, query);
4498  Threads::parallel_reduce(*_mesh.getLocalNodeRange(), cnppt);
4500  }
4501 
4502  // if any userobject may have written to variables we need to close the aux solution
4503  for (const auto & uo : nodal)
4504  if (auto nuo = dynamic_cast<const NodalUserObject *>(uo);
4505  nuo && nuo->hasWritableCoupledVariables())
4506  {
4507  _aux->solution().close();
4508  _aux->system().update();
4509  break;
4510  }
4511 
4512  // Execute MortarUserObjects
4513  {
4514  for (auto obj : mortar)
4515  obj->initialize();
4516  if (!mortar.empty())
4517  {
4518  auto create_and_run_mortar_functors = [this, type, &mortar](const bool displaced)
4519  {
4520  // go over mortar interfaces and construct functors
4521  const auto & mortar_interfaces = getMortarInterfaces(displaced);
4522  for (const auto & mortar_interface : mortar_interfaces)
4523  {
4524  const auto primary_secondary_boundary_pair = mortar_interface.first;
4525  auto mortar_uos_to_execute =
4526  getMortarUserObjects(primary_secondary_boundary_pair.first,
4527  primary_secondary_boundary_pair.second,
4528  displaced,
4529  mortar);
4530  const auto & mortar_generation_object = mortar_interface.second;
4531 
4532  auto * const subproblem = displaced
4533  ? static_cast<SubProblem *>(_displaced_problem.get())
4534  : static_cast<SubProblem *>(this);
4535  MortarUserObjectThread muot(mortar_uos_to_execute,
4536  mortar_generation_object,
4537  *subproblem,
4538  *this,
4539  displaced,
4540  subproblem->assembly(0, 0));
4541 
4542  muot();
4543  }
4544  };
4545 
4546  create_and_run_mortar_functors(false);
4547  if (_displaced_problem)
4548  create_and_run_mortar_functors(true);
4549  }
4550  for (auto obj : mortar)
4551  obj->finalize();
4552  }
4553 
4554  // Execute threaded general user objects
4555  for (auto obj : tgobjs)
4556  obj->initialize();
4557  std::vector<GeneralUserObject *> tguos_zero;
4558  query.clone()
4559  .condition<AttribThread>(0)
4560  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject)
4561  .queryInto(tguos_zero);
4562  for (auto obj : tguos_zero)
4563  {
4564  std::vector<GeneralUserObject *> tguos;
4565  auto q = query.clone()
4566  .condition<AttribName>(obj->name())
4567  .condition<AttribInterfaces>(Interfaces::ThreadedGeneralUserObject);
4568  q.queryInto(tguos);
4569 
4571  Threads::parallel_reduce(GeneralUserObjectRange(tguos.begin(), tguos.end()), ctguot);
4572  joinAndFinalize(q);
4573  }
4574 
4575  // Execute general user objects
4577  true);
4578  }
4579  }
4580  catch (...)
4581  {
4582  handleException("computeUserObjectsInternal");
4583  }
4584 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1041
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:1078
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:294
void handleException(const std::string &calling_method)
Handle exceptions.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
MooseMesh & _mesh
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
StoredRange< std::vector< GeneralUserObject * >::iterator, GeneralUserObject * > GeneralUserObjectRange
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:344
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h: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.

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

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

◆ computingNonlinearResid() [2/4]

bool SubProblem::computingNonlinearResid
inlineinherited

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

Definition at line 677 of file SubProblem.h.

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

◆ computingNonlinearResid() [3/4]

virtual void SubProblem::computingNonlinearResid
inlineinherited

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

Definition at line 682 of file SubProblem.h.

683  {
684  _computing_nonlinear_residual = computing_nonlinear_residual;
685  }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1072

◆ computingNonlinearResid() [4/4]

void FEProblemBase::computingNonlinearResid ( bool  computing_nonlinear_residual)
finalvirtualinherited

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

Reimplemented from SubProblem.

Definition at line 8403 of file FEProblemBase.C.

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

8404 {
8405  parallel_object_only();
8406 
8407  if (_displaced_problem)
8408  _displaced_problem->computingNonlinearResid(computing_nonlinear_residual);
8409  _computing_nonlinear_residual = computing_nonlinear_residual;
8410 }
bool _computing_nonlinear_residual
Whether the non-linear residual is being evaluated.
Definition: SubProblem.h:1072
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computingPreSMOResidual()

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

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

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

Implements SubProblem.

Definition at line 6105 of file FEProblemBase.C.

Referenced by DisplacedProblem::computingPreSMOResidual().

6106 {
6107  return _nl[nl_sys_num]->computingPreSMOResidual();
6108 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ computingScalingJacobian() [1/2]

void FEProblemBase::computingScalingJacobian ( bool  computing_scaling_jacobian)
inlineinherited

Setter for whether we're computing the scaling jacobian.

Definition at line 2139 of file FEProblemBase.h.

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

2140  {
2141  _computing_scaling_jacobian = computing_scaling_jacobian;
2142  }
bool _computing_scaling_jacobian
Flag used to indicate whether we are computing the scaling Jacobian.

◆ computingScalingJacobian() [2/2]

bool FEProblemBase::computingScalingJacobian ( ) const
inlinefinaloverridevirtualinherited

Getter for whether we're computing the scaling jacobian.

Implements SubProblem.

Definition at line 2144 of file FEProblemBase.h.

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

◆ computingScalingResidual() [1/2]

void FEProblemBase::computingScalingResidual ( bool  computing_scaling_residual)
inlineinherited

Setter for whether we're computing the scaling residual.

Definition at line 2149 of file FEProblemBase.h.

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

2150  {
2151  _computing_scaling_residual = computing_scaling_residual;
2152  }
bool _computing_scaling_residual
Flag used to indicate whether we are computing the scaling Residual.

◆ computingScalingResidual() [2/2]

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

Implements SubProblem.

Definition at line 2157 of file FEProblemBase.h.

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

◆ connectControllableParams()

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

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

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

Definition at line 33 of file MooseBaseParameterInterface.C.

37 {
38  MooseObjectParameterName primary_name(uniqueName(), parameter);
39  const auto base_type = _factory.getValidParams(object_type).get<std::string>("_moose_base");
40  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
42  primary_name, secondary_name);
43 
44  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
45  for (const auto & tag : tags)
46  {
47  if (!tag.empty())
48  {
49  MooseObjectParameterName tagged_name(tag, _moose_base.name(), parameter);
51  tagged_name, secondary_name);
52  }
53  }
54 }
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2225
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:57
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
Factory & _factory
The Factory associated with the MooseApp.
MooseObjectName uniqueName() const
The unique name for accessing input parameters of this object in the InputParameterWarehouse.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ console()

const ConsoleStream& Problem::console ( ) const
inlineinherited

Return console handle.

Definition at line 48 of file Problem.h.

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

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

◆ constantMatrices() [1/2]

bool EigenProblem::constantMatrices ( ) const
inline

◆ constantMatrices() [2/2]

void EigenProblem::constantMatrices ( bool  cm)
inline

Set a flag to indicate whether or not we use constant matrices.

Definition at line 215 of file EigenProblem.h.

215 { _constant_matrices = cm; }
bool _constant_matrices
Whether or not require constant matrices.
Definition: EigenProblem.h:265

◆ constJacobian()

bool FEProblemBase::constJacobian ( ) const
inherited

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

Definition at line 8290 of file FEProblemBase.C.

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

8291 {
8292  return _const_jacobian;
8293 }
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 FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), DisplacedProblem::nlConverged(), SubProblem::nlConverged(), EigenExecutionerBase::nonlinearSolve(), FEProblemSolve::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::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 ( )
inherited
Returns
the coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system

Definition at line 8575 of file FEProblemBase.C.

8576 {
8577  return mesh().coordTransform();
8578 }
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:1830
virtual MooseMesh & mesh() override

◆ copySolutionsBackwards()

void FEProblemBase::copySolutionsBackwards ( )
virtualinherited

Definition at line 6111 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

6112 {
6113  TIME_SECTION("copySolutionsBackwards", 3, "Copying Solutions Backward");
6114 
6115  for (auto & sys : _solver_systems)
6116  sys->copySolutionsBackwards();
6117  _aux->copySolutionsBackwards();
6118 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ coupling()

Moose::CouplingType FEProblemBase::coupling ( )
inlineinherited

Definition at line 171 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::computeJacobianInternal().

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

◆ couplingEntries()

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

◆ couplingMatrix()

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

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

Implements SubProblem.

Definition at line 2951 of file FEProblemBase.h.

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

2952 {
2953  return _cm[i].get();
2954 }
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 
)
inherited

Definition at line 7270 of file FEProblemBase.C.

7278 {
7279  _has_mortar = true;
7280 
7281  if (on_displaced)
7282  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7283  primary_secondary_subdomain_pair,
7285  on_displaced,
7286  periodic,
7287  debug,
7288  correct_edge_dropping,
7289  minimum_projection_angle);
7290  else
7291  return _mortar_data.createMortarInterface(primary_secondary_boundary_pair,
7292  primary_secondary_subdomain_pair,
7293  *this,
7294  on_displaced,
7295  periodic,
7296  debug,
7297  correct_edge_dropping,
7298  minimum_projection_angle);
7299 }
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 
)
virtualinherited

Definition at line 5582 of file FEProblemBase.C.

5588 {
5589  if (order == INVALID_ORDER)
5590  {
5591  // automatically determine the integration order
5592  order = _solver_systems[0]->getMinQuadratureOrder();
5593  for (const auto i : make_range(std::size_t(1), _solver_systems.size()))
5594  if (order < _solver_systems[i]->getMinQuadratureOrder())
5595  order = _solver_systems[i]->getMinQuadratureOrder();
5596  if (order < _aux->getMinQuadratureOrder())
5597  order = _aux->getMinQuadratureOrder();
5598  }
5599 
5600  if (volume_order == INVALID_ORDER)
5601  volume_order = order;
5602 
5603  if (face_order == INVALID_ORDER)
5604  face_order = order;
5605 
5606  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
5607  for (const auto i : index_range(_solver_systems))
5608  _assembly[tid][i]->createQRules(
5609  type, order, volume_order, face_order, block, allow_negative_qweights);
5610 
5611  if (_displaced_problem)
5612  _displaced_problem->createQRules(
5613  type, order, volume_order, face_order, block, allow_negative_qweights);
5614 
5615  updateMaxQps();
5616 }
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< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
auto index_range(const T &sizable)

◆ createTagSolutions()

void FEProblemBase::createTagSolutions ( )
protectedinherited

Create extra tagged solution vectors.

Definition at line 565 of file FEProblemBase.C.

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

566 {
567  for (auto & vector : getParam<std::vector<TagName>>("extra_tag_solutions"))
568  {
569  auto tag = addVectorTag(vector, Moose::VECTOR_TAG_SOLUTION);
570  for (auto & sys : _solver_systems)
571  sys->addVector(tag, false, GHOSTED);
572  _aux->addVector(tag, false, GHOSTED);
573  }
574 
575  if (getParam<bool>("previous_nl_solution_required"))
576  {
577  // We'll populate the zeroth state of the nonlinear iterations with the current solution for
578  // ease of use in doing things like copying solutions backwards. We're just storing pointers in
579  // the solution states containers so populating the zeroth state does not cost us the memory of
580  // a new vector
581  for (const auto i : make_range(0, 2))
582  {
583  for (auto & sys : _solver_systems)
584  sys->needSolutionState(i, Moose::SolutionIterationType::Nonlinear);
585  _aux->needSolutionState(i, Moose::SolutionIterationType::Nonlinear);
586  }
587  }
588 
590  for (auto & sys : _solver_systems)
591  sys->associateVectorToTag(*sys->system().current_local_solution.get(), tag);
592  _aux->associateVectorToTag(*_aux->system().current_local_solution.get(), tag);
593 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:82
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const 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 ( )
protectedinherited

Create extra tagged vectors and matrices.

Definition at line 543 of file FEProblemBase.C.

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

544 {
545  // add vectors and their tags to system
546  auto & vectors = getParam<std::vector<std::vector<TagName>>>("extra_tag_vectors");
547  for (const auto nl_sys_num : index_range(vectors))
548  for (auto & vector : vectors[nl_sys_num])
549  {
550  auto tag = addVectorTag(vector);
551  _nl[nl_sys_num]->addVector(tag, false, GHOSTED);
552  }
553 
554  // add matrices and their tags
555  auto & matrices = getParam<std::vector<std::vector<TagName>>>("extra_tag_matrices");
556  for (const auto nl_sys_num : index_range(matrices))
557  for (auto & matrix : matrices[nl_sys_num])
558  {
559  auto tag = addMatrixTag(matrix);
560  _nl[nl_sys_num]->addMatrix(tag);
561  }
562 }
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:82
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:289
auto index_range(const T &sizable)

◆ currentLinearSysNum()

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

Implements SubProblem.

Definition at line 8587 of file FEProblemBase.C.

Referenced by DisplacedProblem::currentLinearSysNum().

8588 {
8589  return currentLinearSystem().number();
8590 }
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1132
LinearSystem & currentLinearSystem()
Get a non-constant reference to the current linear system.

◆ currentLinearSystem() [1/2]

LinearSystem & FEProblemBase::currentLinearSystem ( )
inlineinherited

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

Definition at line 2919 of file FEProblemBase.h.

Referenced by FEProblemBase::currentLinearSysNum().

2920 {
2921  mooseAssert(_current_linear_sys, "The linear system is not currently set");
2922  return *_current_linear_sys;
2923 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.

◆ currentLinearSystem() [2/2]

const LinearSystem & FEProblemBase::currentLinearSystem ( ) const
inlineinherited

Get a constant reference to the current linear system.

Definition at line 2926 of file FEProblemBase.h.

2927 {
2928  mooseAssert(_current_linear_sys, "The linear system is not currently set");
2929  return *_current_linear_sys;
2930 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.

◆ currentlyComputingJacobian()

const bool& SubProblem::currentlyComputingJacobian ( ) const
inlineinherited

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

Definition at line 654 of file SubProblem.h.

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

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

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

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

◆ currentlyComputingResidual() [2/2]

const bool& SubProblem::currentlyComputingResidual
inlineinherited

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

Definition at line 690 of file SubProblem.h.

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

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

Referenced by SubProblem::reinitElemFaceRef().

1432 {
1434 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1069

◆ currentNlSysNum()

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

Implements SubProblem.

Definition at line 8581 of file FEProblemBase.C.

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

8582 {
8583  return currentNonlinearSystem().number();
8584 }
NonlinearSystemBase & currentNonlinearSystem()
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1132

◆ currentNonlinearSystem() [1/2]

NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( )
inlineinherited

◆ currentNonlinearSystem() [2/2]

const NonlinearSystemBase & FEProblemBase::currentNonlinearSystem ( ) const
inlineinherited

Definition at line 2896 of file FEProblemBase.h.

2897 {
2898  mooseAssert(_current_nl_sys, "The nonlinear system is not currently set");
2899  return *_current_nl_sys;
2900 }
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.

◆ currentResidualVectorTags()

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

Return the residual vector tags we are currently computing.

Implements SubProblem.

Definition at line 2967 of file FEProblemBase.h.

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

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

◆ customSetup()

void FEProblemBase::customSetup ( const ExecFlagType exec_type)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 4156 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

4157 {
4158  SubProblem::customSetup(exec_type);
4159 
4160  if (_line_search)
4161  _line_search->customSetup(exec_type);
4162 
4163  unsigned int n_threads = libMesh::n_threads();
4164  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4165  {
4166  _all_materials.customSetup(exec_type, tid);
4167  _functions.customSetup(exec_type, tid);
4168  }
4169 
4170  _aux->customSetup(exec_type);
4171  for (auto & nl : _nl)
4172  nl->customSetup(exec_type);
4173 
4174  if (_displaced_problem)
4175  _displaced_problem->customSetup(exec_type);
4176 
4177  for (THREAD_ID tid = 0; tid < n_threads; tid++)
4178  {
4179  _internal_side_indicators.customSetup(exec_type, tid);
4180  _indicators.customSetup(exec_type, tid);
4181  _markers.customSetup(exec_type, tid);
4182  }
4183 
4184  std::vector<UserObject *> userobjs;
4185  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
4186  for (auto obj : userobjs)
4187  obj->customSetup(exec_type);
4188 
4189  _app.getOutputWarehouse().customSetup(exec_type);
4190 }
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:1150
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:84
MooseObjectWarehouse< Indicator > _indicators
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseObjectWarehouse< Function > _functions
functions
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
MooseObjectWarehouse< Marker > _markers
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
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 132 of file SubProblem.h.

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

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

◆ diracKernelInfo()

DiracKernelInfo & SubProblem::diracKernelInfo ( )
virtualinherited

Definition at line 718 of file SubProblem.C.

719 {
720  return _dirac_kernel_info;
721 }
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
Definition: SubProblem.h:1016

◆ doFreeNonlinearPowerIterations()

void EigenProblem::doFreeNonlinearPowerIterations ( unsigned int  free_power_iterations)
private

Do some free/extra power iterations.

Definition at line 497 of file EigenProblem.C.

Referenced by solve().

498 {
499  mooseAssert(_current_nl_sys, "This needs to be non-null");
500 
501  doFreePowerIteration(true);
502  // Set free power iterations
504 
505  // Call solver
508 
509  // Clear free power iterations
510  auto executioner = getMooseApp().getExecutioner();
511  if (executioner)
513  else
514  mooseError("There is no executioner for this moose app");
515 
516  doFreePowerIteration(false);
517 }
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
Definition: SystemBase.C:1218
void clearFreeNonlinearPowerIterations(const InputParameters &params)
Definition: SlepcSupport.C:365
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:1483
virtual void solve() override=0
Solve the system (using libMesh magic)
void setFreeNonlinearPowerIterations(unsigned int free_power_iterations)
Set SLEPc/PETSc options to trigger free power iteration.
Definition: SlepcSupport.C:350
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool doFreePowerIteration() const
Whether or not we are doing free power iteration.
Definition: EigenProblem.h:82

◆ doFreePowerIteration() [1/2]

bool EigenProblem::doFreePowerIteration ( ) const
inline

Whether or not we are doing free power iteration.

It is used in convergence check. We need to mark the solver as "converged" when doing free power to retrieve the final solution from SLPEc

Definition at line 82 of file EigenProblem.h.

Referenced by doFreeNonlinearPowerIterations(), and Moose::SlepcSupport::mooseSlepcStoppingTest().

82 { return _do_free_power_iteration; }
bool _do_free_power_iteration
Whether or not we are doing free power iteration.
Definition: EigenProblem.h:257

◆ doFreePowerIteration() [2/2]

void EigenProblem::doFreePowerIteration ( bool  do_power)
inline

Set a flag to indicate whether or not we are doing free power iterations.

Definition at line 87 of file EigenProblem.h.

87 { _do_free_power_iteration = do_power; }
bool _do_free_power_iteration
Whether or not we are doing free power iteration.
Definition: EigenProblem.h:257

◆ doingPRefinement() [1/4]

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

Definition at line 1324 of file SubProblem.C.

Referenced by FEProblemBase::doingPRefinement(), and FEProblemBase::meshChangedHelper().

1325 {
1326  return mesh().doingPRefinement();
1327 }
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
inherited

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

1291 {
1292  mesh().doingPRefinement(doing_p_refinement);
1293 
1294  if (doing_p_refinement)
1295  {
1296  std::vector<FEFamily> disable_families(disable_p_refinement_for_families_enum.size());
1297  for (const auto i : index_range(disable_families))
1298  disable_families[i] =
1299  Utility::string_to_enum<FEFamily>(disable_p_refinement_for_families_enum[i]);
1300 
1301  for (const auto tid : make_range(libMesh::n_threads()))
1302  for (const auto s : make_range(numNonlinearSystems()))
1303  assembly(tid, s).havePRefinement(disable_families);
1304 
1305  auto & eq = es();
1306  for (const auto family : disable_families)
1307  for (const auto i : make_range(eq.n_systems()))
1308  {
1309  auto & system = eq.get_system(i);
1310  auto & dof_map = system.get_dof_map();
1311  for (const auto vg : make_range(system.n_variable_groups()))
1312  {
1313  const auto & var_group = system.variable_group(vg);
1314  if (var_group.type().family == family)
1315  dof_map.should_p_refine(vg, false);
1316  }
1317  }
1318 
1319  _have_p_refinement = true;
1320  }
1321 }
unsigned int n_threads()
virtual std::size_t numNonlinearSystems() const override
virtual EquationSystems & es() override
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) 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:1167
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
auto index_range(const T &sizable)

◆ doingPRefinement() [3/4]

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

Definition at line 1324 of file SubProblem.C.

1325 {
1326  return mesh().doingPRefinement();
1327 }
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 
)
overridevirtualinherited

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

Referenced by Adaptivity::doingPRefinement().

8653 {
8654  SubProblem::doingPRefinement(doing_p_refinement, disable_p_refinement_for_families);
8655  if (_displaced_problem)
8656  _displaced_problem->doingPRefinement(doing_p_refinement, disable_p_refinement_for_families);
8657 }
bool doingPRefinement() const
Definition: SubProblem.C:1324
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ dt()

virtual Real& FEProblemBase::dt ( ) const
inlinevirtualinherited

◆ dtOld()

virtual Real& FEProblemBase::dtOld ( ) const
inlinevirtualinherited

Definition at line 529 of file FEProblemBase.h.

Referenced by IterationAdaptiveDT::acceptStep().

529 { return _dt_old; }

◆ duplicateVariableCheck()

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

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

Definition at line 2453 of file FEProblemBase.C.

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

2456 {
2457  for (auto & sys : _solver_systems)
2458  {
2459  SystemBase * curr_sys_ptr = sys.get();
2460  SystemBase * other_sys_ptr = _aux.get();
2461  std::string error_prefix = "";
2462  if (is_aux)
2463  {
2464  curr_sys_ptr = _aux.get();
2465  other_sys_ptr = sys.get();
2466  error_prefix = "Aux";
2467  }
2468 
2469  if (other_sys_ptr->hasVariable(var_name))
2470  mooseError("Cannot have an auxiliary variable and a solver variable with the same name: ",
2471  var_name);
2472 
2473  if (curr_sys_ptr->hasVariable(var_name))
2474  {
2475  const Variable & var =
2476  curr_sys_ptr->system().variable(curr_sys_ptr->system().variable_number(var_name));
2477  if (var.type() != type)
2478  mooseError(error_prefix,
2479  "Variable with name '",
2480  var_name,
2481  "' already exists but is of a differing type!");
2482 
2483  return true;
2484  }
2485  }
2486 
2487  return false;
2488 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Base class for a system (of equations)
Definition: SystemBase.h:85
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
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:807
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 50 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ errorOnJacobianNonzeroReallocation()

bool FEProblemBase::errorOnJacobianNonzeroReallocation ( ) const
inlineinherited

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

Definition at line 1781 of file FEProblemBase.h.

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

1782  {
1784  }
bool _error_on_jacobian_nonzero_reallocation

◆ errorPrefix()

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

Definition at line 43 of file MooseBase.C.

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

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

◆ es()

virtual EquationSystems& FEProblemBase::es ( )
inlineoverridevirtualinherited

◆ execMultiApps()

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

Execute the MultiApps associated with the ExecFlagType.

Definition at line 4990 of file FEProblemBase.C.

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

4991 {
4992  // Active MultiApps
4993  const std::vector<MooseSharedPointer<MultiApp>> & multi_apps =
4995 
4996  // Do anything that needs to be done to Apps before transfers
4997  for (const auto & multi_app : multi_apps)
4998  multi_app->preTransfer(_dt, _time);
4999 
5000  // Execute Transfers _to_ MultiApps
5002 
5003  // Execute Transfers _between_ Multiapps
5005 
5006  // Execute MultiApps
5007  if (multi_apps.size())
5008  {
5009  TIME_SECTION("execMultiApps", 1, "Executing MultiApps", false);
5010 
5011  if (_verbose_multiapps)
5012  _console << COLOR_CYAN << "\nExecuting MultiApps on " << Moose::stringify(type)
5013  << COLOR_DEFAULT << std::endl;
5014 
5015  bool success = true;
5016 
5017  for (const auto & multi_app : multi_apps)
5018  {
5019  success = multi_app->solveStep(_dt, _time, auto_advance);
5020  // no need to finish executing the subapps if one fails
5021  if (!success)
5022  break;
5023  }
5024 
5026 
5027  _communicator.min(success);
5028 
5029  if (!success)
5030  return false;
5031 
5032  if (_verbose_multiapps)
5033  _console << COLOR_CYAN << "Finished Executing MultiApps on " << Moose::stringify(type) << "\n"
5034  << COLOR_DEFAULT << std::endl;
5035  }
5036 
5037  // Execute Transfers _from_ MultiApps
5039 
5040  // If we made it here then everything passed
5041  return true;
5042 }
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:51
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 
)
inherited

Execute MultiAppTransfers associated with execution flag and direction.

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

Definition at line 4890 of file FEProblemBase.C.

Referenced by FEProblemBase::execMultiApps().

4891 {
4892  bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
4893  bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
4894  std::string string_direction;
4895  if (to_multiapp)
4896  string_direction = " To ";
4897  else if (from_multiapp)
4898  string_direction = " From ";
4899  else
4900  string_direction = " Between ";
4901 
4902  const MooseObjectWarehouse<Transfer> & wh = to_multiapp ? _to_multi_app_transfers[type]
4903  : from_multiapp ? _from_multi_app_transfers[type]
4905 
4906  if (wh.hasActiveObjects())
4907  {
4908  TIME_SECTION("execMultiAppTransfers", 1, "Executing Transfers");
4909 
4910  const auto & transfers = wh.getActiveObjects();
4911 
4912  if (_verbose_multiapps)
4913  {
4914  _console << COLOR_CYAN << "\nTransfers on " << Moose::stringify(type) << string_direction
4915  << "MultiApps" << COLOR_DEFAULT << ":" << std::endl;
4916 
4918  {"Name", "Type", "From", "To"});
4919 
4920  // Build Table of Transfer Info
4921  for (const auto & transfer : transfers)
4922  {
4923  auto multiapp_transfer = dynamic_cast<MultiAppTransfer *>(transfer.get());
4924 
4925  table.addRow(multiapp_transfer->name(),
4926  multiapp_transfer->type(),
4927  multiapp_transfer->getFromName(),
4928  multiapp_transfer->getToName());
4929  }
4930 
4931  // Print it
4932  table.print(_console);
4933  }
4934 
4935  for (const auto & transfer : transfers)
4936  {
4937  transfer->setCurrentDirection(direction);
4938  transfer->execute();
4939  }
4940 
4942 
4943  if (_verbose_multiapps)
4944  _console << COLOR_CYAN << "Transfers on " << Moose::stringify(type) << " Are Finished\n"
4945  << COLOR_DEFAULT << std::endl;
4946  }
4947  else if (_multi_apps[type].getActiveObjects().size())
4948  {
4949  if (_verbose_multiapps)
4950  _console << COLOR_CYAN << "\nNo Transfers on " << Moose::stringify(type) << string_direction
4951  << "MultiApps\n"
4952  << COLOR_DEFAULT << std::endl;
4953  }
4954 }
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:51
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)
inherited

Execute the Transfers associated with the ExecFlagType.

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

Definition at line 5160 of file FEProblemBase.C.

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

5161 {
5162  if (_transfers[type].hasActiveObjects())
5163  {
5164  TIME_SECTION("execTransfers", 3, "Executing Transfers");
5165 
5166  const auto & transfers = _transfers[type].getActiveObjects();
5167 
5168  for (const auto & transfer : transfers)
5169  transfer->execute();
5170  }
5171 }
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ execute()

void EigenProblem::execute ( const ExecFlagType exec_type)
overridevirtual

Convenience function for performing execution of MOOSE systems.

We override this function to perform an initial scaling.

Reimplemented from FEProblemBase.

Definition at line 155 of file EigenProblem.C.

Referenced by Eigenvalue::execute(), Eigenvalue::init(), postScaleEigenVector(), and solve().

156 {
157  if (exec_type == EXEC_INITIAL)
158  // we need to scale the solution properly and we can do this only all initial setup of
159  // depending objects by the residual evaluations has been done to this point.
160  preScaleEigenVector(std::pair<Real, Real>(_initial_eigenvalue, 0));
161 
162  FEProblemBase::execute(exec_type);
163 }
void preScaleEigenVector(const std::pair< Real, Real > &eig)
Eigenvector need to be scaled back if it was scaled in an earlier stage Scaling eigen vector does not...
Definition: EigenProblem.C:422
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
Real _initial_eigenvalue
A value used for initial normalization.
Definition: EigenProblem.h:276
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28

◆ executeAllObjects()

void FEProblemBase::executeAllObjects ( const ExecFlagType exec_type)
virtualinherited

Definition at line 4151 of file FEProblemBase.C.

Referenced by Executor::exec().

4152 {
4153 }

◆ executeControls()

void FEProblemBase::executeControls ( const ExecFlagType exec_type)
inherited

Performs setup and execute calls for Control objects.

Definition at line 4587 of file FEProblemBase.C.

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

4588 {
4589  if (_control_warehouse[exec_type].hasActiveObjects())
4590  {
4591  TIME_SECTION("executeControls", 1, "Executing Controls");
4592 
4594 
4595  auto controls_wh = _control_warehouse[exec_type];
4596  // Add all of the dependencies into the resolver and sort them
4597  for (const auto & it : controls_wh.getActiveObjects())
4598  {
4599  // Make sure an item with no dependencies comes out too!
4600  resolver.addItem(it);
4601 
4602  std::vector<std::string> & dependent_controls = it->getDependencies();
4603  for (const auto & depend_name : dependent_controls)
4604  {
4605  if (controls_wh.hasActiveObject(depend_name))
4606  {
4607  auto dep_control = controls_wh.getActiveObject(depend_name);
4608  resolver.addEdge(dep_control, it);
4609  }
4610  else
4611  mooseError("The Control \"",
4612  depend_name,
4613  "\" was not created, did you make a "
4614  "spelling mistake or forget to include it "
4615  "in your input file?");
4616  }
4617  }
4618 
4619  const auto & ordered_controls = resolver.getSortedValues();
4620 
4621  if (!ordered_controls.empty())
4622  {
4623  _control_warehouse.setup(exec_type);
4624  // Run the controls in the proper order
4625  for (const auto & control : ordered_controls)
4626  control->execute();
4627  }
4628  }
4629 }
ExecuteMooseObjectWarehouse< Control > _control_warehouse
The control logic warehouse.
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const
void addEdge(const T &a, const T &b)
Add an edge between nodes &#39;a&#39; and &#39;b&#39;.
void addItem(const T &value)
Add an independent item to the set.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Class that represents the dependecy as a graph.

◆ executeSamplers()

void FEProblemBase::executeSamplers ( const ExecFlagType exec_type)
inherited

Performs setup and execute calls for Sampler objects.

Definition at line 4632 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

4633 {
4634  // TODO: This should be done in a threaded loop, but this should be super quick so for now
4635  // do a serial loop.
4636  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4637  {
4638  std::vector<Sampler *> objects;
4639  theWarehouse()
4640  .query()
4641  .condition<AttribSystem>("Sampler")
4642  .condition<AttribThread>(tid)
4643  .condition<AttribExecOns>(exec_type)
4644  .queryInto(objects);
4645 
4646  if (!objects.empty())
4647  {
4648  TIME_SECTION("executeSamplers", 1, "Executing Samplers");
4649  FEProblemBase::objectSetupHelper<Sampler>(objects, exec_type);
4650  FEProblemBase::objectExecuteHelper<Sampler>(objects);
4651  }
4652  }
4653 }
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 ( )
inherited

Definition at line 5045 of file FEProblemBase.C.

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

5046 {
5047  const auto & multi_apps = _multi_apps.getActiveObjects();
5048 
5049  for (const auto & multi_app : multi_apps)
5050  multi_app->finalize();
5051 }
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ finalNonlinearResidual()

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

Reimplemented from SubProblem.

Definition at line 6099 of file FEProblemBase.C.

6100 {
6101  return _nl[nl_sys_num]->finalNonlinearResidual();
6102 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ finishMultiAppStep()

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

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

Optionally recurse through all multi-app levels

Definition at line 5073 of file FEProblemBase.C.

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

5074 {
5075  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5076 
5077  if (multi_apps.size())
5078  {
5079  if (_verbose_multiapps)
5080  _console << COLOR_CYAN << "\nAdvancing MultiApps on " << type.name() << COLOR_DEFAULT
5081  << std::endl;
5082 
5083  for (const auto & multi_app : multi_apps)
5084  multi_app->finishStep(recurse_through_multiapp_levels);
5085 
5087 
5088  if (_verbose_multiapps)
5089  _console << COLOR_CYAN << "Finished Advancing MultiApps on " << type.name() << "\n"
5090  << COLOR_DEFAULT << std::endl;
5091  }
5092 }
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:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ forceOutput()

void FEProblemBase::forceOutput ( )
inherited

Indicates that the next call to outputStep should be forced.

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

Forced output will NOT override the allowOutput flag.

Definition at line 6205 of file FEProblemBase.C.

Referenced by TransientMultiApp::solveStep().

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

◆ formNorm()

Real EigenProblem::formNorm ( )

Form the Bx norm.

Definition at line 656 of file EigenProblem.C.

Referenced by preScaleEigenVector().

657 {
658  mooseAssert(_bx_norm_name,
659  "We should not get here unless a bx_norm postprocessor has been provided");
661 }
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
std::optional< PostprocessorName > _bx_norm_name
The name of the Postprocessor providing the Bx norm.
Definition: EigenProblem.h:292

◆ fvBCsIntegrityCheck() [1/2]

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

Definition at line 2083 of file FEProblemBase.h.

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

◆ fvBCsIntegrityCheck() [2/2]

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

Definition at line 2957 of file FEProblemBase.h.

2958 {
2960  // the user has requested that we don't check integrity so we will honor that
2961  return;
2962 
2963  _fv_bcs_integrity_check = fv_bcs_integrity_check;
2964 }
bool _fv_bcs_integrity_check
Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset...

◆ geomSearchData()

virtual GeometricSearchData& FEProblemBase::geomSearchData ( )
inlineoverridevirtualinherited

◆ getActiveElementalMooseVariables()

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

Get the MOOSE variables to be reinited on each element.

Parameters
tidThe thread id

Definition at line 432 of file SubProblem.C.

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

433 {
435 }
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:1042

◆ getActiveFEVariableCoupleableMatrixTags()

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

Definition at line 368 of file SubProblem.C.

369 {
371 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
Definition: SubProblem.h:1048

◆ getActiveFEVariableCoupleableVectorTags()

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

Definition at line 374 of file SubProblem.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

375 {
377 }
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
Definition: SubProblem.h:1050

◆ getActiveScalarVariableCoupleableMatrixTags()

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

Definition at line 409 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit().

410 {
412 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
Definition: SubProblem.h:1052

◆ getActiveScalarVariableCoupleableVectorTags()

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

Definition at line 415 of file SubProblem.C.

416 {
418 }
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
Definition: SubProblem.h:1054

◆ getActualFieldVariable()

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

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

Implements SubProblem.

Definition at line 5278 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSampleTransfer::execute().

5279 {
5280  for (auto & sys : _solver_systems)
5281  if (sys->hasVariable(var_name))
5282  return sys->getActualFieldVariable<Real>(tid, var_name);
5283  if (_aux->hasVariable(var_name))
5284  return _aux->getActualFieldVariable<Real>(tid, var_name);
5285 
5286  mooseError("Unknown variable " + var_name);
5287 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getArrayVariable()

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

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

Implements SubProblem.

Definition at line 5302 of file FEProblemBase.C.

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

5303 {
5304  for (auto & sys : _solver_systems)
5305  if (sys->hasVariable(var_name))
5306  return sys->getFieldVariable<RealEigenVector>(tid, var_name);
5307  if (_aux->hasVariable(var_name))
5308  return _aux->getFieldVariable<RealEigenVector>(tid, var_name);
5309 
5310  mooseError("Unknown variable " + var_name);
5311 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:138

◆ getAuxiliarySystem()

AuxiliarySystem& FEProblemBase::getAuxiliarySystem ( )
inlineinherited

◆ getAxisymmetricRadialCoord()

unsigned int SubProblem::getAxisymmetricRadialCoord ( ) const
inherited

Returns the desired radial direction for RZ coordinate transformation.

Returns
The coordinate direction for the radial direction

Definition at line 772 of file SubProblem.C.

773 {
774  return mesh().getAxisymmetricRadialCoord();
775 }
virtual MooseMesh & mesh()=0
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4038

◆ getBndMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getBndMaterialPropertyStorage ( )
inlineinherited

Definition at line 1572 of file FEProblemBase.h.

1572 { 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 268 of file MooseBaseParameterInterface.h.

270 {
271  return parameters().getCheckedPointerParam<T>(name, error_string);
272 }
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 712 of file SubProblem.C.

Referenced by MaterialPropertyDebugOutput::output().

713 {
715 }
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
Definition: SubProblem.h:1152

◆ getControlWarehouse()

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

Reference to the control logic warehouse.

Definition at line 1873 of file FEProblemBase.h.

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

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

◆ getCoordSystem()

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

Definition at line 1235 of file SubProblem.C.

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

1236 {
1237  return mesh().getCoordSystem(sid);
1238 }
virtual MooseMesh & mesh()=0
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Get the coordinate system type, e.g.
Definition: MooseMesh.C:3919

◆ getCurrentExecuteOnFlag()

const ExecFlagType & FEProblemBase::getCurrentExecuteOnFlag ( ) const
inherited

Return/set the current execution flag.

Returns EXEC_NONE when not being executed.

See also
FEProblemBase::execute

Definition at line 4139 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(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeNodalKernelsThread::printGeneralExecutionInformation(), ComputeNodalKernelBCJacobiansThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeNodalDampingThread::printGeneralExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeNodalKernelJacobiansThread::printGeneralExecutionInformation(), ComputeThreadedGeneralUserObjectsThread::printGeneralExecutionInformation(), ComputeUserObjectsThread::printGeneralExecutionInformation(), ComputeLinearFVElementalThread::printGeneralExecutionInformation(), ComputeLinearFVFaceThread::printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), MultiApp::restore(), ElementReporter::shouldStore(), NodalReporter::shouldStore(), GeneralReporter::shouldStore(), and WebServerControl::startServer().

4140 {
4141  return _current_execute_on_flag;
4142 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ getCurrentNonlinearEigenSystem()

NonlinearEigenSystem & EigenProblem::getCurrentNonlinearEigenSystem ( )
inline

◆ 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

Definition at line 24 of file DataFileInterface.C.

25 {
26  // The path from the parameters, which has not been modified because it is a DataFileName
27  const auto & value = _parent.template getParam<DataFileParameterType>(param);
28  if (value.empty())
29  _parent.paramInfo(param, "Data file name is empty");
30 
31  const std::filesystem::path value_path = std::filesystem::path(std::string(value));
32 
33  // If the file is absolute, we should reference that directly and don't need to add
34  // any info beacuse this is not ambiguous
35  if (value_path.is_absolute() && MooseUtils::checkFileReadable(value, false, false, false))
36  return value;
37 
38  // Look relative to the input file
39  const auto base = _parent.parameters().getParamFileBase(param);
40  const std::string relative_to_context = std::filesystem::absolute(base / value_path).c_str();
41  if (MooseUtils::checkFileReadable(relative_to_context, false, false, false))
42  {
43  _parent.paramInfo(param, "Data file '", value, "' found relative to the input file.");
44  return relative_to_context;
45  }
46 
47  // Isn't absolute and couldn't find relative to the input file, so search the data
48  return getDataFileNameByName(value, &param);
49 }
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::filesystem::path getParamFileBase(const std::string &param_name) const
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
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:256
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 53 of file DataFileInterface.C.

55 {
57  const auto share_dir = MooseUtils::pathjoin(Moose::getExecutablePath(), "..", "share");
58  if (MooseUtils::pathIsDirectory(share_dir))
59  {
60  const auto dirs = MooseUtils::listDir(share_dir, false);
61  for (const auto & data_dir : dirs)
62  {
63  const auto path = MooseUtils::pathjoin(data_dir, "data", relative_path);
64  if (MooseUtils::checkFileReadable(path, false, false, false))
65  {
66  if (param)
68  *param, "Data file '", path, "' found in an installed app distribution.");
69  else
70  mooseInfo("Data file '", path, "' found in an installed app distribution.");
71  return path;
72  }
73  }
74  }
75 
77  for (const auto & data_dir : Registry::getRegistry().getDataFilePaths())
78  {
79  const auto path = MooseUtils::pathjoin(data_dir, relative_path);
80  if (MooseUtils::checkFileReadable(path, false, false, false))
81  {
82  if (param)
83  _parent.paramInfo(*param, "Data file '", path, "' found in a source repository.");
84  else
85  mooseInfo("Data file '", path, "' found in a source repository.");
86  return path;
87  }
88  }
89 
90  mooseException(param ? _parent.parameters().inputLocation(*param) : _parent.name(),
91  ": Unable to find data file '",
92  relative_path,
93  "' anywhere");
94 }
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:57
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:366
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:256
std::string inputLocation(const std::string &param) const
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:768
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)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 2230 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

2231 {
2232  // First add in the undisplaced elements
2233  elems = _dirac_kernel_info.getElements();
2234 
2235  if (_displaced_problem)
2236  {
2237  std::set<const Elem *> displaced_elements;
2238  _displaced_problem->getDiracElements(displaced_elements);
2239 
2240  { // Use the ids from the displaced elements to get the undisplaced elements
2241  // and add them to the list
2242  for (const auto & elem : displaced_elements)
2243  elems.insert(_mesh.elemPtr(elem->id()));
2244  }
2245  }
2246 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
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:1016

◆ getDiscreteMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getDiscreteMaterialWarehouse ( ) const
inlineinherited

Definition at line 1757 of file FEProblemBase.h.

1757 { return _discrete_materials; }
MaterialWarehouse _discrete_materials

◆ getDisplacedProblem() [1/2]

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

◆ getDisplacedProblem() [2/2]

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

Definition at line 1514 of file FEProblemBase.h.

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

◆ getDistribution()

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

Definition at line 2411 of file FEProblemBase.C.

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

2412 {
2413  std::vector<Distribution *> objs;
2414  theWarehouse()
2415  .query()
2416  .condition<AttribSystem>("Distribution")
2417  .condition<AttribName>(name)
2418  .queryInto(objs);
2419  if (objs.empty())
2420  mooseError("Unable to find Distribution with name '" + name + "'");
2421  return *(objs[0]);
2422 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getEvaluableElementRange()

const ConstElemRange & FEProblemBase::getEvaluableElementRange ( )
inherited

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

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

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

Definition at line 697 of file FEProblemBase.C.

Referenced by NodalPatchRecoveryBase::finalize().

698 {
700  {
701  std::vector<const DofMap *> dof_maps(es().n_systems());
702  for (const auto i : make_range(es().n_systems()))
703  {
704  const auto & sys = es().get_system(i);
705  dof_maps[i] = &sys.get_dof_map();
706  }
708  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
709  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
710  }
712 }
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
virtual EquationSystems & es() override
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3199
MooseMesh & _mesh
IntRange< T > make_range(T beg, T end)

◆ getExecutor()

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

Definition at line 1825 of file FEProblemBase.h.

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

◆ getFailNextNonlinearConvergenceCheck()

bool FEProblemBase::getFailNextNonlinearConvergenceCheck ( ) const
inlineinherited

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

Definition at line 2196 of file FEProblemBase.h.

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

2197  {
2199  }
bool _fail_next_nonlinear_convergence_check

◆ getFunction()

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

Definition at line 2312 of file FEProblemBase.C.

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

2313 {
2314  // This thread lock is necessary since this method will create functions
2315  // for all threads if one is missing.
2316  Threads::spin_mutex::scoped_lock lock(get_function_mutex);
2317 
2318  if (!hasFunction(name, tid))
2319  {
2320  // If we didn't find a function, it might be a default function, attempt to construct one now
2321  std::istringstream ss(name);
2322  Real real_value;
2323 
2324  // First see if it's just a constant. If it is, build a ConstantFunction
2325  if (ss >> real_value && ss.eof())
2326  {
2327  InputParameters params = _factory.getValidParams("ConstantFunction");
2328  params.set<Real>("value") = real_value;
2329  addFunction("ConstantFunction", ss.str(), params);
2330  }
2331  else
2332  {
2334  std::string vars = "x,y,z,t,NaN,pi,e";
2335  if (fp.Parse(name, vars) == -1) // -1 for success
2336  {
2337  // It parsed ok, so build a MooseParsedFunction
2338  InputParameters params = _factory.getValidParams("ParsedFunction");
2339  params.set<std::string>("expression") = name;
2340  addFunction("ParsedFunction", name, params);
2341  }
2342  }
2343 
2344  // Try once more
2345  if (!hasFunction(name, tid))
2346  mooseError("Unable to find function " + name);
2347  }
2348 
2349  auto * const ret = dynamic_cast<Function *>(_functions.getActiveObject(name, tid).get());
2350  if (!ret)
2351  mooseError("No function named ", name, " of appropriate type");
2352 
2353  return *ret;
2354 }
Base class for function objects.
Definition: Function.h:37
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:1012
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:57
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
virtual void addFunction(const std::string &type, const std::string &name, InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseObjectWarehouse< Function > _functions
functions
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)

◆ getFunctor()

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

Definition at line 1174 of file SubProblem.h.

Referenced by FunctorInterface::getFunctorByName().

1178 {
1179  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1180 
1181  // Log the requestor
1182  _functor_to_requestors["wraps_" + name].insert(requestor_name);
1183 
1184  constexpr bool requested_functor_is_ad =
1185  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1186 
1187  auto & functor_to_request_info = _functor_to_request_info[tid];
1188 
1189  // Get the requested functor if we already have it
1190  auto & functors = _functors[tid];
1191  if (auto find_ret = functors.find("wraps_" + name); find_ret != functors.end())
1192  {
1193  if (functors.count("wraps_" + name) > 1)
1194  mooseError("Attempted to get a functor with the name '",
1195  name,
1196  "' but multiple functors match. Make sure that you do not have functor material "
1197  "properties, functions, postprocessors or variables with the same names");
1198 
1199  auto & [true_functor_is, non_ad_functor, ad_functor] = find_ret->second;
1200  auto & functor_wrapper = requested_functor_is_ad ? *ad_functor : *non_ad_functor;
1201 
1202  auto * const functor = dynamic_cast<Moose::Functor<T> *>(&functor_wrapper);
1203  if (!functor)
1204  mooseError("A call to SubProblem::getFunctor requested a functor named '",
1205  name,
1206  "' that returns the type: '",
1207  libMesh::demangle(typeid(T).name()),
1208  "'. However, that functor already exists and returns a different type: '",
1209  functor_wrapper.returnType(),
1210  "'");
1211 
1212  if (functor->template wrapsType<Moose::NullFunctor<T>>())
1213  // Store for future checking when the actual functor gets added
1214  functor_to_request_info.emplace(name,
1215  std::make_pair(requested_functor_is_ad, requestor_is_ad));
1216  else
1217  {
1218  // We already have the actual functor
1219  if (true_functor_is == SubProblem::TrueFunctorIs::UNSET)
1220  mooseError("We already have the functor; it should not be unset");
1221 
1222  // Check for whether this is a valid request
1223  if (!requested_functor_is_ad && requestor_is_ad &&
1224  true_functor_is == SubProblem::TrueFunctorIs::AD)
1225  mooseError("The AD object '",
1226  requestor_name,
1227  "' is requesting the functor '",
1228  name,
1229  "' as a non-AD functor even though it is truly an AD functor, which is not "
1230  "allowed, since this may unintentionally drop derivatives.");
1231  }
1232 
1233  return *functor;
1234  }
1235 
1236  // We don't have the functor yet but we could have it in the future. We'll create null functors
1237  // for now
1238  functor_to_request_info.emplace(name, std::make_pair(requested_functor_is_ad, requestor_is_ad));
1239  if constexpr (requested_functor_is_ad)
1240  {
1241  typedef typename MetaPhysicL::RawType<T>::value_type NonADType;
1242  typedef T ADType;
1243 
1244  auto emplace_ret =
1245  functors.emplace("wraps_" + name,
1246  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1247  std::make_unique<Moose::Functor<NonADType>>(
1248  std::make_unique<Moose::NullFunctor<NonADType>>()),
1249  std::make_unique<Moose::Functor<ADType>>(
1250  std::make_unique<Moose::NullFunctor<ADType>>())));
1251 
1252  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1253  ? std::get<2>(emplace_ret->second)
1254  : std::get<1>(emplace_ret->second)));
1255  }
1256  else
1257  {
1258  typedef T NonADType;
1259  typedef typename Moose::ADType<T>::type ADType;
1260 
1261  auto emplace_ret =
1262  functors.emplace("wraps_" + name,
1263  std::make_tuple(SubProblem::TrueFunctorIs::UNSET,
1264  std::make_unique<Moose::Functor<NonADType>>(
1265  std::make_unique<Moose::NullFunctor<NonADType>>()),
1266  std::make_unique<Moose::Functor<ADType>>(
1267  std::make_unique<Moose::NullFunctor<ADType>>())));
1268 
1269  return static_cast<Moose::Functor<T> &>(*(requested_functor_is_ad
1270  ? std::get<2>(emplace_ret->second)
1271  : std::get<1>(emplace_ret->second)));
1272  }
1273 }
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:1124
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
A multimap (for each thread) from unfilled functor requests to whether the requests were for AD funct...
Definition: SubProblem.h:1128
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:1111
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...

◆ getFVInitialConditionWarehouse()

const FVInitialConditionWarehouse& FEProblemBase::getFVInitialConditionWarehouse ( ) const
inlineinherited

Return FVInitialCondition storage.

Definition at line 1599 of file FEProblemBase.h.

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

1599 { return _fv_ics; }
FVInitialConditionWarehouse _fv_ics

◆ getFVMatsAndDependencies()

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

Get the materials and variables potentially needed for FV.

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

Definition at line 8483 of file FEProblemBase.C.

8489 {
8490  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
8491  {
8492  auto & this_face_mats =
8494  for (std::shared_ptr<MaterialBase> face_mat : this_face_mats)
8495  if (face_mat->ghostable())
8496  {
8497  mooseAssert(!face_mat->hasStatefulProperties(),
8498  "Finite volume materials do not currently support stateful properties.");
8499  face_materials.push_back(face_mat);
8500  auto & var_deps = face_mat->getMooseVariableDependencies();
8501  for (auto * var : var_deps)
8502  {
8503  mooseAssert(
8504  var->isFV(),
8505  "Ghostable materials should only have finite volume variables coupled into them.");
8506  variables.insert(var);
8507  }
8508  }
8509  }
8510 
8511  if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
8512  {
8513  auto & this_neighbor_mats =
8515  for (std::shared_ptr<MaterialBase> neighbor_mat : this_neighbor_mats)
8516  if (neighbor_mat->ghostable())
8517  {
8518  mooseAssert(!neighbor_mat->hasStatefulProperties(),
8519  "Finite volume materials do not currently support stateful properties.");
8520  neighbor_materials.push_back(neighbor_mat);
8521 #ifndef NDEBUG
8522  auto & var_deps = neighbor_mat->getMooseVariableDependencies();
8523  for (auto * var : var_deps)
8524  {
8525  mooseAssert(
8526  var->isFV(),
8527  "Ghostable materials should only have finite volume variables coupled into them.");
8528  auto pr = variables.insert(var);
8529  mooseAssert(!pr.second,
8530  "We should not have inserted any new variables dependencies from our "
8531  "neighbor materials that didn't exist for our face materials");
8532  }
8533 #endif
8534  }
8535  }
8536 }
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
MaterialWarehouse _materials

◆ getIndicatorWarehouse()

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

Return indicator/marker storage.

Definition at line 1583 of file FEProblemBase.h.

1583 { return _indicators; }
MooseObjectWarehouse< Indicator > _indicators

◆ getInitialConditionWarehouse()

const InitialConditionWarehouse& FEProblemBase::getInitialConditionWarehouse ( ) const
inlineinherited

Return InitialCondition storage.

Definition at line 1594 of file FEProblemBase.h.

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

1594 { return _ics; }
InitialConditionWarehouse _ics

◆ getInterfaceMaterialsWarehouse()

const MaterialWarehouse& FEProblemBase::getInterfaceMaterialsWarehouse ( ) const
inlineinherited

Definition at line 1758 of file FEProblemBase.h.

1758 { return _interface_materials; }
MaterialWarehouse _interface_materials

◆ getInternalSideIndicatorWarehouse()

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

Definition at line 1584 of file FEProblemBase.h.

1585  {
1587  }
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators

◆ getLinearSystem() [1/2]

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

Get non-constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 2903 of file FEProblemBase.h.

Referenced by MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), Moose::compute_linear_system(), ComputeLinearFVElementalThread::fetchSystemContributionObjects(), ComputeLinearFVFaceThread::fetchSystemContributionObjects(), ComputeLinearFVGreenGaussGradientFaceThread::operator()(), ComputeLinearFVGreenGaussGradientVolumeThread::operator()(), and Moose::PetscSupport::petscSetDefaults().

2904 {
2905  mooseAssert(sys_num < _linear_systems.size(),
2906  "System number greater than the number of linear systems");
2907  return *_linear_systems[sys_num];
2908 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ getLinearSystem() [2/2]

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

Get a constant reference to a linear system.

Parameters
sys_numThe number of the linear system

Definition at line 2911 of file FEProblemBase.h.

2912 {
2913  mooseAssert(sys_num < _linear_systems.size(),
2914  "System number greater than the number of linear systems");
2915  return *_linear_systems[sys_num];
2916 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ getLineSearch()

LineSearch* FEProblemBase::getLineSearch ( )
inlineoverridevirtualinherited

getter for the MOOSE line search

Implements SubProblem.

Definition at line 643 of file FEProblemBase.h.

Referenced by DisplacedProblem::getLineSearch().

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

◆ getMarkerWarehouse()

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

Definition at line 1588 of file FEProblemBase.h.

1588 { return _markers; }
MooseObjectWarehouse< Marker > _markers

◆ getMaterial()

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

Return a pointer to a MaterialBase object.

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

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

Definition at line 3367 of file FEProblemBase.C.

Referenced by MaterialPropertyInterface::getMaterialByName().

3371 {
3372  switch (type)
3373  {
3375  name += "_neighbor";
3376  break;
3378  name += "_face";
3379  break;
3380  default:
3381  break;
3382  }
3383 
3384  std::shared_ptr<MaterialBase> material = _all_materials[type].getActiveObject(name, tid);
3385  if (!no_warn && material->getParam<bool>("compute") && type == Moose::BLOCK_MATERIAL_DATA)
3386  mooseWarning("You are retrieving a Material object (",
3387  material->name(),
3388  "), but its compute flag is set to true. This indicates that MOOSE is "
3389  "computing this property which may not be desired and produce un-expected "
3390  "results.");
3391 
3392  return material;
3393 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
std::shared_ptr< T > getActiveObject(const std::string &name, THREAD_ID tid=0) const
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MaterialWarehouse _all_materials

◆ getMaterialData()

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

Definition at line 3396 of file FEProblemBase.C.

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

3397 {
3398  switch (type)
3399  {
3401  return _material_props.getMaterialData(tid);
3408  }
3409 
3410  mooseError("FEProblemBase::getMaterialData(): Invalid MaterialDataType ", type);
3411 }
MaterialPropertyStorage & _bnd_material_props
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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 467 of file SubProblem.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyBlockNames().

468 {
469  std::set<SubdomainID> blocks = getMaterialPropertyBlocks(prop_name);
470  std::vector<SubdomainName> block_names;
471  block_names.reserve(blocks.size());
472  for (const auto & block_id : blocks)
473  {
474  SubdomainName name;
475  name = mesh().getMesh().subdomain_name(block_id);
476  if (name.empty())
477  {
478  std::ostringstream oss;
479  oss << block_id;
480  name = oss.str();
481  }
482  block_names.push_back(name);
483  }
484 
485  return block_names;
486 }
virtual MooseMesh & mesh()=0
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3199
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:451

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

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

452 {
453  std::set<SubdomainID> blocks;
454 
455  for (const auto & it : _map_block_material_props)
456  {
457  const std::set<std::string> & prop_names = it.second;
458  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
459  if (name_it != prop_names.end())
460  blocks.insert(it.first);
461  }
462 
463  return blocks;
464 }
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1019

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

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

504 {
505  std::set<BoundaryID> boundaries;
506 
507  for (const auto & it : _map_boundary_material_props)
508  {
509  const std::set<std::string> & prop_names = it.second;
510  std::set<std::string>::iterator name_it = prop_names.find(prop_name);
511  if (name_it != prop_names.end())
512  boundaries.insert(it.first);
513  }
514 
515  return boundaries;
516 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1022

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

Referenced by MaterialPropertyInterface::getMaterialPropertyBoundaryNames().

520 {
521  std::set<BoundaryID> boundaries = getMaterialPropertyBoundaryIDs(prop_name);
522  std::vector<BoundaryName> boundary_names;
523  boundary_names.reserve(boundaries.size());
524  const BoundaryInfo & boundary_info = mesh().getMesh().get_boundary_info();
525 
526  for (const auto & bnd_id : boundaries)
527  {
528  BoundaryName name;
529  if (bnd_id == Moose::ANY_BOUNDARY_ID)
530  name = "ANY_BOUNDARY_ID";
531  else
532  {
533  name = boundary_info.get_sideset_name(bnd_id);
534  if (name.empty())
535  {
536  std::ostringstream oss;
537  oss << bnd_id;
538  name = oss.str();
539  }
540  }
541  boundary_names.push_back(name);
542  }
543 
544  return boundary_names;
545 }
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:503
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3199
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:23

◆ getMaterialPropertyRegistry()

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

Definition at line 1561 of file FEProblemBase.h.

Referenced by MaterialBase::checkStatefulSanity().

1562  {
1563  return _material_prop_registry;
1564  }
MaterialPropertyRegistry _material_prop_registry

◆ getMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getMaterialPropertyStorage ( )
inlineinherited

Return a reference to the material property storage.

Returns
A const reference to the material property storage

Definition at line 1571 of file FEProblemBase.h.

1571 { return _material_props; }
MaterialPropertyStorage & _material_props

◆ getMaterialWarehouse()

const MaterialWarehouse& FEProblemBase::getMaterialWarehouse ( ) const
inlineinherited

◆ getMatrixTagID()

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

Get a TagID from a TagName.

Reimplemented in DisplacedProblem.

Definition at line 320 of file SubProblem.C.

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

321 {
322  auto tag_name_upper = MooseUtils::toUpper(tag_name);
323 
324  if (!matrixTagExists(tag_name))
325  mooseError("Matrix tag: ",
326  tag_name,
327  " does not exist. ",
328  "If this is a TimeKernel then this may have happened because you didn't "
329  "specify a Transient Executioner.");
330 
331  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
332 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1006
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1040
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:306

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

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

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

◆ getMaxQps()

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

Definition at line 1384 of file FEProblemBase.C.

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

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

◆ getMaxScalarOrder()

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

Definition at line 1392 of file FEProblemBase.C.

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

1393 {
1394  return _max_scalar_order;
1395 }
Order _max_scalar_order
Maximum scalar variable order.

◆ getMeshDivision()

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

Get a MeshDivision.

Definition at line 2372 of file FEProblemBase.C.

Referenced by NestedDivision::NestedDivision().

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

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

◆ getMortarInterface() [1/2]

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

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

Definition at line 7302 of file FEProblemBase.C.

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

◆ getMortarInterface() [2/2]

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

Definition at line 7312 of file FEProblemBase.C.

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

◆ getMortarInterfaces()

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

Definition at line 7322 of file FEProblemBase.C.

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

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

◆ getMultiApp()

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

Get a MultiApp object by name.

Definition at line 4884 of file FEProblemBase.C.

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

4885 {
4886  return _multi_apps.getObject(multi_app_name);
4887 }
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
inherited

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

Definition at line 4979 of file FEProblemBase.C.

4980 {
4981  if (direction == MultiAppTransfer::TO_MULTIAPP)
4982  return _to_multi_app_transfers;
4983  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4985  else
4987 }
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.

◆ getMultiAppWarehouse()

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

Definition at line 1897 of file FEProblemBase.h.

Referenced by MooseApp::errorCheck().

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

◆ getNEigenPairsRequired()

unsigned int EigenProblem::getNEigenPairsRequired ( ) const
inline

Definition at line 40 of file EigenProblem.h.

Referenced by NonlinearEigenSystem::solve().

40 { return _n_eigen_pairs_required; }
unsigned int _n_eigen_pairs_required
Definition: EigenProblem.h:243

◆ getNeighborMaterialPropertyStorage()

const MaterialPropertyStorage& FEProblemBase::getNeighborMaterialPropertyStorage ( )
inlineinherited

Definition at line 1573 of file FEProblemBase.h.

1574  {
1575  return _neighbor_material_props;
1576  }
MaterialPropertyStorage & _neighbor_material_props

◆ getNonlinearEigenSystem()

NonlinearEigenSystem & EigenProblem::getNonlinearEigenSystem ( const unsigned int  nl_sys_num)
inline

Definition at line 302 of file EigenProblem.h.

Referenced by Moose::assemble_matrix(), and Eigenvalue::Eigenvalue().

303 {
304  if (nl_sys_num > 0)
305  mooseError("eigen problems do not currently support multiple nonlinear eigen systems");
306  return *_nl_eigen;
307 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getNonlinearEvaluableElementRange()

const ConstElemRange & FEProblemBase::getNonlinearEvaluableElementRange ( )
inherited

Definition at line 715 of file FEProblemBase.C.

Referenced by ElemSideNeighborLayersTester::execute().

716 {
718  {
719  std::vector<const DofMap *> dof_maps(_nl.size());
720  for (const auto i : index_range(dof_maps))
721  dof_maps[i] = &_nl[i]->dofMap();
723  std::make_unique<ConstElemRange>(_mesh.getMesh().multi_evaluable_elements_begin(dof_maps),
724  _mesh.getMesh().multi_evaluable_elements_end(dof_maps));
725  }
726 
728 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3199
MooseMesh & _mesh
auto index_range(const T &sizable)
std::unique_ptr< ConstElemRange > _nl_evaluable_local_elem_range

◆ getNonlinearForcedIterations()

unsigned int FEProblemBase::getNonlinearForcedIterations ( ) const
inlineinherited

method returning the number of forced nonlinear iterations

Definition at line 2128 of file FEProblemBase.h.

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

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

◆ getNonlinearSystem()

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

Reimplemented in FEProblem.

Definition at line 2387 of file FEProblemBase.C.

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

2388 {
2389  mooseDeprecated("FEProblemBase::getNonlinearSystem() is deprecated, please use "
2390  "FEProblemBase::getNonlinearSystemBase() \n");
2391 
2392  mooseAssert(sys_num < _nl.size(), "System number greater than the number of nonlinear systems");
2393  auto nl_sys = std::dynamic_pointer_cast<NonlinearSystem>(_nl[sys_num]);
2394 
2395  if (!nl_sys)
2396  mooseError("This is not a NonlinearSystem");
2397 
2398  return *nl_sys;
2399 }
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)
inlineinherited

Definition at line 2859 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::petscSetDefaults(), ReferenceResidualProblem::ReferenceResidualProblem(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), AB2PredictorCorrector::step(), Moose::PetscSupport::storePetscOptions(), DisplacedProblem::syncSolutions(), and Console::writeVariableNorms().

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

◆ getNonlinearSystemBase() [2/2]

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

Definition at line 2866 of file FEProblemBase.h.

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

◆ getNumCyclesCompleted()

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

Definition at line 1624 of file FEProblemBase.h.

1624 { 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 204 of file MooseBaseParameterInterface.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), PiecewiseTabularBase::buildFromJSON(), PhysicsBase::checkVectorParamsNoOverlap(), PhysicsBase::checkVectorParamsSameLength(), FEProblemBase::createTagSolutions(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FVInterfaceKernel::FVInterfaceKernel(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), BlockDeletionGenerator::generate(), MeshExtruderGenerator::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().

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

◆ getParam() [2/2]

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

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

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

Definition at line 261 of file MooseBaseParameterInterface.h.

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

◆ getPetscOptions()

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

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

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

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

◆ getPositionsObject()

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

Get the Positions object by its name.

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

Definition at line 3961 of file FEProblemBase.C.

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

3962 {
3963  std::vector<Positions *> objs;
3964  theWarehouse()
3965  .query()
3966  .condition<AttribSystem>("UserObject")
3967  .condition<AttribName>(name)
3968  .queryInto(objs);
3969  if (objs.empty())
3970  mooseError("Unable to find Positions object with name '" + name + "'");
3971  mooseAssert(objs.size() == 1, "Should only find one Positions");
3972  return *(objs[0]);
3973 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getPostprocessorValueByName()

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

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

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

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

Definition at line 3995 of file FEProblemBase.C.

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

3997 {
3999  t_index);
4000 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
Definition: ReporterData.h: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
inlineinherited

Definition at line 1756 of file FEProblemBase.h.

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

1756 { 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 211 of file MooseBaseParameterInterface.h.

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

◆ getReporterData() [1/2]

const ReporterData& FEProblemBase::getReporterData ( ) const
inlineinherited

◆ getReporterData() [2/2]

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

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

see ReporterData.h

Definition at line 1004 of file FEProblemBase.h.

1004 { return _reporter_data; }
ReporterData _reporter_data

◆ getRestartableData()

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

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

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

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

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

Definition at line 287 of file Restartable.h.

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

◆ getSampler()

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

Definition at line 2435 of file FEProblemBase.C.

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

2436 {
2437  std::vector<Sampler *> objs;
2438  theWarehouse()
2439  .query()
2440  .condition<AttribSystem>("Sampler")
2441  .condition<AttribThread>(tid)
2442  .condition<AttribName>(name)
2443  .queryInto(objs);
2444  if (objs.empty())
2445  mooseError(
2446  "Unable to find Sampler with name '" + name +
2447  "', if you are attempting to access this object in the constructor of another object then "
2448  "the object being retrieved must occur prior to the caller within the input file.");
2449  return *(objs[0]);
2450 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getScalarVariable()

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

Returns the scalar variable reference from whichever system contains it.

Implements SubProblem.

Definition at line 5326 of file FEProblemBase.C.

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

5327 {
5328  for (auto & sys : _solver_systems)
5329  if (sys->hasScalarVariable(var_name))
5330  return sys->getScalarVariable(tid, var_name);
5331  if (_aux->hasScalarVariable(var_name))
5332  return _aux->getScalarVariable(tid, var_name);
5333 
5334  mooseError("Unknown variable " + var_name);
5335 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSharedPtr() [1/2]

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

Get another shared pointer to this object that has the same ownership group.

Wrapper around shared_from_this().

Definition at line 72 of file MooseObject.C.

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

◆ getSharedPtr() [2/2]

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

Definition at line 85 of file MooseObject.C.

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

◆ getSolverSystem() [1/2]

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

Get non-constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 2873 of file FEProblemBase.h.

Referenced by MooseApp::attachRelationshipManagers(), Moose::PetscSupport::petscSetDefaultKSPNormType(), and Moose::PetscSupport::petscSetDefaultPCSide().

2874 {
2875  mooseAssert(sys_num < _solver_systems.size(),
2876  "System number greater than the number of solver systems");
2877  return *_solver_systems[sys_num];
2878 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ getSolverSystem() [2/2]

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

Get a constant reference to a solver system.

Parameters
sys_numThe number of the solver system

Definition at line 2881 of file FEProblemBase.h.

2882 {
2883  mooseAssert(sys_num < _solver_systems.size(),
2884  "System number greater than the number of solver systems");
2885  return *_solver_systems[sys_num];
2886 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.

◆ getStandardVariable()

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

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

Implements SubProblem.

Definition at line 5266 of file FEProblemBase.C.

5267 {
5268  for (auto & sys : _solver_systems)
5269  if (sys->hasVariable(var_name))
5270  return sys->getFieldVariable<Real>(tid, var_name);
5271  if (_aux->hasVariable(var_name))
5272  return _aux->getFieldVariable<Real>(tid, var_name);
5273 
5274  mooseError("Unknown variable " + var_name);
5275 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getSystem()

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

Returns the equation system containing the variable provided.

Implements SubProblem.

Definition at line 5338 of file FEProblemBase.C.

Referenced by MultiApp::appTransferVector().

5339 {
5340  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
5341  if (var_in_sys)
5342  return _solver_systems[sys_num]->system();
5343  else if (_aux->hasVariable(var_name))
5344  return _aux->system();
5345  else
5346  mooseError("Unable to find a system containing the variable " + var_name);
5347 }
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getTimeFromStateArg()

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

Returns the time associated with the requested state.

Definition at line 6232 of file FEProblemBase.C.

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

6233 {
6235  // If we are any iteration type other than time (e.g. nonlinear), then temporally we are still
6236  // in the present time
6237  return time();
6238 
6239  switch (state.state)
6240  {
6241  case 0:
6242  return time();
6243 
6244  case 1:
6245  return timeOld();
6246 
6247  default:
6248  mooseError("Unhandled state ", state.state, " in FEProblemBase::getTimeFromStateArg");
6249  }
6250 }
virtual Real & time() const
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Real & timeOld() const
unsigned int state
The state.

◆ getTransfers() [1/2]

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

Get Transfers by ExecFlagType and direction.

Definition at line 4957 of file FEProblemBase.C.

4958 {
4959  if (direction == MultiAppTransfer::TO_MULTIAPP)
4961  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4963  else
4965 }
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
Transfers executed just before MultiApps to transfer data between them.

◆ getTransfers() [2/2]

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

Definition at line 4968 of file FEProblemBase.C.

4969 {
4970  if (direction == MultiAppTransfer::TO_MULTIAPP)
4972  else if (direction == MultiAppTransfer::FROM_MULTIAPP)
4974  else
4976 }
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
inlineinherited

Get the user object by its name.

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

Definition at line 1024 of file FEProblemBase.h.

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

1025  {
1026  std::vector<T *> objs;
1027  theWarehouse()
1028  .query()
1029  .condition<AttribSystem>("UserObject")
1030  .condition<AttribThread>(tid)
1031  .condition<AttribName>(name)
1032  .queryInto(objs);
1033  if (objs.empty())
1034  mooseError("Unable to find user object with name '" + name + "'");
1035  return *(objs[0]);
1036  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectBase()

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

Get the user object by its name.

Parameters
nameThe name of the user object being retrieved
tidThe thread of the user object (defaults to 0)
Returns
Const reference to the user object

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

3946 {
3947  std::vector<UserObject *> objs;
3948  theWarehouse()
3949  .query()
3950  .condition<AttribSystem>("UserObject")
3951  .condition<AttribThread>(tid)
3952  .condition<AttribName>(name)
3953  .queryInto(objs);
3954  if (objs.empty())
3955  mooseError("Unable to find user object with name '" + name + "'");
3956  mooseAssert(objs.size() == 1, "Should only find one UO");
3957  return *(objs[0]);
3958 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ getUserObjectJacobianVariables()

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

Definition at line 358 of file FEProblemBase.h.

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

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

◆ getUserObjects()

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

Definition at line 1011 of file FEProblemBase.h.

1012  {
1014  "This function is deprecated, use theWarehouse().query() to construct a query instead");
1015  return _all_user_objects;
1016  }
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 245 of file SubProblem.h.

249  {
250  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
251  tid, var_name, expected_var_type, expected_var_field_type));
252  }
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
inlineinherited

Definition at line 245 of file SubProblem.h.

249  {
250  return const_cast<MooseVariableFieldBase &>(const_cast<const SubProblem *>(this)->getVariable(
251  tid, var_name, expected_var_type, expected_var_field_type));
252  }
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
inherited

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

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

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

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

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

Implements SubProblem.

Definition at line 5256 of file FEProblemBase.C.

Referenced by FEProblemBase::addFVInitialCondition(), FEProblemBase::addInitialCondition(), 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().

5260 {
5261  return getVariableHelper(
5262  tid, var_name, expected_var_type, expected_var_field_type, _solver_systems, *_aux);
5263 }
MooseVariableFieldBase & getVariableHelper(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
Helper function called by getVariable that handles the logic for checking whether Variables of the re...
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getVariableHelper() [1/2]

template<typename T >
MooseVariableFEBase& SubProblem::getVariableHelper ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type,
Moose::VarFieldType  expected_var_field_type,
const std::vector< T > &  systems,
const SystemBase aux 
) const
inherited

Definition at line 779 of file SubProblem.C.

785 {
786  // Eventual return value
787  MooseVariableFEBase * var = nullptr;
788 
789  const auto [var_in_sys, sys_num] = determineSolverSystem(var_name);
790 
791  // First check that the variable is found on the expected system.
792  if (expected_var_type == Moose::VarKindType::VAR_ANY)
793  {
794  if (var_in_sys)
795  var = &(systems[sys_num]->getVariable(tid, var_name));
796  else if (aux.hasVariable(var_name))
797  var = &(aux.getVariable(tid, var_name));
798  else
799  mooseError("Unknown variable " + var_name);
800  }
801  else if (expected_var_type == Moose::VarKindType::VAR_SOLVER && var_in_sys &&
802  systems[sys_num]->hasVariable(var_name))
803  var = &(systems[sys_num]->getVariable(tid, var_name));
804  else if (expected_var_type == Moose::VarKindType::VAR_AUXILIARY && aux.hasVariable(var_name))
805  var = &(aux.getVariable(tid, var_name));
806  else
807  {
808  std::string expected_var_type_string =
809  (expected_var_type == Moose::VarKindType::VAR_SOLVER ? "nonlinear" : "auxiliary");
810  mooseError("No ",
811  expected_var_type_string,
812  " variable named ",
813  var_name,
814  " found. "
815  "Did you specify an auxiliary variable when you meant to specify a nonlinear "
816  "variable (or vice-versa)?");
817  }
818 
819  // Now make sure the var found has the expected field type.
820  if ((expected_var_field_type == Moose::VarFieldType::VAR_FIELD_ANY) ||
821  (expected_var_field_type == var->fieldType()))
822  return *var;
823  else
824  {
825  std::string expected_var_field_type_string =
826  MooseUtils::toLower(Moose::stringify(expected_var_field_type));
827  std::string var_field_type_string = MooseUtils::toLower(Moose::stringify(var->fieldType()));
828 
829  mooseError("No ",
830  expected_var_field_type_string,
831  " variable named ",
832  var_name,
833  " found. "
834  "Did you specify a ",
835  var_field_type_string,
836  " variable when you meant to specify a ",
837  expected_var_field_type_string,
838  " variable?");
839  }
840 }
std::string toLower(const std::string &name)
Convert supplied string to lower case.
Definition: MooseUtils.C:1048
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:807
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const =0
virtual Moose::VarFieldType fieldType() const =0
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:86

◆ getVariableHelper() [2/2]

template<typename T >
MooseVariableFieldBase& SubProblem::getVariableHelper ( const THREAD_ID  tid,
const std::string &  var_name,
Moose::VarKindType  expected_var_type,
Moose::VarFieldType  expected_var_field_type,
const std::vector< T > &  nls,
const SystemBase aux 
) const
protectedinherited

Helper function called by getVariable that handles the logic for checking whether Variables of the requested type are available.

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

◆ getVariableNames()

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

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

Definition at line 8001 of file FEProblemBase.C.

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

8002 {
8003  std::vector<VariableName> names;
8004 
8005  for (auto & sys : _solver_systems)
8006  {
8007  const std::vector<VariableName> & var_names = sys->getVariableNames();
8008  names.insert(names.end(), var_names.begin(), var_names.end());
8009  }
8010 
8011  const std::vector<VariableName> & aux_var_names = _aux->getVariableNames();
8012  names.insert(names.end(), aux_var_names.begin(), aux_var_names.end());
8013 
8014  return names;
8015 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ getVectorPostprocessorObjectByName()

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

Return the VPP object given the name.

Parameters
object_nameThe name of the VPP object
Returns
Desired VPP object

This is used by various output objects as well as the scatter value handling.

See also
CSV.C, XMLOutput.C, VectorPostprocessorInterface.C

Definition at line 4039 of file FEProblemBase.C.

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

4041 {
4042  return getUserObject<VectorPostprocessor>(object_name, tid);
4043 }

◆ getVectorPostprocessorValueByName()

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

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

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

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

Definition at line 4020 of file FEProblemBase.C.

Referenced by HistogramVectorPostprocessor::execute().

4023 {
4025  VectorPostprocessorReporterName(object_name, vector_name), t_index);
4026 }
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 139 of file SubProblem.C.

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

140 {
141  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
142 
143  if (!vectorTagExists(tag_id))
144  mooseError("Vector tag with ID ", tag_id, " does not exist");
145 
146  return _vector_tags[tag_id];
147 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1134
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:173
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 181 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(), SolverSystem::setSolution(), TaggingInterface::TaggingInterface(), MultiAppDofCopyTransfer::transfer(), TaggingInterface::useVectorTag(), Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

182 {
183  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
184 
185  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
186  const auto search = _vector_tags_name_map.find(tag_name_upper);
187  if (search != _vector_tags_name_map.end())
188  return search->second;
189 
190  std::string message =
191  tag_name_upper == "TIME"
192  ? ".\n\nThis may occur if "
193  "you have a TimeKernel in your problem but did not specify a transient executioner."
194  : "";
195  mooseError("Vector tag '", tag_name_upper, "' does not exist", message);
196 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1040
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1144
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 150 of file SubProblem.C.

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

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

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

163 {
164  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
165 
167  return _vector_tags;
168  else
169  return _typed_vector_tags[type];
170 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1134
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< std::vector< VectorTag > > _typed_vector_tags
The vector tags associated with each VectorTagType This is kept separate from _vector_tags for quick ...
Definition: SubProblem.h:1141

◆ getVectorVariable()

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

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

Implements SubProblem.

Definition at line 5290 of file FEProblemBase.C.

5291 {
5292  for (auto & sys : _solver_systems)
5293  if (sys->hasVariable(var_name))
5294  return sys->getFieldVariable<RealVectorValue>(tid, var_name);
5295  if (_aux->hasVariable(var_name))
5296  return _aux->getFieldVariable<RealVectorValue>(tid, var_name);
5297 
5298  mooseError("Unknown variable " + var_name);
5299 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getXFEM()

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

Get a pointer to the XFEM controller object.

Definition at line 1641 of file FEProblemBase.h.

1641 { 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 642 of file SubProblem.h.

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

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

◆ ghostGhostedBoundaries()

void FEProblemBase::ghostGhostedBoundaries ( )
overridevirtualinherited

Causes the boundaries added using addGhostedBoundary to actually be ghosted.

Implements SubProblem.

Definition at line 1892 of file FEProblemBase.C.

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

1893 {
1894  TIME_SECTION("ghostGhostedBoundaries", 3, "Ghosting Ghosted Boundaries");
1895 
1897 
1898  if (_displaced_problem)
1900 }
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:3065
MooseMesh * _displaced_mesh

◆ hasActiveElementalMooseVariables()

bool SubProblem::hasActiveElementalMooseVariables ( const THREAD_ID  tid) const
virtualinherited

Whether or not a list of active elemental moose variables has been set.

Returns
True if there has been a list of active elemental moose variables set, False otherwise

Definition at line 438 of file SubProblem.C.

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

439 {
441 }
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:1046

◆ hasActiveMaterialProperties()

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

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

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

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

Definition at line 5458 of file FEProblemBase.C.

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

5459 {
5460  return _has_active_material_properties[tid];
5461 }
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 489 of file SubProblem.C.

490 {
491  auto it = _map_block_material_props.find(bid);
492  if (it == _map_block_material_props.end())
493  return false;
494 
495  if (it->second.count(prop_name) > 0)
496  return true;
497  else
498  return false;
499 }
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1019

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

549 {
550  auto it = _map_boundary_material_props.find(bid);
551  if (it == _map_boundary_material_props.end())
552  return false;
553 
554  if (it->second.count(prop_name) > 0)
555  return true;
556  else
557  return false;
558 }
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1022

◆ hasDampers()

bool FEProblemBase::hasDampers ( )
inlineinherited

Whether or not this system has dampers.

Definition at line 1161 of file FEProblemBase.h.

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

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

◆ hasException()

virtual bool FEProblemBase::hasException ( )
inlinevirtualinherited

Whether or not an exception has occurred.

Definition at line 486 of file FEProblemBase.h.

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

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

◆ hasFunction()

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

Definition at line 2306 of file FEProblemBase.C.

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

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

◆ hasFunctor()

bool SubProblem::hasFunctor ( const std::string &  name,
const THREAD_ID  tid 
) const
inherited

checks whether we have a functor corresponding to name on the thread id tid

Definition at line 1227 of file SubProblem.C.

Referenced by FunctorInterface::isFunctor().

1228 {
1229  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1230  auto & functors = _functors[tid];
1231  return (functors.find("wraps_" + name) != functors.end());
1232 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
Definition: SubProblem.h:1111

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

1278 {
1279  mooseAssert(tid < _functors.size(), "Too large a thread ID");
1280  auto & functors = _functors[tid];
1281 
1282  const auto & it = functors.find("wraps_" + name);
1283  constexpr bool requested_functor_is_ad =
1284  !std::is_same<T, typename MetaPhysicL::RawType<T>::value_type>::value;
1285 
1286  if (it == functors.end())
1287  return false;
1288  else
1289  return dynamic_cast<Moose::Functor<T> *>(
1290  requested_functor_is_ad ? std::get<2>(it->second).get() : std::get<1>(it->second).get());
1291 }
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:57
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
A container holding pointers to all the functors in our problem.
Definition: SubProblem.h:1111

◆ hasInitialAdaptivity() [1/2]

bool FEProblemBase::hasInitialAdaptivity ( ) const
inlineinherited

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1629 of file FEProblemBase.h.

1629 { 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
inlineinherited

Return a Boolean indicating whether initial AMR is turned on.

Definition at line 1634 of file FEProblemBase.h.

1634 { return false; }

◆ hasJacobian()

bool FEProblemBase::hasJacobian ( ) const
inherited

Returns _has_jacobian.

Definition at line 8284 of file FEProblemBase.C.

Referenced by DisplacedProblem::prepare().

8285 {
8286  return _has_jacobian;
8287 }
bool _has_jacobian
Indicates if the Jacobian was computed.

◆ hasMortarCoupling()

virtual bool FEProblemBase::hasMortarCoupling ( ) const
inlinevirtualinherited

Whether the simulation has mortar coupling.

Definition at line 2020 of file FEProblemBase.h.

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

◆ hasMultiApp()

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

Definition at line 4878 of file FEProblemBase.C.

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

◆ hasMultiApps() [1/2]

bool FEProblemBase::hasMultiApps ( ) const
inlineinherited

Returns whether or not the current simulation has any multiapps.

Definition at line 1147 of file FEProblemBase.h.

Referenced by FixedPointSolve::solveStep().

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

◆ hasMultiApps() [2/2]

bool FEProblemBase::hasMultiApps ( ExecFlagType  type) const
inherited

Definition at line 4872 of file FEProblemBase.C.

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

◆ hasNeighborCoupling()

virtual bool FEProblemBase::hasNeighborCoupling ( ) const
inlinevirtualinherited

Whether the simulation has neighbor coupling.

Definition at line 2015 of file FEProblemBase.h.

bool _has_internal_edge_residual_objects
Whether the problem has dgkernels or interface kernels.

◆ hasNonlocalCoupling()

virtual bool FEProblemBase::hasNonlocalCoupling ( ) const
inlineoverridevirtualinherited

Whether the simulation has nonlocal coupling which should be accounted for in the Jacobian.

Implements SubProblem.

Definition at line 2260 of file FEProblemBase.h.

Referenced by DisplacedProblem::hasNonlocalCoupling().

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

◆ hasPostprocessor()

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

Deprecated.

Use hasPostprocessorValueByName

Definition at line 4012 of file FEProblemBase.C.

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

◆ hasPostprocessorValueByName()

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

Whether or not a Postprocessor value exists by a given name.

Parameters
nameThe name of the Postprocessor
Returns
True if a Postprocessor value exists

Note: You should prioritize the use of PostprocessorInterface::hasPostprocessor and PostprocessorInterface::hasPostprocessorByName over this method when possible.

Definition at line 3989 of file FEProblemBase.C.

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

3990 {
3992 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h: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
overridevirtualinherited

Returns a Boolean indicating whether any system contains a variable with the name provided.

Implements SubProblem.

Definition at line 5314 of file FEProblemBase.C.

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

5315 {
5316  for (auto & sys : _solver_systems)
5317  if (sys->hasScalarVariable(var_name))
5318  return true;
5319  if (_aux->hasScalarVariable(var_name))
5320  return true;
5321 
5322  return false;
5323 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ hasScalingVector()

void SubProblem::hasScalingVector ( const unsigned int  nl_sys_num)
inherited

Tells this problem that the assembly associated with the given nonlinear system number involves a scaling vector.

Definition at line 1127 of file SubProblem.C.

Referenced by SystemBase::addScalingVector().

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

◆ hasTimeIntegrator()

bool FEProblemBase::hasTimeIntegrator ( ) const
inlineinherited

Returns whether or not this Problem has a TimeIntegrator.

Definition at line 1806 of file FEProblemBase.h.

Referenced by Transient::setupTimeIntegrator().

1806 { return _has_time_integrator; }
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)

◆ hasUOAuxStateCheck()

bool FEProblemBase::hasUOAuxStateCheck ( ) const
inlineinherited

Whether or not MOOSE will perform a user object/auxiliary kernel state check.

Definition at line 194 of file FEProblemBase.h.

194 { return _uo_aux_state_check; }
const bool _uo_aux_state_check
Whether or not checking the state of uo/aux evaluation.

◆ hasUserObject()

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

Check if there if a user object of given name.

Parameters
nameThe name of the user object being checked for
Returns
true if the user object exists, false otherwise

Definition at line 3976 of file FEProblemBase.C.

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

3977 {
3978  std::vector<UserObject *> objs;
3979  theWarehouse()
3980  .query()
3981  .condition<AttribSystem>("UserObject")
3982  .condition<AttribThread>(0)
3983  .condition<AttribName>(name)
3984  .queryInto(objs);
3985  return !objs.empty();
3986 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
TheWarehouse & theWarehouse() const
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ hasVariable()

bool FEProblemBase::hasVariable ( const std::string &  var_name) const
overridevirtualinherited

Whether or not this problem has the variable.

Implements SubProblem.

Definition at line 5244 of file FEProblemBase.C.

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

5245 {
5246  for (auto & sys : _solver_systems)
5247  if (sys->hasVariable(var_name))
5248  return true;
5249  if (_aux->hasVariable(var_name))
5250  return true;
5251 
5252  return false;
5253 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ haveADObjects() [1/4]

bool SubProblem::haveADObjects ( ) const
inlineinherited

Method for reading wehther we have any ad objects.

Definition at line 741 of file SubProblem.h.

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

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

◆ haveADObjects() [2/4]

virtual void SubProblem::haveADObjects
inlineinherited

Method for setting whether we have any ad objects.

Definition at line 737 of file SubProblem.h.

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

◆ haveADObjects() [3/4]

bool SubProblem::haveADObjects
inlineinherited

Method for reading wehther we have any ad objects.

Definition at line 741 of file SubProblem.h.

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

◆ haveADObjects() [4/4]

void FEProblemBase::haveADObjects ( bool  have_ad_objects)
overridevirtualinherited

Method for setting whether we have any ad objects.

Reimplemented from SubProblem.

Definition at line 8354 of file FEProblemBase.C.

8355 {
8356  _have_ad_objects = have_ad_objects;
8357  if (_displaced_problem)
8358  _displaced_problem->SubProblem::haveADObjects(have_ad_objects);
8359 }
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
Definition: SubProblem.h:1084
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveDisplaced()

bool FEProblemBase::haveDisplaced ( ) const
inlinefinaloverridevirtualinherited

Whether we have a displaced problem in our simulation.

Implements SubProblem.

Definition at line 2113 of file FEProblemBase.h.

2113 { return _displaced_problem.get(); }
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ haveFV()

virtual bool FEProblemBase::haveFV ( ) const
inlineoverridevirtualinherited

◆ havePRefinement()

bool SubProblem::havePRefinement ( ) const
inlineinherited

Query whether p-refinement has been requested at any point during the simulation.

Definition at line 980 of file SubProblem.h.

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

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

◆ haveXFEM()

bool FEProblemBase::haveXFEM ( )
inlineinherited

Find out whether the current analysis is using XFEM.

Definition at line 1644 of file FEProblemBase.h.

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

1644 { return _xfem != nullptr; }
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.

◆ identifyVariableGroupsInNL()

bool FEProblemBase::identifyVariableGroupsInNL ( ) const
inlineinherited

Whether to identify variable groups in nonlinear systems.

This affects dof ordering

Definition at line 2265 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::NonlinearSystemBase().

const bool _identify_variable_groups_in_nl
Whether to identify variable groups in nonlinear systems. This affects dof ordering.

◆ ignoreZerosInJacobian()

bool FEProblemBase::ignoreZerosInJacobian ( ) const
inlineinherited

Definition at line 1801 of file FEProblemBase.h.

Referenced by NonlinearSystemBase::constraintJacobians().

1801 { return _ignore_zeros_in_jacobian; }
bool _ignore_zeros_in_jacobian

◆ immediatelyPrintInvalidSolution()

bool FEProblemBase::immediatelyPrintInvalidSolution ( ) const
inlineinherited

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

Definition at line 1799 of file FEProblemBase.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

const bool & _immediately_print_invalid_solution

◆ incrementMultiAppTStep()

void FEProblemBase::incrementMultiAppTStep ( ExecFlagType  type)
inherited

Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.

Definition at line 5063 of file FEProblemBase.C.

Referenced by Transient::incrementStepOrReject().

5064 {
5065  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5066 
5067  if (multi_apps.size())
5068  for (const auto & multi_app : multi_apps)
5069  multi_app->incrementTStep(_time);
5070 }
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.

◆ init()

void EigenProblem::init ( )
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 617 of file EigenProblem.C.

618 {
619 #if !PETSC_RELEASE_LESS_THAN(3, 13, 0)
620  // If matrix_free=true, this tells Libmesh to use shell matrices
621  _nl_eigen->sys().use_shell_matrices(solverParams()._eigen_matrix_free &&
622  !solverParams()._eigen_matrix_vector_mult);
623  // We need to tell libMesh if we are using a shell preconditioning matrix
624  _nl_eigen->sys().use_shell_precond_matrix(solverParams()._precond_matrix_free);
625 #endif
626 
628 }
SolverParams & solverParams()
Get the solver parameters.
virtual void init() override
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245

◆ initEigenvector()

void EigenProblem::initEigenvector ( const Real  initial_value)

For nonlinear eigen solver, a good initial value can help convergence.

Should set initial values for only eigen variables.

Definition at line 410 of file EigenProblem.C.

Referenced by Eigenvalue::init().

411 {
412  // Yaqi's note: the following code will set a flat solution for lagrange and
413  // constant monomial variables. For the first or higher order elemental variables,
414  // the solution is not flat. Fortunately, the initial guess does not affect
415  // the final solution as long as it is not perpendicular to the true solution.
416  // We, in general, do not need to worry about that.
417 
418  adjustEigenVector(initial_value, false);
419 }
void adjustEigenVector(const Real value, bool scaling)
Adjust eigen vector by either scaling the existing values or setting new values The operations are ap...
Definition: EigenProblem.C:378

◆ initElementStatefulProps()

void FEProblemBase::initElementStatefulProps ( const ConstElemRange elem_range,
const bool  threaded 
)
inherited

Initialize stateful properties for elements in a specific elem_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Definition at line 7674 of file FEProblemBase.C.

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

7675 {
7678  if (threaded)
7679  Threads::parallel_reduce(elem_range, cmt);
7680  else
7681  cmt(elem_range, true);
7682 }
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 ( )
virtualinherited

Definition at line 7390 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

7391 {
7392  unsigned int n = adaptivity().getInitialSteps();
7393  _cycles_completed = 0;
7394  if (n)
7395  {
7398  mooseError("HFEM does not support mesh adaptivity currently.");
7399 
7400  TIME_SECTION("initialAdaptMesh", 2, "Performing Initial Adaptivity");
7401 
7402  for (unsigned int i = 0; i < n; i++)
7403  {
7405  computeMarkers();
7406 
7408  {
7409  meshChanged();
7410 
7411  // reproject the initial condition
7412  projectSolution();
7413 
7415  }
7416  else
7417  {
7418  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
7419  return;
7420  }
7421  }
7422  }
7423 }
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:2922

◆ initialSetup()

void FEProblemBase::initialSetup ( )
overridevirtualinherited

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

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

Reimplemented from SubProblem.

Reimplemented in ReferenceResidualProblem.

Definition at line 731 of file FEProblemBase.C.

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

732 {
733  TIME_SECTION("initialSetup", 2, "Performing Initial Setup");
734 
736 
738  mooseError("Checkpoint recovery and restart and exodus restart are all mutually exclusive.");
739 
741  mooseWarning("MOOSE may fail to catch an exception when the \"skip_exception_check\" parameter "
742  "is used. If you receive a terse MPI error during execution, remove this "
743  "parameter and rerun your simulation");
744 
745  // set state flag indicating that we are in or beyond initialSetup.
746  // This can be used to throw errors in methods that _must_ be called at construction time.
747  _started_initial_setup = true;
749 
750  // Setup the solution states (current, old, etc) in each system based on
751  // its default and the states requested of each of its variables
752  for (const auto i : index_range(_solver_systems))
753  {
754  _solver_systems[i]->initSolutionState();
755  if (getDisplacedProblem())
756  getDisplacedProblem()->solverSys(i).initSolutionState();
757  }
758  _aux->initSolutionState();
759  if (getDisplacedProblem())
760  getDisplacedProblem()->auxSys().initSolutionState();
761 
762  // always execute to get the max number of DoF per element and node needed to initialize phi_zero
763  // variables
764  dof_id_type global_max_var_n_dofs_per_elem = 0;
765  for (const auto i : index_range(_solver_systems))
766  {
767  auto & sys = *_solver_systems[i];
768  dof_id_type max_var_n_dofs_per_elem;
769  dof_id_type max_var_n_dofs_per_node;
770  {
771  TIME_SECTION("computingMaxDofs", 3, "Computing Max Dofs Per Element");
772 
773  MaxVarNDofsPerElem mvndpe(*this, sys);
774  Threads::parallel_reduce(*_mesh.getActiveLocalElementRange(), mvndpe);
775  max_var_n_dofs_per_elem = mvndpe.max();
776  _communicator.max(max_var_n_dofs_per_elem);
777 
778  MaxVarNDofsPerNode mvndpn(*this, sys);
779  Threads::parallel_reduce(*_mesh.getLocalNodeRange(), mvndpn);
780  max_var_n_dofs_per_node = mvndpn.max();
781  _communicator.max(max_var_n_dofs_per_node);
782  global_max_var_n_dofs_per_elem =
783  std::max(global_max_var_n_dofs_per_elem, max_var_n_dofs_per_elem);
784  }
785 
786  {
787  TIME_SECTION("assignMaxDofs", 5, "Assigning Maximum Dofs Per Elem");
788 
789  sys.assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
790  auto displaced_problem = getDisplacedProblem();
791  if (displaced_problem)
792  displaced_problem->solverSys(i).assignMaxVarNDofsPerElem(max_var_n_dofs_per_elem);
793 
794  sys.assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
795  if (displaced_problem)
796  displaced_problem->solverSys(i).assignMaxVarNDofsPerNode(max_var_n_dofs_per_node);
797  }
798  }
799 
800  {
801  TIME_SECTION("resizingVarValues", 5, "Resizing Variable Values");
802 
803  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
804  {
805  _phi_zero[tid].resize(global_max_var_n_dofs_per_elem, std::vector<Real>(getMaxQps(), 0.));
806  _grad_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
807  std::vector<RealGradient>(getMaxQps(), RealGradient(0.)));
808  _second_phi_zero[tid].resize(global_max_var_n_dofs_per_elem,
809  std::vector<RealTensor>(getMaxQps(), RealTensor(0.)));
810  }
811  }
812 
813  // Set up stateful material property redistribution, if we suspect
814  // it may be necessary later.
816 
818  {
819  // Only load all of the vectors if we're recovering
821 
822  // This forces stateful material property loading to be an exact one-to-one match
823  if (_app.isRecovering())
825  props->setRecovering();
826 
827  TIME_SECTION("restore", 3, "Restoring from backup");
828 
829  // We could have a cached backup when this app is a sub-app and has been given a Backup
830  if (!_app.hasInitialBackup())
832  else
834 
840  if (_app.isRestarting())
841  {
842  if (_app.hasStartTime())
844  else
845  _time_old = _time;
846  }
847  }
848  else
849  {
850  ExodusII_IO * reader = _app.getExReaderForRestart();
851 
852  if (reader)
853  {
854  TIME_SECTION("copyingFromExodus", 3, "Copying Variables From Exodus");
855 
856  for (auto & sys : _solver_systems)
857  sys->copyVars(*reader);
858  _aux->copyVars(*reader);
859  }
860  else
861  {
862  if (_solver_systems[0]->hasVarCopy() || _aux->hasVarCopy())
863  mooseError("Need Exodus reader to restart variables but the reader is not available\n"
864  "Use either FileMesh with an Exodus mesh file or FileMeshGenerator with an "
865  "Exodus mesh file and with use_for_exodus_restart equal to true");
866  }
867  }
868 
869  // Perform output related setups
871 
872  // Flush all output to _console that occur during construction and initialization of objects
874 
875  // Build Refinement and Coarsening maps for stateful material projections if necessary
876  if ((_adaptivity.isOn() || _num_grid_steps) &&
879  {
881  mooseError("Stateful neighbor material properties do not work with mesh adaptivity");
882 
884  }
885 
886  if (!_app.isRecovering())
887  {
894  {
895  if (!_app.isUltimateMaster())
896  mooseError(
897  "Doing extra refinements when restarting is NOT supported for sub-apps of a MultiApp");
898 
900  }
901  }
902 
903  unsigned int n_threads = libMesh::n_threads();
904 
905  // UserObject initialSetup
906  std::set<std::string> depend_objects_ic = _ics.getDependObjects();
907  std::set<std::string> depend_objects_aux = _aux->getDependObjects();
908 
909  // This replaces all prior updateDependObjects calls on the old user object warehouses.
910  TheWarehouse::Query uo_query = theWarehouse().query().condition<AttribSystem>("UserObject");
911  std::vector<UserObject *> userobjs;
912  uo_query.queryInto(userobjs);
914  theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);
915 
916  for (auto obj : userobjs)
917  obj->initialSetup();
918 
919  // check if jacobian calculation is done in userobject
920  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
922 
923  // Check whether nonlocal couling is required or not
927 
928  {
929  TIME_SECTION("initializingFunctions", 5, "Initializing Functions");
930 
931  // Call the initialSetup methods for functions
932  for (THREAD_ID tid = 0; tid < n_threads; tid++)
933  {
934  reinitScalars(tid); // initialize scalars so they are properly sized for use as input into
935  // ParsedFunctions
937  }
938  }
939 
940  {
941  TIME_SECTION("initializingRandomObjects", 5, "Initializing Random Objects");
942 
943  // Random interface objects
944  for (const auto & it : _random_data_objects)
945  it.second->updateSeeds(EXEC_INITIAL);
946  }
947 
948  if (!_app.isRecovering())
949  {
951 
952  {
953  TIME_SECTION("ICiniitalSetup", 5, "Setting Up Initial Conditions");
954 
955  for (THREAD_ID tid = 0; tid < n_threads; tid++)
956  _ics.initialSetup(tid);
957 
959  }
960 
961  projectSolution();
962  }
963 
964  // Materials
966  {
967  TIME_SECTION("materialInitialSetup", 3, "Setting Up Materials");
968 
969  for (THREAD_ID tid = 0; tid < n_threads; tid++)
970  {
971  // Sort the Material objects, these will be actually computed by MOOSE in reinit methods.
972  _materials.sort(tid);
974 
975  // Call initialSetup on all material objects
977 
978  // Discrete materials may insert additional dependencies on materials during the initial
979  // setup. Therefore we resolve the dependencies once more, now with the additional
980  // dependencies due to discrete materials.
982  {
983  _materials.sort(tid);
985  }
986  }
987 
988  {
989  TIME_SECTION("computingInitialStatefulProps", 3, "Computing Initial Material Values");
990 
992 
996  }
997  }
998 
999  // setRestartInPlace() is set because the property maps have now been setup and we can
1000  // dataLoad() them directly in place
1001  // setRecovering() is set because from now on we require a one-to-one mapping of
1002  // stateful properties because we shouldn't be declaring any more
1004  {
1005  props->setRestartInPlace();
1006  props->setRecovering();
1007  }
1008 
1009  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1010  {
1013  _markers.sort(tid);
1014  _markers.initialSetup(tid);
1015  }
1016 
1017 #ifdef LIBMESH_ENABLE_AMR
1018 
1019  if (!_app.isRecovering())
1020  {
1021  unsigned int n = adaptivity().getInitialSteps();
1022  if (n && !_app.isUltimateMaster() && _app.isRestarting())
1023  mooseError("Cannot perform initial adaptivity during restart on sub-apps of a MultiApp!");
1024 
1025  initialAdaptMesh();
1026  }
1027 
1028 #endif // LIBMESH_ENABLE_AMR
1029 
1030  if (!_app.isRecovering() && !_app.isRestarting())
1031  {
1032  // During initial setup the solution is copied to the older solution states (old, older, etc)
1034  }
1035 
1036  if (!_app.isRecovering())
1037  {
1038  if (haveXFEM())
1039  updateMeshXFEM();
1040  }
1041 
1042  // Call initialSetup on the solver systems
1043  for (auto & sys : _solver_systems)
1044  sys->initialSetup();
1045 
1046  // Auxilary variable initialSetup calls
1047  _aux->initialSetup();
1048 
1049  if (_displaced_problem)
1050  // initialSetup for displaced systems
1051  _displaced_problem->initialSetup();
1052 
1053  for (auto & sys : _solver_systems)
1054  sys->setSolution(*(sys->system().current_local_solution.get()));
1055 
1056  // Update the nearest node searches (has to be called after the problem is all set up)
1057  // We do this here because this sets up the Element's DoFs to ghost
1059 
1061  if (_displaced_mesh)
1063 
1064  // We need to move the mesh in order to build a map between mortar secondary and primary
1065  // interfaces. This map will then be used by the AgumentSparsityOnInterface ghosting functor to
1066  // know which dofs we need ghosted when we call EquationSystems::reinit
1068  _displaced_problem->updateMesh();
1069 
1070  // Possibly reinit one more time to get ghosting correct
1072 
1073  if (_displaced_mesh)
1074  _displaced_problem->updateMesh();
1075 
1076  updateGeomSearch(); // Call all of the rest of the geometric searches
1077 
1078  for (auto & sys : _solver_systems)
1079  {
1080  auto ti = sys->getTimeIntegrator();
1081 
1082  if (ti)
1083  {
1084  TIME_SECTION("timeIntegratorInitialSetup", 5, "Initializing Time Integrator");
1085  ti->initialSetup();
1086  }
1087  }
1088 
1089  // HUGE NOTE: MultiApp initialSetup() MUST... I repeat MUST be _after_ main-app restartable data
1090  // has been restored
1091 
1092  // Call initialSetup on the MultiApps
1093  if (_multi_apps.hasObjects())
1094  {
1095  TIME_SECTION("initialSetupMultiApps", 2, "Initializing MultiApps", false);
1097  }
1098 
1099  // Call initialSetup on the transfers
1100  {
1101  TIME_SECTION("initialSetupTransfers", 2, "Initializing Transfers");
1102 
1104 
1105  // Call initialSetup on the MultiAppTransfers to be executed on TO_MULTIAPP
1106  const auto & to_multi_app_objects = _to_multi_app_transfers.getActiveObjects();
1107  for (const auto & transfer : to_multi_app_objects)
1108  {
1109  transfer->setCurrentDirection(Transfer::DIRECTION::TO_MULTIAPP);
1110  transfer->initialSetup();
1111  }
1112 
1113  // Call initialSetup on the MultiAppTransfers to be executed on FROM_MULTIAPP
1114  const auto & from_multi_app_objects = _from_multi_app_transfers.getActiveObjects();
1115  for (const auto & transfer : from_multi_app_objects)
1116  {
1117  transfer->setCurrentDirection(Transfer::DIRECTION::FROM_MULTIAPP);
1118  transfer->initialSetup();
1119  }
1120 
1121  // Call initialSetup on the MultiAppTransfers to be executed on BETWEEN_MULTIAPP
1122  const auto & between_multi_app_objects = _between_multi_app_transfers.getActiveObjects();
1123  for (const auto & transfer : between_multi_app_objects)
1124  {
1125  transfer->setCurrentDirection(Transfer::DIRECTION::BETWEEN_MULTIAPP);
1126  transfer->initialSetup();
1127  }
1128  }
1129 
1131  {
1132  TIME_SECTION("BoundaryRestrictedNodeIntegrityCheck", 5);
1133 
1134  // check that variables are defined along boundaries of boundary restricted nodal objects
1135  ConstBndNodeRange & bnd_nodes = *mesh().getBoundaryNodeRange();
1136  BoundaryNodeIntegrityCheckThread bnict(*this, uo_query);
1137  Threads::parallel_reduce(bnd_nodes, bnict);
1138 
1139  // Nodal bcs aren't threaded
1140  const auto & node_to_elem_map = _mesh.nodeToActiveSemilocalElemMap();
1141  for (const auto & bnode : bnd_nodes)
1142  {
1143  const auto boundary_id = bnode->_bnd_id;
1144  const Node * const node = bnode->_node;
1145 
1146  if (node->processor_id() != this->processor_id())
1147  continue;
1148 
1149  // Only check vertices. Variables may not be defined on non-vertex nodes (think first order
1150  // Lagrange on a second order mesh) and user-code can often handle that
1151  const Elem * const an_elem =
1152  _mesh.getMesh().elem_ptr(libmesh_map_find(node_to_elem_map, node->id()).front());
1153  if (!an_elem->is_vertex(an_elem->get_node_index(node)))
1154  continue;
1155 
1156  const auto & bnd_name = _mesh.getBoundaryName(boundary_id);
1157 
1158  for (auto & nl : _nl)
1159  {
1160  const auto & nodal_bcs = nl->getNodalBCWarehouse();
1161  if (!nodal_bcs.hasBoundaryObjects(boundary_id, 0))
1162  continue;
1163 
1164  const auto & bnd_objects = nodal_bcs.getBoundaryObjects(boundary_id, 0);
1165  for (const auto & bnd_object : bnd_objects)
1166  // Skip if this object uses geometric search because coupled variables may be defined on
1167  // paired boundaries instead of the boundary this node is on
1168  if (!bnd_object->requiresGeometricSearch() &&
1169  bnd_object->checkVariableBoundaryIntegrity())
1170  {
1171  std::set<MooseVariableFieldBase *> vars_to_omit = {
1172  &static_cast<MooseVariableFieldBase &>(
1173  const_cast<MooseVariableBase &>(bnd_object->variable()))};
1174 
1176  *bnd_object, bnd_object->checkAllVariables(*node, vars_to_omit), bnd_name);
1177  }
1178  }
1179  }
1180  }
1181 
1183  {
1184  TIME_SECTION("BoundaryRestrictedElemIntegrityCheck", 5);
1185 
1186  // check that variables are defined along boundaries of boundary restricted elemental objects
1187  ConstBndElemRange & bnd_elems = *mesh().getBoundaryElementRange();
1188  BoundaryElemIntegrityCheckThread beict(*this, uo_query);
1189  Threads::parallel_reduce(bnd_elems, beict);
1190  }
1191 
1192  if (!_app.isRecovering())
1193  {
1195 
1197  if (!converged)
1198  mooseError("failed to converge initial MultiApp");
1199 
1200  // We'll backup the Multiapp here
1202 
1203  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1204  reinitScalars(tid);
1205 
1207 
1208  // The FEProblemBase::execute method doesn't call all the systems on EXEC_INITIAL, but it does
1209  // set/unset the current flag. Therefore, this resets the current flag to EXEC_INITIAL so that
1210  // subsequent calls (e.g., executeControls) have the proper flag.
1212  }
1213 
1214  // Here we will initialize the stateful properties once more since they may have been updated
1215  // during initialSetup by calls to computeProperties.
1216  //
1217  // It's really bad that we don't allow this during restart. It means that we can't add new
1218  // stateful materials
1219  // during restart. This is only happening because this _has_ to be below initial userobject
1220  // execution.
1221  // Otherwise this could be done up above... _before_ restoring restartable data... which would
1222  // allow you to have
1223  // this happen during restart. I honestly have no idea why this has to happen after initial user
1224  // object computation.
1225  // THAT is something we should fix... so I've opened this ticket: #5804
1226  if (!_app.isRecovering() && !_app.isRestarting() &&
1229  {
1230  TIME_SECTION("computeMaterials", 2, "Computing Initial Material Properties");
1231 
1233  }
1234 
1235  // Control Logic
1237 
1238  // Scalar variables need to reinited for the initial conditions to be available for output
1239  for (unsigned int tid = 0; tid < n_threads; tid++)
1240  reinitScalars(tid);
1241 
1242  if (_displaced_mesh)
1243  _displaced_problem->syncSolutions();
1244 
1245  // Writes all calls to _console from initialSetup() methods
1247 
1249  {
1251  for (THREAD_ID tid = 0; tid < n_threads; ++tid)
1252  for (auto & assembly : _assembly[tid])
1254  }
1255 
1256  {
1257  TIME_SECTION("lineSearchInitialSetup", 5, "Initializing Line Search");
1258 
1259  if (_line_search)
1260  _line_search->initialSetup();
1261  }
1262 
1263  // Perform Reporter get/declare check
1265 
1266  // We do this late to allow objects to get late restartable data
1269 
1271 }
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:1057
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1041
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:805
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:1009
bool hasInitialBackup() const
Definition: MooseApp.h:990
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:983
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:1567
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition: MooseApp.C:2412
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
bool haveXFEM()
Find out whether the current analysis is using XFEM.
This class provides an interface for common operations on field variables of both FE and FV types wit...
const Parallel::Communicator & _communicator
MaterialWarehouse _interface_materials
Real getStartTime() const
Definition: MooseApp.h:284
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:435
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1174
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1078
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:1063
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
void projectSolution()
auto max(const L &left, const R &right)
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
ScalarInitialConditionWarehouse _scalar_ics
bool getExodusFileRestart() const
Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh...
Definition: MooseApp.h:425
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:3199
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:1276
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:84
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2967
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:2210
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:1241
std::vector< VariablePhiValue > _phi_zero
InitialConditionWarehouse _ics
MaterialWarehouse _discrete_materials
virtual void initialSetup()
Definition: SubProblem.C:1174
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:754
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:279
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:1283
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1106
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
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:1168
Restartable::ManagedValue< RestartableEquationSystems > _req
The EquationSystems object, wrapped for restart.
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:486
MooseObjectWarehouse< Marker > _markers
virtual void initialAdaptMesh()
MaterialWarehouse _all_materials
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1092
auto index_range(const T &sizable)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
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 
)
virtualinherited

Definition at line 610 of file FEProblemBase.C.

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

612 {
613  TIME_SECTION("initNullSpaceVectors", 5, "Initializing Null Space Vectors");
614 
615  unsigned int dimNullSpace = parameters.get<unsigned int>("null_space_dimension");
616  unsigned int dimTransposeNullSpace =
617  parameters.get<unsigned int>("transpose_null_space_dimension");
618  unsigned int dimNearNullSpace = parameters.get<unsigned int>("near_null_space_dimension");
619  for (unsigned int i = 0; i < dimNullSpace; ++i)
620  {
621  std::ostringstream oss;
622  oss << "_" << i;
623  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
624  // builder might march over all nodes
625  for (auto & nl : nls)
626  nl->addVector("NullSpace" + oss.str(), false, GHOSTED);
627  }
628  _subspace_dim["NullSpace"] = dimNullSpace;
629  for (unsigned int i = 0; i < dimTransposeNullSpace; ++i)
630  {
631  std::ostringstream oss;
632  oss << "_" << i;
633  // do not project, since this will be recomputed, but make it ghosted, since the near nullspace
634  // builder might march over all nodes
635  for (auto & nl : nls)
636  nl->addVector("TransposeNullSpace" + oss.str(), false, GHOSTED);
637  }
638  _subspace_dim["TransposeNullSpace"] = dimTransposeNullSpace;
639  for (unsigned int i = 0; i < dimNearNullSpace; ++i)
640  {
641  std::ostringstream oss;
642  oss << "_" << i;
643  // do not project, since this will be recomputed, but make it ghosted, since the near-nullspace
644  // builder might march over all semilocal nodes
645  for (auto & nl : nls)
646  nl->addVector("NearNullSpace" + oss.str(), false, GHOSTED);
647  }
648  _subspace_dim["NearNullSpace"] = dimNearNullSpace;
649 }
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 EigenProblem::initPetscOutputAndSomeSolverSettings ( )
overridevirtual

Hook up monitors for SNES and KSP.

Reimplemented from FEProblemBase.

Definition at line 650 of file EigenProblem.C.

Referenced by SlepcEigenSolverConfiguration::configure_solver().

651 {
653 }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void solveSetup()
Calls the timestepSetup function for each of the output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773

◆ initXFEM()

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

Create XFEM controller object.

Definition at line 7480 of file FEProblemBase.C.

7481 {
7482  _xfem = xfem;
7483  _xfem->setMesh(&_mesh);
7484  if (_displaced_mesh)
7485  _xfem->setDisplacedMesh(_displaced_mesh);
7486 
7487  auto fill_data = [](auto & storage)
7488  {
7489  std::vector<MaterialData *> data(libMesh::n_threads());
7490  for (const auto tid : make_range(libMesh::n_threads()))
7491  data[tid] = &storage.getMaterialData(tid);
7492  return data;
7493  };
7494  _xfem->setMaterialData(fill_data(_material_props));
7495  _xfem->setBoundaryMaterialData(fill_data(_bnd_material_props));
7496 
7497  unsigned int n_threads = libMesh::n_threads();
7498  for (unsigned int i = 0; i < n_threads; ++i)
7499  for (const auto nl_sys_num : index_range(_nl))
7500  {
7501  _assembly[i][nl_sys_num]->setXFEM(_xfem);
7502  if (_displaced_problem)
7503  _displaced_problem->assembly(i, nl_sys_num).setXFEM(_xfem);
7504  }
7505 }
void fill_data(std::map< processor_id_type, std::vector< std::set< unsigned int >>> &data, int M)
MaterialPropertyStorage & _bnd_material_props
unsigned int n_threads()
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseMesh & _mesh
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem
std::shared_ptr< XFEMInterface > _xfem
Pointer to XFEM controller.
MaterialPropertyStorage & _material_props
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ isGeneralizedEigenvalueProblem()

bool EigenProblem::isGeneralizedEigenvalueProblem ( ) const
inline

Definition at line 45 of file EigenProblem.h.

bool _generalized_eigenvalue_problem
Definition: EigenProblem.h:244

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

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

◆ isNonlinearEigenvalueSolver()

bool EigenProblem::isNonlinearEigenvalueSolver ( ) const

Definition at line 640 of file EigenProblem.C.

Referenced by Moose::assemble_matrix(), SlepcEigenSolverConfiguration::configure_solver(), NonlinearEigenSystem::getSNES(), Moose::SlepcSupport::setSlepcEigenSolverTolerances(), solve(), and NonlinearEigenSystem::solve().

641 {
647 }
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default) ...
Definition: MooseTypes.h:774
Moose::EigenSolveType _eigen_solve_type
Definition: SolverParams.h:24
SolverParams & solverParams()
Get the solver parameters.
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
Definition: MooseTypes.h:776
Preconditioned Jacobian-free Newton Krylov.
Definition: MooseTypes.h:775
Nonlinear inverse power.
Definition: MooseTypes.h:773
Jacobian-free Newton Krylov.
Definition: MooseTypes.h:777

◆ isParamSetByUser()

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

◆ 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 111 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::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(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), FileMeshGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), BlockDeletionGenerator::generate(), MeshExtruderGenerator::generate(), XYDelaunayGenerator::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(), 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(), SideSetsGeneratorBase::setup(), SetupMeshAction::setupMesh(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideExtremeValue::SideExtremeValue(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObject::SolutionUserObject(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

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

◆ isSNESMFReuseBaseSetbyUser()

bool FEProblemBase::isSNESMFReuseBaseSetbyUser ( )
inlineinherited

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

Definition at line 1941 of file FEProblemBase.h.

bool _snesmf_reuse_base_set_by_user
If or not _snesmf_reuse_base is set by user.

◆ isSolverSystemNonlinear()

bool FEProblemBase::isSolverSystemNonlinear ( const unsigned int  sys_num)
inlineinherited

◆ isSolveTerminationRequested()

virtual bool Problem::isSolveTerminationRequested ( ) const
inlinevirtualinherited

Check of termination has been requested.

This should be called by transient Executioners in the keepGoing() member.

Definition at line 43 of file Problem.h.

Referenced by 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
inlineoverridevirtualinherited

◆ jacobianSetup()

void FEProblemBase::jacobianSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 8561 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::jacobianSetup().

8562 {
8564  // We need to setup all the nonlinear systems other than our current one which actually called
8565  // this method (so we have to make sure we don't go in a circle)
8566  for (const auto i : make_range(numNonlinearSystems()))
8567  if (i != currentNlSysNum())
8568  _nl[i]->jacobianSetup();
8569  // We don't setup the aux sys because that's been done elsewhere
8570  if (_displaced_problem)
8571  _displaced_problem->jacobianSetup();
8572 }
virtual std::size_t numNonlinearSystems() const override
virtual void jacobianSetup()
Definition: SubProblem.C:1166
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual unsigned int currentNlSysNum() const override
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ linearSysNum()

unsigned int FEProblemBase::linearSysNum ( const LinearSystemName &  linear_sys_name) const
overridevirtualinherited
Returns
the linear system number corresponding to the provided linear_sys_name

Implements SubProblem.

Definition at line 5862 of file FEProblemBase.C.

Referenced by Moose::compute_linear_system(), LinearSystem::computeGradients(), LinearSystem::computeLinearSystemInternal(), FEProblemBase::computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and DisplacedProblem::linearSysNum().

5863 {
5864  std::istringstream ss(linear_sys_name);
5865  unsigned int linear_sys_num;
5866  if (!(ss >> linear_sys_num) || !ss.eof())
5867  linear_sys_num = libmesh_map_find(_linear_sys_name_to_num, linear_sys_name);
5868 
5869  return linear_sys_num;
5870 }
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
Map from linear system name to number.

◆ lineSearch()

void FEProblemBase::lineSearch ( )
virtualinherited

execute MOOSE line search

Definition at line 2381 of file FEProblemBase.C.

Referenced by ComputeLineSearchObjectWrapper::linesearch().

2382 {
2383  _line_search->lineSearch();
2384 }
std::shared_ptr< LineSearch > _line_search

◆ logAdd()

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

Output information about the object just added to the problem.

Definition at line 3790 of file FEProblemBase.C.

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

3793 {
3794  if (_verbose_setup)
3795  _console << "[DBG] Adding " << system << " '" << name << "' of type " << type << std::endl;
3796 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
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 694 of file SubProblem.C.

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

695 {
696  _material_property_requested.insert(prop_name);
697 }
std::set< std::string > _material_property_requested
set containing all material property names that have been requested by getMaterialProperty* ...
Definition: SubProblem.h:1029

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

307 {
308  auto tag_name_upper = MooseUtils::toUpper(tag_name);
309 
310  return _matrix_tag_name_to_tag_id.find(tag_name_upper) != _matrix_tag_name_to_tag_id.end();
311 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:1006
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1040

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

315 {
316  return _matrix_tag_id_to_tag_name.find(tag_id) != _matrix_tag_id_to_tag_name.end();
317 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1009

◆ matrixTagName()

TagName SubProblem::matrixTagName ( TagID  tag)
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 335 of file SubProblem.C.

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

336 {
337  return _matrix_tag_id_to_tag_name[tag];
338 }
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:1009

◆ mesh() [1/3]

virtual MooseMesh& FEProblemBase::mesh ( )
inlineoverridevirtualinherited

Implements SubProblem.

Definition at line 157 of file FEProblemBase.h.

Referenced by Adaptivity::adaptMesh(), FEProblemBase::addAnyRedistributers(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), PhysicsBasedPreconditioner::apply(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), LinearSystem::computeGradients(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::coordTransform(), MultiApp::createApp(), DMMooseGetEmbedding_Private(), ElementsAlongLine::ElementsAlongLine(), ElementsAlongPlane::ElementsAlongPlane(), MultiAppVariableValueSampleTransfer::execute(), ElementsAlongLine::execute(), ElementsAlongPlane::execute(), IntersectionPointsAlongLine::execute(), MultiAppVariableValueSamplePostprocessorTransfer::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(), FEProblemBase::initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), Moose::Mortar::loopOverMortarSegments(), ReporterPointMarker::markerSetup(), FEProblemBase::mesh(), Nemesis::meshChanged(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), ComputeNodalUserObjectsThread::onNode(), BoundaryNodeIntegrityCheckThread::onNode(), ComputeInitialConditionThread::operator()(), BoundaryElemIntegrityCheckThread::operator()(), ComputeLinearFVGreenGaussGradientVolumeThread::operator()(), Output::Output(), ConsoleUtils::outputMeshInformation(), Exodus::outputSetup(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), MeshInfo::possiblyAddSidesetInfo(), MeshInfo::possiblyAddSubdomainInfo(), ComputeLinearFVElementalThread::printBlockExecutionInformation(), ComputeLinearFVFaceThread::printBlockExecutionInformation(), MaterialPropertyDebugOutput::printMaterialMap(), TopResidualDebugOutput::printTopResiduals(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), Moose::PetscSupport::storePetscOptions(), MultiAppDofCopyTransfer::transfer(), and Checkpoint::updateCheckpointFiles().

157 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [2/3]

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

Implements SubProblem.

Definition at line 158 of file FEProblemBase.h.

158 { return _mesh; }
MooseMesh & _mesh

◆ mesh() [3/3]

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

Implements SubProblem.

Definition at line 534 of file FEProblemBase.C.

535 {
536  if (use_displaced && !_displaced_problem)
537  mooseWarning("Displaced mesh was requested but the displaced problem does not exist. "
538  "Regular mesh will be returned");
539  return ((use_displaced && _displaced_problem) ? _displaced_problem->mesh() : mesh());
540 }
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 ( )
overridevirtualinherited

Update data after a mesh change.

Reimplemented from SubProblem.

Definition at line 7530 of file FEProblemBase.C.

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

7531 {
7532  TIME_SECTION("meshChanged", 3, "Handling Mesh Changes");
7533 
7534  this->meshChangedHelper();
7535 }
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)
protectedinherited

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

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

7539 {
7540  TIME_SECTION("meshChangedHelper", 5);
7541 
7544  _mesh.cacheChangedLists(); // Currently only used with adaptivity and stateful material
7545  // properties
7546 
7547  // Clear these out because they corresponded to the old mesh
7548  _ghosted_elems.clear();
7550 
7551  // The mesh changed. We notify the MooseMesh first, because
7552  // callbacks (e.g. for sparsity calculations) triggered by the
7553  // EquationSystems reinit may require up-to-date MooseMesh caches.
7554  _mesh.meshChanged();
7555 
7556  // If we're just going to alter the mesh again, all we need to
7557  // handle here is AMR and projections, not full system reinit
7558  if (intermediate_change)
7559  es().reinit_solutions();
7560  else
7561  es().reinit();
7562 
7563  // Updating MooseMesh first breaks other adaptivity code, unless we
7564  // then *again* update the MooseMesh caches. E.g. the definition of
7565  // "active" and "local" may have been *changed* by refinement and
7566  // repartitioning done in EquationSystems::reinit().
7567  _mesh.meshChanged();
7568 
7569  // If we have finite volume variables, we will need to recompute additional elemental/face
7570  // quantities
7573 
7574  // Let the meshChangedInterface notify the mesh changed event before we update the active
7575  // semilocal nodes, because the set of ghosted elements may potentially be updated during a mesh
7576  // changed event.
7577  for (const auto & mci : _notify_when_mesh_changes)
7578  mci->meshChanged();
7579 
7580  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
7582 
7583  // Need to redo ghosting
7585 
7586  if (_displaced_problem)
7587  {
7588  _displaced_problem->meshChanged();
7590  }
7591 
7593 
7596 
7597  // Just like we reinitialized our geometric search objects, we also need to reinitialize our
7598  // mortar meshes. Note that this needs to happen after DisplacedProblem::meshChanged because the
7599  // mortar mesh discretization will depend necessarily on the displaced mesh being re-displaced
7600  updateMortarMesh();
7601 
7602  reinitBecauseOfGhostingOrNewGeomObjects(/*mortar_changed=*/true);
7603 
7604  // We need to create new storage for newly active elements, and copy
7605  // stateful properties from the old elements.
7608  {
7609  if (havePRefinement())
7611 
7612  // Prolong properties onto newly refined elements' children
7613  {
7615  /* refine = */ true, *this, _material_props, _bnd_material_props, _assembly);
7616  const auto & range = *_mesh.refinedElementRange();
7617  Threads::parallel_reduce(range, pmp);
7618 
7619  // Concurrent erasure from the shared hash map is not safe while we are reading from it in
7620  // ProjectMaterialProperties, so we handle erasure here. Moreover, erasure based on key is
7621  // not thread safe in and of itself because it is a read-write operation. Note that we do not
7622  // do the erasure for p-refinement because the coarse level element is the same as our active
7623  // refined level element
7624  if (!doingPRefinement())
7625  for (const auto & elem : range)
7626  {
7630  }
7631  }
7632 
7633  // Restrict properties onto newly coarsened elements
7634  {
7636  /* refine = */ false, *this, _material_props, _bnd_material_props, _assembly);
7637  const auto & range = *_mesh.coarsenedElementRange();
7638  Threads::parallel_reduce(range, pmp);
7639  // Note that we do not do the erasure for p-refinement because the coarse level element is the
7640  // same as our active refined level element
7641  if (!doingPRefinement())
7642  for (const auto & elem : range)
7643  {
7644  auto && coarsened_children = _mesh.coarsenedElementChildren(elem);
7645  for (auto && child : coarsened_children)
7646  {
7650  }
7651  }
7652  }
7653  }
7654 
7657 
7658  _has_jacobian = false; // we have to recompute jacobian when mesh changed
7659 
7660  // Since the mesh has changed, we need to make sure that we update any of our
7661  // MOOSE-system specific data. libmesh system data has already been updated
7662  for (auto & sys : _solver_systems)
7663  sys->update(/*update_libmesh_system=*/false);
7664  _aux->update(/*update_libmesh_system=*/false);
7665 }
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:716
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:734
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1063
virtual EquationSystems & es() override
bool _calculate_jacobian_in_uo
bool havePRefinement() const
Query whether p-refinement has been requested at any point during the simulation. ...
Definition: SubProblem.h:980
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:1324
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:746
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:754
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:740
DiracKernelInfo _dirac_kernel_info
nonlocal coupling matrix;
Definition: SubProblem.h:1016
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:685
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2112
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:3842

◆ mooseDeprecated()

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

Definition at line 91 of file MooseBaseErrorInterface.h.

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

92  {
93  moose::internal::mooseDeprecatedStream(_console, false, true, std::forward<Args>(args)...);
94  }
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.

◆ mooseDocumentedError()

template<typename... Args>
void MooseBaseErrorInterface::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Emits a documented error with object name and type.

Documented errors are errors that have an issue associated with them.

The repository name repo_name links a named repository to a URL and should be registered at the application level with registerRepository(). See Moose.C for an example of the "moose" repository registration.

Parameters
repo_nameThe repository name where the issue resides
issue_numThe number of the issue
argsThe error message to be combined

Definition at line 61 of file MooseBaseErrorInterface.h.

64  {
65  std::ostringstream oss;
66  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
67  const auto msg = moose::internal::formatMooseDocumentedError(repo_name, issue_num, oss.str());
68  _moose_base.callMooseError(msg, /* with_prefix = */ true);
69  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:92
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition: MooseError.C:97

◆ mooseError()

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

Emits an error prefixed with object name and type.

Definition at line 29 of file MooseBaseErrorInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), InitProblemAction::act(), CheckFVBCAction::act(), SetupMeshCompleteAction::act(), AutoCheckpointAction::act(), AddICAction::act(), AddMeshGeneratorAction::act(), AddBoundsVectorsAction::act(), AddVectorPostprocessorAction::act(), CreateExecutionerAction::act(), AddFVICAction::act(), CheckIntegrityAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), DeprecatedBlockAction::act(), SetupTimeStepperAction::act(), SetupPredictorAction::act(), AddTimeStepperAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::adaptMesh(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), DistributedRectilinearMeshGenerator::addElement(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFVInitialCondition(), ADDGKernel::ADDGKernel(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addScalarKernel(), AddVariableAction::addVariable(), FEProblemBase::addVectorPostprocessor(), SubProblem::addVectorTag(), MooseLinearVariableFV< Real >::adError(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), 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(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::checkDuplicatePostprocessorVariableNames(), MooseMesh::checkDuplicateSubdomainNames(), FEProblemBase::checkExceptionAndStopSolve(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), Sampler::checkReinitStatus(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), FEProblemBase::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(), FEProblemBase::computeBounds(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), ArrayDGKernel::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighResidual(), InternalSideIntegralPostprocessor::computeFaceInfoIntegral(), SideIntegralPostprocessor::computeFaceInfoIntegral(), MooseVariableFieldBase::computeFaceValues(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), MooseMesh::computeFiniteVolumeCoords(), HistogramVectorPostprocessor::computeHistogram(), ArrayKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), FVFluxKernel::computeJacobian(), NodalConstraint::computeJacobian(), FEProblemBase::computeJacobianTags(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), 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(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualTags(), FEProblemBase::computeResidualType(), KernelScalarBase::computeScalarOffDiagJacobian(), ADKernelScalarBase::computeScalarQpResidual(), ADMortarScalarBase::computeScalarQpResidual(), MortarScalarBase::computeScalarQpResidual(), KernelScalarBase::computeScalarQpResidual(), TimeStepper::computeStep(), ActuallyExplicitEuler::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CentralDifference::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), MultiAppGeometricInterpolationTransfer::computeTransformation(), BuildArrayVariableAux::computeValue(), TagVectorArrayVariableAux::computeValue(), 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(), FEProblemBase::determineSolverSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), doFreeNonlinearPowerIterations(), FEProblemBase::duplicateVariableCheck(), EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementQualityAux::ElementQualityAux(), ElementUOAux::ElementUOAux(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), SideIntegralPostprocessor::errorNoFaceInfo(), SideIntegralFunctorPostprocessorTempl< is_ad >::errorNoFaceInfo(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppGeneralFieldTransfer::examineReceivedValueConflicts(), RestartableDataReporter::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppPostprocessorTransfer::execute(), ElementQualityChecker::execute(), PositionsFunctorValueSampler::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppCopyTransfer::execute(), WebServerControl::execute(), MultiAppUserObjectTransfer::execute(), InterfaceQpUserObjectBase::execute(), MultiAppGeometricInterpolationTransfer::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), TimeExtremeValue::execute(), Eigenvalue::execute(), DomainUserObject::execute(), FEProblemBase::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), ExplicitSSPRungeKutta::ExplicitSSPRungeKutta(), MultiAppGeneralFieldTransfer::extractOutgoingPoints(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), 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(), BlockToMeshConverterGenerator::generate(), FileMeshGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), FlipSidesetGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), CutMeshByPlaneGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshRepairGenerator::generate(), SideSetsFromPointsGenerator::generate(), MeshCollectionGenerator::generate(), CombinerGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), MeshExtruderGenerator::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(), FEProblemBase::getActualFieldVariable(), DisplacedProblem::getArrayVariable(), FEProblemBase::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(), FEProblemBase::getDistribution(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), GhostingUserObject::getElementalValue(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), PropertyReadFile::getElementData(), MooseMesh::getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), MooseMesh::getElemIDMapping(), MooseMesh::getElemIDsOnBlocks(), MultiAppFieldTransfer::getEquationSystem(), MultiApp::getExecutioner(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), FEProblemBase::getFunction(), SubProblem::getFunctor(), MooseMesh::getGeneralAxisymmetricCoordAxis(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), SolutionUserObject::getLocalVarIndex(), Material::getMaterialByName(), FEProblemBase::getMaterialData(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), MooseMesh::getNodeBlockIds(), PropertyReadFile::getNodeData(), MooseMesh::getNodeList(), getNonlinearEigenSystem(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), FEProblemBase::getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), InterfaceQpUserObjectBase::getQpValue(), MooseMesh::getRefinementMap(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), FEProblemBase::getSampler(), JSONFileReader::getScalar(), WebServerControl::getScalarJSONValue(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseObject::getSharedPtr(), InterfaceQpUserObjectBase::getSideAverageValue(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), Times::getTimeAtIndex(), FEProblemBase::getTimeFromStateArg(), Transient::getTimeIntegratorName(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), FEProblemBase::getUserObject(), FEProblemBase::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(), FEProblemBase::getVectorVariable(), GhostingAux::GhostingAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), FEProblemBase::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(), FEProblemBase::init(), MultiApp::init(), FEProblemBase::initialAdaptMesh(), NestedDivision::initialize(), TransformedPositions::initialize(), DistributedPositions::initialize(), ReporterPositions::initialize(), ReporterTimes::initialize(), ElementGroupCentroidPositions::initialize(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), PiecewiseLinearBase::initialSetup(), MultiAppConservativeTransfer::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), ReferenceResidualProblem::initialSetup(), FullSolveMultiApp::initialSetup(), PiecewiseLinear::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), LinearFVAdvection::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), LinearFVDiffusion::initialSetup(), SolutionScalarAux::initialSetup(), SolutionAux::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::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(), MooseLinearVariableFV< Real >::lowerDError(), 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(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), MooseVariableBase::MooseVariableBase(), MooseVariableConstMonomial::MooseVariableConstMonomial(), MoveNodeGenerator::MoveNodeGenerator(), ElementSubdomainModifier::movingBoundaryID(), ElementSubdomainModifier::movingBoundaryName(), MultiApp::MultiApp(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), FEProblemBase::needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), MooseLinearVariableFV< Real >::nodalError(), MooseVariableFV< Real >::nodalMatrixTagValue(), NodalPatchRecoveryBase::nodalPatchRecovery(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalScalarKernel::NodalScalarKernel(), MooseVariableFV< Real >::nodalValueArray(), MooseVariableFV< Real >::nodalValueOldArray(), MooseVariableFV< Real >::nodalValueOlderArray(), NodalVariableValue::NodalVariableValue(), MooseVariableFV< Real >::nodalVectorTagValue(), DistributedRectilinearMeshGenerator::nodeId(), 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(), 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(), FEProblemBase::setCoupling(), PiecewiseBase::setData(), FileOutput::setFileBaseInternal(), MooseMesh::setGeneralAxisymmetricCoordAxes(), FEProblemSolve::setInnerSolve(), MeshGenerator::setMeshProperty(), FVPointValueConstraint::setMyElem(), FEProblemBase::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(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointAverage::spatialValue(), NearestPointIntegralVariablePostprocessor::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), WebServerControl::stringifyJSONType(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), GeneralUserObject::subdomainSetup(), NodalUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), FEProblemBase::swapBackMaterialsNeighbor(), DisplacedProblem::systemBaseLinear(), Console::systemInfoFlags(), Terminator::Terminator(), CutMeshByPlaneGenerator::tet4ElemCutter(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), MooseLinearVariableFV< Real >::timeIntegratorError(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriodBase::TimePeriodBase(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransformedPositions::TransformedPositions(), FEProblemBase::trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), FEProblemBase::uDotDotOldRequested(), MooseVariableScalar::uDotOld(), FEProblemBase::uDotOldRequested(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), FEProblemBase::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().

30  {
31  std::ostringstream oss;
32  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
33  _moose_base.callMooseError(oss.str(), /* with_prefix = */ true);
34  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:92
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ mooseErrorNonPrefixed()

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

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

Definition at line 40 of file MooseBaseErrorInterface.h.

41  {
42  std::ostringstream oss;
43  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
44  _moose_base.callMooseError(oss.str(), /* with_prefix = */ false);
45  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:92
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ mooseInfo()

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

◆ mooseWarning()

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

Emits a warning prefixed with object name and type.

Definition at line 75 of file MooseBaseErrorInterface.h.

Referenced by AddKernelAction::act(), SetupMeshAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), MaterialOutputAction::act(), CommonOutputAction::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(), FEProblemBase::getMaterial(), Positions::getNearestPositionIndex(), LineValueSampler::getValue(), Terminator::handleMessage(), SphericalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), CartesianGridDivision::initialize(), CylindricalGridDivision::initialize(), ReferenceResidualProblem::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), FEProblemBase::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(), FEProblemBase::sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

76  {
78  _console, _moose_base.errorPrefix("warning"), std::forward<Args>(args)...);
79  }
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:181
const MooseBase & _moose_base
The MooseBase class deriving from this interface.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseWarningNonPrefixed()

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

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

Definition at line 85 of file MooseBaseErrorInterface.h.

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

◆ mortarData() [1/2]

const MortarData& FEProblemBase::mortarData ( ) const
inlineinherited

Returns the mortar data object.

Definition at line 2009 of file FEProblemBase.h.

2009 { return _mortar_data; }
MortarData _mortar_data

◆ mortarData() [2/2]

MortarData& FEProblemBase::mortarData ( )
inlineinherited

Definition at line 2010 of file FEProblemBase.h.

2010 { return _mortar_data; }
MortarData _mortar_data

◆ name()

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

Get the name of the class.

Returns
The name of the class

Reimplemented in MooseVariableBase.

Definition at line 57 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), CopyNodalVarsAction::act(), AddElementalFieldAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), AddVariableAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), SubProblem::addPiecewiseByBlockLambdaFunctor(), FEProblemBase::addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), FVFluxKernel::adjustRMGhostLayers(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), Moose::Builder::build(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), FEProblemBase::checkNonlinearConvergence(), Coupleable::checkWritableVar(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBaseParameterInterface::connectControllableParams(), MultiApp::createApp(), MooseApp::createExecutors(), AddVariableAction::createInitialConditionAction(), MultiApp::createLocalApp(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), 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(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), MooseBase::errorPrefix(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), RestartableDataReporter::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), MultiApp::fillPositions(), PointSamplerBase::finalize(), FunctionDT::FunctionDT(), FVFunctionIC::functionName(), FunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), StitchedMeshGenerator::generate(), XYDelaunayGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), MooseApp::getExecutor(), FEProblemBase::getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), SolutionUserObject::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), MooseApp::getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), ActionWarehouse::getMooseAppName(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), OutputWarehouse::getOutput(), MooseApp::getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ReporterData::getReporterInfo(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), FEProblemBase::getSampler(), Transient::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), MooseApp::hasMeshGenerator(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), FEProblemBase::hasUserObject(), IterationAdaptiveDT::init(), AdvancedOutput::init(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), Console::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MeshGenerator::isChildMeshGenerator(), MeshGenerator::isNullMeshName(), MooseApp::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseApp::MooseApp(), OutputWarehouse::mooseConsole(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), PhysicsBase::nonlinearVariableExists(), Registry::objData(), 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(), MooseServer::parseDocumentForDiagnostics(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PointVariableSamplerBase::PointVariableSamplerBase(), MooseApp::possiblyLoadRestartableMetaData(), PhysicsBase::prefix(), PerfGraphLivePrint::printStats(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), MooseApp::runInputFile(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), FEProblemBase::setPostprocessorValueByName(), GlobalParamsAction::setScalarParam(), MooseMesh::setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), Split::setup(), SideSetsGeneratorBase::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), VectorPostprocessorVisualizationAux::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBaseParameterInterface::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), and MooseApp::writeRestartableMetaData().

57 { return _name; }
const std::string _name
The name of this class.
Definition: MooseBase.h:90

◆ needBoundaryMaterialOnSide()

bool FEProblemBase::needBoundaryMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)
inherited

These methods are used to determine whether stateful material properties need to be stored on internal sides.

There are five situations where this may be the case: 1) DGKernels 2) IntegratedBCs 3)InternalSideUserObjects 4)ElementalAuxBCs 5)InterfaceUserObjects

Method 1:

Parameters
bnd_idthe boundary id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Method 2:

Parameters
subdomain_idthe subdomain id for which to see if stateful material properties need to be stored
tidthe THREAD_ID of the caller
Returns
Boolean indicating whether material properties need to be stored

Definition at line 8171 of file FEProblemBase.C.

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

8172 {
8173  if (_bnd_mat_side_cache[tid].find(bnd_id) == _bnd_mat_side_cache[tid].end())
8174  {
8175  auto & bnd_mat_side_cache = _bnd_mat_side_cache[tid][bnd_id];
8176  bnd_mat_side_cache = false;
8177 
8178  if (_aux->needMaterialOnSide(bnd_id))
8179  {
8180  bnd_mat_side_cache = true;
8181  return true;
8182  }
8183  else
8184  for (auto & nl : _nl)
8185  if (nl->needBoundaryMaterialOnSide(bnd_id, tid))
8186  {
8187  bnd_mat_side_cache = true;
8188  return true;
8189  }
8190 
8191  if (theWarehouse()
8192  .query()
8193  .condition<AttribThread>(tid)
8194  .condition<AttribInterfaces>(Interfaces::SideUserObject)
8195  .condition<AttribBoundaries>(bnd_id)
8196  .count() > 0)
8197  {
8198  bnd_mat_side_cache = true;
8199  return true;
8200  }
8201  }
8202 
8203  return _bnd_mat_side_cache[tid][bnd_id];
8204 }
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
Cache for calculating materials on side.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
TheWarehouse & theWarehouse() const
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
AttribBoundaries tracks all boundary IDs associated with an object.
Definition: Attributes.h:188
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:466
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284

◆ needFV()

virtual void FEProblemBase::needFV ( )
inlineoverridevirtualinherited

marks this problem as including/needing finite volume functionality.

Implements SubProblem.

Definition at line 2257 of file FEProblemBase.h.

Referenced by DisplacedProblem::needFV().

2257 { _have_fv = true; }
bool _have_fv
Whether we are performing some calculations with finite volume discretizations.

◆ needInterfaceMaterialOnSide()

bool FEProblemBase::needInterfaceMaterialOnSide ( BoundaryID  bnd_id,
const THREAD_ID  tid 
)
inherited

Definition at line 8207 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface().

8208 {
8209  if (_interface_mat_side_cache[tid].find(bnd_id) == _interface_mat_side_cache[tid].end())
8210  {
8211  auto & interface_mat_side_cache = _interface_mat_side_cache[tid][bnd_id];
8212  interface_mat_side_cache = false;
8213 
8214  for (auto & nl : _nl)
8215  if (nl->needInterfaceMaterialOnSide(bnd_id, tid))
8216  {
8217  interface_mat_side_cache = true;
8218  return true;
8219  }
8220 
8221  if (theWarehouse()
8222  .query()
8223  .condition<AttribThread>(tid)
8224  .condition<AttribInterfaces>(Interfaces::InterfaceUserObject)
8225  .condition<AttribBoundaries>(bnd_id)
8226  .count() > 0)
8227  {
8228  interface_mat_side_cache = true;
8229  return true;
8230  }
8231  else if (_interface_materials.hasActiveBoundaryObjects(bnd_id, tid))
8232  {
8233  interface_mat_side_cache = true;
8234  return true;
8235  }
8236  }
8237  return _interface_mat_side_cache[tid][bnd_id];
8238 }
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)
inherited

Set a flag that indicated that user required values for the previous Newton iterate.

Definition at line 8276 of file FEProblemBase.C.

Referenced by Coupleable::coupledGradientPreviousNL(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValuePreviousNL(), and NonlinearSystem::solve().

8277 {
8279  mooseError("Previous nonlinear solution is required but not added through "
8280  "Problem/previous_nl_solution_required=true");
8281 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:173
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
inherited

Check to see whether we need to compute the variable values of the previous Newton iterate.

Returns
true if the user required values of the previous Newton iterate

Definition at line 8270 of file FEProblemBase.C.

8271 {
8273 }
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:173
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:30

◆ needSubdomainMaterialOnSide()

bool FEProblemBase::needSubdomainMaterialOnSide ( SubdomainID  subdomain_id,
const THREAD_ID  tid 
)
inherited

Definition at line 8241 of file FEProblemBase.C.

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

8242 {
8243  if (_block_mat_side_cache[tid].find(subdomain_id) == _block_mat_side_cache[tid].end())
8244  {
8245  _block_mat_side_cache[tid][subdomain_id] = false;
8246 
8247  for (auto & nl : _nl)
8248  if (nl->needSubdomainMaterialOnSide(subdomain_id, tid))
8249  {
8250  _block_mat_side_cache[tid][subdomain_id] = true;
8251  return true;
8252  }
8253 
8254  if (theWarehouse()
8255  .query()
8256  .condition<AttribThread>(tid)
8257  .condition<AttribInterfaces>(Interfaces::InternalSideUserObject)
8258  .condition<AttribSubdomains>(subdomain_id)
8259  .count() > 0)
8260  {
8261  _block_mat_side_cache[tid][subdomain_id] = true;
8262  return true;
8263  }
8264  }
8265 
8266  return _block_mat_side_cache[tid][subdomain_id];
8267 }
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

◆ negativeSignEigenKernel()

bool EigenProblem::negativeSignEigenKernel ( ) const
inline

A flag indicates if a negative sign is used in eigen kernels.

If the negative sign is used, eigen kernels are consistent in nonlinear solver. In nonlinear solver, RHS kernels always have a negative sign.

Definition at line 60 of file EigenProblem.h.

Referenced by Moose::assemble_matrix(), Moose::SlepcSupport::mooseMatMult_Eigen(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionB(), and Moose::SlepcSupport::mooseSlepcEigenFormJacobianB().

bool _negative_sign_eigen_kernel
Whether or not use negative sign for Bx.
Definition: EigenProblem.h:249

◆ neighborSubdomainSetup()

void FEProblemBase::neighborSubdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 2274 of file FEProblemBase.C.

Referenced by ThreadedFaceLoop< RangeType >::neighborSubdomainChanged().

2275 {
2276  _all_materials.neighborSubdomainSetup(subdomain, tid);
2277 }
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials

◆ newAssemblyArray()

void FEProblemBase::newAssemblyArray ( std::vector< std::shared_ptr< SolverSystem >> &  solver_systems)
virtualinherited

Definition at line 596 of file FEProblemBase.C.

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

597 {
598  unsigned int n_threads = libMesh::n_threads();
599 
600  _assembly.resize(n_threads);
601  for (const auto i : make_range(n_threads))
602  {
603  _assembly[i].resize(solver_systems.size());
604  for (const auto j : index_range(solver_systems))
605  _assembly[i][j] = std::make_unique<Assembly>(*solver_systems[j], i);
606  }
607 }
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 EigenProblem::nlConverged ( const unsigned int  nl_sys_num)
overridevirtual
Returns
whether the given nl_sys_num is converged

Reimplemented from FEProblemBase.

Definition at line 631 of file EigenProblem.C.

632 {
633  if (_solve)
634  return _nl_eigen->converged();
635  else
636  return true;
637 }
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ nLinearIterations()

unsigned int FEProblemBase::nLinearIterations ( const unsigned int  nl_sys_num) const
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 6093 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6094 {
6095  return _nl[nl_sys_num]->nLinearIterations();
6096 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nlSysNum()

unsigned int FEProblemBase::nlSysNum ( const NonlinearSystemName &  nl_sys_name) const
overridevirtualinherited
Returns
the nonlinear system number corresponding to the provided nl_sys_name

Implements SubProblem.

Definition at line 5851 of file FEProblemBase.C.

Referenced by DisplacedProblem::nlSysNum().

5852 {
5853  std::istringstream ss(nl_sys_name);
5854  unsigned int nl_sys_num;
5855  if (!(ss >> nl_sys_num) || !ss.eof())
5856  nl_sys_num = libmesh_map_find(_nl_sys_name_to_num, nl_sys_name);
5857 
5858  return nl_sys_num;
5859 }
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
Map from nonlinear system name to number.

◆ nNonlinearIterations()

unsigned int FEProblemBase::nNonlinearIterations ( const unsigned int  nl_sys_num) const
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 6087 of file FEProblemBase.C.

Referenced by PiecewiseLinearFromVectorPostprocessor::valueInternal().

6088 {
6089  return _nl[nl_sys_num]->nNonlinearIterations();
6090 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ nonlinearConvergenceSetup()

virtual void FEProblemBase::nonlinearConvergenceSetup ( )
inlinevirtualinherited

Perform steps required before checking nonlinear convergence.

Reimplemented in ReferenceResidualProblem.

Definition at line 245 of file FEProblemBase.h.

Referenced by FEProblemBase::checkNonlinearConvergence().

245 {}

◆ nonlocalCouplingEntries()

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

Definition at line 5726 of file FEProblemBase.C.

Referenced by ComputeFullJacobianThread::computeOnBoundary(), and ComputeFullJacobianThread::computeOnElement().

5727 {
5728  return _assembly[tid][nl_sys]->nonlocalCouplingEntries();
5729 }
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 649 of file SubProblem.h.

649 { return _nonlocal_cm[i]; }
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:1014

◆ notifyWhenMeshChanges()

void FEProblemBase::notifyWhenMeshChanges ( MeshChangedInterface mci)
inherited

Register an object that derives from MeshChangedInterface to be notified when the mesh changes.

Definition at line 7668 of file FEProblemBase.C.

Referenced by MeshChangedInterface::MeshChangedInterface().

7669 {
7670  _notify_when_mesh_changes.push_back(mci);
7671 }
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
Objects to be notified when the mesh changes.

◆ numGridSteps()

void FEProblemBase::numGridSteps ( unsigned int  num_grid_steps)
inlineinherited

Set the number of steps in a grid sequences.

Definition at line 2031 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2031 { _num_grid_steps = num_grid_steps; }
unsigned int _num_grid_steps
Number of steps in a grid sequence.

◆ numLinearSystems()

virtual std::size_t FEProblemBase::numLinearSystems ( ) const
inlineoverridevirtualinherited
Returns
the number of linear systems in the problem

Implements SubProblem.

Definition at line 2167 of file FEProblemBase.h.

Referenced by FEProblemBase::addPredictor(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), DisplacedProblem::numLinearSystems(), and Moose::PetscSupport::petscSetDefaults().

2167 { return _num_linear_sys; }
const std::size_t _num_linear_sys
The number of linear systems.

◆ numMatrixTags()

virtual unsigned int SubProblem::numMatrixTags ( ) const
inlinevirtualinherited

◆ numNonlinearSystems()

virtual std::size_t FEProblemBase::numNonlinearSystems ( ) const
inlineoverridevirtualinherited

◆ numSolverSystems()

virtual std::size_t FEProblemBase::numSolverSystems ( ) const
inlineoverridevirtualinherited
Returns
the number of solver systems in the problem

Implements SubProblem.

Definition at line 2169 of file FEProblemBase.h.

Referenced by DisplacedProblem::numSolverSystems(), Moose::PetscSupport::petscSetDefaultKSPNormType(), and Moose::PetscSupport::petscSetDefaultPCSide().

2169 { return _num_nl_sys + _num_linear_sys; }
const std::size_t _num_nl_sys
The number of nonlinear systems.
const std::size_t _num_linear_sys
The number of linear systems.

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

Referenced by NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeResidualInternal(), ComputeResidualThread::determineObjectWarehouses(), MooseVariableDataBase< OutputType >::MooseVariableDataBase(), MooseVariableScalar::MooseVariableScalar(), DisplacedProblem::numVectorTags(), ComputeNodalKernelBcsThread::pre(), and ComputeNodalKernelsThread::pre().

174 {
175  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
176 
177  return getVectorTags(type).size();
178 }
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:150

◆ objectExecuteHelper()

template<typename T >
void FEProblemBase::objectExecuteHelper ( const std::vector< T *> &  objects)
staticinherited

Definition at line 2826 of file FEProblemBase.h.

2827 {
2828  for (T * obj_ptr : objects)
2829  obj_ptr->execute();
2830 }

◆ objectSetupHelper()

template<typename T >
void FEProblemBase::objectSetupHelper ( const std::vector< T *> &  objects,
const ExecFlagType exec_flag 
)
staticinherited

Helpers for calling the necessary setup/execute functions for the supplied objects.

Definition at line 2792 of file FEProblemBase.h.

2793 {
2794  if (exec_flag == EXEC_INITIAL)
2795  {
2796  for (T * obj_ptr : objects)
2797  obj_ptr->initialSetup();
2798  }
2799 
2800  else if (exec_flag == EXEC_TIMESTEP_BEGIN)
2801  {
2802  for (const auto obj_ptr : objects)
2803  obj_ptr->timestepSetup();
2804  }
2805  else if (exec_flag == EXEC_SUBDOMAIN)
2806  {
2807  for (const auto obj_ptr : objects)
2808  obj_ptr->subdomainSetup();
2809  }
2810 
2811  else if (exec_flag == EXEC_NONLINEAR)
2812  {
2813  for (const auto obj_ptr : objects)
2814  obj_ptr->jacobianSetup();
2815  }
2816 
2817  else if (exec_flag == EXEC_LINEAR)
2818  {
2819  for (const auto obj_ptr : objects)
2820  obj_ptr->residualSetup();
2821  }
2822 }
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

◆ onLinearSolver() [1/2]

bool EigenProblem::onLinearSolver ( ) const
inline

◆ onLinearSolver() [2/2]

void EigenProblem::onLinearSolver ( bool  ols)
inline

Set a flag to indicate whether or not we are in a linear solver iteration.

Definition at line 205 of file EigenProblem.h.

205 { _on_linear_solver = ols; }
bool _on_linear_solver
Whether or not we are in linear solver.
Definition: EigenProblem.h:261

◆ onTimestepBegin()

void FEProblemBase::onTimestepBegin ( )
overridevirtualinherited

Implements SubProblem.

Definition at line 6218 of file FEProblemBase.C.

Referenced by Transient::takeStep().

6219 {
6220  TIME_SECTION("onTimestepBegin", 2);
6221 
6222  for (auto & nl : _nl)
6223  nl->onTimestepBegin();
6224 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ onTimestepEnd()

void FEProblemBase::onTimestepEnd ( )
overridevirtualinherited

◆ outputInverseEigenvalue() [1/2]

bool EigenProblem::outputInverseEigenvalue ( ) const
inline

Whether or not to output eigenvalue inverse.

The inverse is useful for neutronics community

Definition at line 190 of file EigenProblem.h.

Referenced by Moose::SlepcSupport::mooseSlepcEPSMonitor().

190 { return _output_inverse_eigenvalue; }
bool _output_inverse_eigenvalue
Whether or not output eigenvalue as its inverse. By default, we output regular eigenvalue.
Definition: EigenProblem.h:259

◆ outputInverseEigenvalue() [2/2]

void EigenProblem::outputInverseEigenvalue ( bool  inverse)
inline

Set a flag to indicate whether or not to output eigenvalue inverse.

Definition at line 195 of file EigenProblem.h.

bool _output_inverse_eigenvalue
Whether or not output eigenvalue as its inverse. By default, we output regular eigenvalue.
Definition: EigenProblem.h:259
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
Inverse the dense square matrix m using LAPACK routines.
Definition: MatrixTools.C:23

◆ outputStep()

void FEProblemBase::outputStep ( ExecFlagType  type)
virtualinherited

Output the current step.

Will ensure that everything is in the proper state to be outputted. Then tell the OutputWarehouse to do its thing

Parameters
typeThe type execution flag (see Moose.h)

Reimplemented in DumpObjectsProblem.

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

6183 {
6184  TIME_SECTION("outputStep", 1, "Outputting");
6185 
6187 
6188  for (auto & sys : _solver_systems)
6189  sys->update();
6190  _aux->update();
6191  if (_displaced_problem)
6192  _displaced_problem->syncSolutions();
6194 
6196 }
void outputStep(ExecFlagType type)
Calls the outputStep method for each output object.
const ExecFlagType EXEC_NONE
Definition: Moose.C:27
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
void setCurrentExecuteOnFlag(const ExecFlagType &)
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
std::shared_ptr< DisplacedProblem > _displaced_problem
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773

◆ 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 237 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(), 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(), FillBetweenSidesetsGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), AddMetaDataGenerator::generate(), FillBetweenCurvesGenerator::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), CutMeshByPlaneGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), CoarsenBlockGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), AdvancedExtruderGenerator::generate(), BreakMeshByElementGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::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(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), 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(), 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(), SideSetsGeneratorBase::setup(), TimeSequenceStepperBase::setupSequence(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), 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().

238 {
239  Moose::show_trace = false;
240  _moose_base.callMooseError(paramErrorMsg(param, std::forward<Args>(args)...),
241  /* with_prefix = */ false);
242  Moose::show_trace = true;
243 }
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:649
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::string paramErrorMsg(const std::string &param, Args... args) const
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ parameters()

const InputParameters& MooseBaseParameterInterface::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 62 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), PhysicsBase::assertParamDefined(), Action::associateWithParameter(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), UserObjectInterface::castUserObject(), PostprocessorInterface::checkParam(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), 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(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem(), Eigenvalue::Eigenvalue(), Executor::Executor(), Exodus::Exodus(), FEProblem::FEProblem(), FEProblemBase::FEProblemBase(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainMeshGenerator::generate(), MooseBaseParameterInterface::getCheckedPointerParam(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), MooseObject::MooseObject(), 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(), FEProblemBase::setInputParametersFEProblem(), SideSetsGeneratorBase::setup(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SteffensenSolve::SteffensenSolve(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), Transient::Transient(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

62 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ paramInfo()

template<typename... Args>
void MooseBaseParameterInterface::paramInfo ( const std::string &  param,
Args...  args 
) const
inherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 254 of file MooseBaseParameterInterface.h.

Referenced by TransientMultiApp::TransientMultiApp().

255 {
256  mooseInfo(paramErrorMsg(param, std::forward<Args>(args)...));
257 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:366
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 247 of file MooseBaseParameterInterface.h.

Referenced by MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), FixedPointSolve::FixedPointSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), and MooseMesh::MooseMesh().

248 {
249  mooseWarning(paramErrorMsg(param, std::forward<Args>(args)...));
250 }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:333
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ parentOutputPositionChanged()

void FEProblemBase::parentOutputPositionChanged ( )
inherited

Calls parentOutputPositionChanged() on all sub apps.

Definition at line 4046 of file FEProblemBase.C.

Referenced by Transient::parentOutputPositionChanged().

4047 {
4048  for (const auto & it : _multi_apps)
4049  {
4050  const auto & objects = it.second.getActiveObjects();
4051  for (const auto & obj : objects)
4052  obj->parentOutputPositionChanged();
4053  }
4054 }
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:133

◆ petscOptionsDatabase()

PetscOptions& FEProblemBase::petscOptionsDatabase ( )
inlineinherited

Definition at line 1949 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

1949 { return _petsc_option_data_base; }
PetscOptions _petsc_option_data_base

◆ petscOptionsInserted()

bool& FEProblemBase::petscOptionsInserted ( )
inlineinherited

If PETSc options are already inserted.

Definition at line 1946 of file FEProblemBase.h.

Referenced by Eigenvalue::prepareSolverOptions().

1946 { return _is_petsc_options_inserted; }
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.

◆ possiblyRebuildGeomSearchPatches()

void FEProblemBase::possiblyRebuildGeomSearchPatches ( )
virtualinherited

Definition at line 7328 of file FEProblemBase.C.

Referenced by FEProblemBase::solve().

7329 {
7330  if (_displaced_problem) // Only need to do this if things are moving...
7331  {
7332  TIME_SECTION("possiblyRebuildGeomSearchPatches", 5, "Rebuilding Geometric Search Patches");
7333 
7334  switch (_mesh.getPatchUpdateStrategy())
7335  {
7336  case Moose::Never:
7337  break;
7338  case Moose::Iteration:
7339  // Update the list of ghosted elements at the start of the time step
7342 
7343  _displaced_problem->geomSearchData().updateGhostedElems();
7345 
7346  // The commands below ensure that the sparsity of the Jacobian matrix is
7347  // augmented at the start of the time step using neighbor nodes from the end
7348  // of the previous time step.
7349 
7351 
7352  // This is needed to reinitialize PETSc output
7354 
7355  break;
7356 
7357  case Moose::Auto:
7358  {
7359  Real max = _displaced_problem->geomSearchData().maxPatchPercentage();
7361 
7362  // If we haven't moved very far through the patch
7363  if (max < 0.4)
7364  break;
7365  }
7366  libmesh_fallthrough();
7367 
7368  // Let this fall through if things do need to be updated...
7369  case Moose::Always:
7370  // Flush output here to see the message before the reinitialization, which could take a
7371  // while
7372  _console << "\n\nUpdating geometric search patches\n" << std::endl;
7373 
7376 
7377  _displaced_problem->geomSearchData().clearNearestNodeLocators();
7379 
7381 
7382  // This is needed to reinitialize PETSc output
7384  }
7385  }
7386 }
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:1063
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:754
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:3164
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
MooseMesh * _displaced_mesh

◆ postExecute()

void FEProblemBase::postExecute ( )
virtualinherited

Method called at the end of the simulation.

Definition at line 5054 of file FEProblemBase.C.

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

5055 {
5056  const auto & multi_apps = _multi_apps.getActiveObjects();
5057 
5058  for (const auto & multi_app : multi_apps)
5059  multi_app->postExecute();
5060 }
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.

◆ postScaleEigenVector()

void EigenProblem::postScaleEigenVector ( )

Normalize eigen vector.

Scale eigen vector such as ||x|| = _normal_factor This might be useful when coupling to other physics

Definition at line 438 of file EigenProblem.C.

Referenced by solve().

439 {
440  if (_has_normalization)
441  {
442  Real v;
444  {
445  if (_active_eigen_index >= _nl_eigen->getNumConvergedEigenvalues())
446  mooseError("Number of converged eigenvalues ",
447  _nl_eigen->getNumConvergedEigenvalues(),
448  " but you required eigenvalue ",
450 
451  // when normal factor is not provided, we use the inverse of the norm of
452  // the active eigenvalue for normalization
453  auto eig = _nl_eigen->getAllConvergedEigenvalues()[_active_eigen_index];
454  v = 1 / std::sqrt(eig.first * eig.first + eig.second * eig.second);
455  }
456  else
457  v = _normal_factor;
458 
460 
461  // We scale SLEPc eigen vector here, so we need to scale it back for optimal
462  // convergence if we call EPS solver again
463  mooseAssert(v != 0., "normal factor can not be zero");
464 
465  unsigned int itr = 0;
466 
467  while (!MooseUtils::relativeFuzzyEqual(v, c))
468  {
469  // If postprocessor is not defined on eigen variables, scaling might not work
470  if (itr > 10)
471  mooseError("Can not scale eigenvector to the required factor ",
472  v,
473  " please check if postprocessor is defined on only eigen variables");
474 
475  mooseAssert(c != 0., "postprocessor value used for scaling can not be zero");
476 
477  scaleEigenvector(v / c);
478 
479  // update all aux variables and user objects on linear
481 
483 
484  itr++;
485  }
486  }
487 }
PostprocessorName _normalization
Postprocessor used to compute a factor from eigenvector.
Definition: EigenProblem.h:269
bool _has_normalization
Whether or not we normalize eigenvector.
Definition: EigenProblem.h:267
virtual void execute(const ExecFlagType &exec_type) override
Convenience function for performing execution of MOOSE systems.
Definition: EigenProblem.C:155
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
auto max(const L &left, const R &right)
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
unsigned int _active_eigen_index
Which eigenvalue is used to compute residual.
Definition: EigenProblem.h:252
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
void scaleEigenvector(const Real scaling_factor)
Scale eigenvector.
Definition: EigenProblem.C:404
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool relativeFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
Definition: MooseUtils.h:454
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Real _normal_factor
Postprocessor target value.
Definition: EigenProblem.h:272

◆ predictorCleanup()

void FEProblemBase::predictorCleanup ( NumericVector< Number > &  ghosted_solution)
virtualinherited

Perform cleanup tasks after application of predictor to solution vector.

Parameters
ghosted_solutionGhosted solution vector

Definition at line 7235 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::setInitialSolution().

7236 {
7237 }

◆ prepare() [1/2]

void FEProblemBase::prepare ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1487 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), and ComputeInitialConditionThread::operator()().

1488 {
1489  for (const auto i : index_range(_solver_systems))
1490  {
1491  _assembly[tid][i]->reinit(elem);
1492  _solver_systems[i]->prepare(tid);
1493 
1494  if (i < _num_nl_sys)
1495  {
1496  // This method is called outside of residual/Jacobian callbacks during initial condition
1497  // evaluation
1499  _assembly[tid][i]->prepareJacobianBlock();
1500  _assembly[tid][i]->prepareResidual();
1502  _assembly[tid][i]->prepareNonlocal();
1503  }
1504  }
1505  _aux->prepare(tid);
1506 
1507  if (_displaced_problem &&
1508  // _reinit_displaced_neighbor applies to interface type objects which will do computations
1509  // based on both elem and neighbor. Consequently, despite what you might think by its name, we
1510  // must make sure we prepare the displaced elem
1512  {
1513  _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), tid);
1515  _displaced_problem->prepareNonlocal(tid);
1516  }
1517 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
const std::size_t _num_nl_sys
The number of nonlinear systems.
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:2864
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< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
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:654
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1531 of file FEProblemBase.C.

1536 {
1537  for (const auto i : index_range(_nl))
1538  {
1539  _assembly[tid][i]->reinit(elem);
1540  _nl[i]->prepare(tid);
1541  }
1542 
1543  _aux->prepare(tid);
1544  const auto current_nl_sys_num = _current_nl_sys->number();
1545  _assembly[tid][current_nl_sys_num]->prepareBlock(ivar, jvar, dof_indices);
1547  if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1548  {
1549  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1550  _assembly[tid][current_nl_sys_num]->prepareBlockNonlocal(
1551  ivar, jvar, dof_indices, jv.allDofIndices());
1552  }
1553 
1555  {
1556  _displaced_problem->prepare(_displaced_mesh->elemPtr(elem->id()), ivar, jvar, dof_indices, tid);
1558  if (_nonlocal_cm[current_nl_sys_num](ivar, jvar) != 0)
1559  {
1560  MooseVariableFEBase & jv = _current_nl_sys->getVariable(tid, jvar);
1561  _displaced_problem->prepareBlockNonlocal(ivar, jvar, dof_indices, jv.allDofIndices(), tid);
1562  }
1563  }
1564 }
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:2864
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:1014
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:1132
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:86
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh

◆ prepareAssembly()

void FEProblemBase::prepareAssembly ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1606 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), NonlinearSystemBase::reinitNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().

1607 {
1608  _assembly[tid][_current_nl_sys->number()]->prepare();
1610  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1611 
1613  {
1614  _displaced_problem->prepareAssembly(tid);
1616  _displaced_problem->prepareNonlocal(tid);
1617  }
1618 }
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:1132
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
bool _reinit_displaced_face
Whether to call DisplacedProblem::reinitElemFace when this->reinitElemFace is called.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ prepareFace()

void FEProblemBase::prepareFace ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1520 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onInterface(), and ComputeUserObjectsThread::onInternalSide().

1521 {
1522  for (auto & nl : _nl)
1523  nl->prepareFace(tid, true);
1524  _aux->prepareFace(tid, false);
1525 
1527  _displaced_problem->prepareFace(_displaced_mesh->elemPtr(elem->id()), tid);
1528 }
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:2864
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1865 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onBoundary().

1866 {
1867  _assembly[tid][_current_nl_sys->number()]->copyFaceShapes(var);
1868 }
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:1132
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareMaterials()

void FEProblemBase::prepareMaterials ( const std::unordered_set< unsigned int > &  consumer_needed_mat_props,
const SubdomainID  blk_id,
const THREAD_ID  tid 
)
inherited

Add the MooseVariables and the material properties that the current materials depend on to the dependency list.

Parameters
consumer_needed_mat_propsThe material properties needed by consumer objects (other than the materials themselves)
blk_idThe subdomain ID for which we are preparing our list of needed vars and props
tidThe thread ID we are preparing the requirements for

This MUST be done after the moose variable dependency list has been set for all the other objects using the setActiveElementalMooseVariables API!

Definition at line 3572 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

3575 {
3576  std::set<MooseVariableFEBase *> needed_moose_vars;
3577  std::unordered_set<unsigned int> needed_mat_props;
3578 
3579  if (_all_materials.hasActiveBlockObjects(blk_id, tid))
3580  {
3581  _all_materials.updateVariableDependency(needed_moose_vars, tid);
3582  _all_materials.updateBlockMatPropDependency(blk_id, needed_mat_props, tid);
3583  }
3584 
3585  const auto & ids = _mesh.getSubdomainBoundaryIds(blk_id);
3586  for (const auto id : ids)
3587  {
3588  _materials.updateBoundaryVariableDependency(id, needed_moose_vars, tid);
3589  _materials.updateBoundaryMatPropDependency(id, needed_mat_props, tid);
3590  }
3591 
3592  const auto & current_active_elemental_moose_variables = getActiveElementalMooseVariables(tid);
3593  needed_moose_vars.insert(current_active_elemental_moose_variables.begin(),
3594  current_active_elemental_moose_variables.end());
3595 
3596  needed_mat_props.insert(consumer_needed_mat_props.begin(), consumer_needed_mat_props.end());
3597 
3598  setActiveElementalMooseVariables(needed_moose_vars, tid);
3599  setActiveMaterialProperties(needed_mat_props, tid);
3600 }
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:3248
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:432
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
MooseMesh & _mesh
void updateBoundaryMatPropDependency(std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void updateBlockMatPropDependency(SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0) const
void updateBoundaryVariableDependency(std::set< MooseVariableFieldBase *> &needed_moose_vars, THREAD_ID tid=0) const
MaterialWarehouse _all_materials
MaterialWarehouse _materials

◆ prepareNeighborShapes()

void FEProblemBase::prepareNeighborShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1871 of file FEProblemBase.C.

1872 {
1873  _assembly[tid][_current_nl_sys->number()]->copyNeighborShapes(var);
1874 }
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:1132
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ prepareShapes()

void FEProblemBase::prepareShapes ( unsigned int  var,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1859 of file FEProblemBase.C.

Referenced by ComputeUserObjectsThread::onElement().

1860 {
1861  _assembly[tid][_current_nl_sys->number()]->copyShapes(var);
1862 }
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:1132
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.

◆ preScaleEigenVector()

void EigenProblem::preScaleEigenVector ( const std::pair< Real, Real > &  eig)

Eigenvector need to be scaled back if it was scaled in an earlier stage Scaling eigen vector does not affect solution (eigenvalue, eigenvector), but it does affect the convergence rate.

To have an optimal convergence rate, We pre-scale eigen vector using the same factor as the one computed in "postScaleEigenVector"

Definition at line 422 of file EigenProblem.C.

Referenced by execute(), and solve().

423 {
424  // pre-scale the solution to make sure ||Bx||_2 is equal to inverse of eigenvalue
426  *_nl_eigen->currentSolution(), _nl_eigen->residualVectorBX(), _nl_eigen->eigenVectorTag());
427 
428  // Eigenvalue magnitude
429  Real v = std::sqrt(eig.first * eig.first + eig.second * eig.second);
430  // Scaling factor
431  Real factor = 1 / v / (bxNormProvided() ? formNorm() : _nl_eigen->residualVectorBX().l2_norm());
432  // Scale eigenvector
433  if (!MooseUtils::absoluteFuzzyEqual(factor, 1))
434  scaleEigenvector(factor);
435 }
virtual void computeResidualTag(const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag) override
Form a vector for all kernels and BCs with a given tag.
Definition: EigenProblem.C:286
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within an absolute tolerance.
Definition: MooseUtils.h:346
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
Real formNorm()
Form the Bx norm.
Definition: EigenProblem.C:656
void scaleEigenvector(const Real scaling_factor)
Scale eigenvector.
Definition: EigenProblem.C:404
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool bxNormProvided() const
Whether a Bx norm postprocessor has been provided.
Definition: EigenProblem.h:235

◆ projectInitialConditionOnCustomRange()

void FEProblemBase::projectInitialConditionOnCustomRange ( ConstElemRange elem_range,
ConstBndNodeRange bnd_node_range 
)
inherited

Project initial conditions for custom elem_range and bnd_node_range This is needed when elements/boundary nodes are added to a specific subdomain at an intermediate step.

Definition at line 3314 of file FEProblemBase.C.

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

3316 {
3317  ComputeInitialConditionThread cic(*this);
3318  Threads::parallel_reduce(elem_range, cic);
3319 
3320  // Need to close the solution vector here so that boundary ICs take precendence
3321  for (auto & nl : _nl)
3322  nl->solution().close();
3323  _aux->solution().close();
3324 
3326  Threads::parallel_reduce(bnd_nodes, cbic);
3327 
3328  for (auto & nl : _nl)
3329  nl->solution().close();
3330  _aux->solution().close();
3331 
3332  // Also, load values into the SCALAR dofs
3333  // Note: We assume that all SCALAR dofs are on the
3334  // processor with highest ID
3335  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3336  {
3337  const auto & ics = _scalar_ics.getActiveObjects();
3338  for (const auto & ic : ics)
3339  {
3340  MooseVariableScalar & var = ic->variable();
3341  var.reinit();
3342 
3343  DenseVector<Number> vals(var.order());
3344  ic->compute(vals);
3345 
3346  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3347  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3348  {
3349  const dof_id_type global_index = var.dofIndices()[i];
3350  var.sys().solution().set(global_index, vals(i));
3351  var.setValue(i, vals(i));
3352  }
3353  }
3354  }
3355 
3356  for (auto & nl : _nl)
3357  {
3358  nl->solution().close();
3359  nl->solution().localize(*nl->system().current_local_solution, nl->dofMap().get_send_list());
3360  }
3361 
3362  _aux->solution().close();
3363  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3364 }
NumericVector< Number > & solution()
Definition: SystemBase.h:182
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 ( )
inherited

Definition at line 3246 of file FEProblemBase.C.

Referenced by FEProblemBase::initialAdaptMesh(), and FEProblemBase::initialSetup().

3247 {
3248  TIME_SECTION("projectSolution", 2, "Projecting Initial Solutions")
3249 
3250  FloatingPointExceptionGuard fpe_guard(_app);
3251 
3252  ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
3253  ComputeInitialConditionThread cic(*this);
3254  Threads::parallel_reduce(elem_range, cic);
3255 
3256  if (haveFV())
3257  {
3258  using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
3259  ElemInfoRange elem_info_range(_mesh.ownedElemInfoBegin(), _mesh.ownedElemInfoEnd());
3260 
3261  ComputeFVInitialConditionThread cfvic(*this);
3262  Threads::parallel_reduce(elem_info_range, cfvic);
3263  }
3264 
3265  // Need to close the solution vector here so that boundary ICs take precendence
3266  for (auto & nl : _nl)
3267  nl->solution().close();
3268  _aux->solution().close();
3269 
3270  // now run boundary-restricted initial conditions
3271  ConstBndNodeRange & bnd_nodes = *_mesh.getBoundaryNodeRange();
3273  Threads::parallel_reduce(bnd_nodes, cbic);
3274 
3275  for (auto & nl : _nl)
3276  nl->solution().close();
3277  _aux->solution().close();
3278 
3279  // Also, load values into the SCALAR dofs
3280  // Note: We assume that all SCALAR dofs are on the
3281  // processor with highest ID
3282  if (processor_id() == (n_processors() - 1) && _scalar_ics.hasActiveObjects())
3283  {
3284  const auto & ics = _scalar_ics.getActiveObjects();
3285  for (const auto & ic : ics)
3286  {
3287  MooseVariableScalar & var = ic->variable();
3288  var.reinit();
3289 
3290  DenseVector<Number> vals(var.order());
3291  ic->compute(vals);
3292 
3293  const unsigned int n_SCALAR_dofs = var.dofIndices().size();
3294  for (unsigned int i = 0; i < n_SCALAR_dofs; i++)
3295  {
3296  const dof_id_type global_index = var.dofIndices()[i];
3297  var.sys().solution().set(global_index, vals(i));
3298  var.setValue(i, vals(i));
3299  }
3300  }
3301  }
3302 
3303  for (auto & sys : _solver_systems)
3304  {
3305  sys->solution().close();
3306  sys->solution().localize(*sys->system().current_local_solution, sys->dofMap().get_send_list());
3307  }
3308 
3309  _aux->solution().close();
3310  _aux->solution().localize(*_aux->sys().current_local_solution, _aux->dofMap().get_send_list());
3311 }
NumericVector< Number > & solution()
Definition: SystemBase.h:182
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.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
Scope guard for starting and stopping Floating Point Exception Trapping.
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1311
ScalarInitialConditionWarehouse _scalar_ics
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
processor_id_type n_processors() const
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
void setValue(unsigned int i, Number value)
Set the nodal value for this variable (to keep everything up to date.
MooseMesh & _mesh
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
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:1319
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:1092
uint8_t dof_id_type

◆ registerRandomInterface()

void FEProblemBase::registerRandomInterface ( RandomInterface random_interface,
const std::string &  name 
)
inherited

Definition at line 8161 of file FEProblemBase.C.

Referenced by RandomInterface::setRandomResetFrequency().

8162 {
8163  auto insert_pair = moose_try_emplace(
8164  _random_data_objects, name, std::make_unique<RandomData>(*this, random_interface));
8165 
8166  auto random_data_ptr = insert_pair.first->second.get();
8167  random_interface.setRandomDataPointer(random_data_ptr);
8168 }
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:57
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
A map of objects that consume random numbers.
void setRandomDataPointer(RandomData *random_data)

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 53 of file PerfGraphInterface.C.

55 {
56  const auto timed_section_name = timedSectionName(section_name);
57  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
58  return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
59  else
60  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
61 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 64 of file PerfGraphInterface.C.

68 {
69  const auto timed_section_name = timedSectionName(section_name);
70  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
72  timedSectionName(section_name), level, live_message, print_dots);
73  else
74  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
75 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerUnfilledFunctorRequest()

template<typename T >
void SubProblem::registerUnfilledFunctorRequest ( T *  functor_interface,
const std::string &  functor_name,
const THREAD_ID  tid 
)
inherited

Register an unfulfilled functor request.

◆ reinitBecauseOfGhostingOrNewGeomObjects()

void FEProblemBase::reinitBecauseOfGhostingOrNewGeomObjects ( bool  mortar_changed = false)
protectedinherited

Call when it is possible that the needs for ghosted elements has changed.

Parameters
mortar_changedWhether an update of mortar data has been requested since the last EquationSystems (re)initialization

Definition at line 4689 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), FEProblemBase::meshChangedHelper(), and FEProblemBase::possiblyRebuildGeomSearchPatches().

4690 {
4691  TIME_SECTION("reinitBecauseOfGhostingOrNewGeomObjects",
4692  3,
4693  "Reinitializing Because of Geometric Search Objects");
4694 
4695  // Need to see if _any_ processor has ghosted elems or geometry objects.
4696  bool needs_reinit = !_ghosted_elems.empty();
4697  needs_reinit = needs_reinit || !_geometric_search_data._nearest_node_locators.empty() ||
4698  (_mortar_data.hasObjects() && mortar_changed);
4699  needs_reinit =
4700  needs_reinit || (_displaced_problem &&
4701  (!_displaced_problem->geomSearchData()._nearest_node_locators.empty() ||
4702  (_mortar_data.hasDisplacedObjects() && mortar_changed)));
4703  _communicator.max(needs_reinit);
4704 
4705  if (needs_reinit)
4706  {
4707  // Call reinit to get the ghosted vectors correct now that some geometric search has been done
4708  es().reinit();
4709 
4710  if (_displaced_mesh)
4711  _displaced_problem->es().reinit();
4712  }
4713 }
const Parallel::Communicator & _communicator
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:1063
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 
)
overridevirtualinherited

Returns true if the Problem has Dirac kernels it needs to compute on elem.

The maximum number of qps can rise if several Dirac points are added to a single element. In that case we need to resize the zeros to compensate.

Implements SubProblem.

Definition at line 1910 of file FEProblemBase.C.

Referenced by ComputeDiracThread::onElement().

1911 {
1912  std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
1913 
1914  unsigned int n_points = points.size();
1915 
1916  if (n_points)
1917  {
1918  if (n_points > _max_qps)
1919  {
1920  _max_qps = n_points;
1921 
1926  unsigned int max_qpts = getMaxQps();
1927  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
1928  {
1929  // the highest available order in libMesh is 43
1930  _scalar_zero[tid].resize(FORTYTHIRD, 0);
1931  _zero[tid].resize(max_qpts, 0);
1932  _grad_zero[tid].resize(max_qpts, RealGradient(0.));
1933  _second_zero[tid].resize(max_qpts, RealTensor(0.));
1934  _vector_zero[tid].resize(max_qpts, RealGradient(0.));
1935  _vector_curl_zero[tid].resize(max_qpts, RealGradient(0.));
1936  }
1937  }
1938 
1939  for (const auto i : index_range(_nl))
1940  {
1941  _assembly[tid][i]->reinitAtPhysical(elem, points);
1942  _nl[i]->prepare(tid);
1943  }
1944  _aux->prepare(tid);
1945 
1946  reinitElem(elem, tid);
1947  }
1948 
1949  _assembly[tid][_current_nl_sys->number()]->prepare();
1951  _assembly[tid][_current_nl_sys->number()]->prepareNonlocal();
1952 
1953  bool have_points = n_points > 0;
1955  {
1956  have_points |= _displaced_problem->reinitDirac(_displaced_mesh->elemPtr(elem->id()), tid);
1958  _displaced_problem->prepareNonlocal(tid);
1959  }
1960 
1961  return have_points;
1962 }
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:2864
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:1132
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:1016
auto index_range(const T &sizable)
MooseMesh * _displaced_mesh
unsigned int getMaxQps() const

◆ reinitElem()

void FEProblemBase::reinitElem ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1965 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMaterialsObjectThread::onElement(), NonlinearThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeInitialConditionThread::operator()(), FEProblemBase::reinitDirac(), and FEProblemBase::reinitElemPhys().

1966 {
1967  for (auto & sys : _solver_systems)
1968  sys->reinitElem(elem, tid);
1969  _aux->reinitElem(elem, tid);
1970 
1972  _displaced_problem->reinitElem(_displaced_mesh->elemPtr(elem->id()), tid);
1973 }
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:2864
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1997 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onBoundary(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), and ComputeMaterialsObjectThread::onInterface().

2001 {
2002  for (const auto i : index_range(_solver_systems))
2003  {
2004  _assembly[tid][i]->reinit(elem, side);
2005  _solver_systems[i]->reinitElemFace(elem, side, bnd_id, tid);
2006  }
2007  _aux->reinitElemFace(elem, side, bnd_id, tid);
2008 
2010  _displaced_problem->reinitElemFace(_displaced_mesh->elemPtr(elem->id()), side, bnd_id, tid);
2011 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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 
)
overridevirtualinherited

reinitialize FE objects on a given element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 8445 of file FEProblemBase.C.

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

8452 {
8453  SubProblem::reinitElemFaceRef(elem, side, bnd_id, tolerance, pts, weights, tid);
8454 
8455  if (_displaced_problem)
8456  _displaced_problem->reinitElemFaceRef(
8457  _displaced_mesh->elemPtr(elem->id()), side, bnd_id, tolerance, pts, weights, tid);
8458 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
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:843
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitElemNeighborAndLowerD()

void FEProblemBase::reinitElemNeighborAndLowerD ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2142 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInternalSide(), and NonlinearThread::onInternalSide().

2145 {
2146  reinitNeighbor(elem, side, tid);
2147 
2148  const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
2149  if (lower_d_elem && lower_d_elem->subdomain_id() == Moose::INTERNAL_SIDE_LOWERD_ID)
2150  reinitLowerDElem(lower_d_elem, tid);
2151  else
2152  {
2153  // with mesh refinement, lower-dimensional element might be defined on neighbor side
2154  auto & neighbor = _assembly[tid][0]->neighbor();
2155  auto & neighbor_side = _assembly[tid][0]->neighborSide();
2156  const Elem * lower_d_elem_neighbor = _mesh.getLowerDElem(neighbor, neighbor_side);
2157  if (lower_d_elem_neighbor &&
2158  lower_d_elem_neighbor->subdomain_id() == Moose::INTERNAL_SIDE_LOWERD_ID)
2159  {
2160  auto qps = _assembly[tid][0]->qPointsFaceNeighbor().stdVector();
2161  std::vector<Point> reference_points;
2162  FEInterface::inverse_map(
2163  lower_d_elem_neighbor->dim(), FEType(), lower_d_elem_neighbor, qps, reference_points);
2164  reinitLowerDElem(lower_d_elem_neighbor, tid, &reference_points);
2165  }
2166  }
2167 
2168  if (_displaced_problem &&
2170  _displaced_problem->reinitElemNeighborAndLowerD(
2171  _displaced_mesh->elemPtr(elem->id()), side, tid);
2172 }
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:2864
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:1484
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1976 of file FEProblemBase.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute().

1979 {
1980  mooseAssert(_mesh.queryElemPtr(elem->id()) == elem,
1981  "Are you calling this method with a displaced mesh element?");
1982 
1983  for (const auto i : index_range(_solver_systems))
1984  {
1985  _assembly[tid][i]->reinitAtPhysical(elem, phys_points_in_elem);
1986  _solver_systems[i]->prepare(tid);
1987  _assembly[tid][i]->prepare();
1989  _assembly[tid][i]->prepareNonlocal();
1990  }
1991  _aux->prepare(tid);
1992 
1993  reinitElem(elem, tid);
1994 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2876
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 1241 of file SubProblem.C.

1242 {
1243  for (const auto nl : make_range(numNonlinearSystems()))
1244  assembly(tid, nl).reinitFVFace(fi);
1245 }
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1850
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reinitLowerDElem()

void FEProblemBase::reinitLowerDElem ( const Elem *  lower_d_elem,
const THREAD_ID  tid,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 2014 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), and FEProblemBase::reinitElemNeighborAndLowerD().

2018 {
2019  SubProblem::reinitLowerDElem(lower_d_elem, tid, pts, weights);
2020 
2022  _displaced_problem->reinitLowerDElem(
2023  _displaced_mesh->elemPtr(lower_d_elem->id()), tid, pts, weights);
2024 }
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:920
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ reinitMaterials()

void FEProblemBase::reinitMaterials ( SubdomainID  blk_id,
const THREAD_ID  tid,
bool  swap_stateful = true 
)
inherited

Definition at line 3603 of file FEProblemBase.C.

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

3604 {
3605  if (hasActiveMaterialProperties(tid))
3606  {
3607  auto && elem = _assembly[tid][0]->elem();
3608  unsigned int n_points = _assembly[tid][0]->qRule()->n_points();
3609 
3610  auto & material_data = _material_props.getMaterialData(tid);
3611  material_data.resize(n_points);
3612 
3613  // Only swap if requested
3614  if (swap_stateful)
3615  material_data.swap(*elem);
3616 
3617  if (_discrete_materials.hasActiveBlockObjects(blk_id, tid))
3618  material_data.reset(_discrete_materials.getActiveBlockObjects(blk_id, tid));
3619 
3620  if (_materials.hasActiveBlockObjects(blk_id, tid))
3621  material_data.reinit(_materials.getActiveBlockObjects(blk_id, tid));
3622  }
3623 }
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 
)
inherited

reinit materials on a boundary

Parameters
boundary_idThe boundary on which to reinit corresponding materials
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense

Definition at line 3696 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

3700 {
3701  if (hasActiveMaterialProperties(tid))
3702  {
3703  auto && elem = _assembly[tid][0]->elem();
3704  unsigned int side = _assembly[tid][0]->side();
3705  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3706 
3707  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3708  bnd_material_data.resize(n_points);
3709 
3710  if (swap_stateful && !bnd_material_data.isSwapped())
3711  bnd_material_data.swap(*elem, side);
3712 
3713  if (_discrete_materials.hasActiveBoundaryObjects(boundary_id, tid))
3714  bnd_material_data.reset(_discrete_materials.getActiveBoundaryObjects(boundary_id, tid));
3715 
3716  if (reinit_mats)
3717  bnd_material_data.reinit(*reinit_mats);
3718  else if (_materials.hasActiveBoundaryObjects(boundary_id, tid))
3719  bnd_material_data.reinit(_materials.getActiveBoundaryObjects(boundary_id, tid));
3720  }
3721 }
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 
)
inherited

reinit materials on element faces

Parameters
blk_idThe subdomain on which the element owning the face lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense

Definition at line 3626 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), and ComputeUserObjectsThread::onInternalSide().

3630 {
3631  if (hasActiveMaterialProperties(tid))
3632  {
3633  auto && elem = _assembly[tid][0]->elem();
3634  unsigned int side = _assembly[tid][0]->side();
3635  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3636 
3637  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3638  bnd_material_data.resize(n_points);
3639 
3640  if (swap_stateful && !bnd_material_data.isSwapped())
3641  bnd_material_data.swap(*elem, side);
3642 
3643  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3644  bnd_material_data.reset(
3645  _discrete_materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3646 
3647  if (reinit_mats)
3648  bnd_material_data.reinit(*reinit_mats);
3649  else if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3650  bnd_material_data.reinit(
3651  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3652  }
3653 }
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 
)
inherited

Definition at line 3724 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), and ComputeUserObjectsThread::onInterface().

3727 {
3728  if (hasActiveMaterialProperties(tid))
3729  {
3730  const Elem * const & elem = _assembly[tid][0]->elem();
3731  unsigned int side = _assembly[tid][0]->side();
3732  unsigned int n_points = _assembly[tid][0]->qRuleFace()->n_points();
3733 
3734  auto & bnd_material_data = _bnd_material_props.getMaterialData(tid);
3735  bnd_material_data.resize(n_points);
3736 
3737  if (swap_stateful && !bnd_material_data.isSwapped())
3738  bnd_material_data.swap(*elem, side);
3739 
3740  if (_interface_materials.hasActiveBoundaryObjects(boundary_id, tid))
3741  bnd_material_data.reinit(_interface_materials.getActiveBoundaryObjects(boundary_id, tid));
3742  }
3743 }
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 
)
inherited

reinit materials on the neighboring element face

Parameters
blk_idThe subdomain on which the neighbor element lives
tidThe thread id
swap_statefulWhether to swap stateful material properties between MaterialData and MaterialPropertyStorage
execute_statefulWhether to execute material objects that have stateful properties. This should be false when for example executing material objects for mortar contexts in which stateful properties don't make sense

Definition at line 3656 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and NonlinearSystemBase::reinitNodeFace().

3660 {
3661  if (hasActiveMaterialProperties(tid))
3662  {
3663  // NOTE: this will not work with h-adaptivity
3664  // lindsayad: why not?
3665 
3666  const Elem * neighbor = _assembly[tid][0]->neighbor();
3667  unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[tid][0]->elem());
3668 
3669  mooseAssert(neighbor, "neighbor should be non-null");
3670  mooseAssert(blk_id == neighbor->subdomain_id(),
3671  "The provided blk_id " << blk_id << " and neighbor subdomain ID "
3672  << neighbor->subdomain_id() << " do not match.");
3673 
3674  unsigned int n_points = _assembly[tid][0]->qRuleNeighbor()->n_points();
3675 
3676  auto & neighbor_material_data = _neighbor_material_props.getMaterialData(tid);
3677  neighbor_material_data.resize(n_points);
3678 
3679  // Only swap if requested
3680  if (swap_stateful)
3681  neighbor_material_data.swap(*neighbor, neighbor_side);
3682 
3683  if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3684  neighbor_material_data.reset(
3685  _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3686 
3687  if (reinit_mats)
3688  neighbor_material_data.reinit(*reinit_mats);
3689  else if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(blk_id, tid))
3690  neighbor_material_data.reinit(
3691  _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(blk_id, tid));
3692  }
3693 }
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 957 of file SubProblem.C.

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

958 {
959  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
960  assembly(tid, nl_sys_num).reinitMortarElem(elem);
961 }
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2396
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reinitMortarUserObjects()

void FEProblemBase::reinitMortarUserObjects ( BoundaryID  primary_boundary_id,
BoundaryID  secondary_boundary_id,
bool  displaced 
)
inherited

Call reinit on mortar user objects with matching primary boundary ID, secondary boundary ID, and displacement characteristics.

Definition at line 8637 of file FEProblemBase.C.

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

8640 {
8641  const auto mortar_uos =
8642  getMortarUserObjects(primary_boundary_id, secondary_boundary_id, displaced);
8643  for (auto * const mortar_uo : mortar_uos)
8644  {
8645  mortar_uo->setNormals();
8646  mortar_uo->reinit();
8647  }
8648 }
std::vector< MortarUserObject * > getMortarUserObjects(BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject *> &mortar_uo_superset)
Helper for getting mortar objects corresponding to primary boundary ID, secondary boundary ID...

◆ reinitNeighbor()

void FEProblemBase::reinitNeighbor ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2102 of file FEProblemBase.C.

Referenced by ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and FEProblemBase::reinitElemNeighborAndLowerD().

2103 {
2104  setNeighborSubdomainID(elem, side, tid);
2105 
2106  const Elem * neighbor = elem->neighbor_ptr(side);
2107  unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
2108 
2109  for (const auto i : index_range(_nl))
2110  {
2111  _assembly[tid][i]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
2112  _nl[i]->prepareNeighbor(tid);
2113  // Called during stateful material property evaluation outside of solve
2114  _assembly[tid][i]->prepareNeighbor();
2115  }
2116  _aux->prepareNeighbor(tid);
2117 
2118  BoundaryID bnd_id = 0; // some dummy number (it is not really used for anything, right now)
2119  for (auto & nl : _nl)
2120  {
2121  nl->reinitElemFace(elem, side, bnd_id, tid);
2122  nl->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2123  }
2124  _aux->reinitElemFace(elem, side, bnd_id, tid);
2125  _aux->reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
2126 
2128  {
2129  // There are cases like for cohesive zone modeling without significant sliding where we cannot
2130  // use FEInterface::inverse_map in Assembly::reinitElemAndNeighbor in the displaced problem
2131  // because the physical points coming from the element don't actually lie on the neighbor.
2132  // Moreover, what's the point of doing another physical point inversion in other cases? We only
2133  // care about the reference points which we can just take from the undisplaced computation
2134  const auto & displaced_ref_pts = _assembly[tid][0]->qRuleNeighbor()->get_points();
2135 
2136  _displaced_problem->reinitNeighbor(
2137  _displaced_mesh->elemPtr(elem->id()), side, tid, &displaced_ref_pts);
2138  }
2139 }
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:2864
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 
)
overridevirtualinherited

reinitialize FE objects on a given neighbor element on a given side at a given set of reference points and then compute variable data.

Note that this method makes no assumptions about what's been called beforehand, e.g. you don't have to call some prepare method before this one. This is an all-in-one reinit

Reimplemented from SubProblem.

Definition at line 8461 of file FEProblemBase.C.

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

8468 {
8470  neighbor_elem, neighbor_side, bnd_id, tolerance, pts, weights, tid);
8471 
8472  if (_displaced_problem)
8473  _displaced_problem->reinitNeighborFaceRef(_displaced_mesh->elemPtr(neighbor_elem->id()),
8474  neighbor_side,
8475  bnd_id,
8476  tolerance,
8477  pts,
8478  weights,
8479  tid);
8480 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
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:883
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 950 of file SubProblem.C.

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

951 {
952  for (const auto nl_sys_num : make_range(numNonlinearSystems()))
953  assembly(tid, nl_sys_num).reinitNeighborLowerDElem(elem);
954 }
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2375
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reinitNeighborPhys() [1/2]

void FEProblemBase::reinitNeighborPhys ( const Elem *  neighbor,
unsigned int  neighbor_side,
const std::vector< Point > &  physical_points,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2175 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::reinitNodeFace(), and EqualValueEmbeddedConstraint::shouldApply().

2179 {
2180  mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2181  "Are you calling this method with a displaced mesh element?");
2182 
2183  for (const auto i : index_range(_nl))
2184  {
2185  // Reinits shape the functions at the physical points
2186  _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
2187 
2188  // Sets the neighbor dof indices
2189  _nl[i]->prepareNeighbor(tid);
2190  }
2191  _aux->prepareNeighbor(tid);
2192 
2193  // Resizes Re and Ke
2194  _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2195 
2196  // Compute the values of each variable at the points
2197  for (auto & nl : _nl)
2198  nl->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2199  _aux->reinitNeighborFace(neighbor, neighbor_side, 0, tid);
2200 }
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2876
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:1132
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2203 of file FEProblemBase.C.

2206 {
2207  mooseAssert(_mesh.queryElemPtr(neighbor->id()) == neighbor,
2208  "Are you calling this method with a displaced mesh element?");
2209 
2210  for (const auto i : index_range(_nl))
2211  {
2212  // Reinits shape the functions at the physical points
2213  _assembly[tid][i]->reinitNeighborAtPhysical(neighbor, physical_points);
2214 
2215  // Sets the neighbor dof indices
2216  _nl[i]->prepareNeighbor(tid);
2217  }
2218  _aux->prepareNeighbor(tid);
2219 
2220  // Resizes Re and Ke
2221  _assembly[tid][_current_nl_sys->number()]->prepareNeighbor();
2222 
2223  // Compute the values of each variable at the points
2224  for (auto & nl : _nl)
2225  nl->reinitNeighbor(neighbor, tid);
2226  _aux->reinitNeighbor(neighbor, tid);
2227 }
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2876
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:1132
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2027 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), NonlinearSystemBase::computeResidualInternal(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalDampingThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

2028 {
2030  _displaced_problem->reinitNode(&_displaced_mesh->nodeRef(node->id()), tid);
2031 
2032  for (const auto i : index_range(_nl))
2033  {
2034  _assembly[tid][i]->reinit(node);
2035  _nl[i]->reinitNode(node, tid);
2036  }
2037  _aux->reinitNode(node, tid);
2038 }
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:637
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 
)
overridevirtualinherited

Implements SubProblem.

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

2042 {
2044  _displaced_problem->reinitNodeFace(&_displaced_mesh->nodeRef(node->id()), bnd_id, tid);
2045 
2046  for (const auto i : index_range(_nl))
2047  {
2048  _assembly[tid][i]->reinit(node);
2049  _nl[i]->reinitNodeFace(node, bnd_id, tid);
2050  }
2051  _aux->reinitNodeFace(node, bnd_id, tid);
2052 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:637
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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2055 of file FEProblemBase.C.

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

2056 {
2058  _displaced_problem->reinitNodes(nodes, tid);
2059 
2060  for (auto & nl : _nl)
2061  nl->reinitNodes(nodes, tid);
2062  _aux->reinitNodes(nodes, tid);
2063 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitNodesNeighbor()

void FEProblemBase::reinitNodesNeighbor ( const std::vector< dof_id_type > &  nodes,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 2066 of file FEProblemBase.C.

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

2067 {
2069  _displaced_problem->reinitNodesNeighbor(nodes, tid);
2070 
2071  for (auto & nl : _nl)
2072  nl->reinitNodesNeighbor(nodes, tid);
2073  _aux->reinitNodesNeighbor(nodes, tid);
2074 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitOffDiagScalars()

void FEProblemBase::reinitOffDiagScalars ( const THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 2094 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians(), NonlinearSystemBase::constraintJacobians(), and NonlinearThread::onElement().

2095 {
2096  _assembly[tid][_current_nl_sys->number()]->prepareOffDiagScalar();
2097  if (_displaced_problem)
2098  _displaced_problem->reinitOffDiagScalars(tid);
2099 }
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:1132
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ reinitScalars()

void FEProblemBase::reinitScalars ( const THREAD_ID  tid,
bool  reinit_for_derivative_reordering = false 
)
overridevirtualinherited

fills the VariableValue arrays for scalar variables from the solution vector

Parameters
tidThe thread id
reinit_for_derivative_reorderingA flag indicating whether we are reinitializing for the purpose of re-ordering derivative information for ADNodalBCs

Implements SubProblem.

Definition at line 2077 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), AuxiliarySystem::computeScalarVars(), and FEProblemBase::initialSetup().

2078 {
2079  TIME_SECTION("reinitScalars", 3, "Reinitializing Scalar Variables");
2080 
2082  _displaced_problem->reinitScalars(tid, reinit_for_derivative_reordering);
2083 
2084  for (auto & nl : _nl)
2085  nl->reinitScalars(tid, reinit_for_derivative_reordering);
2086  _aux->reinitScalars(tid, reinit_for_derivative_reordering);
2087 
2088  // This is called outside of residual/Jacobian call-backs
2089  for (auto & assembly : _assembly[tid])
2091 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
void prepareScalar()
Definition: Assembly.C:2941
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
The Assembly objects.
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ removeAlgebraicGhostingFunctor()

void SubProblem::removeAlgebraicGhostingFunctor ( GhostingFunctor &  algebraic_gf)
inherited

Remove an algebraic ghosting functor from this problem's DofMaps.

Definition at line 1030 of file SubProblem.C.

1031 {
1032  EquationSystems & eq = es();
1033  const auto n_sys = eq.n_systems();
1034 
1035 #ifndef NDEBUG
1036  const DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1037  const bool found_in_root_sys =
1038  std::find(nl_dof_map.algebraic_ghosting_functors_begin(),
1039  nl_dof_map.algebraic_ghosting_functors_end(),
1040  &algebraic_gf) != nl_dof_map.algebraic_ghosting_functors_end();
1041  const bool found_in_our_map =
1042  _root_alg_gf_to_sys_clones.find(&algebraic_gf) != _root_alg_gf_to_sys_clones.end();
1043  mooseAssert(found_in_root_sys == found_in_our_map,
1044  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1045  "it in our gf to clones map");
1046 #endif
1047 
1048  eq.get_system(0).get_dof_map().remove_algebraic_ghosting_functor(algebraic_gf);
1049 
1050  auto it = _root_alg_gf_to_sys_clones.find(&algebraic_gf);
1051  if (it == _root_alg_gf_to_sys_clones.end())
1052  return;
1053 
1054  auto & clones_vec = it->second;
1055  mooseAssert((n_sys - 1) == clones_vec.size(),
1056  "The size of the gf clones vector doesn't match the number of systems minus one");
1057  if (clones_vec.empty())
1058  {
1059  mooseAssert(n_sys == 1, "The clones vector should only be empty if there is only one system");
1060  return;
1061  }
1062 
1063  for (const auto i : make_range(n_sys))
1064  eq.get_system(i + 1).get_dof_map().remove_algebraic_ghosting_functor(*clones_vec[i]);
1065 
1066  _root_alg_gf_to_sys_clones.erase(it->first);
1067 }
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:1158
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 1070 of file SubProblem.C.

1071 {
1072  EquationSystems & eq = es();
1073  const auto num_nl_sys = numNonlinearSystems();
1074  if (!num_nl_sys)
1075  return;
1076 
1077 #ifndef NDEBUG
1078  const DofMap & nl_dof_map = eq.get_system(0).get_dof_map();
1079  const bool found_in_root_sys = std::find(nl_dof_map.coupling_functors_begin(),
1080  nl_dof_map.coupling_functors_end(),
1081  &coupling_gf) != nl_dof_map.coupling_functors_end();
1082  const bool found_in_our_map =
1084  mooseAssert(found_in_root_sys == found_in_our_map,
1085  "If the ghosting functor exists in the root DofMap, then we need to have a key for "
1086  "it in our gf to clones map");
1087 #endif
1088 
1089  eq.get_system(0).get_dof_map().remove_coupling_functor(coupling_gf);
1090 
1091  auto it = _root_coupling_gf_to_sys_clones.find(&coupling_gf);
1092  if (it == _root_coupling_gf_to_sys_clones.end())
1093  return;
1094 
1095  auto & clones_vec = it->second;
1096  mooseAssert((num_nl_sys - 1) == clones_vec.size(),
1097  "The size of the gf clones vector doesn't match the number of systems minus one");
1098  if (clones_vec.empty())
1099  {
1100  mooseAssert(num_nl_sys == 1,
1101  "The clones vector should only be empty if there is only one nonlinear system");
1102  return;
1103  }
1104 
1105  for (const auto i : make_range(num_nl_sys))
1106  eq.get_system(i + 1).get_dof_map().remove_coupling_functor(*clones_vec[i]);
1107 
1108  _root_coupling_gf_to_sys_clones.erase(it->first);
1109 }
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:1164
IntRange< T > make_range(T beg, T end)
virtual std::size_t numNonlinearSystems() const =0

◆ reportMooseObjectDependency()

void FEProblemBase::reportMooseObjectDependency ( MooseObject a,
MooseObject b 
)
inherited

Register a MOOSE object dependency so we can either order operations properly or report when we cannot.

a -> b (a depends on b)

Definition at line 4683 of file FEProblemBase.C.

4684 {
4685  //<< "Object " << a->name() << " -> " << b->name() << std::endl;
4686 }

◆ residualSetup()

void FEProblemBase::residualSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 8547 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::residualSetup().

8548 {
8550  // We need to setup all the nonlinear systems other than our current one which actually called
8551  // this method (so we have to make sure we don't go in a circle)
8552  for (const auto i : make_range(numNonlinearSystems()))
8553  if (i != currentNlSysNum())
8554  _nl[i]->residualSetup();
8555  // We don't setup the aux sys because that's been done elsewhere
8556  if (_displaced_problem)
8557  _displaced_problem->residualSetup();
8558 }
virtual std::size_t numNonlinearSystems() const override
virtual void residualSetup()
Definition: SubProblem.C:1158
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
virtual unsigned int currentNlSysNum() const override
IntRange< T > make_range(T beg, T end)
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ resizeMaterialData()

void FEProblemBase::resizeMaterialData ( Moose::MaterialDataType  data_type,
unsigned int  nqp,
const THREAD_ID  tid 
)
inherited

Resize material data.

Parameters
data_typeThe type of material data to resize
nqpThe number of quadrature points to resize for
tidThe thread ID

Definition at line 8539 of file FEProblemBase.C.

8542 {
8543  getMaterialData(data_type, tid).resize(nqp);
8544 }
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 
)
inherited

Restore the MultiApps associated with the ExecFlagType.

Parameters
forceForce restoration because something went wrong with the solve

Definition at line 5119 of file FEProblemBase.C.

Referenced by Transient::incrementStepOrReject(), and FixedPointSolve::solve().

5120 {
5121  const auto & multi_apps = _multi_apps[type].getActiveObjects();
5122 
5123  if (multi_apps.size())
5124  {
5125  if (_verbose_multiapps)
5126  {
5127  if (force)
5128  _console << COLOR_CYAN << "\nRestoring Multiapps on " << type.name()
5129  << " because of solve failure!" << COLOR_DEFAULT << std::endl;
5130  else
5131  _console << COLOR_CYAN << "\nRestoring MultiApps on " << type.name() << COLOR_DEFAULT
5132  << std::endl;
5133  }
5134 
5135  for (const auto & multi_app : multi_apps)
5136  multi_app->restore(force);
5137 
5139 
5140  if (_verbose_multiapps)
5141  _console << COLOR_CYAN << "Finished Restoring MultiApps on " << type.name() << "\n"
5142  << COLOR_DEFAULT << std::endl;
5143  }
5144 }
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:51
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _verbose_multiapps
Whether or not to be verbose with multiapps.

◆ restoreOldSolutions()

void FEProblemBase::restoreOldSolutions ( )
virtualinherited

Restore old solutions from the backup vectors and deallocate them.

Definition at line 6172 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6173 {
6174  TIME_SECTION("restoreOldSolutions", 5, "Restoring Old Solutions");
6175 
6176  for (auto & sys : _solver_systems)
6177  sys->restoreOldSolutions();
6178  _aux->restoreOldSolutions();
6179 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ restoreSolutions()

void FEProblemBase::restoreSolutions ( )
virtualinherited

Definition at line 6149 of file FEProblemBase.C.

Referenced by ActivateElementsUserObjectBase::initSolutions(), TimeStepper::rejectStep(), and FEProblemBase::updateMeshXFEM().

6150 {
6151  TIME_SECTION("restoreSolutions", 5, "Restoring Solutions");
6152 
6153  for (auto & sys : _solver_systems)
6154  sys->restoreSolutions();
6155  _aux->restoreSolutions();
6156 
6157  if (_displaced_problem)
6158  _displaced_problem->updateMesh();
6159 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.
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 701 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:1078

◆ safeAccessTaggedVectors()

virtual bool SubProblem::safeAccessTaggedVectors ( ) const
inlinevirtualinherited

Is it safe to access the tagged vectors.

Reimplemented in DisplacedProblem.

Definition at line 704 of file SubProblem.h.

Referenced by MooseVariableScalar::reinit(), and DisplacedProblem::safeAccessTaggedVectors().

704 { return _safe_access_tagged_vectors; }
bool _safe_access_tagged_vectors
Is it safe to retrieve data from tagged vectors.
Definition: SubProblem.h:1081

◆ saveOldSolutions()

void FEProblemBase::saveOldSolutions ( )
virtualinherited

Allocate vectors and save old solutions into them.

Definition at line 6162 of file FEProblemBase.C.

Referenced by EigenExecutionerBase::inversePowerIteration().

6163 {
6164  TIME_SECTION("saveOldSolutions", 5, "Saving Old Solutions");
6165 
6166  for (auto & sys : _solver_systems)
6167  sys->saveOldSolutions();
6168  _aux->saveOldSolutions();
6169 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ scaleEigenvector()

void EigenProblem::scaleEigenvector ( const Real  scaling_factor)

Scale eigenvector.

Scaling_factor is often computed based on physics.

Definition at line 404 of file EigenProblem.C.

Referenced by postScaleEigenVector(), and preScaleEigenVector().

405 {
406  adjustEigenVector(scaling_factor, true);
407 }
void adjustEigenVector(const Real value, bool scaling)
Adjust eigen vector by either scaling the existing values or setting new values The operations are ap...
Definition: EigenProblem.C:378

◆ selectMatrixTagsFromSystem()

void SubProblem::selectMatrixTagsFromSystem ( const SystemBase system,
const std::map< TagName, TagID > &  input_matrix_tags,
std::set< TagID > &  selected_tags 
)
staticinherited

Select the matrix tags which belong to a specific system.

Parameters
systemReference to the system
input_matrix_tagsA map of matrix tags
selected_tagsA set which gets populated by the tag-ids that belong to the system

Definition at line 278 of file SubProblem.C.

Referenced by FEProblemBase::computeLinearSystemSys().

281 {
282  selected_tags.clear();
283  for (const auto & matrix_tag_pair : input_matrix_tags)
284  if (system.hasMatrix(matrix_tag_pair.second))
285  selected_tags.insert(matrix_tag_pair.second);
286 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:338

◆ selectVectorTagsFromSystem()

void SubProblem::selectVectorTagsFromSystem ( const SystemBase system,
const std::vector< VectorTag > &  input_vector_tags,
std::set< TagID > &  selected_tags 
)
staticinherited

Select the vector tags which belong to a specific system.

Parameters
systemReference to the system
input_vector_tagsA vector of vector tags
selected_tagsA set which gets populated by the tag-ids that belong to the system

Definition at line 267 of file SubProblem.C.

Referenced by FEProblemBase::computeLinearSystemSys(), FEProblemBase::computeResidual(), FEProblemBase::computeResidualAndJacobian(), and ComputeResidualAndJacobianThread::determineObjectWarehouses().

270 {
271  selected_tags.clear();
272  for (const auto & vector_tag : input_vector_tags)
273  if (system.hasVector(vector_tag._id))
274  selected_tags.insert(vector_tag._id);
275 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:880

◆ setActiveElementalMooseVariables()

void FEProblemBase::setActiveElementalMooseVariables ( const std::set< MooseVariableFEBase *> &  moose_vars,
const THREAD_ID  tid 
)
overridevirtualinherited

Set the MOOSE variables to be reinited on each element.

Parameters
moose_varsA set of variables that need to be reinited each time reinit() is called.
tidThe thread id

Reimplemented from SubProblem.

Definition at line 5388 of file FEProblemBase.C.

Referenced by FEProblemBase::prepareMaterials(), ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().

5390 {
5392 
5393  if (_displaced_problem)
5394  _displaced_problem->setActiveElementalMooseVariables(moose_vars, tid);
5395 }
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:421
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::setActiveFEVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5350 of file FEProblemBase.C.

5351 {
5353 
5354  if (_displaced_problem)
5355  _displaced_problem->setActiveFEVariableCoupleableMatrixTags(mtags, tid);
5356 }
virtual void setActiveFEVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:341
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveFEVariableCoupleableVectorTags()

void FEProblemBase::setActiveFEVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtualinherited

◆ setActiveMaterialProperties()

void FEProblemBase::setActiveMaterialProperties ( const std::unordered_set< unsigned int > &  mat_prop_ids,
const THREAD_ID  tid 
)
inherited

Record and set the material properties required by the current computing thread.

Parameters
mat_prop_idsThe set of material properties required by the current computing thread.
tidThe thread id

Definition at line 5443 of file FEProblemBase.C.

Referenced by Moose::Mortar::loopOverMortarSegments(), FEProblemBase::prepareMaterials(), NodalPatchRecovery::reinitPatch(), NonlinearSystemBase::setConstraintSecondaryValues(), and ComputeDiracThread::subdomainChanged().

5445 {
5446  // mark active properties in every material
5447  for (auto & mat : _all_materials.getObjects(tid))
5448  mat->setActiveProperties(mat_prop_ids);
5449  for (auto & mat : _all_materials[Moose::FACE_MATERIAL_DATA].getObjects(tid))
5450  mat->setActiveProperties(mat_prop_ids);
5451  for (auto & mat : _all_materials[Moose::NEIGHBOR_MATERIAL_DATA].getObjects(tid))
5452  mat->setActiveProperties(mat_prop_ids);
5453 
5454  _has_active_material_properties[tid] = !mat_prop_ids.empty();
5455 }
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
std::vector< unsigned char > _has_active_material_properties
Whether there are active material properties on each thread.
MaterialWarehouse _all_materials

◆ setActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::setActiveScalarVariableCoupleableMatrixTags ( std::set< TagID > &  mtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5368 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5370 {
5372 
5373  if (_displaced_problem)
5374  _displaced_problem->setActiveScalarVariableCoupleableMatrixTags(mtags, tid);
5375 }
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid)
Definition: SubProblem.C:380
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::setActiveScalarVariableCoupleableVectorTags ( std::set< TagID > &  vtags,
const THREAD_ID  tid 
)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 5378 of file FEProblemBase.C.

Referenced by AuxiliarySystem::setScalarVariableCoupleableTags().

5380 {
5382 
5383  if (_displaced_problem)
5384  _displaced_problem->setActiveScalarVariableCoupleableVectorTags(vtags, tid);
5385 }
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid)
Definition: SubProblem.C:387
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setAxisymmetricCoordAxis()

void FEProblemBase::setAxisymmetricCoordAxis ( const MooseEnum rz_coord_axis)
inherited

Definition at line 691 of file FEProblemBase.C.

Referenced by FEProblemBase::FEProblemBase().

692 {
693  _mesh.setAxisymmetricCoordAxis(rz_coord_axis);
694 }
MooseMesh & _mesh
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:3957

◆ setBxNorm()

void EigenProblem::setBxNorm ( const PostprocessorName &  bx_norm)
inline

Set the Bx norm postprocessor programatically.

Definition at line 240 of file EigenProblem.h.

240 { _bx_norm_name = bx_norm; }
std::optional< PostprocessorName > _bx_norm_name
The name of the Postprocessor providing the Bx norm.
Definition: EigenProblem.h:292

◆ setConstJacobian()

void FEProblemBase::setConstJacobian ( bool  state)
inlineinherited

Set flag that Jacobian is constant (for optimization purposes)

Parameters
stateTrue if the Jacobian is constant, false otherwise

Definition at line 1679 of file FEProblemBase.h.

Referenced by ExplicitEuler::preSolve(), ExplicitTVDRK2::preSolve(), and ExplicitRK2::preSolve().

1679 { _const_jacobian = state; }
bool _const_jacobian
true if the Jacobian is constant

◆ setCoordSystem()

void FEProblemBase::setCoordSystem ( const std::vector< SubdomainName > &  blocks,
const MultiMooseEnum coord_sys 
)
inherited

Definition at line 683 of file FEProblemBase.C.

Referenced by FEProblemBase::FEProblemBase().

685 {
686  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
687  _mesh.setCoordSystem(blocks, coord_sys);
688 }
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:3851

◆ setCoupling()

void FEProblemBase::setCoupling ( Moose::CouplingType  type)
inherited

Set the coupling between variables TODO: allow user-defined coupling.

Parameters
typeType of coupling

Definition at line 5619 of file FEProblemBase.C.

Referenced by FEProblemBase::init(), FEProblemBase::setCouplingMatrix(), and Moose::SlepcSupport::setEigenProblemSolverParams().

5620 {
5622  {
5624  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
5625  "haven't been provided a coupling matrix!");
5626 
5627  // We've been told to trust the user coupling matrix, so we're going to leave things alone
5628  return;
5629  }
5630 
5631  _coupling = type;
5632 }
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
Moose::CouplingType _coupling
Type of variable coupling.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ setCouplingMatrix() [1/2]

void FEProblemBase::setCouplingMatrix ( std::unique_ptr< CouplingMatrix >  cm,
const unsigned int  nl_sys_num 
)
inherited

Set custom coupling matrix.

Parameters
cmcoupling matrix to be set
nl_sys_numwhich nonlinear system we are setting the coupling matrix for

Definition at line 5643 of file FEProblemBase.C.

Referenced by MoosePreconditioner::setCouplingMatrix().

5644 {
5646  _cm[i] = std::move(cm);
5647 }
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 
)
inherited

Definition at line 5635 of file FEProblemBase.C.

5636 {
5637  // TODO: Deprecate method
5639  _cm[i].reset(cm);
5640 }
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 
)
overridevirtualinherited

sets the current boundary ID in assembly

Reimplemented from SubProblem.

Definition at line 8676 of file FEProblemBase.C.

8677 {
8679  if (_displaced_problem)
8680  _displaced_problem->setCurrentBoundaryID(bid, tid);
8681 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid)
sets the current boundary ID in assembly
Definition: SubProblem.C:765
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ setCurrentExecuteOnFlag()

void FEProblemBase::setCurrentExecuteOnFlag ( const ExecFlagType flag)
inherited

Definition at line 4145 of file FEProblemBase.C.

Referenced by FEProblemBase::execute(), FEProblemBase::initialSetup(), and FEProblemBase::outputStep().

4146 {
4147  _current_execute_on_flag = flag;
4148 }
ExecFlagType _current_execute_on_flag
Current execute_on flag.

◆ setCurrentLinearSystem()

void FEProblemBase::setCurrentLinearSystem ( unsigned int  sys_num)
inherited

Set the current linear system pointer.

Parameters
sys_numThe number of linear system

Definition at line 8693 of file FEProblemBase.C.

Referenced by FEProblemBase::computeLinearSystemSys(), LinearSystem::computeLinearSystemTags(), and FEProblemBase::solveLinearSystem().

8694 {
8695  mooseAssert(sys_num < _linear_systems.size(),
8696  "System number greater than the number of linear systems");
8697  _current_linear_sys = _linear_systems[sys_num].get();
8699 }
LinearSystem * _current_linear_sys
The current linear system that we are solving.
SolverSystem * _current_solver_sys
The current solver system.
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ setCurrentLowerDElem()

void FEProblemBase::setCurrentLowerDElem ( const Elem *const  lower_d_elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Set the current lower dimensional element.

This can be null

Reimplemented from SubProblem.

Definition at line 8667 of file FEProblemBase.C.

8668 {
8669  SubProblem::setCurrentLowerDElem(lower_d_elem, tid);
8670  if (_displaced_problem)
8671  _displaced_problem->setCurrentLowerDElem(
8672  lower_d_elem ? _displaced_mesh->elemPtr(lower_d_elem->id()) : nullptr, tid);
8673 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2864
virtual void setCurrentLowerDElem(const Elem *const lower_d_elem, const THREAD_ID tid)
Set the current lower dimensional element.
Definition: SubProblem.C:1330
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 659 of file SubProblem.h.

Referenced by FEProblemBase::computeResidualAndJacobian(), and FEProblemBase::resetState().

660  {
661  _currently_computing_jacobian = currently_computing_jacobian;
662  }
bool _currently_computing_jacobian
Flag to determine whether the problem is currently computing Jacobian.
Definition: SubProblem.h:1066

◆ setCurrentlyComputingResidual()

void FEProblemBase::setCurrentlyComputingResidual ( bool  currently_computing_residual)
finalvirtualinherited

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

Reimplemented from SubProblem.

Definition at line 8413 of file FEProblemBase.C.

Referenced by FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualTags(), and FEProblemBase::resetState().

8414 {
8415  if (_displaced_problem)
8416  _displaced_problem->setCurrentlyComputingResidual(currently_computing_residual);
8417  _currently_computing_residual = currently_computing_residual;
8418 }
std::shared_ptr< DisplacedProblem > _displaced_problem
bool _currently_computing_residual
Whether the residual is being evaluated.
Definition: SubProblem.h:1075

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

Referenced by FEProblemBase::computeResidualAndJacobian(), and FEProblemBase::resetState().

1439 {
1440  _currently_computing_residual_and_jacobian = currently_computing_residual_and_jacobian;
1441 }
bool _currently_computing_residual_and_jacobian
Flag to determine whether the problem is currently computing the residual and Jacobian.
Definition: SubProblem.h:1069

◆ setCurrentNonlinearSystem()

void FEProblemBase::setCurrentNonlinearSystem ( const unsigned int  nl_sys_num)
inherited

Definition at line 8684 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian(), computeJacobianAB(), computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), computeJacobianTag(), computeMatricesTags(), FEProblemBase::computeResidual(), computeResidualTag(), NonlinearSystemBase::computeResidualTags(), FEProblem::FEProblem(), solve(), and FEProblemBase::solve().

8685 {
8686  mooseAssert(nl_sys_num < _nl.size(),
8687  "System number greater than the number of nonlinear systems");
8688  _current_nl_sys = _nl[nl_sys_num].get();
8690 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
SolverSystem * _current_solver_sys
The current solver system.

◆ setCurrentResidualVectorTags()

void FEProblemBase::setCurrentResidualVectorTags ( const std::set< TagID > &  vector_tags)
inlineinherited

Set the current residual vector tag data structure based on the passed in tag IDs.

Definition at line 2973 of file FEProblemBase.h.

Referenced by FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), and CrankNicolson::init().

2974 {
2976 }
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:150

◆ setCurrentSubdomainID()

void FEProblemBase::setCurrentSubdomainID ( const Elem *  elem,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1567 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementalVariableValue::execute(), and ComputeInitialConditionThread::operator()().

1568 {
1569  SubdomainID did = elem->subdomain_id();
1570  for (const auto i : index_range(_solver_systems))
1571  {
1572  _assembly[tid][i]->setCurrentSubdomainID(did);
1573  if (_displaced_problem &&
1575  _displaced_problem->assembly(tid, i).setCurrentSubdomainID(did);
1576  }
1577 }
bool _reinit_displaced_elem
Whether to call DisplacedProblem::reinitElem when this->reinitElem is called.
bool _reinit_displaced_neighbor
Whether to call DisplacedProblem::reinitNeighbor when this->reinitNeighbor is called.
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
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)

◆ setEigenproblemType()

void EigenProblem::setEigenproblemType ( Moose::EigenProblemType  eigen_problem_type)

Set eigen problem type.

Don't need to use this if we use Newton eigenvalue solver.

Referenced by Eigenvalue::Eigenvalue().

◆ setErrorOnJacobianNonzeroReallocation()

void FEProblemBase::setErrorOnJacobianNonzeroReallocation ( bool  state)
inlineinherited

Definition at line 1786 of file FEProblemBase.h.

1787  {
1789  }
bool _error_on_jacobian_nonzero_reallocation

◆ setException()

void FEProblemBase::setException ( const std::string &  message)
virtualinherited

Set an exception, which is stored at this point by toggling a member variable in this class, and which must be followed up with by a call to checkExceptionAndStopSolve().

Parameters
messageThe error message describing the exception, which will get printed when checkExceptionAndStopSolve() is called

Definition at line 5945 of file FEProblemBase.C.

Referenced by ComputeThreadedGeneralUserObjectsThread::caughtMooseException(), ThreadedNodeLoop< ConstBndNodeRange, ConstBndNodeRange::const_iterator >::caughtMooseException(), ThreadedFaceLoop< RangeType >::caughtMooseException(), NonlinearSystemBase::computeDamping(), AuxiliarySystem::computeElementalVarsHelper(), AuxiliarySystem::computeMortarNodalVars(), FEProblemBase::handleException(), ComputeMortarFunctor::operator()(), and DisplacedProblem::updateMesh().

5946 {
5947  _has_exception = true;
5948  _exception_message = message;
5949 }
bool _has_exception
Whether or not an exception has occurred.
std::string _exception_message
The error message to go with an exception.

◆ setExecutionPrinting()

void FEProblemBase::setExecutionPrinting ( const ExecFlagEnum print_exec)
inlineinherited

Definition at line 2210 of file FEProblemBase.h.

2210 { _print_execution_on = print_exec; }
ExecFlagEnum _print_execution_on
When to print the execution of loops.

◆ setFailNextNonlinearConvergenceCheck()

void FEProblemBase::setFailNextNonlinearConvergenceCheck ( )
inlineinherited

Skip further residual evaluations and fail the next nonlinear convergence check.

Definition at line 2204 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 894 of file SubProblem.h.

894 { _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:1131

◆ setIgnoreZerosInJacobian()

void FEProblemBase::setIgnoreZerosInJacobian ( bool  state)
inlineinherited

Definition at line 1803 of file FEProblemBase.h.

1803 { _ignore_zeros_in_jacobian = state; }
bool _ignore_zeros_in_jacobian

◆ setInitialEigenvalue()

void EigenProblem::setInitialEigenvalue ( const Real  initial_eigenvalue)
inline

Set an initial eigenvalue for initial normalization.

Definition at line 72 of file EigenProblem.h.

Referenced by Eigenvalue::Eigenvalue().

73  {
74  _initial_eigenvalue = initial_eigenvalue;
75  }
Real _initial_eigenvalue
A value used for initial normalization.
Definition: EigenProblem.h:276

◆ setInputParametersFEProblem()

virtual void FEProblemBase::setInputParametersFEProblem ( InputParameters parameters)
inlinevirtualinherited

Reimplemented in FEProblem.

Definition at line 745 of file FEProblemBase.h.

Referenced by FEProblem::setInputParametersFEProblem().

746  {
747  parameters.set<FEProblemBase *>("_fe_problem_base") = this;
748  }
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)
inlineinherited

Set flag to indicate whether kernel coverage checks should be performed.

This check makes sure that at least one kernel is active on all subdomains in the domain (default: true).

Definition at line 1685 of file FEProblemBase.h.

1685 { _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)
inlineinherited

Set flag to indicate whether material coverage checks should be performed.

This check makes sure that at least one material is active on all subdomains in the domain if any material is supplied. If no materials are supplied anywhere, a simulation is still considered OK as long as no properties are being requested anywhere.

Definition at line 1693 of file FEProblemBase.h.

1693 { _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)
inlineinherited

method setting the maximum number of allowable non linear residual pingpong

Definition at line 2116 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2117  {
2118  _n_max_nl_pingpong = n_max_nl_pingpong;
2119  }
unsigned int _n_max_nl_pingpong

◆ setNEigenPairsRequired()

void EigenProblem::setNEigenPairsRequired ( unsigned int  n_eigen_pairs)
inline

Definition at line 41 of file EigenProblem.h.

Referenced by Moose::SlepcSupport::setEigenProblemSolverParams().

42  {
43  _n_eigen_pairs_required = n_eigen_pairs;
44  }
unsigned int _n_eigen_pairs_required
Definition: EigenProblem.h:243

◆ setNeighborSubdomainID() [1/2]

void FEProblemBase::setNeighborSubdomainID ( const Elem *  elem,
unsigned int  side,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1580 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), FEProblemBase::reinitNeighbor(), NonlinearSystemBase::reinitNodeFace(), and EqualValueEmbeddedConstraint::shouldApply().

1581 {
1582  SubdomainID did = elem->neighbor_ptr(side)->subdomain_id();
1583  for (const auto i : index_range(_nl))
1584  {
1585  _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1586  if (_displaced_problem &&
1588  _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
1589  }
1590 }
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 
)
virtualinherited

Definition at line 1593 of file FEProblemBase.C.

1594 {
1595  SubdomainID did = elem->subdomain_id();
1596  for (const auto i : index_range(_nl))
1597  {
1598  _assembly[tid][i]->setCurrentNeighborSubdomainID(did);
1599  if (_displaced_problem &&
1601  _displaced_problem->assembly(tid, i).setCurrentNeighborSubdomainID(did);
1602  }
1603 }
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)
inlineinherited

method setting the absolute divergence tolerance

Definition at line 2131 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

2132  {
2133  _nl_abs_div_tol = nl_abs_div_tol;
2134  }
Real _nl_abs_div_tol
the absolute non linear divergence tolerance

◆ setNonlinearForcedIterations()

void FEProblemBase::setNonlinearForcedIterations ( const unsigned int  nl_forced_its)
inlineinherited

method setting the minimum number of nonlinear iterations before performing divergence checks

Definition at line 2122 of file FEProblemBase.h.

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

2123  {
2124  _nl_forced_its = nl_forced_its;
2125  }
int _nl_forced_its
the number of forced nonlinear iterations

◆ setNonlocalCouplingMatrix()

void FEProblemBase::setNonlocalCouplingMatrix ( )
inherited

Set custom coupling matrix for variables requiring nonlocal contribution.

Definition at line 5660 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

5661 {
5662  TIME_SECTION("setNonlocalCouplingMatrix", 5, "Setting Nonlocal Coupling Matrix");
5663 
5664  if (_nl.size() > 1)
5665  mooseError("Nonlocal kernels are weirdly stored on the FEProblem so we don't currently support "
5666  "multiple nonlinear systems with nonlocal kernels.");
5667 
5668  for (const auto nl_sys_num : index_range(_nl))
5669  {
5670  auto & nl = _nl[nl_sys_num];
5671  auto & nonlocal_cm = _nonlocal_cm[nl_sys_num];
5672  unsigned int n_vars = nl->nVariables();
5673  nonlocal_cm.resize(n_vars);
5674  const auto & vars = nl->getVariables(0);
5675  const auto & nonlocal_kernel = _nonlocal_kernels.getObjects();
5676  const auto & nonlocal_integrated_bc = _nonlocal_integrated_bcs.getObjects();
5677  for (const auto & ivar : vars)
5678  {
5679  for (const auto & kernel : nonlocal_kernel)
5680  {
5681  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5682  if (i == kernel->variable().number())
5683  for (const auto & jvar : vars)
5684  {
5685  const auto it = _var_dof_map.find(jvar->name());
5686  if (it != _var_dof_map.end())
5687  {
5688  unsigned int j = jvar->number();
5689  nonlocal_cm(i, j) = 1;
5690  }
5691  }
5692  }
5693  for (const auto & integrated_bc : nonlocal_integrated_bc)
5694  {
5695  for (unsigned int i = ivar->number(); i < ivar->number() + ivar->count(); ++i)
5696  if (i == integrated_bc->variable().number())
5697  for (const auto & jvar : vars)
5698  {
5699  const auto it = _var_dof_map.find(jvar->name());
5700  if (it != _var_dof_map.end())
5701  {
5702  unsigned int j = jvar->number();
5703  nonlocal_cm(i, j) = 1;
5704  }
5705  }
5706  }
5707  }
5708  }
5709 }
std::vector< CouplingMatrix > _nonlocal_cm
Definition: SubProblem.h:1014
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:644
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

◆ setNormalization()

void EigenProblem::setNormalization ( const PostprocessorName &  pp,
const Real  value = std::numeric_limits<Real>::max() 
)

Set postprocessor and normalization factor 'Postprocessor' is often used to compute an integral of physics variables.

Definition at line 609 of file EigenProblem.C.

Referenced by Eigenvalue::Eigenvalue().

610 {
611  _has_normalization = true;
612  _normalization = pp;
614 }
PostprocessorName _normalization
Postprocessor used to compute a factor from eigenvector.
Definition: EigenProblem.h:269
bool _has_normalization
Whether or not we normalize eigenvector.
Definition: EigenProblem.h:267
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real _normal_factor
Postprocessor target value.
Definition: EigenProblem.h:272

◆ setParallelBarrierMessaging()

void FEProblemBase::setParallelBarrierMessaging ( bool  flag)
inlineinherited

Toggle parallel barrier messaging (defaults to on).

Definition at line 1698 of file FEProblemBase.h.

1698 { _parallel_barrier_messaging = flag; }
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.

◆ setPostprocessorValueByName()

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

Set the value of a PostprocessorValue.

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

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

WARNING! This method should be used with caution. It exists to allow Transfers and other similar objects to modify Postprocessor values. It is not intended for general use.

Definition at line 4003 of file FEProblemBase.C.

Referenced by MultiAppPostprocessorTransfer::execute(), PIDTransientControl::execute(), FEProblemBase::joinAndFinalize(), SteffensenSolve::transformPostprocessors(), SecantSolve::transformPostprocessors(), and PicardSolve::transformPostprocessors().

4006 {
4008  PostprocessorReporterName(name), value, t_index);
4009 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
ReporterData _reporter_data
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h: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 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1701 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1702 {
1703  _assembly[tid][_current_nl_sys->number()]->setResidual(
1704  residual,
1706  getVectorTag(_nl[_current_nl_sys->number()]->residualVectorTag()));
1707  if (_displaced_problem)
1708  _displaced_problem->setResidual(residual, tid);
1709 }
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:1132
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:139
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ setResidualNeighbor()

void FEProblemBase::setResidualNeighbor ( NumericVector< Number > &  residual,
const THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1712 of file FEProblemBase.C.

1713 {
1714  _assembly[tid][_current_nl_sys->number()]->setResidualNeighbor(
1716  if (_displaced_problem)
1717  _displaced_problem->setResidualNeighbor(residual, tid);
1718 }
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:1132
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:139
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:794

◆ setRestartFile()

void FEProblemBase::setRestartFile ( const std::string &  file_name)
inherited

Communicate to the Resurector the name of the restart filer.

Parameters
file_nameThe file name for restarting from

Definition at line 7986 of file FEProblemBase.C.

Referenced by Executioner::Executioner(), and FEProblemBase::FEProblemBase().

7987 {
7988  if (_app.isRecovering())
7989  {
7990  mooseInfo("Restart file ", file_name, " is NOT being used since we are performing recovery.");
7991  }
7992  else
7993  {
7994  _app.setRestart(true);
7995  _app.setRestartRecoverFileBase(file_name);
7996  mooseInfo("Using ", file_name, " for restart.");
7997  }
7998 }
void mooseInfo(Args &&... args) const
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:498
void setRestart(bool value)
Sets the restart/recover flags.
Definition: MooseApp.C:2237
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1168

◆ setSNESMFReuseBase()

void FEProblemBase::setSNESMFReuseBase ( bool  reuse,
bool  set_by_user 
)
inlineinherited

If or not to reuse the base vector for matrix-free calculation.

Definition at line 1920 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

1921  {
1922  _snesmf_reuse_base = reuse, _snesmf_reuse_base_set_by_user = set_by_user;
1923  }
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)
inlinevirtualinherited

Set boolean flag to true to store old solution second time derivative.

Definition at line 1968 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1969  {
1970  _u_dotdot_old_requested = u_dotdot_old_requested;
1971  }
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.

◆ setUDotDotRequested()

virtual void FEProblemBase::setUDotDotRequested ( const bool  u_dotdot_requested)
inlinevirtualinherited

Set boolean flag to true to store solution second time derivative.

Definition at line 1956 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1957  {
1958  _u_dotdot_requested = u_dotdot_requested;
1959  }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ setUDotOldRequested()

virtual void FEProblemBase::setUDotOldRequested ( const bool  u_dot_old_requested)
inlinevirtualinherited

Set boolean flag to true to store old solution time derivative.

Definition at line 1962 of file FEProblemBase.h.

Referenced by CentralDifference::CentralDifference(), and NewmarkBeta::NewmarkBeta().

1963  {
1964  _u_dot_old_requested = u_dot_old_requested;
1965  }
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ setUDotRequested()

virtual void FEProblemBase::setUDotRequested ( const bool  u_dot_requested)
inlinevirtualinherited

Set boolean flag to true to store solution time derivative.

Definition at line 1953 of file FEProblemBase.h.

Referenced by TimeIntegrator::TimeIntegrator().

1953 { _u_dot_requested = u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ setupDampers()

void FEProblemBase::setupDampers ( )
inherited

Definition at line 4740 of file FEProblemBase.C.

4741 {
4742  for (auto & nl : _nl)
4743  nl->setupDampers();
4744 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.

◆ setVariableAllDoFMap()

void FEProblemBase::setVariableAllDoFMap ( const std::vector< const MooseVariableFEBase *> &  moose_vars)
inherited

Definition at line 1475 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup(), and FEProblemBase::meshChangedHelper().

1476 {
1477  for (unsigned int i = 0; i < moose_vars.size(); ++i)
1478  {
1479  VariableName var_name = moose_vars[i]->name();
1480  auto & sys = _solver_systems[moose_vars[i]->sys().number()];
1481  sys->setVariableGlobalDoFs(var_name);
1482  _var_dof_map[var_name] = sys->getVariableGlobalDoFs();
1483  }
1484 }
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
std::map< std::string, std::vector< dof_id_type > > _var_dof_map
Definition: SubProblem.h:644

◆ setVectorPostprocessorValueByName()

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

Set the value of a VectorPostprocessor vector.

Parameters
object_nameThe name of the VPP object
vector_nameThe name of the declared vector
valueThe data to apply to the vector
t_indexFlag for getting current (0), old (1), or older (2) values

Definition at line 4029 of file FEProblemBase.C.

4033 {
4035  VectorPostprocessorReporterName(object_name, vector_name), value, t_index);
4036 }
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)
inherited

Make the problem be verbose.

Definition at line 8660 of file FEProblemBase.C.

Referenced by Executioner::Executioner().

8661 {
8662  _verbose_setup = verbose;
8663  _verbose_multiapps = verbose;
8664 }
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
inherited

Check whether the problem should output execution orders at this time.

Definition at line 8593 of file FEProblemBase.C.

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

8594 {
8595  // For now, only support printing from thread 0
8596  if (tid != 0)
8597  return false;
8598 
8601  return true;
8602  else
8603  return false;
8604 }
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
inlineinherited

Definition at line 2004 of file FEProblemBase.h.

Referenced by FEProblemSolve::solve().

2004 { return _solve; }
const bool & _solve
Whether or not to actually solve the nonlinear system.

◆ shouldUpdateSolution()

bool FEProblemBase::shouldUpdateSolution ( )
virtualinherited

Check to see whether the problem should update the solution.

Returns
true if the problem should update the solution, false otherwise

Definition at line 7222 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck(), and NonlinearSystem::solve().

7223 {
7224  return false;
7225 }

◆ sizeZeroes()

void FEProblemBase::sizeZeroes ( unsigned int  size,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 1903 of file FEProblemBase.C.

1904 {
1905  mooseDoOnce(mooseWarning(
1906  "This function is deprecated and no longer performs any function. Please do not call it."));
1907 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.

◆ skipExceptionCheck()

void FEProblemBase::skipExceptionCheck ( bool  skip_exception_check)
inlineinherited

Set a flag that indicates if we want to skip exception and stop solve.

Definition at line 1933 of file FEProblemBase.h.

Referenced by FEProblemSolve::FEProblemSolve().

1934  {
1935  _skip_exception_check = skip_exception_check;
1936  }
bool _skip_exception_check
If or not skip &#39;exception and stop solve&#39;.

◆ solve()

void EigenProblem::solve ( const unsigned int  nl_sys_num)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 520 of file EigenProblem.C.

521 {
522 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
523  // Master has the default database
524  if (!_app.isUltimateMaster())
525  PetscOptionsPush(_petsc_option_data_base);
526 #endif
527 
528  setCurrentNonlinearSystem(nl_sys_num);
529 
530  if (_solve)
531  {
532  TIME_SECTION("solve", 1);
533 
534  // Set necessary slepc callbacks
535  // We delay this call as much as possible because libmesh
536  // could rebuild matrices due to mesh changes or something else.
537  _nl_eigen->attachSLEPcCallbacks();
538 
539  // If there is an eigenvalue, we scale 1/|Bx| to eigenvalue
540  if (_active_eigen_index < _nl_eigen->getNumConvergedEigenvalues())
541  {
542  std::pair<Real, Real> eig = _nl_eigen->getConvergedEigenvalue(_active_eigen_index);
543  preScaleEigenVector(eig);
544  }
545 
547  solverParams()._eigen_solve_type != Moose::EST_NONLINEAR_POWER)
548  {
549  // Let do an initial solve if a nonlinear eigen solver but not power is used.
550  // The initial solver is a Inverse Power, and it is used to compute a good initial
551  // guess for Newton
552  if (solverParams()._free_power_iterations && _first_solve)
553  {
554  _console << std::endl << " -------------------------------" << std::endl;
555  _console << " Free power iteration starts ..." << std::endl;
556  _console << " -------------------------------" << std::endl << std::endl;
557  doFreeNonlinearPowerIterations(solverParams()._free_power_iterations);
558  _first_solve = false;
559  }
560 
561  // Let us do extra power iterations here if necessary
562  if (solverParams()._extra_power_iterations)
563  {
564  _console << std::endl << " --------------------------------------" << std::endl;
565  _console << " Extra Free power iteration starts ..." << std::endl;
566  _console << " --------------------------------------" << std::endl << std::endl;
567  doFreeNonlinearPowerIterations(solverParams()._extra_power_iterations);
568  }
569  }
570 
571  // We print this for only nonlinear solver
573  {
574  _console << std::endl << " -------------------------------------" << std::endl;
575 
576  if (solverParams()._eigen_solve_type != Moose::EST_NONLINEAR_POWER)
577  _console << " Nonlinear Newton iteration starts ..." << std::endl;
578  else
579  _console << " Nonlinear power iteration starts ..." << std::endl;
580 
581  _console << " -------------------------------------" << std::endl << std::endl;
582  }
583 
586 
587  // with PJFNKMO solve type, we need to evaluate the linear objects to bring them up-to-date
588  if (solverParams()._eigen_solve_type == Moose::EST_PJFNKMO)
590 
591  // Scale eigen vector if users ask
593  }
594 
595 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
596  if (!_app.isUltimateMaster())
597  PetscOptionsPop();
598 #endif
599 
600  // sync solutions in displaced problem
601  if (_displaced_problem)
602  _displaced_problem->syncSolutions();
603 
604  // Reset the matrix flag, so that we reform matrix in next picard iteration
605  _matrices_formed = false;
606 }
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
Definition: SystemBase.C:1218
bool _matrices_formed
Whether or not matrices had been formed.
Definition: EigenProblem.h:263
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:805
SolverParams & solverParams()
Get the solver parameters.
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
Definition: MooseTypes.h:776
virtual void execute(const ExecFlagType &exec_type) override
Convenience function for performing execution of MOOSE systems.
Definition: EigenProblem.C:155
PetscOptions _petsc_option_data_base
void doFreeNonlinearPowerIterations(unsigned int free_power_iterations)
Do some free/extra power iterations.
Definition: EigenProblem.C:497
void preScaleEigenVector(const std::pair< Real, Real > &eig)
Eigenvector need to be scaled back if it was scaled in an earlier stage Scaling eigen vector does not...
Definition: EigenProblem.C:422
std::shared_ptr< NonlinearEigenSystem > _nl_eigen
Definition: EigenProblem.h:245
bool isNonlinearEigenvalueSolver() const
Definition: EigenProblem.C:640
bool & _first_solve
A flag to indicate if it is the first time calling the solve.
Definition: EigenProblem.h:274
const bool & _solve
Whether or not to actually solve the nonlinear system.
NonlinearSystemBase * _current_nl_sys
The current nonlinear system that we are solving.
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
Nonlinear inverse power.
Definition: MooseTypes.h:773
unsigned int _active_eigen_index
Which eigenvalue is used to compute residual.
Definition: EigenProblem.h:252
virtual void solve() override=0
Solve the system (using libMesh magic)
void postScaleEigenVector()
Normalize eigen vector.
Definition: EigenProblem.C:438
std::shared_ptr< DisplacedProblem > _displaced_problem
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ solveLinearSystem()

void FEProblemBase::solveLinearSystem ( const unsigned int  linear_sys_num,
const Moose::PetscSupport::PetscOptions po = nullptr 
)
inherited

Build and solve a linear system.

Parameters
linear_sys_numThe number of the linear system (1,..,num. of lin. systems)
poThe petsc options for the solve, if not supplied, the defaults are used

Definition at line 6040 of file FEProblemBase.C.

6042 {
6043  TIME_SECTION("solve", 1, "Solving", false);
6044 
6045  setCurrentLinearSystem(linear_sys_num);
6046 
6047  const Moose::PetscSupport::PetscOptions & options = po ? *po : _petsc_options;
6048  SolverParams solver_params;
6049  solver_params._type = Moose::SolveType::ST_LINEAR;
6051 
6052 #if PETSC_RELEASE_LESS_THAN(3, 12, 0)
6054  options, solver_params); // Make sure the PETSc options are setup for this app
6055 #else
6056  // Now this database will be the default
6057  // Each app should have only one database
6058  if (!_app.isUltimateMaster())
6059  PetscOptionsPush(_petsc_option_data_base);
6060  // We did not add PETSc options to database yet
6062  {
6063  Moose::PetscSupport::petscSetOptions(options, solver_params);
6065  }
6066 #endif
6067 
6068  if (_solve)
6070 
6071 #if !PETSC_RELEASE_LESS_THAN(3, 12, 0)
6072  if (!_app.isUltimateMaster())
6073  PetscOptionsPop();
6074 #endif
6075 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:805
Moose::LineSearchType _line_search
Definition: SolverParams.h:20
bool _is_petsc_options_inserted
If or not PETSc options have been added to database.
A struct for storing the various types of petsc options and values.
Definition: PetscSupport.h:38
PetscOptions _petsc_option_data_base
Solving a linear problem.
Definition: MooseTypes.h:761
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:239
const bool & _solve
Whether or not to actually solve the nonlinear system.
Moose::SolveType _type
Definition: SolverParams.h:19
LinearSystem * _current_linear_sys
The current linear system that we are solving.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
virtual void solve() override
Solve the system (using libMesh magic)
Definition: LinearSystem.C:262
void setCurrentLinearSystem(unsigned int sys_num)
Set the current linear system pointer.
Moose::PetscSupport::PetscOptions _petsc_options
PETSc option storage.

◆ solverParams() [1/2]

SolverParams & FEProblemBase::solverParams ( )
inherited

◆ solverParams() [2/2]

const SolverParams & FEProblemBase::solverParams ( ) const
inherited

const version

Definition at line 8155 of file FEProblemBase.C.

8156 {
8157  return _solver_params;
8158 }
SolverParams _solver_params

◆ solverSysNum()

unsigned int FEProblemBase::solverSysNum ( const SolverSystemName &  solver_sys_name) const
overridevirtualinherited
Returns
the solver system number corresponding to the provided solver_sys_name

Implements SubProblem.

Definition at line 5873 of file FEProblemBase.C.

Referenced by FEProblemBase::addVariable(), and DisplacedProblem::solverSysNum().

5874 {
5875  std::istringstream ss(solver_sys_name);
5876  unsigned int solver_sys_num;
5877  if (!(ss >> solver_sys_num) || !ss.eof())
5878  solver_sys_num = libmesh_map_find(_solver_sys_name_to_num, solver_sys_name);
5879 
5880  return solver_sys_num;
5881 }
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
Map connecting solver system names with their respective systems.

◆ solverTypeString()

virtual std::string EigenProblem::solverTypeString ( )
inlineoverridevirtual

Return solver type as a human readable string.

Reimplemented from FEProblemBase.

Definition at line 28 of file EigenProblem.h.

29  {
30  return Moose::stringify(solverParams()._eigen_solve_type);
31  }
SolverParams & solverParams()
Get the solver parameters.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62

◆ startedInitialSetup()

virtual bool FEProblemBase::startedInitialSetup ( )
inlinevirtualinherited

Returns true if we are in or beyond the initialSetup stage.

Definition at line 520 of file FEProblemBase.h.

Referenced by MaterialBase::checkExecutionStage(), and MaterialPropertyInterface::checkExecutionStage().

520 { 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 593 of file SubProblem.C.

Referenced by MaterialPropertyInterface::checkMaterialProperty().

596 {
597  _map_boundary_material_props_check[boundary_id].insert(std::make_pair(requestor, name));
598 }
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:1038
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ storeBoundaryMatPropName()

void SubProblem::storeBoundaryMatPropName ( BoundaryID  boundary_id,
const std::string &  name 
)
virtualinherited

Adds the given material property to a storage map based on boundary ids.

This is method is called from within the Material class when the property is first registered.

Parameters
boundary_idThe block id for the MaterialProperty
nameThe name of the property

Definition at line 567 of file SubProblem.C.

Referenced by MaterialBase::registerPropName().

568 {
569  _map_boundary_material_props[boundary_id].insert(name);
570 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:1022

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

Referenced by MaterialBase::getGenericZeroMaterialPropertyByName().

580 {
581  _zero_boundary_material_props[boundary_id].insert(name);
582 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:1026

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

Referenced by MaterialPropertyInterface::checkMaterialProperty().

588 {
589  _map_block_material_props_check[block_id].insert(std::make_pair(requestor, name));
590 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:1037

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

Referenced by MaterialBase::registerPropName().

562 {
563  _map_block_material_props[block_id].insert(name);
564 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:1019

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

Referenced by MaterialBase::getGenericZeroMaterialPropertyByName().

574 {
575  _zero_block_material_props[block_id].insert(name);
576 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:1025

◆ subdomainSetup()

void FEProblemBase::subdomainSetup ( SubdomainID  subdomain,
const THREAD_ID  tid 
)
virtualinherited

Definition at line 2258 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeDiracThread::subdomainChanged(), NonlinearThread::subdomainChanged(), ComputeUserObjectsThread::subdomainChanged(), and ThreadedFaceLoop< RangeType >::subdomainChanged().

2259 {
2260  _all_materials.subdomainSetup(subdomain, tid);
2261 
2262  // Call the subdomain methods of the output system, these are not threaded so only call it once
2263  if (tid == 0)
2265 
2266  for (auto & nl : _nl)
2267  nl->subdomainSetup(subdomain, tid);
2268 
2269  // FIXME: call displaced_problem->subdomainSetup() ?
2270  // When adding possibility with materials being evaluated on displaced mesh
2271 }
std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
The nonlinear systems.
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void subdomainSetup()
Calls the subdomainSetup function for each of the output objects.
virtual void subdomainSetup(THREAD_ID tid=0) const
MaterialWarehouse _all_materials
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773

◆ subspaceDim()

unsigned int FEProblemBase::subspaceDim ( const std::string &  prefix) const
inlineinherited

Dimension of the subspace spanned by vectors with a given prefix.

Parameters
prefixPrefix of the vectors spanning the subspace.

Definition at line 1740 of file FEProblemBase.h.

Referenced by FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), and FEProblemBase::computeTransposeNullSpace().

1741  {
1742  if (_subspace_dim.count(prefix))
1743  return _subspace_dim.find(prefix)->second;
1744  else
1745  return 0;
1746  }
std::map< std::string, unsigned int > _subspace_dim
Dimension of the subspace spanned by the vectors with a given prefix.

◆ swapBackMaterials()

void FEProblemBase::swapBackMaterials ( const THREAD_ID  tid)
virtualinherited

Definition at line 3746 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), LineMaterialSamplerBase< Real >::execute(), ComputeMarkerThread::onElement(), ComputeElemAuxVarsThread< AuxKernelType >::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), and ComputeUserObjectsThread::onElement().

3747 {
3748  auto && elem = _assembly[tid][0]->elem();
3750 }
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)
virtualinherited

Definition at line 3753 of file FEProblemBase.C.

Referenced by NonlinearThread::onBoundary(), ComputeUserObjectsThread::onBoundary(), NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

3754 {
3755  auto && elem = _assembly[tid][0]->elem();
3756  unsigned int side = _assembly[tid][0]->side();
3757  _bnd_material_props.getMaterialData(tid).swapBack(*elem, side);
3758 }
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)
virtualinherited

Definition at line 3761 of file FEProblemBase.C.

Referenced by NonlinearThread::onInterface(), ComputeUserObjectsThread::onInterface(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), ComputeUserObjectsThread::onInternalSide(), and ComputeElemAuxBcsThread< AuxKernelType >::operator()().

3762 {
3763  // NOTE: this will not work with h-adaptivity
3764  const Elem * neighbor = _assembly[tid][0]->neighbor();
3765  unsigned int neighbor_side =
3766  neighbor ? neighbor->which_neighbor_am_i(_assembly[tid][0]->elem()) : libMesh::invalid_uint;
3767 
3768  if (!neighbor)
3769  {
3770  if (haveFV())
3771  {
3772  // If neighbor is null, then we're on the neighbor side of a mesh boundary, e.g. we're off
3773  // the mesh in ghost-land. If we're using the finite volume method, then variable values and
3774  // consequently material properties have well-defined values in this ghost region outside of
3775  // the mesh and we really do want to reinit our neighbor materials in this case. Since we're
3776  // off in ghost land it's safe to do swaps with `MaterialPropertyStorage` using the elem and
3777  // elem_side keys
3778  neighbor = _assembly[tid][0]->elem();
3779  neighbor_side = _assembly[tid][0]->side();
3780  mooseAssert(neighbor, "We should have an appropriate value for elem coming from Assembly");
3781  }
3782  else
3783  mooseError("neighbor is null in Assembly!");
3784  }
3785 
3786  _neighbor_material_props.getMaterialData(tid).swapBack(*neighbor, neighbor_side);
3787 }
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
overridevirtualinherited

Return the auxiliary system object as a base class reference.

Implements SubProblem.

Definition at line 8391 of file FEProblemBase.C.

8392 {
8393  return *_aux;
8394 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseAuxiliary() [2/2]

SystemBase & FEProblemBase::systemBaseAuxiliary ( )
overridevirtualinherited

Implements SubProblem.

Definition at line 8397 of file FEProblemBase.C.

8398 {
8399  return *_aux;
8400 }
std::shared_ptr< AuxiliarySystem > _aux
The auxiliary system.

◆ systemBaseLinear() [1/2]

const SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num) const
overridevirtualinherited

Get a constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 8375 of file FEProblemBase.C.

8376 {
8377  mooseAssert(sys_num < _linear_systems.size(),
8378  "System number greater than the number of linear systems");
8379  return *_linear_systems[sys_num];
8380 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ systemBaseLinear() [2/2]

SystemBase & FEProblemBase::systemBaseLinear ( unsigned int  sys_num)
overridevirtualinherited

Get a non-constant base class reference to a linear system.

Parameters
sys_numThe number of the linear system

Implements SubProblem.

Definition at line 8383 of file FEProblemBase.C.

8384 {
8385  mooseAssert(sys_num < _linear_systems.size(),
8386  "System number greater than the number of linear systems");
8387  return *_linear_systems[sys_num];
8388 }
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
The vector of linear systems.

◆ systemBaseNonlinear() [1/2]

const SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num) const
overridevirtualinherited

Return the nonlinear system object as a base class reference given the system number.

Implements SubProblem.

Definition at line 8362 of file FEProblemBase.C.

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

◆ systemBaseNonlinear() [2/2]

SystemBase & FEProblemBase::systemBaseNonlinear ( const unsigned int  sys_num)
overridevirtualinherited

Implements SubProblem.

Definition at line 8369 of file FEProblemBase.C.

8370 {
8371  return *_nl[sys_num];
8372 }
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
inlineinherited

Definition at line 1915 of file FEProblemBase.h.

Referenced by FEProblemBase::addObject(), FEProblemBase::addUserObject(), NonlinearSystemBase::checkKernelCoverage(), FEProblemBase::checkUserObjectJacobianRequirement(), FEProblemBase::checkUserObjects(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), NonlinearSystemBase::customSetup(), FEProblemBase::customSetup(), ComputeResidualThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), FEProblemBase::executeSamplers(), ComputeLinearFVElementalThread::fetchSystemContributionObjects(), ComputeLinearFVFaceThread::fetchSystemContributionObjects(), FEProblemBase::getDistribution(), FEProblemBase::getMortarUserObjects(), FEProblemBase::getPositionsObject(), FEProblemBase::getSampler(), CompositionDT::getTimeSteppers(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), FEProblemBase::hasUserObject(), NonlinearSystemBase::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), FEProblemBase::needBoundaryMaterialOnSide(), FEProblemBase::needInterfaceMaterialOnSide(), FEProblemBase::needSubdomainMaterialOnSide(), JSONOutput::outputReporters(), NonlinearThread::subdomainChanged(), NonlinearSystemBase::timestepSetup(), and FEProblemBase::timestepSetup().

1915 { return _app.theWarehouse(); }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
TheWarehouse & theWarehouse()
Definition: MooseApp.h:102

◆ time()

virtual Real& FEProblemBase::time ( ) const
inlinevirtualinherited

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 47 of file PerfGraphInterface.C.

Referenced by PerfGraphInterface::registerTimedSection().

48 {
49  return _prefix.empty() ? "" : (_prefix + "::") + section_name;
50 }
const std::string _prefix
A prefix to use for all sections.

◆ timeOld()

virtual Real& FEProblemBase::timeOld ( ) const
inlinevirtualinherited

◆ timeStep()

virtual int& FEProblemBase::timeStep ( ) const
inlinevirtualinherited

◆ timestepSetup()

void FEProblemBase::timestepSetup ( )
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 1283 of file FEProblemBase.C.

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

1284 {
1286 
1287  if (_t_step > 1 && _num_grid_steps)
1288  {
1289  MeshRefinement mesh_refinement(_mesh);
1290  std::unique_ptr<MeshRefinement> displaced_mesh_refinement(nullptr);
1291  if (_displaced_mesh)
1292  displaced_mesh_refinement = std::make_unique<MeshRefinement>(*_displaced_mesh);
1293 
1294  for (MooseIndex(_num_grid_steps) i = 0; i < _num_grid_steps; ++i)
1295  {
1296  if (_displaced_problem)
1297  // If the DisplacedProblem is active, undisplace the DisplacedMesh in preparation for
1298  // refinement. We can't safely refine the DisplacedMesh directly, since the Hilbert keys
1299  // computed on the inconsistenly-displaced Mesh are different on different processors,
1300  // leading to inconsistent Hilbert keys. We must do this before the undisplaced Mesh is
1301  // coarsensed, so that the element and node numbering is still consistent. We also have to
1302  // make sure this is done during every step of coarsening otherwise different partitions
1303  // will be generated for the reference and displaced meshes (even for replicated)
1304  _displaced_problem->undisplaceMesh();
1305 
1306  mesh_refinement.uniformly_coarsen();
1307  if (_displaced_mesh)
1308  displaced_mesh_refinement->uniformly_coarsen();
1309 
1310  // Mark this as an intermediate change because we do not yet want to reinit_systems. E.g. we
1311  // need things to happen in the following order for the undisplaced problem:
1312  // u1) EquationSystems::reinit_solutions. This will restrict the solution vectors and then
1313  // contract the mesh
1314  // u2) MooseMesh::meshChanged. This will update the node/side lists and other
1315  // things which needs to happen after the contraction
1316  // u3) GeometricSearchData::reinit. Once the node/side lists are updated we can perform our
1317  // geometric searches which will aid in determining sparsity patterns
1318  //
1319  // We do these things for the displaced problem (if it exists)
1320  // d1) EquationSystems::reinit. Restrict the displaced problem vector copies and then contract
1321  // the mesh. It's safe to do a full reinit with the displaced because there are no
1322  // matrices that sparsity pattern calculations will be conducted for
1323  // d2) MooseMesh::meshChanged. This will update the node/side lists and other
1324  // things which needs to happen after the contraction
1325  // d3) UpdateDisplacedMeshThread::operator(). Re-displace the mesh using the *displaced*
1326  // solution vector copy because we don't know the state of the reference solution vector.
1327  // It's safe to use the displaced copy because we are outside of a non-linear solve,
1328  // and there is no concern about differences between solution and current_local_solution
1329  // d4) GeometricSearchData::reinit. With the node/side lists updated and the mesh
1330  // re-displaced, we can perform our geometric searches, which will aid in determining the
1331  // sparsity pattern of the matrix held by the libMesh::ImplicitSystem held by the
1332  // NonlinearSystem held by this
1333  meshChangedHelper(/*intermediate_change=*/true);
1334  }
1335 
1336  // u4) Now that all the geometric searches have been done (both undisplaced and displaced),
1337  // we're ready to update the sparsity pattern
1338  es().reinit_systems();
1339  }
1340 
1341  if (_line_search)
1342  _line_search->timestepSetup();
1343 
1344  // Random interface objects
1345  for (const auto & it : _random_data_objects)
1346  it.second->updateSeeds(EXEC_TIMESTEP_BEGIN);
1347 
1348  unsigned int n_threads = libMesh::n_threads();
1349  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1350  {
1353  }
1354 
1355  _aux->timestepSetup();
1356  for (auto & sys : _solver_systems)
1357  sys->timestepSetup();
1358 
1359  if (_displaced_problem)
1360  // timestepSetup for displaced systems
1361  _displaced_problem->timestepSetup();
1362 
1363  for (THREAD_ID tid = 0; tid < n_threads; tid++)
1364  {
1367  _markers.timestepSetup(tid);
1368  }
1369 
1370  std::vector<UserObject *> userobjs;
1371  theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(userobjs);
1372  for (auto obj : userobjs)
1373  obj->timestepSetup();
1374 
1375  // Timestep setup of output objects
1377 
1380  _has_nonlocal_coupling = true;
1381 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:1057
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
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
Combined container to base pointer of every solver system.
unsigned int _num_grid_steps
Number of steps in a grid sequence.
virtual EquationSystems & es() override
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:84
MooseObjectWarehouse< Indicator > _indicators
virtual void timestepSetup()
Definition: SubProblem.C:1142
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:1773
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)
inlinevirtualinherited

Definition at line 535 of file FEProblemBase.h.

Referenced by EigenExecutionerBase::EigenExecutionerBase(), and Transient::Transient().

535 { _transient = trans; }

◆ trustUserCouplingMatrix()

void FEProblemBase::trustUserCouplingMatrix ( )
inherited

Whether to trust the user coupling matrix even if we want to do things like be paranoid and create a full coupling matrix.

See https://github.com/idaholab/moose/issues/16395 for detailed background

Definition at line 5650 of file FEProblemBase.C.

Referenced by SingleMatrixPreconditioner::SingleMatrixPreconditioner().

5651 {
5653  mooseError("Someone told us (the FEProblemBase) to trust the user coupling matrix, but we "
5654  "haven't been provided a coupling matrix!");
5655 
5657 }
bool _trust_user_coupling_matrix
Whether to trust the user coupling matrix no matter what.
Moose::CouplingType _coupling
Type of variable coupling.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ type()

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

Get the type of this class.

Returns
the name of the type of this class

Definition at line 51 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), FEProblemBase::addFunction(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addObject(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), MooseApp::appendMeshGenerator(), PhysicsBase::assertParamDefined(), AuxKernelTempl< Real >::AuxKernelTempl(), FEProblemBase::backupMultiApps(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildPRefinementAndCoarseningMaps(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PhysicsBase::checkRequiredTasks(), ADDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayDGLowerDKernel::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ADDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGConvection::computeQpJacobian(), ScalarKernel::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), ArrayHFEMDiffusion::computeQpResidual(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), ADDGDiffusion::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), MooseApp::createRecoverablePerfGraph(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MooseBase::errorPrefix(), AB2PredictorCorrector::estimateTimeError(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), Transient::getTimeIntegratorName(), FEProblemBase::getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MooseObject::MooseObject(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), Console::output(), AdvancedOutput::output(), ConsoleUtils::outputExecutionInformation(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), MooseApp::setupOptions(), WebServerControl::startServer(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

51 { return _type; }
const std::string _type
The type of this class.
Definition: MooseBase.h:87

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inherited

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 27 of file MooseBase.C.

Referenced by MaterialPropertyStorage::addProperty(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

28 {
29  return type() + std::string(" \"") + name() + std::string("\"");
30 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ uDotDotOldRequested()

virtual bool FEProblemBase::uDotDotOldRequested ( )
inlinevirtualinherited

Get boolean flag to check whether old solution second time derivative needs to be stored.

Definition at line 1991 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

1992  {
1994  mooseError("FEProblemBase: When requesting old second time derivative of solution, current "
1995  "second time derivation of solution should also be stored. Please set "
1996  "`u_dotdot_requested` to true using setUDotDotRequested.");
1997  return _u_dotdot_old_requested;
1998  }
bool _u_dotdot_old_requested
Whether old solution second time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotDotRequested()

virtual bool FEProblemBase::uDotDotRequested ( )
inlinevirtualinherited

Get boolean flag to check whether solution second time derivative needs to be stored.

Definition at line 1977 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors(), and FEProblemBase::addTimeIntegrator().

1977 { return _u_dotdot_requested; }
bool _u_dotdot_requested
Whether solution second time derivative needs to be stored.

◆ uDotOldRequested()

virtual bool FEProblemBase::uDotOldRequested ( )
inlinevirtualinherited

Get boolean flag to check whether old solution time derivative needs to be stored.

Definition at line 1980 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

1981  {
1983  mooseError("FEProblemBase: When requesting old time derivative of solution, current time "
1984  "derivative of solution should also be stored. Please set `u_dot_requested` to "
1985  "true using setUDotRequested.");
1986 
1987  return _u_dot_old_requested;
1988  }
bool _u_dot_requested
Whether solution time derivative needs to be stored.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _u_dot_old_requested
Whether old solution time derivative needs to be stored.

◆ uDotRequested()

virtual bool FEProblemBase::uDotRequested ( )
inlinevirtualinherited

Get boolean flag to check whether solution time derivative needs to be stored.

Definition at line 1974 of file FEProblemBase.h.

Referenced by SystemBase::addDotVectors().

1974 { return _u_dot_requested; }
bool _u_dot_requested
Whether solution time derivative needs to be stored.

◆ uniformRefine()

void FEProblemBase::uniformRefine ( )
inherited

uniformly refine the problem mesh(es).

This will also prolong the the solution, and in order for that to be safe, we can only perform one refinement at a time

Definition at line 8421 of file FEProblemBase.C.

Referenced by FEProblemSolve::solve().

8422 {
8423  // ResetDisplacedMeshThread::onNode looks up the reference mesh by ID, so we need to make sure
8424  // we undisplace before adapting the reference mesh
8425  if (_displaced_problem)
8426  _displaced_problem->undisplaceMesh();
8427 
8429  if (_displaced_problem)
8431 
8432  meshChangedHelper(/*intermediate_change=*/false);
8433 }
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 67 of file MooseBaseParameterInterface.h.

Referenced by MooseBaseParameterInterface::connectControllableParams(), and Action::uniqueActionName().

68  {
69  return MooseObjectName(_pars.get<std::string>("_unique_name"));
70  }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBaseParameterInterface::uniqueParameterName ( const std::string &  parameter_name) const
inlineinherited

The unique parameter name of a valid parameter of this object for accessing parameter controls.

Definition at line 52 of file MooseBaseParameterInterface.h.

53  {
55  _pars.get<std::string>("_moose_base"), _moose_base.name(), parameter_name);
56  }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ updateActiveObjects()

void FEProblemBase::updateActiveObjects ( )
virtualinherited

Update the active objects in the warehouses.

Reimplemented in DumpObjectsProblem.

Definition at line 4656 of file FEProblemBase.C.

Referenced by MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), and FixedPointSolve::solveStep().

4657 {
4658  TIME_SECTION("updateActiveObjects", 5, "Updating Active Objects");
4659 
4660  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
4661  {
4662  for (auto & nl : _nl)
4663  nl->updateActive(tid);
4664  _aux->updateActive(tid);
4667  _markers.updateActive(tid);
4669  _materials.updateActive(tid);
4671  }
4672 
4680 }
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)
overridevirtualinherited

Implements SubProblem.

Definition at line 7249 of file FEProblemBase.C.

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

7250 {
7251  TIME_SECTION("updateGeometricSearch", 3, "Updating Geometric Search");
7252 
7254 
7255  if (_displaced_problem)
7256  _displaced_problem->updateGeomSearch(type);
7257 }
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void update(GeometricSearchType type=ALL)
Update all of the search objects.
std::shared_ptr< DisplacedProblem > _displaced_problem
GeometricSearchData _geometric_search_data

◆ updateMeshXFEM()

bool FEProblemBase::updateMeshXFEM ( )
virtualinherited

Update the mesh due to changing XFEM cuts.

Definition at line 7508 of file FEProblemBase.C.

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

7509 {
7510  TIME_SECTION("updateMeshXFEM", 5, "Updating XFEM");
7511 
7512  bool updated = false;
7513  if (haveXFEM())
7514  {
7515  if (_xfem->updateHeal())
7516  meshChanged();
7517 
7518  updated = _xfem->update(_time, _nl, *_aux);
7519  if (updated)
7520  {
7521  meshChanged();
7522  _xfem->initSolution(_nl, *_aux);
7523  restoreSolutions();
7524  }
7525  }
7526  return updated;
7527 }
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 ( )
virtualinherited

Definition at line 7260 of file FEProblemBase.C.

Referenced by FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::init(), and FEProblemBase::meshChangedHelper().

7261 {
7262  TIME_SECTION("updateMortarMesh", 5, "Updating Mortar Mesh");
7263 
7264  FloatingPointExceptionGuard fpe_guard(_app);
7265 
7266  _mortar_data.update();
7267 }
Scope guard for starting and stopping Floating Point Exception Trapping.
MortarData _mortar_data
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void update()
Builds mortar segment meshes for each mortar interface.
Definition: MortarData.C:149

◆ updateSolution()

bool FEProblemBase::updateSolution ( NumericVector< Number > &  vec_solution,
NumericVector< Number > &  ghosted_solution 
)
virtualinherited

Update the solution.

Parameters
vec_solutionLocal solution vector that gets modified by this method
ghosted_solutionGhosted solution vector
Returns
true if the solution was modified, false otherwise

Definition at line 7228 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

7230 {
7231  return false;
7232 }

◆ useSNESMFReuseBase()

bool FEProblemBase::useSNESMFReuseBase ( )
inlineinherited

Return a flag that indicates if we are reusing the vector base.

Definition at line 1928 of file FEProblemBase.h.

Referenced by NonlinearSystem::solve().

1928 { return _snesmf_reuse_base; }
bool _snesmf_reuse_base
If or not to resuse the base vector for matrix-free calculation.

◆ validParams()

InputParameters EigenProblem::validParams ( )
static

Definition at line 31 of file EigenProblem.C.

32 {
34  params.addClassDescription("Problem object for solving an eigenvalue problem.");
35  params.addParam<bool>("negative_sign_eigen_kernel",
36  true,
37  "Whether or not to use a negative sign for eigenvalue kernels. "
38  "Using a negative sign makes eigenvalue kernels consistent with "
39  "a nonlinear solver");
40 
41  params.addParam<unsigned int>(
42  "active_eigen_index",
43  0,
44  "Which eigenvector is used to compute residual and also associated to nonlinear variable");
45  params.addParam<PostprocessorName>("bx_norm", "A postprocessor describing the norm of Bx");
46 
47  return params;
48 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
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()

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

127 {
128  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
129 
130  const auto tag_name_upper = MooseUtils::toUpper(tag_name);
131  for (const auto & vector_tag : _vector_tags)
132  if (vector_tag._name == tag_name_upper)
133  return true;
134 
135  return false;
136 }
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:1040
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1134
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219

◆ vectorTagName()

TagName SubProblem::vectorTagName ( const TagID  tag) const
virtualinherited

Retrieve the name associated with a TagID.

Reimplemented in DisplacedProblem.

Definition at line 199 of file SubProblem.C.

Referenced by SystemBase::addVector(), SystemBase::closeTaggedVector(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), SystemBase::removeVector(), NonlinearSystemBase::residualGhosted(), DisplacedProblem::vectorTagName(), and SystemBase::zeroTaggedVector().

200 {
201  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
202  if (!vectorTagExists(tag_id))
203  mooseError("Vector tag with ID ", tag_id, " does not exist");
204 
205  return _vector_tags[tag_id]._name;
206 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1134
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:173
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 209 of file SubProblem.C.

Referenced by MooseVariableScalar::reinit(), TaggingInterface::TaggingInterface(), and DisplacedProblem::vectorTagType().

210 {
211  mooseAssert(verifyVectorTags(), "Vector tag storage invalid");
212  if (!vectorTagExists(tag_id))
213  mooseError("Vector tag with ID ", tag_id, " does not exist");
214 
215  return _vector_tags[tag_id]._type;
216 }
std::vector< VectorTag > _vector_tags
The declared vector tags.
Definition: SubProblem.h:1134
bool verifyVectorTags() const
Verify the integrity of _vector_tags and _typed_vector_tags.
Definition: SubProblem.C:219
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:173
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ verboseMultiApps()

bool FEProblemBase::verboseMultiApps ( ) const
inlineinherited

Whether or not to use verbose printing for MultiApps.

Definition at line 1706 of file FEProblemBase.h.

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::restore(), FullSolveMultiApp::showStatusMessage(), and TransientMultiApp::solveStep().

1706 { 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 219 of file SubProblem.C.

Referenced by SubProblem::addVectorTag(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), SubProblem::getVectorTags(), SubProblem::numVectorTags(), SubProblem::vectorTagExists(), SubProblem::vectorTagName(), and SubProblem::vectorTagType().

220 {
221  for (TagID tag_id = 0; tag_id < _vector_tags.size(); ++tag_id)
222  {
223  const auto & vector_tag = _vector_tags[tag_id];
224 
225  if (vector_tag._id != tag_id)
226  mooseError("Vector tag ", vector_tag._id, " id mismatch in _vector_tags");
227  if (vector_tag._type == Moose::VECTOR_TAG_ANY)
228  mooseError("Vector tag '", vector_tag._name, "' has type VECTOR_TAG_ANY");
229 
230  const auto search = _vector_tags_name_map.find(vector_tag._name);
231  if (search == _vector_tags_name_map.end())
232  mooseError("Vector tag ", vector_tag._id, " is not in _vector_tags_name_map");
233  else if (search->second != tag_id)
234  mooseError("Vector tag ", vector_tag._id, " has incorrect id in _vector_tags_name_map");
235 
236  unsigned int found_in_type = 0;
237  for (TagTypeID tag_type_id = 0; tag_type_id < _typed_vector_tags[vector_tag._type].size();
238  ++tag_type_id)
239  {
240  const auto & vector_tag_type = _typed_vector_tags[vector_tag._type][tag_type_id];
241  if (vector_tag_type == vector_tag)
242  {
243  ++found_in_type;
244  if (vector_tag_type._type_id != tag_type_id)
245  mooseError("Type ID for Vector tag ", tag_id, " is incorrect");
246  }
247  }
248 
249  if (found_in_type == 0)
250  mooseError("Vector tag ", tag_id, " not found in _typed_vector_tags");
251  if (found_in_type > 1)
252  mooseError("Vector tag ", tag_id, " found multiple times in _typed_vector_tags");
253  }
254 
255  unsigned int num_typed_vector_tags = 0;
256  for (const auto & typed_vector_tags : _typed_vector_tags)
257  num_typed_vector_tags += typed_vector_tags.size();
258  if (num_typed_vector_tags != _vector_tags.size())
259  mooseError("Size mismatch between _vector_tags and _typed_vector_tags");
260  if (_vector_tags_name_map.size() != _vector_tags.size())
261  mooseError("Size mismatch between _vector_tags and _vector_tags_name_map");
262 
263  return true;
264 }
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:1134
std::map< TagName, TagID > _vector_tags_name_map
Map of vector tag TagName to TagID.
Definition: SubProblem.h:1144
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:1141
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ wereMatricesFormed() [1/2]

bool EigenProblem::wereMatricesFormed ( ) const
inline

Whether or not constant matrices were already formed.

Definition at line 220 of file EigenProblem.h.

Referenced by Moose::SlepcSupport::mooseEPSFormMatrices().

220 { return _matrices_formed; }
bool _matrices_formed
Whether or not matrices had been formed.
Definition: EigenProblem.h:263

◆ wereMatricesFormed() [2/2]

void EigenProblem::wereMatricesFormed ( bool  mf)
inline

Set a flag to indicate whether or not constant matrices were already formed.

Definition at line 225 of file EigenProblem.h.

225 { _matrices_formed = mf; }
bool _matrices_formed
Whether or not matrices had been formed.
Definition: EigenProblem.h:263

Member Data Documentation

◆ _action_factory

ActionFactory& MooseBaseParameterInterface::_action_factory
protectedinherited

◆ _active_eigen_index

unsigned int EigenProblem::_active_eigen_index
protected

Which eigenvalue is used to compute residual.

By default the zeroth eigenvalue is used.

Definition at line 252 of file EigenProblem.h.

Referenced by activeEigenvalueIndex(), computeResidualL2Norm(), postScaleEigenVector(), and solve().

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

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::getActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _active_fe_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_matrix_tags
protectedinherited

◆ _active_fe_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_fe_var_coupleable_vector_tags
protectedinherited

◆ _active_sc_var_coupleable_matrix_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_matrix_tags
protectedinherited

◆ _active_sc_var_coupleable_vector_tags

std::vector<std::set<TagID> > SubProblem::_active_sc_var_coupleable_vector_tags
protectedinherited

◆ _ad_grad_zero

std::vector<MooseArray<ADRealVectorValue> > FEProblemBase::_ad_grad_zero
inherited

◆ _ad_second_zero

std::vector<MooseArray<ADRealTensorValue> > FEProblemBase::_ad_second_zero
inherited

◆ _ad_zero

std::vector<MooseArray<ADReal> > FEProblemBase::_ad_zero
inherited

◆ _adaptivity

Adaptivity FEProblemBase::_adaptivity
protectedinherited

◆ _all_materials

MaterialWarehouse FEProblemBase::_all_materials
protectedinherited

◆ _all_user_objects

ExecuteMooseObjectWarehouse<UserObject> FEProblemBase::_all_user_objects
protectedinherited

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 84 of file MooseBase.h.

◆ _assembly

std::vector<std::vector<std::unique_ptr<Assembly> > > FEProblemBase::_assembly
protectedinherited

The Assembly objects.

The first index corresponds to the thread ID and the second index corresponds to the nonlinear system number

Definition at line 2377 of file FEProblemBase.h.

Referenced by FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), FEProblemBase::assembly(), FEProblemBase::bumpAllQRuleOrder(), FEProblemBase::bumpVolumeQRuleOrder(), FEProblemBase::couplingEntries(), FEProblemBase::createQRules(), FEProblemBase::init(), FEProblemBase::initElementStatefulProps(), FEProblemBase::initialSetup(), FEProblemBase::initXFEM(), FEProblemBase::meshChangedHelper(), FEProblemBase::newAssemblyArray(), FEProblemBase::nonlocalCouplingEntries(), FEProblemBase::prepare(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElemFace(), FEProblemBase::reinitElemNeighborAndLowerD(), FEProblemBase::reinitElemPhys(), FEProblemBase::reinitMaterials(), FEProblemBase::reinitMaterialsBoundary(), FEProblemBase::reinitMaterialsFace(), FEProblemBase::reinitMaterialsInterface(), FEProblemBase::reinitMaterialsNeighbor(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborPhys(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::reinitScalars(), FEProblemBase::setCurrentSubdomainID(), FEProblemBase::setNeighborSubdomainID(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), FEProblemBase::swapBackMaterials(), FEProblemBase::swapBackMaterialsFace(), and FEProblemBase::swapBackMaterialsNeighbor().

◆ _aux

std::shared_ptr<AuxiliarySystem> FEProblemBase::_aux
protectedinherited

The auxiliary system.

Definition at line 2367 of file FEProblemBase.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addIndicator(), FEProblemBase::addMarker(), FEProblemBase::addMultiApp(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::advanceState(), FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::computeBounds(), FEProblemBase::computeIndicators(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeMarkers(), FEProblemBase::computePostCheck(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::copySolutionsBackwards(), FEProblemBase::createQRules(), FEProblemBase::createTagSolutions(), FEProblemBase::customSetup(), FEProblemBase::determineSolverSystem(), DumpObjectsProblem::DumpObjectsProblem(), FEProblemBase::duplicateVariableCheck(), EigenProblem(), FEProblemBase::execute(), ExternalProblem::ExternalProblem(), FEProblem::FEProblem(), FEProblemBase::getActualFieldVariable(), FEProblemBase::getArrayVariable(), FEProblemBase::getAuxiliarySystem(), FEProblemBase::getScalarVariable(), FEProblemBase::getStandardVariable(), FEProblemBase::getSystem(), FEProblemBase::getVariable(), FEProblemBase::getVariableNames(), FEProblemBase::getVectorVariable(), FEProblemBase::hasScalarVariable(), FEProblemBase::hasVariable(), FEProblemBase::init(), FEProblemBase::initialSetup(), FEProblemBase::meshChangedHelper(), FEProblemBase::needBoundaryMaterialOnSide(), FEProblemBase::outputStep(), FEProblemBase::prepare(), FEProblemBase::prepareFace(), FEProblemBase::projectInitialConditionOnCustomRange(), FEProblemBase::projectSolution(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemFace(), FEProblemBase::reinitElemPhys(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborPhys(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitNodes(), FEProblemBase::reinitNodesNeighbor(), FEProblemBase::reinitScalars(), FEProblemBase::restoreOldSolutions(), FEProblemBase::restoreSolutions(), FEProblemBase::saveOldSolutions(), FEProblemBase::systemBaseAuxiliary(), FEProblemBase::timestepSetup(), FEProblemBase::updateActiveObjects(), and FEProblemBase::updateMeshXFEM().

◆ _aux_evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_aux_evaluable_local_elem_range
protectedinherited

Definition at line 2640 of file FEProblemBase.h.

◆ _between_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_between_multi_app_transfers
protectedinherited

◆ _block_mat_side_cache

std::vector<std::unordered_map<SubdomainID, bool> > FEProblemBase::_block_mat_side_cache
protectedinherited

Cache for calculating materials on side.

Definition at line 2452 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needSubdomainMaterialOnSide().

◆ _bnd_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_bnd_mat_side_cache
protectedinherited

Cache for calculating materials on side.

Definition at line 2455 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needBoundaryMaterialOnSide().

◆ _bnd_material_props

MaterialPropertyStorage& FEProblemBase::_bnd_material_props
protectedinherited

◆ _boundary_restricted_elem_integrity_check

const bool FEProblemBase::_boundary_restricted_elem_integrity_check
protectedinherited

whether to perform checking of boundary restricted elemental object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 2583 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup().

◆ _boundary_restricted_node_integrity_check

const bool FEProblemBase::_boundary_restricted_node_integrity_check
protectedinherited

whether to perform checking of boundary restricted nodal object variable dependencies, e.g.

whether the variable dependencies are defined on the selected boundaries

Definition at line 2579 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup().

◆ _bx_norm_name

std::optional<PostprocessorName> EigenProblem::_bx_norm_name
private

The name of the Postprocessor providing the Bx norm.

This may be empty in which case the default L2 norm of Bx will be used as the Bx norm

Definition at line 292 of file EigenProblem.h.

Referenced by bxNormProvided(), formNorm(), and setBxNorm().

◆ _calculate_jacobian_in_uo

bool FEProblemBase::_calculate_jacobian_in_uo
protectedinherited

◆ _cli_option_found

bool Problem::_cli_option_found
protectedinherited

True if the CLI option is found.

Definition at line 52 of file Problem.h.

Referenced by Problem::_setCLIOption().

◆ _cm

std::vector<std::unique_ptr<CouplingMatrix> > FEProblemBase::_cm
protectedinherited

◆ _color_output

bool Problem::_color_output
protectedinherited

True if we're going to attempt to write color output.

Definition at line 55 of file Problem.h.

◆ _computing_nonlinear_residual

bool SubProblem::_computing_nonlinear_residual
protectedinherited

Whether the non-linear residual is being evaluated.

Definition at line 1072 of file SubProblem.h.

Referenced by SubProblem::computingNonlinearResid(), and FEProblemBase::computingNonlinearResid().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualProblem::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), FixedPointSolve::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MessageFromInput::execute(), Steady::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::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(), FEProblemBase::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(), FEProblemBase::restoreMultiApps(), NonlinearSystemBase::setInitialSolution(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), NonlinearSystem::solve(), solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Transient::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _const_jacobian

bool FEProblemBase::_const_jacobian
protectedinherited

◆ _constant_matrices

bool EigenProblem::_constant_matrices
protected

Whether or not require constant matrices.

Definition at line 265 of file EigenProblem.h.

Referenced by constantMatrices().

◆ _control_warehouse

ExecuteMooseObjectWarehouse<Control> FEProblemBase::_control_warehouse
protectedinherited

The control logic warehouse.

Definition at line 2625 of file FEProblemBase.h.

Referenced by FEProblemBase::executeControls(), FEProblemBase::getControlWarehouse(), and FEProblemBase::updateActiveObjects().

◆ _coupling

Moose::CouplingType FEProblemBase::_coupling
protectedinherited

◆ _current_execute_on_flag

ExecFlagType FEProblemBase::_current_execute_on_flag
protectedinherited

◆ _current_linear_sys

LinearSystem* FEProblemBase::_current_linear_sys
protectedinherited

◆ _current_nl_sys

NonlinearSystemBase* FEProblemBase::_current_nl_sys
protectedinherited

The current nonlinear system that we are solving.

Definition at line 2352 of file FEProblemBase.h.

Referenced by FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::checkNonlinearConvergence(), FEProblemBase::computeBounds(), FEProblemBase::computeDamping(), FEProblemBase::computeJacobianBlock(), computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), FEProblemBase::computePostCheck(), FEProblemBase::computeResidual(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualTags(), FEProblemBase::computeResidualType(), FEProblemBase::computeTransposeNullSpace(), FEProblemBase::currentNonlinearSystem(), doFreeNonlinearPowerIterations(), EigenProblem(), FEProblemBase::prepare(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), FEProblemBase::reinitDirac(), FEProblemBase::reinitNeighborPhys(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::setCurrentNonlinearSystem(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), solve(), FEProblemBase::solve(), and ReferenceResidualProblem::updateReferenceResidual().

◆ _current_solver_sys

SolverSystem* FEProblemBase::_current_solver_sys
protectedinherited

The current solver system.

Definition at line 2355 of file FEProblemBase.h.

Referenced by FEProblemBase::setCurrentLinearSystem(), and FEProblemBase::setCurrentNonlinearSystem().

◆ _currently_computing_jacobian

bool SubProblem::_currently_computing_jacobian
protectedinherited

◆ _currently_computing_residual

bool SubProblem::_currently_computing_residual
protectedinherited

◆ _currently_computing_residual_and_jacobian

bool SubProblem::_currently_computing_residual_and_jacobian
protectedinherited

Flag to determine whether the problem is currently computing the residual and Jacobian.

Definition at line 1069 of file SubProblem.h.

Referenced by SubProblem::currentlyComputingResidualAndJacobian(), and SubProblem::setCurrentlyComputingResidualAndJacobian().

◆ _cycles_completed

unsigned int FEProblemBase::_cycles_completed
protectedinherited

◆ _default_ghosting

bool SubProblem::_default_ghosting
protectedinherited

Whether or not to use default libMesh coupling.

Definition at line 1060 of file SubProblem.h.

Referenced by SubProblem::defaultGhosting().

◆ _dirac_kernel_info

DiracKernelInfo SubProblem::_dirac_kernel_info
protectedinherited

◆ _discrete_materials

MaterialWarehouse FEProblemBase::_discrete_materials
protectedinherited

◆ _displaced_mesh

MooseMesh* FEProblemBase::_displaced_mesh
protectedinherited

◆ _displaced_problem

std::shared_ptr<DisplacedProblem> FEProblemBase::_displaced_problem
protectedinherited

Definition at line 2522 of file FEProblemBase.h.

Referenced by FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addCachedJacobian(), FEProblemBase::addCachedResidual(), FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addConstraint(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDisplacedProblem(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVKernel(), FEProblemBase::addGhostedBoundary(), FEProblemBase::addIndicator(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addScalarKernel(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVariable(), FEProblemBase::advanceState(), FEProblemBase::automaticScaling(), FEProblemBase::bumpAllQRuleOrder(), FEProblemBase::bumpVolumeQRuleOrder(), FEProblemBase::cacheJacobian(), FEProblemBase::cacheJacobianNeighbor(), FEProblemBase::cacheResidual(), FEProblemBase::cacheResidualNeighbor(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::clearActiveElementalMooseVariables(), FEProblemBase::clearActiveFEVariableCoupleableMatrixTags(), FEProblemBase::clearActiveFEVariableCoupleableVectorTags(), FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags(), FEProblemBase::clearActiveScalarVariableCoupleableVectorTags(), FEProblemBase::clearDiracInfo(), computeJacobianBlocks(), FEProblemBase::computeJacobianBlocks(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::computingNonlinearResid(), FEProblemBase::createMortarInterface(), FEProblemBase::createQRules(), FEProblemBase::customSetup(), FEProblemBase::doingPRefinement(), FEProblemBase::getDiracElements(), FEProblemBase::getDisplacedProblem(), FEProblemBase::getMortarUserObjects(), FEProblemBase::ghostGhostedBoundaries(), FEProblemBase::haveADObjects(), FEProblemBase::haveDisplaced(), FEProblemBase::init(), FEProblemBase::initialSetup(), FEProblemBase::initXFEM(), FEProblemBase::jacobianSetup(), FEProblemBase::mesh(), FEProblemBase::meshChangedHelper(), FEProblemBase::outputStep(), FEProblemBase::possiblyRebuildGeomSearchPatches(), FEProblemBase::prepare(), FEProblemBase::prepareAssembly(), FEProblemBase::prepareFace(), FEProblemBase::reinitBecauseOfGhostingOrNewGeomObjects(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemFace(), FEProblemBase::reinitElemFaceRef(), FEProblemBase::reinitElemNeighborAndLowerD(), FEProblemBase::reinitLowerDElem(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborFaceRef(), FEProblemBase::reinitNode(), FEProblemBase::reinitNodeFace(), FEProblemBase::reinitNodes(), FEProblemBase::reinitNodesNeighbor(), FEProblemBase::reinitOffDiagScalars(), FEProblemBase::reinitScalars(), FEProblemBase::resetState(), FEProblemBase::residualSetup(), FEProblemBase::restoreSolutions(), FEProblemBase::setActiveElementalMooseVariables(), FEProblemBase::setActiveFEVariableCoupleableMatrixTags(), FEProblemBase::setActiveFEVariableCoupleableVectorTags(), FEProblemBase::setActiveScalarVariableCoupleableMatrixTags(), FEProblemBase::setActiveScalarVariableCoupleableVectorTags(), FEProblemBase::setCurrentBoundaryID(), FEProblemBase::setCurrentLowerDElem(), FEProblemBase::setCurrentlyComputingResidual(), FEProblemBase::setCurrentSubdomainID(), FEProblemBase::setNeighborSubdomainID(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), solve(), FEProblemBase::solve(), FEProblemBase::timestepSetup(), FEProblemBase::uniformRefine(), and FEProblemBase::updateGeomSearch().

◆ _do_free_power_iteration

bool EigenProblem::_do_free_power_iteration
protected

Whether or not we are doing free power iteration.

Free power iteration is often used to compute initial guess for Newton eigen solver. It is automatically triggered by Eigenvalue Executioner

Definition at line 257 of file EigenProblem.h.

Referenced by doFreePowerIteration().

◆ _dt

Real& FEProblemBase::_dt
protectedinherited

◆ _dt_old

Real& FEProblemBase::_dt_old
protectedinherited

Definition at line 2309 of file FEProblemBase.h.

Referenced by FEProblemBase::dtOld(), and FEProblemBase::FEProblemBase().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 61 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_evaluable_local_elem_range
protectedinherited

◆ _exception_message

std::string FEProblemBase::_exception_message
protectedinherited

The error message to go with an exception.

Definition at line 2619 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), and FEProblemBase::setException().

◆ _factory

Factory& SubProblem::_factory
protectedinherited

◆ _fe_matrix_tags

std::set<TagID> FEProblemBase::_fe_matrix_tags
protectedinherited

◆ _fe_vector_tags

std::set<TagID> FEProblemBase::_fe_vector_tags
protectedinherited

◆ _first_solve

bool& EigenProblem::_first_solve
protected

A flag to indicate if it is the first time calling the solve.

Definition at line 274 of file EigenProblem.h.

Referenced by solve().

◆ _from_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_from_multi_app_transfers
protectedinherited

◆ _functions

MooseObjectWarehouse<Function> FEProblemBase::_functions
protectedinherited

◆ _fv_bcs_integrity_check

bool FEProblemBase::_fv_bcs_integrity_check
protectedinherited

Whether to check overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset.

Definition at line 2589 of file FEProblemBase.h.

Referenced by FEProblemBase::fvBCsIntegrityCheck().

◆ _fv_ics

FVInitialConditionWarehouse FEProblemBase::_fv_ics
protectedinherited

◆ _generalized_eigenvalue_problem

bool EigenProblem::_generalized_eigenvalue_problem
protected

Definition at line 244 of file EigenProblem.h.

Referenced by isGeneralizedEigenvalueProblem().

◆ _geometric_search_data

GeometricSearchData FEProblemBase::_geometric_search_data
protectedinherited

◆ _ghosted_elems

std::set<dof_id_type> SubProblem::_ghosted_elems
protectedinherited

◆ _grad_phi_zero

std::vector<VariablePhiGradient> FEProblemBase::_grad_phi_zero
inherited

◆ _grad_zero

std::vector<VariableGradient> FEProblemBase::_grad_zero
inherited

◆ _has_active_elemental_moose_variables

std::vector<unsigned int> SubProblem::_has_active_elemental_moose_variables
protectedinherited

Whether or not there is currently a list of active elemental moose variables.

Definition at line 1046 of file SubProblem.h.

Referenced by SubProblem::clearActiveElementalMooseVariables(), SubProblem::hasActiveElementalMooseVariables(), SubProblem::setActiveElementalMooseVariables(), and SubProblem::SubProblem().

◆ _has_active_material_properties

std::vector<unsigned char> FEProblemBase::_has_active_material_properties
protectedinherited

◆ _has_constraints

bool FEProblemBase::_has_constraints
protectedinherited

Whether or not this system has any Constraints.

Definition at line 2540 of file FEProblemBase.h.

Referenced by FEProblemBase::addConstraint(), NonlinearSystemBase::computeJacobianInternal(), and NonlinearSystemBase::computeResidualInternal().

◆ _has_dampers

bool FEProblemBase::_has_dampers
protectedinherited

Whether or not this system has any Dampers associated with it.

Definition at line 2537 of file FEProblemBase.h.

Referenced by FEProblemBase::addDamper(), FEProblemBase::computeDamping(), FEProblemBase::computePostCheck(), and FEProblemBase::hasDampers().

◆ _has_exception

bool FEProblemBase::_has_exception
protectedinherited

Whether or not an exception has occurred.

Definition at line 2607 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::hasException(), and FEProblemBase::setException().

◆ _has_initialized_stateful

bool FEProblemBase::_has_initialized_stateful
protectedinherited

Whether nor not stateful materials have been initialized.

Definition at line 2552 of file FEProblemBase.h.

Referenced by FEProblemBase::initialSetup(), and FEProblemBase::meshChangedHelper().

◆ _has_jacobian

bool FEProblemBase::_has_jacobian
protectedinherited

Indicates if the Jacobian was computed.

Definition at line 2558 of file FEProblemBase.h.

Referenced by FEProblemBase::computeJacobianTags(), FEProblemBase::hasJacobian(), FEProblemBase::meshChangedHelper(), and FEProblemBase::prepare().

◆ _has_nonlocal_coupling

bool FEProblemBase::_has_nonlocal_coupling
protectedinherited

◆ _has_normalization

bool EigenProblem::_has_normalization
protected

Whether or not we normalize eigenvector.

Definition at line 267 of file EigenProblem.h.

Referenced by postScaleEigenVector(), and setNormalization().

◆ _has_time_integrator

bool FEProblemBase::_has_time_integrator
protectedinherited

Indicates whether or not this executioner has a time integrator (during setup)

Definition at line 2604 of file FEProblemBase.h.

Referenced by FEProblemBase::addTimeIntegrator(), and FEProblemBase::hasTimeIntegrator().

◆ _have_ad_objects

bool SubProblem::_have_ad_objects
protectedinherited

AD flag indicating whether any AD objects have been added.

Definition at line 1084 of file SubProblem.h.

Referenced by DisplacedProblem::haveADObjects(), SubProblem::haveADObjects(), and FEProblemBase::haveADObjects().

◆ _ics

InitialConditionWarehouse FEProblemBase::_ics
protectedinherited

◆ _indicators

MooseObjectWarehouse<Indicator> FEProblemBase::_indicators
protectedinherited

◆ _initial_eigenvalue

Real EigenProblem::_initial_eigenvalue
protected

A value used for initial normalization.

Definition at line 276 of file EigenProblem.h.

Referenced by execute(), and setInitialEigenvalue().

◆ _initialized

bool FEProblemBase::_initialized
protectedinherited

Definition at line 2289 of file FEProblemBase.h.

Referenced by FEProblemBase::init().

◆ _input_file_saved

bool FEProblemBase::_input_file_saved
protectedinherited

whether input file has been written

Definition at line 2534 of file FEProblemBase.h.

◆ _interface_mat_side_cache

std::vector<std::unordered_map<BoundaryID, bool> > FEProblemBase::_interface_mat_side_cache
protectedinherited

Cache for calculating materials on interface.

Definition at line 2458 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::needInterfaceMaterialOnSide().

◆ _interface_materials

MaterialWarehouse FEProblemBase::_interface_materials
protectedinherited

◆ _internal_side_indicators

MooseObjectWarehouse<InternalSideIndicator> FEProblemBase::_internal_side_indicators
protectedinherited

◆ _is_petsc_options_inserted

bool FEProblemBase::_is_petsc_options_inserted
protectedinherited

If or not PETSc options have been added to database.

Definition at line 2634 of file FEProblemBase.h.

Referenced by FEProblemBase::petscOptionsInserted(), FEProblemBase::solve(), and FEProblemBase::solveLinearSystem().

◆ _kernel_coverage_check

bool FEProblemBase::_kernel_coverage_check
protectedinherited

Determines whether a check to verify an active kernel on every subdomain.

Definition at line 2575 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity(), and FEProblemBase::setKernelCoverageCheck().

◆ _line_search

std::shared_ptr<LineSearch> FEProblemBase::_line_search
protectedinherited

◆ _linear_matrix_tags

std::set<TagID> FEProblemBase::_linear_matrix_tags
protectedinherited

Temporary storage for filtered matrix tags for linear systems.

Definition at line 2299 of file FEProblemBase.h.

Referenced by FEProblemBase::computeLinearSystemSys().

◆ _linear_sys_name_to_num

std::map<LinearSystemName, unsigned int> FEProblemBase::_linear_sys_name_to_num
protectedinherited

Map from linear system name to number.

Definition at line 2331 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::linearSysNum().

◆ _linear_sys_names

const std::vector<LinearSystemName> FEProblemBase::_linear_sys_names
protectedinherited

The linear system names.

Definition at line 2322 of file FEProblemBase.h.

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

◆ _linear_systems

std::vector<std::shared_ptr<LinearSystem> > FEProblemBase::_linear_systems
protectedinherited

◆ _linear_vector_tags

std::set<TagID> FEProblemBase::_linear_vector_tags
protectedinherited

Temporary storage for filtered vector tags for linear systems.

Definition at line 2296 of file FEProblemBase.h.

Referenced by FEProblemBase::computeLinearSystemSys().

◆ _map_block_material_props

std::map<SubdomainID, std::set<std::string> > SubProblem::_map_block_material_props
protectedinherited

Map of material properties (block_id -> list of properties)

Definition at line 1019 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 1037 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 1022 of file SubProblem.h.

Referenced by SubProblem::checkBoundaryMatProps(), SubProblem::getMaterialPropertyBoundaryIDs(), SubProblem::hasBoundaryMaterialProperty(), and SubProblem::storeBoundaryMatPropName().

◆ _map_boundary_material_props_check

std::map<BoundaryID, std::multimap<std::string, std::string> > SubProblem::_map_boundary_material_props_check
protectedinherited

◆ _markers

MooseObjectWarehouse<Marker> FEProblemBase::_markers
protectedinherited

◆ _material_coverage_check

bool FEProblemBase::_material_coverage_check
protectedinherited

Determines whether a check to verify an active material on every subdomain.

Definition at line 2586 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity(), and FEProblemBase::setMaterialCoverageCheck().

◆ _material_dependency_check

const bool FEProblemBase::_material_dependency_check
protectedinherited

Determines whether a check to verify material dependencies on every subdomain.

Definition at line 2592 of file FEProblemBase.h.

Referenced by FEProblemBase::checkProblemIntegrity().

◆ _material_prop_registry

MaterialPropertyRegistry FEProblemBase::_material_prop_registry
protectedinherited

Definition at line 2402 of file FEProblemBase.h.

Referenced by FEProblemBase::getMaterialPropertyRegistry().

◆ _material_property_requested

std::set<std::string> SubProblem::_material_property_requested
protectedinherited

set containing all material property names that have been requested by getMaterialProperty*

Definition at line 1029 of file SubProblem.h.

Referenced by SubProblem::isMatPropRequested(), and SubProblem::markMatPropRequested().

◆ _material_props

MaterialPropertyStorage& FEProblemBase::_material_props
protectedinherited

◆ _materials

MaterialWarehouse FEProblemBase::_materials
protectedinherited

◆ _matrices_formed

bool EigenProblem::_matrices_formed
protected

Whether or not matrices had been formed.

Definition at line 263 of file EigenProblem.h.

Referenced by solve(), and wereMatricesFormed().

◆ _matrix_tag_id_to_tag_name

std::map<TagID, TagName> SubProblem::_matrix_tag_id_to_tag_name
protectedinherited

Reverse map.

Definition at line 1009 of file SubProblem.h.

Referenced by SubProblem::addMatrixTag(), SubProblem::matrixTagExists(), and SubProblem::matrixTagName().

◆ _matrix_tag_name_to_tag_id

std::map<TagName, TagID> SubProblem::_matrix_tag_name_to_tag_id
protectedinherited

◆ _max_qps

unsigned int FEProblemBase::_max_qps
protectedinherited

Maximum number of quadrature points used in the problem.

Definition at line 2598 of file FEProblemBase.h.

Referenced by FEProblemBase::getMaxQps(), FEProblemBase::reinitDirac(), and FEProblemBase::updateMaxQps().

◆ _max_scalar_order

Order FEProblemBase::_max_scalar_order
protectedinherited

Maximum scalar variable order.

Definition at line 2601 of file FEProblemBase.h.

Referenced by FEProblemBase::addAuxScalarVariable(), and FEProblemBase::getMaxScalarOrder().

◆ _mesh

MooseMesh& FEProblemBase::_mesh
protectedinherited

◆ _mesh_divisions

MooseObjectWarehouse<MeshDivision> FEProblemBase::_mesh_divisions
protectedinherited

Warehouse to store mesh divisions NOTE: this could probably be moved to the MooseMesh instead of the Problem Time (and people's uses) will tell where this fits best.

Definition at line 2382 of file FEProblemBase.h.

Referenced by FEProblemBase::addMeshDivision(), and FEProblemBase::getMeshDivision().

◆ _mortar_data

MortarData FEProblemBase::_mortar_data
protectedinherited

◆ _multi_apps

ExecuteMooseObjectWarehouse<MultiApp> FEProblemBase::_multi_apps
protectedinherited

◆ _n_eigen_pairs_required

unsigned int EigenProblem::_n_eigen_pairs_required
protected

Definition at line 243 of file EigenProblem.h.

Referenced by getNEigenPairsRequired(), and setNEigenPairsRequired().

◆ _n_max_nl_pingpong

unsigned int FEProblemBase::_n_max_nl_pingpong = std::numeric_limits<unsigned int>::max()
protectedinherited

◆ _n_nl_pingpong

unsigned int FEProblemBase::_n_nl_pingpong = 0
protectedinherited

maximum numbver

Definition at line 2312 of file FEProblemBase.h.

Referenced by FEProblemBase::checkNonlinearConvergence().

◆ _name

const std::string MooseBase::_name
protectedinherited

The name of this class.

Definition at line 90 of file MooseBase.h.

Referenced by AddBCAction::act(), AddDamperAction::act(), AddMeshGeneratorAction::act(), AddInterfaceKernelAction::act(), AddMarkerAction::act(), AddInitialConditionAction::act(), AddPostprocessorAction::act(), AddDGKernelAction::act(), AddMaterialAction::act(), AddFVInterfaceKernelAction::act(), AddConstraintAction::act(), AddTransferAction::act(), AddNodalKernelAction::act(), AddScalarKernelAction::act(), PartitionerAction::act(), AddFunctorMaterialAction::act(), AddKernelAction::act(), AddIndicatorAction::act(), AddDiracKernelAction::act(), AddUserObjectAction::act(), ReadExecutorParamsAction::act(), AddMultiAppAction::act(), AddVectorPostprocessorAction::act(), AddFVInitialConditionAction::act(), AddReporterAction::act(), AddFieldSplitAction::act(), AddTimesAction::act(), AddPositionsAction::act(), AddFVBCAction::act(), AddFVKernelAction::act(), SetupTimeIntegratorAction::act(), AddFunctionAction::act(), AddMeshDivisionAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::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
protectedinherited

Indicates that we need to compute variable values for previous Newton iteration.

Definition at line 2561 of file FEProblemBase.h.

◆ _negative_sign_eigen_kernel

bool EigenProblem::_negative_sign_eigen_kernel
protected

Whether or not use negative sign for Bx.

Use negative sign by default to make the eigen system consistent with nonlinear system

Definition at line 249 of file EigenProblem.h.

Referenced by computeResidualL2Norm(), and negativeSignEigenKernel().

◆ _neighbor_material_props

MaterialPropertyStorage& FEProblemBase::_neighbor_material_props
protectedinherited

◆ _nl

std::vector<std::shared_ptr<NonlinearSystemBase> > FEProblemBase::_nl
private

The nonlinear systems.

Definition at line 2346 of file FEProblemBase.h.

◆ _nl_abs_div_tol

Real FEProblemBase::_nl_abs_div_tol = -1
protectedinherited

the absolute non linear divergence tolerance

Definition at line 2319 of file FEProblemBase.h.

Referenced by FEProblemBase::checkNonlinearConvergence(), and FEProblemBase::setNonlinearAbsoluteDivergenceTolerance().

◆ _nl_eigen

std::shared_ptr<NonlinearEigenSystem> EigenProblem::_nl_eigen
protected

◆ _nl_evaluable_local_elem_range

std::unique_ptr<ConstElemRange> FEProblemBase::_nl_evaluable_local_elem_range
protectedinherited

◆ _nl_forced_its

int FEProblemBase::_nl_forced_its = 0
protectedinherited

◆ _nl_sys_name_to_num

std::map<NonlinearSystemName, unsigned int> FEProblemBase::_nl_sys_name_to_num
protectedinherited

Map from nonlinear system name to number.

Definition at line 2349 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::nlSysNum().

◆ _nl_sys_names

const std::vector<NonlinearSystemName> FEProblemBase::_nl_sys_names
protectedinherited

The nonlinear system names.

Definition at line 2340 of file FEProblemBase.h.

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

◆ _nonlocal_cm

std::vector<CouplingMatrix> SubProblem::_nonlocal_cm
protectedinherited

◆ _nonlocal_integrated_bcs

MooseObjectWarehouse<IntegratedBCBase> FEProblemBase::_nonlocal_integrated_bcs
protectedinherited

◆ _nonlocal_kernels

MooseObjectWarehouse<KernelBase> FEProblemBase::_nonlocal_kernels
protectedinherited

◆ _normal_factor

Real EigenProblem::_normal_factor
protected

Postprocessor target value.

The value of postprocessor should equal to '_normal_factor' by adjusting eigenvector

Definition at line 272 of file EigenProblem.h.

Referenced by postScaleEigenVector(), and setNormalization().

◆ _normalization

PostprocessorName EigenProblem::_normalization
protected

Postprocessor used to compute a factor from eigenvector.

Definition at line 269 of file EigenProblem.h.

Referenced by postScaleEigenVector(), and setNormalization().

◆ _notify_when_mesh_changes

std::vector<MeshChangedInterface *> FEProblemBase::_notify_when_mesh_changes
protectedinherited

Objects to be notified when the mesh changes.

Definition at line 2461 of file FEProblemBase.h.

Referenced by FEProblemBase::meshChangedHelper(), and FEProblemBase::notifyWhenMeshChanges().

◆ _num_linear_sys

const std::size_t FEProblemBase::_num_linear_sys
protectedinherited

The number of linear systems.

Definition at line 2325 of file FEProblemBase.h.

Referenced by FEProblem::FEProblem(), FEProblemBase::numLinearSystems(), and FEProblemBase::numSolverSystems().

◆ _num_nl_sys

const std::size_t FEProblemBase::_num_nl_sys
protectedinherited

◆ _on_linear_solver

bool EigenProblem::_on_linear_solver
protected

Whether or not we are in linear solver.

Definition at line 261 of file EigenProblem.h.

Referenced by onLinearSolver().

◆ _output_inverse_eigenvalue

bool EigenProblem::_output_inverse_eigenvalue
protected

Whether or not output eigenvalue as its inverse. By default, we output regular eigenvalue.

Definition at line 259 of file EigenProblem.h.

Referenced by outputInverseEigenvalue().

◆ _parallel_barrier_messaging

bool FEProblemBase::_parallel_barrier_messaging
protectedinherited

◆ _pars

const InputParameters& MooseBaseParameterInterface::_pars
protectedinherited

Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

Definition at line 162 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(), 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::MooseBaseParameterInterface(), 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
protectedinherited

◆ _petsc_options

Moose::PetscSupport::PetscOptions FEProblemBase::_petsc_options
protectedinherited

PETSc option storage.

Definition at line 2628 of file FEProblemBase.h.

Referenced by FEProblemBase::getPetscOptions(), FEProblemBase::solve(), and FEProblemBase::solveLinearSystem().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _phi_zero

std::vector<VariablePhiValue> FEProblemBase::_phi_zero
inherited

◆ _point_zero

std::vector<Point> FEProblemBase::_point_zero
inherited

Definition at line 1865 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 127 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _random_data_objects

std::map<std::string, std::unique_ptr<RandomData> > FEProblemBase::_random_data_objects
protectedinherited

◆ _real_zero

std::vector<Real> FEProblemBase::_real_zero
inherited

Convenience zeros.

Definition at line 1854 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase().

◆ _reinit_displaced_elem

bool FEProblemBase::_reinit_displaced_elem
protectedinherited

◆ _reinit_displaced_face

bool FEProblemBase::_reinit_displaced_face
protectedinherited

◆ _reinit_displaced_neighbor

bool FEProblemBase::_reinit_displaced_neighbor
protectedinherited

◆ _reporter_data

ReporterData FEProblemBase::_reporter_data
protectedinherited

◆ _requires_nonlocal_coupling

bool SubProblem::_requires_nonlocal_coupling
protectedinherited

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 227 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 236 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 230 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 233 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _safe_access_tagged_matrices

bool SubProblem::_safe_access_tagged_matrices
protectedinherited

◆ _safe_access_tagged_vectors

bool SubProblem::_safe_access_tagged_vectors
protectedinherited

◆ _scalar_ics

ScalarInitialConditionWarehouse FEProblemBase::_scalar_ics
protectedinherited

◆ _scalar_zero

std::vector<VariableValue> FEProblemBase::_scalar_zero
inherited

◆ _second_phi_zero

std::vector<VariablePhiSecond> FEProblemBase::_second_phi_zero
inherited

◆ _second_zero

std::vector<VariableSecond> FEProblemBase::_second_zero
inherited

◆ _skip_exception_check

bool FEProblemBase::_skip_exception_check
protectedinherited

If or not skip 'exception and stop solve'.

Definition at line 2546 of file FEProblemBase.h.

Referenced by FEProblemBase::checkExceptionAndStopSolve(), FEProblemBase::initialSetup(), and FEProblemBase::skipExceptionCheck().

◆ _snesmf_reuse_base

bool FEProblemBase::_snesmf_reuse_base
protectedinherited

If or not to resuse the base vector for matrix-free calculation.

Definition at line 2543 of file FEProblemBase.h.

Referenced by FEProblemBase::setSNESMFReuseBase(), and FEProblemBase::useSNESMFReuseBase().

◆ _snesmf_reuse_base_set_by_user

bool FEProblemBase::_snesmf_reuse_base_set_by_user
protectedinherited

If or not _snesmf_reuse_base is set by user.

Definition at line 2549 of file FEProblemBase.h.

Referenced by FEProblemBase::isSNESMFReuseBaseSetbyUser(), and FEProblemBase::setSNESMFReuseBase().

◆ _solve

const bool& FEProblemBase::_solve
protectedinherited

◆ _solver_params

SolverParams FEProblemBase::_solver_params
protectedinherited

Definition at line 2572 of file FEProblemBase.h.

Referenced by FEProblemBase::solve(), and FEProblemBase::solverParams().

◆ _solver_sys_name_to_num

std::map<SolverSystemName, unsigned int> FEProblemBase::_solver_sys_name_to_num
protectedinherited

Map connecting solver system names with their respective systems.

Definition at line 2364 of file FEProblemBase.h.

Referenced by FEProblemBase::FEProblemBase(), and FEProblemBase::solverSysNum().

◆ _solver_systems

std::vector<std::shared_ptr<SolverSystem> > FEProblemBase::_solver_systems
protectedinherited

◆ _solver_var_to_sys_num

std::map<SolverVariableName, unsigned int> FEProblemBase::_solver_var_to_sys_num
protectedinherited

Map connecting variable names with their respective solver systems.

Definition at line 2361 of file FEProblemBase.h.

Referenced by FEProblemBase::addVariable(), and FEProblemBase::determineSolverSystem().

◆ _subspace_dim

std::map<std::string, unsigned int> FEProblemBase::_subspace_dim
protectedinherited

Dimension of the subspace spanned by the vectors with a given prefix.

Definition at line 2373 of file FEProblemBase.h.

Referenced by FEProblemBase::initNullSpaceVectors(), and FEProblemBase::subspaceDim().

◆ _t_step

int& FEProblemBase::_t_step
protectedinherited

◆ _termination_requested

bool Problem::_termination_requested
protectedinherited

True if termination of the solve has been requested.

Definition at line 58 of file Problem.h.

Referenced by Problem::isSolveTerminationRequested(), and Problem::terminateSolve().

◆ _time

Real& FEProblemBase::_time
protectedinherited

◆ _time_old

Real& FEProblemBase::_time_old
protectedinherited

◆ _to_multi_app_transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_to_multi_app_transfers
protectedinherited

◆ _transfers

ExecuteMooseObjectWarehouse<Transfer> FEProblemBase::_transfers
protectedinherited

◆ _transient

bool FEProblemBase::_transient
protectedinherited

Definition at line 2304 of file FEProblemBase.h.

Referenced by FEProblemBase::isTransient(), and FEProblemBase::transient().

◆ _transient_multi_apps

ExecuteMooseObjectWarehouse<TransientMultiApp> FEProblemBase::_transient_multi_apps
protectedinherited

Storage for TransientMultiApps (only needed for calling 'computeDT')

Definition at line 2434 of file FEProblemBase.h.

Referenced by FEProblemBase::addMultiApp(), FEProblemBase::computeMultiAppsDT(), and FEProblemBase::updateActiveObjects().

◆ _type

const std::string MooseBase::_type
protectedinherited

◆ _uo_aux_state_check

const bool FEProblemBase::_uo_aux_state_check
protectedinherited

Whether or not checking the state of uo/aux evaluation.

Definition at line 2595 of file FEProblemBase.h.

Referenced by FEProblemBase::execute(), and FEProblemBase::hasUOAuxStateCheck().

◆ _uo_jacobian_moose_vars

std::vector<std::vector<const MooseVariableFEBase *> > FEProblemBase::_uo_jacobian_moose_vars
protectedinherited

◆ _using_ad_mat_props

bool FEProblemBase::_using_ad_mat_props
protectedinherited

Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property.

Definition at line 2644 of file FEProblemBase.h.

◆ _using_default_nl

const bool FEProblemBase::_using_default_nl
protectedinherited

Boolean to check if we have the default nonlinear system.

Definition at line 2337 of file FEProblemBase.h.

◆ _var_dof_map

std::map<std::string, std::vector<dof_id_type> > SubProblem::_var_dof_map
inherited

◆ _vector_curl_zero

std::vector<VectorVariableCurl> FEProblemBase::_vector_curl_zero
inherited

◆ _vector_zero

std::vector<VectorVariableValue> FEProblemBase::_vector_zero
inherited

◆ _verbose_multiapps

bool FEProblemBase::_verbose_multiapps
protectedinherited

◆ _verbose_setup

bool FEProblemBase::_verbose_setup
protectedinherited

Whether or not to be verbose during setup.

Definition at line 2613 of file FEProblemBase.h.

Referenced by FEProblemBase::logAdd(), and FEProblemBase::setVerboseProblem().

◆ _xfem

std::shared_ptr<XFEMInterface> FEProblemBase::_xfem
protectedinherited

Pointer to XFEM controller.

Definition at line 2518 of file FEProblemBase.h.

Referenced by FEProblemBase::getXFEM(), FEProblemBase::haveXFEM(), FEProblemBase::initXFEM(), and FEProblemBase::updateMeshXFEM().

◆ _zero

std::vector<VariableValue> FEProblemBase::_zero
inherited

◆ _zero_block_material_props

std::map<SubdomainID, std::set<MaterialPropertyName> > SubProblem::_zero_block_material_props
protectedinherited

Set of properties returned as zero properties.

Definition at line 1025 of file SubProblem.h.

Referenced by SubProblem::checkBlockMatProps(), FEProblemBase::checkDependMaterialsHelper(), and SubProblem::storeSubdomainZeroMatProp().

◆ _zero_boundary_material_props

std::map<BoundaryID, std::set<MaterialPropertyName> > SubProblem::_zero_boundary_material_props
protectedinherited

The documentation for this class was generated from the following files: