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

Specialization of FEProblem to run with component subsystem. More...

#include <THMProblem.h>

Inheritance diagram for THMProblem:
[legend]

Public Types

enum  CoverageCheckMode
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 THMProblem (const InputParameters &parameters)
 
virtual void advanceState () override
 
virtual void copySolutionsBackwards () override
 
virtual bool hasPostprocessor (const std::string &name) const
 Check if a postprocessor with a given name exists in the simulation.
 
virtual bool getUseNonlinear () const
 
virtual void setUseNonlinear (bool use_nonlinear)
 
virtual void setInputParametersFEProblem (InputParameters &parameters) override
 
virtual NonlinearSystem & getNonlinearSystem (const unsigned int nl_sys_num) override
 
virtual void addLineSearch (const InputParameters &parameters) override
 
virtual void init () override
 
bool initialized () const
 
virtual libMesh::EquationSystems & es () override
 
virtual MooseMesh & mesh () override
 
virtual const MooseMesh & mesh () const override
 
const MooseMesh & mesh (bool use_displaced) const override
 
MooseMesh & mesh (bool use_displaced)
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setCoupling (Moose::CouplingType type)
 
Moose::CouplingType coupling () const
 
void setCouplingMatrix (std::unique_ptr< libMesh::CouplingMatrix > cm, const unsigned int nl_sys_num)
 
void setCouplingMatrix (libMesh::CouplingMatrix *cm, const unsigned int nl_sys_num)
 
const libMesh::CouplingMatrix * couplingMatrix (const unsigned int nl_sys_num) const override
 
void setNonlocalCouplingMatrix ()
 
bool areCoupled (const unsigned int ivar, const unsigned int jvar, const unsigned int nl_sys_num) const
 
bool hasUOAuxStateCheck () const
 
bool checkingUOAuxState () const
 
virtual bool checkResidualForNans () const override
 
void setCheckResidualForNans (bool check_residual_for_nans)
 
void trustUserCouplingMatrix ()
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & nonlocalCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > & fieldScalarCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num) const
 
virtual bool hasVariable (const std::string &var_name) const override
 
bool hasSolverVariable (const std::string &var_name) const
 
virtual const MooseVariableFieldBase & getVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
 
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
 
virtual MooseVariableFieldBase & getVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
MooseVariableFieldBase & getActualFieldVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual MooseVariable & getStandardVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual VectorMooseVariable & getVectorVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual ArrayMooseVariable & getArrayVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 
virtual MooseVariableScalar & getScalarVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual libMesh::System & getSystem (const std::string &var_name) override
 
const RestartableEquationSystems & getRestartableEquationSystems () const
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase * > &moose_vars, const THREAD_ID tid) override
 
virtual void clearActiveElementalMooseVariables (const THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableVectorTags (std::set< TagID > &vtags, const THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableMatrixTags (std::set< TagID > &mtags, const THREAD_ID tid) override
 
virtual void createQRules (libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
 
void bumpVolumeQRuleOrder (libMesh::Order order, SubdomainID block)
 
void bumpAllQRuleOrder (libMesh::Order order, SubdomainID block)
 
unsigned int getMaxQps () const
 
libMesh::Order getMaxScalarOrder () const
 
void checkNonlocalCoupling ()
 
void checkUserObjectJacobianRequirement (THREAD_ID tid)
 
void setVariableAllDoFMap (const std::vector< const MooseVariableFEBase * > &moose_vars)
 
const std::vector< const MooseVariableFEBase * > & getUserObjectJacobianVariables (const THREAD_ID tid) const
 
virtual Assembly & assembly (const THREAD_ID tid, const unsigned int sys_num) override
 
virtual const Assembly & assembly (const THREAD_ID tid, const unsigned int sys_num) const override
 
Moose::Kokkos::Assembly & kokkosAssembly ()
 
const Moose::Kokkos::Assembly & kokkosAssembly () const
 
virtual std::vector< VariableName > getVariableNames ()
 
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 prepareAssemblyNeighbor (const THREAD_ID tid)
 
virtual void addGhostedElem (dof_id_type elem_id) override
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 
virtual void ghostGhostedBoundaries () override
 
virtual void sizeZeroes (unsigned int size, const THREAD_ID tid)
 
virtual bool reinitDirac (const Elem *elem, const THREAD_ID tid) override
 
virtual void reinitElem (const Elem *elem, const THREAD_ID tid) override
 
virtual void reinitElemPhys (const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
 
void reinitElemFace (const Elem *elem, unsigned int side, BoundaryID, const THREAD_ID tid)
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitLowerDElem (const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 
virtual void reinitNode (const Node *node, const THREAD_ID tid) override
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
 
virtual void reinitNeighbor (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitElemNeighborAndLowerD (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitScalars (const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
 
virtual void reinitOffDiagScalars (const THREAD_ID tid) override
 
virtual void getDiracElements (std::set< const Elem * > &elems) override
 
virtual void clearDiracInfo () override
 
virtual void subdomainSetup (SubdomainID subdomain, const THREAD_ID tid)
 
virtual void neighborSubdomainSetup (SubdomainID subdomain, const THREAD_ID tid)
 
virtual void newAssemblyArray (std::vector< std::shared_ptr< SolverSystem > > &solver_systems)
 
virtual void initNullSpaceVectors (const InputParameters &parameters, std::vector< std::shared_ptr< NonlinearSystemBase > > &nl)
 
virtual void solve (const unsigned int nl_sys_num)
 
void initKokkos ()
 
virtual void solveLinearSystem (const unsigned int linear_sys_num, const Moose::PetscSupport::PetscOptions *po=nullptr)
 
virtual void setException (const std::string &message)
 
virtual bool hasException ()
 
virtual void checkExceptionAndStopSolve (bool print_message=true)
 
virtual bool solverSystemConverged (const unsigned int solver_sys_num) override
 
virtual unsigned int nNonlinearIterations (const unsigned int nl_sys_num) const override
 
virtual unsigned int nLinearIterations (const unsigned int nl_sys_num) const override
 
virtual Real finalNonlinearResidual (const unsigned int nl_sys_num) const override
 
virtual bool computingPreSMOResidual (const unsigned int nl_sys_num) const override
 
virtual std::string solverTypeString (unsigned int solver_sys_num=0)
 
virtual bool startedInitialSetup ()
 
virtual void onTimestepBegin () override
 
virtual void onTimestepEnd () override
 
virtual Real & time () const
 
virtual Real & timeOld () const
 
virtual Real & timeOlder () const
 
virtual int & timeStep () const
 
virtual Real & dt () const
 
virtual Real & dtOld () const
 
Real getTimeFromStateArg (const Moose::StateArg &state) const
 
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)
 
void skipNextForwardSolutionCopyToOld ()
 
virtual void restoreSolutions ()
 
void backupGeometricSearchState ()
 
void restoreGeometricSearchState ()
 
virtual void saveOldSolutions ()
 
virtual void restoreOldSolutions ()
 
void needSolutionState (unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
 
bool hasSolutionState (unsigned int state, Moose::SolutionIterationType iteration_type) const
 
virtual void outputStep (ExecFlagType type)
 
virtual void postExecute ()
 
void forceOutput ()
 
virtual void initPetscOutputAndSomeSolverSettings ()
 
Moose::PetscSupport::PetscOptions & getPetscOptions ()
 
void logAdd (const std::string &system, const std::string &name, const std::string &type, const InputParameters &params) const
 
virtual void addFunction (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual bool hasFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual Function & getFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual void addKokkosFunction (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual bool hasKokkosFunction (const std::string &name) const
 
virtual Moose::Kokkos::Function getKokkosFunction (const std::string &name)
 
T & getKokkosFunction (const std::string &name)
 
virtual void addMeshDivision (const std::string &type, const std::string &name, InputParameters &params)
 
MeshDivision & getMeshDivision (const std::string &name, const THREAD_ID tid=0) const
 
virtual void addConvergence (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual Convergence & getConvergence (const std::string &name, const THREAD_ID tid=0) const
 
virtual const std::vector< std::shared_ptr< Convergence > > & getConvergenceObjects (const THREAD_ID tid=0) const
 
virtual bool hasConvergence (const std::string &name, const THREAD_ID tid=0) const
 
bool needToAddDefaultNonlinearConvergence () const
 
bool needToAddDefaultMultiAppFixedPointConvergence () const
 
bool needToAddDefaultSteadyStateConvergence () const
 
void setNeedToAddDefaultNonlinearConvergence ()
 
void setNeedToAddDefaultMultiAppFixedPointConvergence ()
 
void setNeedToAddDefaultSteadyStateConvergence ()
 
bool hasSetMultiAppFixedPointConvergenceName () const
 
bool hasSetSteadyStateConvergenceName () const
 
virtual void addDefaultNonlinearConvergence (const InputParameters &params)
 
virtual bool onlyAllowDefaultNonlinearConvergence () const
 
void addDefaultMultiAppFixedPointConvergence (const InputParameters &params)
 
void addDefaultSteadyStateConvergence (const InputParameters &params)
 
virtual void lineSearch ()
 
LineSearch * getLineSearch () override
 
virtual void addDistribution (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual bool hasDistribution (const std::string &name) const
 
virtual Distribution & getDistribution (const std::string &name)
 
virtual void addSampler (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual Sampler & getSampler (const std::string &name, const THREAD_ID tid=0)
 
NonlinearSystemBase & getNonlinearSystemBase (const unsigned int sys_num)
 
const NonlinearSystemBase & getNonlinearSystemBase (const unsigned int sys_num) const
 
void setCurrentNonlinearSystem (const unsigned int nl_sys_num)
 
NonlinearSystemBase & currentNonlinearSystem ()
 
const NonlinearSystemBase & currentNonlinearSystem () const
 
virtual const SystemBase & systemBaseNonlinear (const unsigned int sys_num) const override
 
virtual SystemBase & systemBaseNonlinear (const unsigned int sys_num) override
 
virtual const SystemBase & systemBaseSolver (const unsigned int sys_num) const override
 
virtual SystemBase & systemBaseSolver (const unsigned int sys_num) override
 
virtual const SystemBase & systemBaseAuxiliary () const override
 
virtual SystemBase & systemBaseAuxiliary () override
 
virtual const SystemBase & getSystemBase (const unsigned int sys_num) const
 
virtual SystemBase & getSystemBase (const unsigned int sys_num)
 
SystemBase & getSystemBase (const std::string &sys_name)
 
LinearSystem & getLinearSystem (unsigned int sys_num)
 
const LinearSystem & getLinearSystem (unsigned int sys_num) const
 
SolverSystem & getSolverSystem (unsigned int sys_num)
 
const SolverSystem & getSolverSystem (unsigned int sys_num) const
 
void setCurrentLinearSystem (unsigned int sys_num)
 
LinearSystem & currentLinearSystem ()
 
const LinearSystem & currentLinearSystem () const
 
virtual const SystemBase & systemBaseLinear (unsigned int sys_num) const override
 
virtual SystemBase & systemBaseLinear (unsigned int sys_num) override
 
virtual void addVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 
virtual void addKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addHDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosNodalKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosBoundaryCondition (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosLinearFVBC (const std::string &bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addConstraint (const std::string &c_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 
virtual void addAuxVariable (const std::string &var_name, const libMesh::FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addElementalFieldVariable (const std::string &var_type, const std::string &var_name, InputParameters &params)
 
virtual void addAuxArrayVariable (const std::string &var_name, const libMesh::FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxScalarVariable (const std::string &var_name, libMesh::Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
AuxiliarySystem & getAuxiliarySystem ()
 
virtual void addDiracKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInterfaceKernel (const std::string &fv_ik_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
void projectSolution ()
 
unsigned short getCurrentICState ()
 
void projectInitialConditionOnCustomRange (libMesh::ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range, const std::optional< std::set< VariableName > > &target_vars=std::nullopt)
 
void projectFunctionOnCustomRange (ConstElemRange &elem_range, Number(*func)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), Gradient(*func_grad)(const Point &, const libMesh::Parameters &, const std::string &, const std::string &), const libMesh::Parameters &params, const std::vector< VariableName > &target_vars)
 
virtual void addMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addMaterialHelper (std::vector< MaterialWarehouse * > warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addFunctorMaterial (const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
void prepareMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
 
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)
 
void reinitMaterialsFaceOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase * > *const reinit_mats=nullptr)
 
void reinitMaterialsNeighborOnBoundary (const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase * > *const reinit_mats=nullptr)
 
void reinitMaterialsNeighbor (SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
 
void reinitMaterialsBoundary (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase * > *reinit_mats=nullptr)
 
void reinitMaterialsInterface (BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
 
void prepareKokkosMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props)
 
void reinitKokkosMaterials ()
 
virtual void swapBackMaterials (const THREAD_ID tid)
 
virtual void swapBackMaterialsFace (const THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (const THREAD_ID tid)
 
void setActiveMaterialProperties (const std::unordered_set< unsigned int > &mat_prop_ids, const THREAD_ID tid)
 
bool hasActiveMaterialProperties (const THREAD_ID tid) const
 
void clearActiveMaterialProperties (const THREAD_ID tid)
 
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")
 
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)
 
virtual void addKokkosPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosVectorPostprocessor (const std::string &pp_name, const std::string &name, InputParameters &parameters)
 
virtual void addKokkosReporter (const std::string &type, const std::string &name, InputParameters &parameters)
 
const ReporterData & getReporterData () const
 
ReporterData & getReporterData (ReporterData::WriteKey)
 
virtual std::vector< std::shared_ptr< UserObject > > addUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
T & getUserObject (const std::string &name, unsigned int tid=0) const
 
const UserObject & getUserObjectBase (const std::string &name, const THREAD_ID tid=0) const
 
bool hasUserObject (const std::string &name) const
 
virtual void addKokkosUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
const T & getKokkosUserObject (const std::string &name) const
 
bool hasKokkosUserObject (const std::string &name) const
 
void checkUserObjectNameCollision (const std::string &name, const std::string &type) const
 
const Positions & getPositionsObject (const std::string &name) const
 
virtual void addFVInterpolationMethod (const std::string &method_type, const std::string &name, InputParameters &parameters)
 
virtual void addFVGradientMethod (const std::string &method_type, const std::string &name, InputParameters &parameters)
 
const FVGradientMethod & getFVGradientMethod (const GradientMethodName &name, const THREAD_ID tid=0) const
 
bool hasFVGradientMethod (const GradientMethodName &name) const
 
const FVInterpolationMethod & getFVInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 
const FVFaceInterpolationMethod & getFVFaceInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 
const FVAdvectedInterpolationMethod & getFVAdvectedInterpolationMethod (const InterpolationMethodName &name, const THREAD_ID tid=0) const
 
bool hasFVInterpolationMethod (const InterpolationMethodName &name) const
 
bool hasPostprocessorValueByName (const PostprocessorName &name) const
 
const Postprocessor & getPostprocessorObjectByName (const PostprocessorName &object_name, const THREAD_ID tid=0) const
 
const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name, std::size_t t_index=0) const
 
void setPostprocessorValueByName (const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, std::size_t t_index=0) const
 
void setVectorPostprocessorValueByName (const std::string &object_name, const std::string &vector_name, const VectorPostprocessorValue &value, std::size_t t_index=0)
 
const VectorPostprocessor & getVectorPostprocessorObjectByName (const std::string &object_name, const THREAD_ID tid=0) const
 
virtual void addDamper (const std::string &damper_name, const std::string &name, InputParameters &parameters)
 
void setupDampers ()
 
bool hasDampers ()
 
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)
 
std::shared_ptr< MultiApp > getMultiApp (const std::string &multi_app_name) const
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, Transfer::DIRECTION direction) const
 
std::vector< std::shared_ptr< Transfer > > getTransfers (Transfer::DIRECTION direction) const
 
const ExecuteMooseObjectWarehouse< Transfer > & getMultiAppTransferWarehouse (Transfer::DIRECTION direction) const
 
void execMultiAppTransfers (ExecFlagType type, Transfer::DIRECTION direction, const MultiAppName &source_app="")
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 
unsigned int numConcurrentMultiApps () const
 
void partitionConcurrentMultiApps ()
 
void finalizeMultiApps ()
 
void incrementMultiAppTStep (ExecFlagType type)
 
void advanceMultiApps (ExecFlagType type)
 
void finishMultiAppStep (ExecFlagType type, bool recurse_through_multiapp_levels=false)
 
void backupMultiApps (ExecFlagType type)
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 
Real computeMultiAppsDT (ExecFlagType type)
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters &parameters)
 
Real computeResidualL2Norm (NonlinearSystemBase &sys)
 
Real computeResidualL2Norm (LinearSystem &sys)
 
virtual Real computeResidualL2Norm ()
 
virtual void computeResidualSys (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
 
void computeResidual (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual)
 
virtual void computeResidual (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, const unsigned int nl_sys_num)
 
void computeResidualAndJacobian (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 
virtual void computeResidualTag (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
 
virtual void computeResidualType (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
 
virtual void computeResidualInternal (const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, const std::set< TagID > &tags)
 
virtual void computeResidualTags (const std::set< TagID > &tags)
 
virtual void computeJacobianSys (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian)
 
virtual void computeJacobian (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const unsigned int nl_sys_num)
 
virtual void computeJacobianTag (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, TagID tag)
 
virtual void computeJacobianInternal (const NumericVector< libMesh::Number > &soln, libMesh::SparseMatrix< libMesh::Number > &jacobian, const std::set< TagID > &tags)
 
virtual void computeJacobianTags (const std::set< TagID > &tags)
 
virtual void computeJacobianBlocks (std::vector< JacobianBlock * > &blocks, const unsigned int nl_sys_num)
 
virtual void computeJacobianBlock (libMesh::SparseMatrix< libMesh::Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 
virtual void computeLinearSystemSys (libMesh::LinearImplicitSystem &sys, libMesh::SparseMatrix< libMesh::Number > &system_matrix, NumericVector< libMesh::Number > &rhs, const bool compute_gradients=true)
 
void computeLinearSystemTags (const NumericVector< libMesh::Number > &soln, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags, const bool compute_gradients=true)
 
virtual Real computeDamping (const NumericVector< libMesh::Number > &soln, const NumericVector< libMesh::Number > &update)
 
virtual bool shouldUpdateSolution ()
 
virtual bool updateSolution (NumericVector< libMesh::Number > &vec_solution, NumericVector< libMesh::Number > &ghosted_solution)
 
virtual void predictorCleanup (NumericVector< libMesh::Number > &ghosted_solution)
 
virtual void computeBounds (libMesh::NonlinearImplicitSystem &sys, NumericVector< libMesh::Number > &lower, NumericVector< libMesh::Number > &upper)
 
virtual void computeNearNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
virtual void computeNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
virtual void computeTransposeNullSpace (libMesh::NonlinearImplicitSystem &sys, std::vector< NumericVector< libMesh::Number > * > &sp)
 
virtual void computePostCheck (libMesh::NonlinearImplicitSystem &sys, const NumericVector< libMesh::Number > &old_soln, NumericVector< libMesh::Number > &search_direction, NumericVector< libMesh::Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
 
virtual void computeIndicatorsAndMarkers ()
 
virtual void computeIndicators ()
 
virtual void computeMarkers ()
 
virtual void addResidual (const THREAD_ID tid) override
 
virtual void addResidualNeighbor (const THREAD_ID tid) override
 
virtual void addResidualLower (const THREAD_ID tid) override
 
virtual void addResidualScalar (const THREAD_ID tid=0)
 
virtual void cacheResidual (const THREAD_ID tid) override
 
virtual void cacheResidualNeighbor (const THREAD_ID tid) override
 
virtual void addCachedResidual (const THREAD_ID tid) override
 
virtual void addCachedResidualDirectly (NumericVector< libMesh::Number > &residual, const THREAD_ID tid)
 
virtual void setResidual (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void setResidual (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void setResidualNeighbor (NumericVector< libMesh::Number > &residual, const THREAD_ID tid) override
 
virtual void setResidualNeighbor (libMesh::NumericVector< libMesh::Number > &residual, const THREAD_ID tid)=0
 
virtual void addJacobian (const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid) override
 
virtual void addJacobianNeighbor (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)=0
 
virtual void addJacobianNeighborLowerD (const THREAD_ID tid) override
 
virtual void addJacobianLowerD (const THREAD_ID tid) override
 
virtual void addJacobianBlockTags (libMesh::SparseMatrix< libMesh::Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
 
virtual void addJacobianScalar (const THREAD_ID tid=0)
 
virtual void addJacobianOffDiagScalar (unsigned int ivar, const THREAD_ID tid=0)
 
virtual void cacheJacobian (const THREAD_ID tid) override
 
virtual void cacheJacobianNeighbor (const THREAD_ID tid) override
 
virtual void addCachedJacobian (const THREAD_ID tid) override
 
virtual void prepareShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareFaceShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void prepareNeighborShapes (unsigned int var, const THREAD_ID tid) override
 
virtual void addDisplacedProblem (std::shared_ptr< DisplacedProblem > displaced_problem)
 
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem () const
 
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem ()
 
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 Mortar3DSubpatchPlane mortar_3d_subpatch_plane, const MooseEnum &triangulation, const bool triangulate_triangles, const Mortar3DQuadraturePointMapping mortar_3d_qp_mapping=Mortar3DQuadraturePointMapping::NORMAL_PROJECTION)
 
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, MortarInterfaceConfig > & getMortarInterfaces (bool on_displaced) const
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchData & geomSearchData () override
 
void setRestartFile (const std::string &file_name)
 
const MaterialPropertyRegistry & getMaterialPropertyRegistry () const
 
const InitialConditionWarehouse & getInitialConditionWarehouse () const
 
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse () const
 
SolverParams & solverParams (unsigned int solver_sys_num=0)
 
const SolverParams & solverParams (unsigned int solver_sys_num=0) const
 
Adaptivity & adaptivity ()
 
virtual void initialAdaptMesh ()
 
virtual bool adaptMesh ()
 
unsigned int getNumCyclesCompleted ()
 
bool hasInitialAdaptivity () const
 
bool hasInitialAdaptivity () const
 
void initXFEM (std::shared_ptr< XFEMInterface > xfem)
 
std::shared_ptr< XFEMInterface > getXFEM ()
 
bool haveXFEM ()
 
virtual bool updateMeshXFEM ()
 
virtual bool allowMeshContractionAfterMeshChanged () const
 
virtual void meshChanged (bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
 
void notifyWhenMeshChanges (MeshChangedInterface *mci)
 
void notifyWhenMeshDisplaces (MeshDisplacedInterface *mdi)
 
void initElementStatefulProps (const libMesh::ConstElemRange &elem_range, const bool threaded)
 
void initKokkosStatefulProps ()
 
virtual void checkProblemIntegrity ()
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 
void setKernelCoverageCheck (CoverageCheckMode mode)
 
void setKernelCoverageCheck (bool flag)
 
void setKernelCoverageCheck (CoverageCheckMode mode)
 
void setMaterialCoverageCheck (CoverageCheckMode mode)
 
void setMaterialCoverageCheck (bool flag)
 
void setMaterialCoverageCheck (CoverageCheckMode mode)
 
void setParallelBarrierMessaging (bool flag)
 
void setVerboseProblem (bool verbose)
 
bool verboseMultiApps () const
 
void parentOutputPositionChanged ()
 
unsigned int subspaceDim (const std::string &prefix) const
 
const MooseObjectWarehouse< Function > & getFunctionWarehouse ()
 
const MaterialWarehouse & getMaterialWarehouse () const
 
const MaterialWarehouse & getRegularMaterialsWarehouse () const
 
const MaterialWarehouse & getDiscreteMaterialWarehouse () const
 
const MaterialWarehouse & getInterfaceMaterialsWarehouse () const
 
const MaterialWarehouse & getKokkosMaterialsWarehouse () const
 
std::shared_ptr< MaterialBase > getMaterial (std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
 
MaterialData & getMaterialData (Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
 
MaterialData & getKokkosMaterialData (Moose::MaterialDataType type, const MooseObject *object=nullptr) const
 
const std::set< const MooseObject * > & getMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
const std::set< const MooseObject * > & getKokkosMaterialPropertyStorageConsumers (Moose::MaterialDataType type) const
 
bool restoreOriginalNonzeroPattern () const
 
bool errorOnJacobianNonzeroReallocation () const
 
void setErrorOnJacobianNonzeroReallocation (bool state)
 
bool preserveMatrixSparsityPattern () const
 
void setPreserveMatrixSparsityPattern (bool preserve)
 
bool ignoreZerosInJacobian () const
 
void setIgnoreZerosInJacobian (bool state)
 
bool acceptInvalidSolution () const
 
bool allowInvalidSolution () const
 
bool showInvalidSolutionConsole () const
 
bool immediatelyPrintInvalidSolution () const
 
bool hasTimeIntegrator () const
 
virtual void execute (const ExecFlagType &exec_type)
 
virtual void executeAllObjects (const ExecFlagType &exec_type)
 
virtual Executor & getExecutor (const std::string &name)
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 
virtual void computeUserObjectByName (const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
 
void needsPreviousNewtonIteration (bool state)
 
bool needsPreviousNewtonIteration () const
 
void needsPreviousMultiAppFixedPointIterationSolution (bool needed, const unsigned int solver_sys_num)
 
bool needsPreviousMultiAppFixedPointIterationSolution (const unsigned int solver_sys_num) const
 
void needsPreviousMultiAppFixedPointIterationAuxiliary (bool state)
 
bool needsPreviousMultiAppFixedPointIterationAuxiliary () const
 
void needsPreviousMultiSystemFixedPointIterationSolution (bool needed, const unsigned int solver_sys_num)
 
bool needsPreviousMultiSystemFixedPointIterationSolution (const unsigned int solver_sys_num) const
 
void needsPreviousMultiSystemFixedPointIterationAuxiliary (bool state)
 
bool needsPreviousMultiSystemFixedPointIterationAuxiliary () const
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 
void executeControls (const ExecFlagType &exec_type)
 
void executeSamplers (const ExecFlagType &exec_type)
 
virtual void updateActiveObjects ()
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
bool hasJacobian () const
 
bool constJacobian () const
 
void addOutput (const std::string &, const std::string &, InputParameters &)
 
TheWarehouse & theWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 
bool useSNESMFReuseBase ()
 
void skipExceptionCheck (bool skip_exception_check)
 
bool isSNESMFReuseBaseSetbyUser ()
 
bool & petscOptionsInserted ()
 
PetscOptions & petscOptionsDatabase ()
 
virtual void setUDotRequested (const bool u_dot_requested)
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 
virtual bool uDotRequested ()
 
virtual bool uDotDotRequested ()
 
virtual bool uDotOldRequested ()
 
virtual bool uDotDotOldRequested ()
 
void haveADObjects (bool have_ad_objects) override
 
virtual void haveADObjects (bool have_ad_objects)
 
bool haveADObjects () const
 
bool shouldSolve () const
 
const MortarInterfaceWarehouse & mortarData () const
 
MortarInterfaceWarehouse & mortarData ()
 
virtual bool hasNeighborCoupling () const
 
virtual bool hasMortarCoupling () const
 
void computingNonlinearResid (bool computing_nonlinear_residual) final
 
bool computingNonlinearResid () const
 
virtual void computingNonlinearResid (const bool computing_nonlinear_residual)
 
void setCurrentlyComputingResidual (bool currently_computing_residual) final
 
void numGridSteps (unsigned int num_grid_steps)
 
void uniformRefine ()
 
void automaticScaling (bool automatic_scaling) override
 
virtual void automaticScaling (bool automatic_scaling)
 
bool automaticScaling () const
 
virtual void reinitElemFaceRef (const Elem *elem, unsigned int side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
 
virtual void reinitNeighborFaceRef (const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr, const THREAD_ID tid=0) override
 
bool fvBCsIntegrityCheck () const
 
void fvBCsIntegrityCheck (bool fv_bcs_integrity_check)
 
bool sideUOInterfaceMatPropIntegrityCheck () const
 
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)
 
void resizeMaterialData (Moose::MaterialDataType data_type, unsigned int nqp, const THREAD_ID tid)
 
bool haveDisplaced () const override final
 
bool hasLinearConvergenceObjects () const
 
void setNonlinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 
void setLinearConvergenceNames (const std::vector< ConvergenceName > &convergence_names)
 
void setMultiAppFixedPointConvergenceName (const ConvergenceName &convergence_name)
 
void setSteadyStateConvergenceName (const ConvergenceName &convergence_name)
 
const std::vector< ConvergenceName > & getNonlinearConvergenceNames () const
 
const std::vector< ConvergenceName > & getLinearConvergenceNames () const
 
const ConvergenceName & getMultiAppFixedPointConvergenceName () const
 
const ConvergenceName & getSteadyStateConvergenceName () const
 
void computingScalingJacobian (bool computing_scaling_jacobian)
 
bool computingScalingJacobian () const override final
 
void computingScalingResidual (bool computing_scaling_residual)
 
bool computingScalingResidual () const override final
 
MooseAppCoordTransform & coordTransform ()
 
virtual std::size_t numNonlinearSystems () const override
 
virtual std::size_t numLinearSystems () const override
 
virtual std::size_t numSolverSystems () const override
 
bool isSolverSystemNonlinear (const unsigned int sys_num)
 
virtual unsigned int currentNlSysNum () const override
 
virtual unsigned int currentLinearSysNum () const override
 
virtual unsigned int nlSysNum (const NonlinearSystemName &nl_sys_name) const override
 
unsigned int linearSysNum (const LinearSystemName &linear_sys_name) const override
 
unsigned int solverSysNum (const SolverSystemName &solver_sys_name) const override
 
unsigned int systemNumForVariable (const VariableName &variable_name) const
 
bool getFailNextNonlinearConvergenceCheck () const
 
bool getFailNextSystemConvergenceCheck () const
 
void setFailNextNonlinearConvergenceCheck ()
 
void setFailNextSystemConvergenceCheck ()
 
void resetFailNextNonlinearConvergenceCheck ()
 
void resetFailNextSystemConvergenceCheck ()
 
void setExecutionPrinting (const ExecFlagEnum &print_exec)
 
bool shouldPrintExecution (const THREAD_ID tid) const
 
void reinitMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
 
virtual const std::vector< VectorTag > & currentResidualVectorTags () const override
 
void setCurrentResidualVectorTags (const std::set< TagID > &vector_tags)
 
void clearCurrentResidualVectorTags ()
 
void clearCurrentJacobianMatrixTags ()
 
virtual void needFV () override
 
virtual bool haveFV () const override
 
virtual bool hasNonlocalCoupling () const override
 
bool identifyVariableGroupsInNL () const
 
virtual void setCurrentLowerDElem (const Elem *const lower_d_elem, const THREAD_ID tid) override
 
virtual void setCurrentBoundaryID (BoundaryID bid, const THREAD_ID tid) override
 
const std::vector< NonlinearSystemName > & getNonlinearSystemNames () const
 
const std::vector< LinearSystemName > & getLinearSystemNames () const
 
const std::vector< SolverSystemName > & getSolverSystemNames () const
 
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix (const unsigned i) const override
 
virtual bool checkNonlocalCouplingRequirement () const override
 
virtual Moose::FEBackend feBackend () const
 
void createTagMatrices (CreateTaggedMatrixKey)
 
bool useHashTableMatrixAssembly () const
 
bool hasKokkosObjects () const
 
bool hasKokkosResidualObjects () const
 
void addKokkosMeshInitializationHook (std::function< void()> function)
 
const bool & currentlyComputingResidual () const
 
virtual bool nlConverged (const unsigned int nl_sys_num)
 
virtual bool converged (const unsigned int sys_num)
 
bool defaultGhosting ()
 
virtual TagID addVectorTag (const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
 
void addNotZeroedVectorTag (const TagID tag)
 
bool vectorTagNotZeroed (const TagID tag) const
 
virtual const VectorTag & getVectorTag (const TagID tag_id) const
 
std::vector< VectorTag > getVectorTags (const std::set< TagID > &tag_ids) const
 
virtual const std::vector< VectorTag > & getVectorTags (const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
 
virtual TagID getVectorTagID (const TagName &tag_name) const
 
virtual TagName vectorTagName (const TagID tag) const
 
virtual bool vectorTagExists (const TagID tag_id) const
 
virtual bool vectorTagExists (const TagName &tag_name) const
 
virtual unsigned int numVectorTags (const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
 
virtual Moose::VectorTagType vectorTagType (const TagID tag_id) const
 
virtual TagID addMatrixTag (TagName tag_name)
 
virtual TagID getMatrixTagID (const TagName &tag_name) const
 
virtual TagName matrixTagName (TagID tag)
 
virtual bool matrixTagExists (const TagName &tag_name) const
 
virtual bool matrixTagExists (TagID tag_id) const
 
virtual unsigned int numMatrixTags () const
 
virtual std::map< TagName, TagID > & getMatrixTags ()
 
virtual bool hasLinearVariable (const std::string &var_name) const
 
virtual bool hasAuxiliaryVariable (const std::string &var_name) const
 
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables (const THREAD_ID tid) const
 
virtual bool hasActiveElementalMooseVariables (const THREAD_ID tid) const
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
unsigned int getAxisymmetricRadialCoord () const
 
virtual DiracKernelInfo & diracKernelInfo ()
 
void reinitNodes (const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
 
void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, const THREAD_ID tid)
 
void reinitNeighborLowerDElem (const Elem *elem, const THREAD_ID tid=0)
 
void reinitMortarElem (const Elem *elem, const THREAD_ID tid=0)
 
void reinitGeomSearch ()
 
virtual void storeSubdomainMatPropName (SubdomainID block_id, const std::string &name)
 
virtual void storeBoundaryMatPropName (BoundaryID boundary_id, const std::string &name)
 
virtual void storeSubdomainZeroMatProp (SubdomainID block_id, const MaterialPropertyName &name)
 
virtual void storeBoundaryZeroMatProp (BoundaryID boundary_id, const MaterialPropertyName &name)
 
virtual void storeSubdomainDelayedCheckMatProp (const std::string &requestor, SubdomainID block_id, const std::string &name)
 
virtual void storeBoundaryDelayedCheckMatProp (const std::string &requestor, BoundaryID boundary_id, const std::string &name)
 
virtual void checkBlockMatProps ()
 
virtual void checkBoundaryMatProps ()
 
virtual void markMatPropRequested (const std::string &)
 
virtual bool isMatPropRequested (const std::string &prop_name) const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 
const std::map< MooseObjectName, std::set< std::string > > & getConsumedPropertyMap () const
 
virtual std::set< SubdomainID > getMaterialPropertyBlocks (const std::string &prop_name)
 
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &prop_name)
 
virtual bool hasBlockMaterialProperty (SubdomainID block_id, const std::string &prop_name)
 
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs (const std::string &prop_name)
 
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &prop_name)
 
virtual bool hasBoundaryMaterialProperty (BoundaryID boundary_id, const std::string &prop_name)
 
virtual std::set< dof_id_type > & ghostedElems ()
 
const bool & currentlyComputingJacobian () const
 
void setCurrentlyComputingJacobian (const bool currently_computing_jacobian)
 
const bool & currentlyComputingResidualAndJacobian () const
 
void setCurrentlyComputingResidualAndJacobian (bool currently_computing_residual_and_jacobian)
 
virtual bool safeAccessTaggedMatrices () const
 
virtual bool safeAccessTaggedVectors () const
 
const std::set< TagID > & getActiveScalarVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableVectorTags (const THREAD_ID tid) const
 
const std::set< TagID > & getActiveFEVariableCoupleableMatrixTags (const THREAD_ID tid) const
 
void addAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
 
void addCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
 
void removeAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf)
 
void removeCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf)
 
void hasScalingVector (const unsigned int nl_sys_num)
 
void clearAllDofIndices ()
 
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
 
bool hasFunctorWithType (const std::string &name, const THREAD_ID tid) const
 
void addFunctor (const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
 
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)
 
void setFunctorOutput (bool set_output)
 
void setChainControlDataOutput (bool set_output)
 
void registerUnfilledFunctorRequest (T *functor_interface, const std::string &functor_name, const THREAD_ID tid)
 
void reinitFVFace (const THREAD_ID tid, const FaceInfo &fi)
 
void preparePRefinement ()
 
bool doingPRefinement () const
 
MooseVariableFEBase & getVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &systems, const SystemBase &aux) const
 
void _setCLIOption ()
 
virtual void terminateSolve ()
 
virtual bool isSolveTerminationRequested () const
 
const ConsoleStream & console () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraph & perfGraph ()
 
const libMesh::ConstElemRange & getEvaluableElementRange ()
 
const libMesh::ConstElemRange & getEvaluableElementRange ()
 
const libMesh::ConstElemRange & getNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRange & getNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRange & getCurrentAlgebraicElementRange ()
 
const libMesh::ConstElemRange & getCurrentAlgebraicElementRange ()
 
const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange ()
 
const libMesh::ConstNodeRange & getCurrentAlgebraicNodeRange ()
 
const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange ()
 
const ConstBndNodeRange & getCurrentAlgebraicBndNodeRange ()
 
void setCurrentAlgebraicElementRange (libMesh::ConstElemRange *range)
 
void setCurrentAlgebraicElementRange (libMesh::ConstElemRange *range)
 
void setCurrentAlgebraicNodeRange (libMesh::ConstNodeRange *range)
 
void setCurrentAlgebraicNodeRange (libMesh::ConstNodeRange *range)
 
void setCurrentAlgebraicBndNodeRange (ConstBndNodeRange *range)
 
void setCurrentAlgebraicBndNodeRange (ConstBndNodeRange *range)
 
void allowOutput (bool state)
 
void allowOutput (bool state)
 
void allowOutput (bool state)
 
void allowOutput (bool state)
 
Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems ()
 
const Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems () const
 
Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems ()
 
const Moose::Kokkos::Array< Moose::Kokkos::System > & getKokkosSystems () const
 
Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems ()
 
const Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems () const
 
Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems ()
 
const Moose::Kokkos::Array< Moose::Kokkos::FESystem > & getKokkosFESystems () const
 
Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num)
 
const Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num) const
 
Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num)
 
const Moose::Kokkos::System & getKokkosSystem (const unsigned int sys_num) const
 
Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num)
 
const Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num) const
 
Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num)
 
const Moose::Kokkos::FESystem & getKokkosFESystem (const unsigned int sys_num) const
 
bool hasMultiApps () const
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApps () const
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApp (const std::string &name) const
 
bool hasMultiApp (const std::string &name) const
 
const AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 
AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 
AutomaticMortarGeneration & getMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const MaterialPropertyStorage & getMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getBndMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getBndMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getNeighborMaterialPropertyStorage ()
 
const MaterialPropertyStorage & getNeighborMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosBndMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosBndMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosNeighborMaterialPropertyStorage ()
 
Moose::Kokkos::MaterialPropertyStorage & getKokkosNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 
const MooseObjectWarehouse< InternalSideIndicatorBase > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< InternalSideIndicatorBase > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needInterfaceMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needInterfaceMaterialOnSide (BoundaryID bnd_id, const THREAD_ID tid)
 
bool needInternalNeighborSideMaterial (SubdomainID subdomain_id, const THREAD_ID tid)
 
bool needInternalNeighborSideMaterial (SubdomainID subdomain_id, const THREAD_ID tid)
 
const ExecFlagType & getCurrentExecuteOnFlag () const
 
const ExecFlagType & getCurrentExecuteOnFlag () const
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
const libMesh::FEType & getFlowFEType () const
 Gets the FE type for the flow in this simulation.
 
virtual void setupQuadrature ()
 Sets up quadrature rules.
 
virtual void initSimulation ()
 Initialize this simulation.
 
virtual void initComponents ()
 Initialize this simulation's components.
 
void identifyLoops ()
 Identifies the component loops.
 
void printComponentLoops () const
 Prints the component loops.
 
virtual void run ()
 Run the simulation.
 
virtual void addComponent (const std::string &type, const std::string &name, InputParameters params)
 Add a component into this simulation.
 
bool hasComponent (const std::string &name) const
 Find out if simulation has a component with the given name.
 
template<typename T >
bool hasComponentOfType (const std::string &name) const
 Find out if simulation has a component with the given name and specified type.
 
template<typename T >
const T & getComponentByName (const std::string &name) const
 Get component by its name.
 
const std::vector< std::shared_ptr< Component > > & getComponents () const
 Return list of components available in the simulation.
 
virtual void addClosures (const std::string &type, const std::string &name, InputParameters params)
 Add a closures object into this simulation.
 
bool hasClosures (const std::string &name) const
 Return whether the simulation has a closures object.
 
std::shared_ptr< ClosuresBase > getClosures (const std::string &name) const
 Get a pointer to a closures object.
 
void addSimVariable (bool nl, const VariableName &name, libMesh::FEType fe_type, Real scaling_factor=1.0)
 Queues a variable of type MooseVariableScalar to be added to the nonlinear or aux system.
 
void addSimVariable (bool nl, const VariableName &name, libMesh::FEType fe_type, const std::vector< SubdomainName > &subdomain_names, Real scaling_factor=1.0)
 Queues a variable of type MooseVariable to be added to the nonlinear or aux system.
 
void addSimVariable (bool nl, const std::string &var_type, const VariableName &name, const InputParameters &params)
 Queues a generic variable to be added to the nonlinear or aux system.
 
void checkVariableNameLength (const std::string &name) const
 Reports an error if the variable name is too long.
 
void addConstantIC (const VariableName &var_name, Real value, const std::vector< SubdomainName > &block_names)
 
void addFunctionIC (const VariableName &var_name, const std::string &func_name, const std::vector< SubdomainName > &block_names)
 
void addConstantScalarIC (const VariableName &var_name, Real value)
 
void addComponentScalarIC (const VariableName &var_name, const std::vector< Real > &value)
 
void addSimInitialCondition (const std::string &type, const std::string &name, InputParameters params)
 
void addControl (const std::string &type, const std::string &name, InputParameters params)
 Add a control.
 
void addFileOutputter (const std::string &name)
 
void addScreenOutputter (const std::string &name)
 
std::vector< OutputName > getOutputsVector (const std::string &key) const
 Gets the vector of output names corresponding to a 1-word key string.
 
virtual void buildMesh ()
 Create mesh for this simulation.
 
virtual void addVariables ()
 Add variables involved in this simulation.
 
virtual void addMooseObjects ()
 Add component MOOSE objects.
 
virtual void setupMesh ()
 Perform mesh setup actions such as setting up the coordinate system(s) and creating ghosted elements.
 
virtual void integrityCheck () const
 Check the integrity of the simulation.
 
virtual void controlDataIntegrityCheck ()
 Check the integrity of the control data.
 
virtual void couplingMatrixIntegrityCheck () const
 Check integrity of coupling matrix used by the preconditioner.
 
template<typename T >
bool hasControlData (const std::string &name)
 Query if control data with name 'name' exists.
 
template<typename T >
ControlData< T > * getControlData (const std::string &name)
 Get control data of type T and name 'name', if it does not exist it will be created.
 
template<typename T >
ControlData< T > * declareControlData (const std::string &name, THMControl *ctrl)
 Declare control data of type T and name 'name', if it does not exist it will be created.
 
const bool & getImplicitTimeIntegrationFlag ()
 Gets the flag indicating whether an implicit time integration scheme is being used.
 
bool hasInitialConditionsFromFile () const
 Are initial conditions specified from a file.
 
Logger & log ()
 
void setCheckJacobian (bool state)
 Enable Jacobian checking.
 
virtual void augmentSparsity (const dof_id_type &elem_id1, const dof_id_type &elem_id2)
 Hint how to augment sparsity pattern between two elements.
 
bool getVectorValuedVelocity ()
 Is velocity output as vector-valued field.
 
void setVectorValuedVelocity (bool vector_velocity)
 Set if velocity is being output as a vector-valued field.
 
void addRelationshipManagers ()
 Add additional relationship managers to run the simulation.
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
template<typename... Args>
void logError (Args &&... args) const
 Logs an error.
 
template<typename... Args>
void logComponentError (const std::string &component_name, Args &&... args) const
 Logs an error for a component.
 
template<typename... Args>
void logWarning (Args &&... args) const
 Logs a warning.
 
template<typename... Args>
void logComponentWarning (const std::string &component_name, Args &&... args) const
 Logs a warning for a component.
 
std::string genName (const std::string &prefix, unsigned int id, const std::string &suffix="") const
 Build a name from a prefix, number and possible suffix.
 
std::string genName (const std::string &prefix, unsigned int i, unsigned int j, const std::string &suffix="") const
 Build a name from a prefix, 2 numbers and possible suffix.
 
std::string genName (const std::string &prefix, const std::string &name, unsigned int i) const
 Build a name from 2 strings and a number.
 
std::string genName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings.
 
std::string genSafeName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings that is safe to use in input files (i.e.
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static void selectVectorTagsFromSystem (const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
 
static void selectMatrixTagsFromSystem (const SystemBase &system, const std::map< TagName, TagID > &input_matrix_tags, std::set< TagID > &selected_tags)
 
static void objectSetupHelper (const std::vector< T * > &objects, const ExecFlagType &exec_flag)
 
static void objectSetupHelper (const std::vector< T * > &objects, const ExecFlagType &exec_flag)
 
static void objectExecuteHelper (const std::vector< T * > &objects)
 
static void objectExecuteHelper (const std::vector< T * > &objects)
 
static void setComponentVariableOrder (const VariableName &var, int index)
 Sets a component variable order index.
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 
std::vector< Real > _real_zero
 
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
 
Real _zero
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Member Functions

virtual void meshChanged ()
 
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
 
void createTagVectors ()
 
void createTagSolutions ()
 
virtual void meshDisplaced ()
 
void computeSystems (const ExecFlagType &type)
 
bool duplicateVariableCheck (const std::string &var_name, const libMesh::FEType &type, bool is_aux, const std::set< SubdomainID > *const active_subdomains)
 
void computeUserObjectsInternal (const ExecFlagType &type, TheWarehouse::Query &query)
 
void computeKokkosUserObjectsInternal (const ExecFlagType &type, TheWarehouse::Query &query)
 
void checkDisplacementOrders ()
 
void checkUserObjects ()
 
void checkDependMaterialsHelper (const std::map< SubdomainID, std::vector< std::shared_ptr< MaterialBase > > > &materials_map)
 
void checkCoordinateSystems ()
 
void reinitBecauseOfGhostingOrNewGeomObjects (bool mortar_changed=false)
 
void addObjectParamsHelper (InputParameters &params, const std::string &object_name, const std::string &var_param_name="variable")
 
bool verifyVectorTags () const
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
void setupEquations ()
 Setup equations to be solved in this simulation.
 
void setupInitialConditionsFromFile ()
 Setup reading initial conditions from a specified file, see 'initial_from_file', 'initial_from_file_timestep', and 'initial_from_file_weighting_type' parameters.
 
void setupInitialConditionObjects ()
 
void setupCoordinateSystem ()
 Sets the coordinate system for each subdomain.
 
void setupCriticalHeatFluxTable ()
 Setup ctirical heat flux table user object.
 

Protected Attributes

bool _use_nonlinear
 
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
 
MooseMesh & _mesh
 
bool _initialized
 
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
 
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
 
std::optional< ConvergenceName > _multiapp_fixed_point_convergence_name
 
std::optional< ConvergenceName > _steady_state_convergence_name
 
std::set< TagID > _fe_vector_tags
 
std::set< TagID > _fe_matrix_tags
 
std::set< TagID > _linear_vector_tags
 
std::set< TagID > _linear_matrix_tags
 
const bool & _solve
 
bool _transient
 
Real & _time
 
Real & _time_old
 
Real & _time_older
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
bool _need_to_add_default_nonlinear_convergence
 
bool _need_to_add_default_multiapp_fixed_point_convergence
 
bool _need_to_add_default_steady_state_convergence
 
const std::vector< LinearSystemName > _linear_sys_names
 
const std::size_t _num_linear_sys
 
std::vector< std::shared_ptr< LinearSystem > > _linear_systems
 
std::map< LinearSystemName, unsigned int > _linear_sys_name_to_num
 
LinearSystem * _current_linear_sys
 
const bool _using_default_nl
 
const std::vector< NonlinearSystemName > _nl_sys_names
 
const std::size_t _num_nl_sys
 
std::map< NonlinearSystemName, unsigned int > _nl_sys_name_to_num
 
NonlinearSystemBase * _current_nl_sys
 
SolverSystem * _current_solver_sys
 
std::vector< std::shared_ptr< SolverSystem > > _solver_systems
 
std::map< SolverVariableName, unsigned int > _solver_var_to_sys_num
 
std::map< SolverSystemName, unsigned int > _solver_sys_name_to_num
 
std::vector< SolverSystemName > _solver_sys_names
 
std::shared_ptr< AuxiliarySystem > _aux
 
Moose::CouplingType _coupling
 
std::vector< std::unique_ptr< libMesh::CouplingMatrix > > _cm
 
Moose::Kokkos::Array< Moose::Kokkos::System > _kokkos_systems
 
Moose::Kokkos::Array< Moose::Kokkos::FESystem > _kokkos_fe_systems
 
std::map< std::string, unsigned int > _subspace_dim
 
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
 
Moose::Kokkos::Assembly _kokkos_assembly
 
MooseObjectWarehouse< MeshDivision > _mesh_divisions
 
MooseObjectWarehouse< Function > _functions
 
MooseObjectWarehouse< Moose::FunctionBase > _kokkos_functions
 
MooseObjectWarehouse< Convergence > _convergences
 
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
 
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
 
MaterialPropertyRegistry _material_prop_registry
 
MaterialPropertyStorage & _material_props
 
MaterialPropertyStorage & _bnd_material_props
 
MaterialPropertyStorage & _neighbor_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_bnd_material_props
 
Moose::Kokkos::MaterialPropertyStorage & _kokkos_neighbor_material_props
 
MooseObjectWarehouse< Marker > _markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
 
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
 
ExecuteMooseObjectWarehouse< Transfer > _transfers
 
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
 
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
 
ExecuteMooseObjectWarehouse< Transfer > _between_multi_app_transfers
 
const unsigned int _num_concurrent_multiapps
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 
std::vector< std::unordered_map< BoundaryID, bool > > _interface_mat_side_cache
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 
std::vector< MeshDisplacedInterface * > _notify_when_mesh_displaces
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface > _xfem
 
MooseMesh * _displaced_mesh
 
std::shared_ptr< DisplacedProblem > _displaced_problem
 
GeometricSearchData _geometric_search_data
 
std::unique_ptr< MortarInterfaceWarehouse > _mortar_data
 
bool _reinit_displaced_elem
 
bool _reinit_displaced_face
 
bool _reinit_displaced_neighbor
 
bool _input_file_saved
 
bool _has_dampers
 
bool _has_constraints
 
bool _snesmf_reuse_base
 
bool _skip_exception_check
 
bool _snesmf_reuse_base_set_by_user
 
bool _has_initialized_stateful
 
bool _const_jacobian
 
bool _has_jacobian
 
bool _needs_old_newton_iter
 
bool _previous_nl_solution_required
 
std::vector< bool > _previous_multiapp_fp_nl_solution_required
 
bool _previous_multiapp_fp_aux_solution_required
 
std::vector< bool > _previous_multisystem_fp_nl_solution_required
 
bool _previous_multisystem_fp_aux_solution_required
 
bool _has_nonlocal_coupling
 
bool _calculate_jacobian_in_uo
 
std::vector< std::vector< const MooseVariableFEBase * > > _uo_jacobian_moose_vars
 
std::vector< unsigned char > _has_active_material_properties
 
std::vector< SolverParams > _solver_params
 
CoverageCheckMode _kernel_coverage_check
 
std::vector< SubdomainName > _kernel_coverage_blocks
 
const bool _boundary_restricted_node_integrity_check
 
const bool _boundary_restricted_elem_integrity_check
 
const bool _side_uo_interface_mat_prop_integrity_check
 
CoverageCheckMode _material_coverage_check
 
std::vector< SubdomainName > _material_coverage_blocks
 
bool _fv_bcs_integrity_check
 
const bool _fv_face_integrity_check
 
const bool _material_dependency_check
 
const bool _uo_aux_state_check
 
bool _check_residual_for_nans
 
unsigned int _max_qps
 
libMesh::Order _max_scalar_order
 
bool _has_time_integrator
 
bool _has_exception
 
bool _parallel_barrier_messaging
 
MooseEnum _verbose_setup
 
bool _verbose_multiapps
 
bool _verbose_restore
 
std::string _exception_message
 
ExecFlagType _current_execute_on_flag
 
ExecuteMooseObjectWarehouse< Control > _control_warehouse
 
Moose::PetscSupport::PetscOptions _petsc_options
 
PetscOptions _petsc_option_data_base
 
bool _is_petsc_options_inserted
 
std::shared_ptr< LineSearch > _line_search
 
std::unique_ptr< libMesh::ConstElemRange > _evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _nl_evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _aux_evaluable_local_elem_range
 
std::unique_ptr< libMesh::ConstElemRange > _current_algebraic_elem_range
 
std::unique_ptr< libMesh::ConstNodeRange > _current_algebraic_node_range
 
std::unique_ptr< ConstBndNodeRange > _current_algebraic_bnd_node_range
 
bool _using_ad_mat_props
 
unsigned short _current_ic_state
 
const bool _use_hash_table_matrix_assembly
 
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
 
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
 
Factory & _factory
 
DiracKernelInfo _dirac_kernel_info
 
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
 
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
 
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
 
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
 
std::set< std::string > _material_property_requested
 
std::vector< std::set< MooseVariableFieldBase * > > _active_elemental_moose_variables
 
std::vector< unsigned int > _has_active_elemental_moose_variables
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
 
bool _default_ghosting
 
std::set< dof_id_type > _ghosted_elems
 
bool _currently_computing_jacobian
 
bool _currently_computing_residual_and_jacobian
 
bool _computing_nonlinear_residual
 
bool _currently_computing_residual
 
bool _safe_access_tagged_matrices
 
bool _safe_access_tagged_vectors
 
bool _have_ad_objects
 
std::unordered_set< TagID > _not_zeroed_tagged_vectors
 
bool _cli_option_found
 
bool _color_output
 
bool _termination_requested
 
const bool & _enabled
 
MooseApp & _app
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
MooseApp & _pg_moose_app
 
const std::string _prefix
 
MooseApp & _restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
InitialConditionWarehouse _ics
 
FVInitialConditionWarehouse _fv_ics
 
ScalarInitialConditionWarehouse _scalar_ics
 
MaterialWarehouse _materials
 
MaterialWarehouse _interface_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_materials
 
MaterialWarehouse _kokkos_materials
 
MooseObjectWarehouse< Indicator > _indicators
 
MooseObjectWarehouse< InternalSideIndicatorBase > _internal_side_indicators
 
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 
const Parallel::Communicator & _communicator
 
MooseMesh & _thm_mesh
 THM mesh.
 
FEProblemBase & _fe_problem
 Pointer to FEProblem representing this simulation.
 
MooseApp & _thm_app
 The application this is associated with.
 
Factory & _thm_factory
 The Factory associated with the MooseApp.
 
std::vector< std::shared_ptr< Component > > _components
 List of components in this simulation.
 
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
 Map of components by their names.
 
std::map< std::string, std::string > _component_name_to_loop_name
 Map of component name to component loop name.
 
std::map< std::string, THM::FlowModelID > _loop_name_to_model_id
 Map of loop name to model type.
 
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
 Map of closures by their names.
 
std::map< VariableName, VariableInfo > _vars
 variables for this simulation (name and info about the var)
 
std::map< std::string, ICInfo > _ics
 
const InputParameters & _thm_pars
 "Global" of this simulation
 
libMesh::FEType _flow_fe_type
 finite element type for the flow in the simulation
 
std::vector< OutputName > _outputters_all
 
std::vector< OutputName > _outputters_file
 
std::vector< OutputName > _outputters_screen
 
std::map< std::string, ControlDataValue * > _control_data
 Control data created in the control logic system.
 
bool _implicit_time_integration
 true if using implicit time integration scheme
 
Logger _log
 
bool _check_jacobian
 True if checking jacobian.
 
std::map< dof_id_type, std::vector< dof_id_type > > _sparsity_elem_augmentation
 Additional sparsity pattern that needs to be added into the Jacobian matrix.
 
bool _output_vector_velocity
 Flag indicating if velocity is output as vector-valued field.
 
const Parallel::Communicator & _communicator
 

Private Types

enum  TrueFunctorIs
 

Private Member Functions

void setResidualObjectParamsAndLog (const std::string &ro_name, const std::string &name, InputParameters &parameters, const unsigned int nl_sys_num, const std::string &base_name, bool &reinit_displaced)
 
void setAuxKernelParamsAndLog (const std::string &ak_name, const std::string &name, InputParameters &parameters, const std::string &base_name)
 
TheWarehouse::Query getUOQuery (const std::string &system, const ExecFlagType &type, const Moose::AuxGroup &group) const
 
void getUOExecutionGroups (TheWarehouse::Query &query, std::set< int > &execution_groups) const
 
void handleException (const std::string &calling_method)
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced, const std::vector< MortarUserObject * > &mortar_uo_superset)
 
std::vector< MortarUserObject * > getMortarUserObjects (BoundaryID primary_boundary_id, BoundaryID secondary_boundary_id, bool displaced)
 
virtual std::pair< bool, unsigned int > determineSolverSystem (const std::string &var_name, bool error_if_not_found=false) const override
 
void checkICRestartError (const std::string &ic_name, const std::string &name, const VariableName &var_name)
 
void addAnyRedistributers ()
 
void updateMaxQps ()
 
void joinAndFinalize (TheWarehouse::Query query, bool isgen=false)
 
void kokkosJoinAndFinalize (const std::vector< Moose::Kokkos::UserObject * > &userobjs)
 
virtual void resetState ()
 
void cloneAlgebraicGhostingFunctor (libMesh::GhostingFunctor &algebraic_gf, bool to_mesh=true)
 
void cloneCouplingGhostingFunctor (libMesh::GhostingFunctor &coupling_gf, bool to_mesh=true)
 
void showFunctors () const
 
void showFunctorRequestors () const
 
RestartableDataValue & registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
std::string restrictionSubdomainCheckName (SubdomainID check_id)
 
std::string restrictionSubdomainCheckName (SubdomainID check_id)
 
std::string restrictionBoundaryCheckName (BoundaryID check_id)
 
std::string restrictionBoundaryCheckName (BoundaryID check_id)
 
std::vector< VariableName > sortAddedComponentVariables () const
 Returns a sorted list of the variables added by components.
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 
static SolverParams makeLinearSolverParams ()
 

Private Attributes

std::vector< std::shared_ptr< NonlinearSystemBase > > _nl
 
Restartable::ManagedValue< RestartableEquationSystems > _req
 
bool _error_on_jacobian_nonzero_reallocation
 
const bool _restore_original_nonzero_pattern
 
bool _ignore_zeros_in_jacobian
 
bool _preserve_matrix_sparsity_pattern
 
const bool _force_restart
 
const bool _allow_ics_during_restart
 
const bool _skip_nl_system_check
 
bool _fail_next_system_convergence_check
 
const bool _allow_invalid_solution
 
const bool _show_invalid_solution_console
 
const bool & _immediately_print_invalid_solution
 
bool _started_initial_setup
 
bool _has_internal_edge_residual_objects
 
bool _u_dot_requested
 
bool _u_dotdot_requested
 
bool _u_dot_old_requested
 
bool _u_dotdot_old_requested
 
bool _has_mortar
 
unsigned int _num_grid_steps
 
bool _trust_user_coupling_matrix
 
bool _computing_scaling_jacobian
 
bool _computing_scaling_residual
 
bool _checking_uo_aux_state
 
ExecFlagEnum _print_execution_on
 
const bool _identify_variable_groups_in_nl
 
std::vector< VectorTag > _current_residual_vector_tags
 
bool _have_fv
 
const bool _regard_general_exceptions_as_errors
 
std::vector< libMesh::CouplingMatrix > _nonlocal_cm
 
bool _requires_nonlocal_coupling
 
bool _has_kokkos_objects
 
bool _has_kokkos_residual_objects
 
std::vector< std::function< void()> > _kokkos_mesh_initialization_hooks
 
std::vector< std::multimap< std::string, std::tuple< TrueFunctorIs, std::unique_ptr< Moose::FunctorEnvelopeBase >, std::unique_ptr< Moose::FunctorEnvelopeBase > > > > _functors
 
std::vector< std::map< std::string, std::unique_ptr< Moose::FunctorAbstract > > > _pbblf_functors
 
std::map< std::string, std::set< std::string > > _functor_to_requestors
 
std::vector< std::multimap< std::string, std::pair< bool, bool > > > _functor_to_request_info
 
bool _show_functors
 
bool _show_chain_control_data
 
std::vector< VectorTag > _vector_tags
 
std::vector< std::vector< VectorTag > > _typed_vector_tags
 
std::map< TagName, TagID > _vector_tags_name_map
 
std::map< MooseObjectName, std::set< std::string > > _consumed_material_properties
 
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_alg_gf_to_sys_clones
 
std::unordered_map< libMesh::GhostingFunctor *, std::vector< std::shared_ptr< libMesh::GhostingFunctor > > > _root_coupling_gf_to_sys_clones
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 

Static Private Attributes

static std::map< VariableName, int > _component_variable_order_map
 Component variable order map; see setComponentVariableOrder for more info.
 

Detailed Description

Specialization of FEProblem to run with component subsystem.

Definition at line 18 of file THMProblem.h.

Constructor & Destructor Documentation

◆ THMProblem()

THMProblem::THMProblem ( const InputParameters &  parameters)

Definition at line 43 of file THMProblem.C.

45{
46}
const InputParameters & parameters() const
Main class for simulation (the driver of the simulation)
Definition Simulation.h:30

Member Function Documentation

◆ addClosures()

void Simulation::addClosures ( const std::string &  type,
const std::string &  name,
InputParameters  params 
)
virtualinherited

Add a closures object into this simulation.

Parameters
[in]typeClosures class name
[in]nameClosures object name
[in]paramsInput parameters

Definition at line 1022 of file Simulation.C.

1023{
1024 std::shared_ptr<ClosuresBase> obj_ptr = _thm_factory.create<ClosuresBase>(type, name, params);
1025 if (_closures_by_name.find(name) == _closures_by_name.end())
1026 _closures_by_name[name] = obj_ptr;
1027 else
1028 logError("A closures object with the name '", name, "' already exists.");
1029}
const std::string name
Definition Setup.h:21
Base class for closures implementations.
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)
void logError(Args &&... args) const
Logs an error.
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
Map of closures by their names.
Definition Simulation.h:404
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition Simulation.h:392

Referenced by AddClosuresAction::act().

◆ addComponent()

void Simulation::addComponent ( const std::string &  type,
const std::string &  name,
InputParameters  params 
)
virtualinherited

Add a component into this simulation.

Parameters
typeType (the registered class name) of the component
nameName of the component
paramsInput parameters

Definition at line 1004 of file Simulation.C.

1005{
1006 std::shared_ptr<Component> comp = _thm_factory.create<Component>(type, name, params);
1007 if (_comp_by_name.find(name) == _comp_by_name.end())
1008 _comp_by_name[name] = comp;
1009 else
1010 logError("Component with name '", name, "' already exists");
1011 _components.push_back(comp);
1012}
Base class for THM components.
Definition Component.h:32
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition Simulation.h:397
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition Simulation.h:395

Referenced by AddComponentAction::act(), and THMActionComponent::addTHMComponent().

◆ addComponentScalarIC()

void Simulation::addComponentScalarIC ( const VariableName &  var_name,
const std::vector< Real > &  value 
)
inherited

Definition at line 562 of file Simulation.C.

563{
565 return;
566
567 std::string class_name = "ScalarComponentIC";
568 InputParameters params = _thm_factory.getValidParams(class_name);
569 params.set<VariableName>("variable") = var_name;
570 params.set<std::vector<Real>>("values") = value;
571 addSimInitialCondition(class_name, genName(var_name, "ic"), params);
572}
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition Simulation.C:492

◆ addConstantIC()

void Simulation::addConstantIC ( const VariableName &  var_name,
Real  value,
const std::vector< SubdomainName > &  block_names 
)
inherited

Definition at line 509 of file Simulation.C.

512{
514 return;
515
516 std::string blk_str = block_names[0];
517 for (unsigned int i = 1; i < block_names.size(); i++)
518 blk_str += ":" + block_names[i];
519
520 std::string class_name = "ConstantIC";
521 InputParameters params = _thm_factory.getValidParams(class_name);
522 params.set<VariableName>("variable") = var_name;
523 params.set<Real>("value") = value;
524 params.set<std::vector<SubdomainName>>("block") = block_names;
525 addSimInitialCondition(class_name, genName(var_name, blk_str, "ic"), params);
526}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by FlowModel::addCommonInitialConditions(), VolumeJunction1Phase::addJunctionIC(), and HeatTransferFromExternalAppHeatFlux1Phase::addVariables().

◆ addConstantScalarIC()

void Simulation::addConstantScalarIC ( const VariableName &  var_name,
Real  value 
)
inherited

Definition at line 549 of file Simulation.C.

550{
552 return;
553
554 std::string class_name = "ScalarConstantIC";
555 InputParameters params = _thm_factory.getValidParams(class_name);
556 params.set<VariableName>("variable") = var_name;
557 params.set<Real>("value") = value;
558 addSimInitialCondition(class_name, genName(var_name, "ic"), params);
559}

Referenced by Shaft::addVariables(), and TotalPower::addVariables().

◆ addControl()

void Simulation::addControl ( const std::string &  type,
const std::string &  name,
InputParameters  params 
)
inherited

Add a control.

Parameters
typeType (registered name) of the control
nameName of the control
paramsInput parameters

Definition at line 484 of file Simulation.C.

485{
486 params.addPrivateParam<FEProblemBase *>("_fe_problem_base", &_fe_problem);
487 std::shared_ptr<Control> control = _thm_factory.create<Control>(type, name, params);
489}
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse()
void addPrivateParam(const std::string &name, const T &value)
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition Simulation.h:386

◆ addFileOutputter()

void Simulation::addFileOutputter ( const std::string &  name)
inherited

Definition at line 1048 of file Simulation.C.

1049{
1050 _outputters_all.push_back(name);
1051 _outputters_file.push_back(name);
1052}
std::vector< OutputName > _outputters_file
Definition Simulation.h:451
std::vector< OutputName > _outputters_all
Definition Simulation.h:450

Referenced by THMSetupOutputAction::act().

◆ addFunctionIC()

void Simulation::addFunctionIC ( const VariableName &  var_name,
const std::string &  func_name,
const std::vector< SubdomainName > &  block_names 
)
inherited

Definition at line 529 of file Simulation.C.

532{
534 return;
535
536 std::string blk_str = block_names[0];
537 for (unsigned int i = 1; i < block_names.size(); i++)
538 blk_str += ":" + block_names[i];
539
540 std::string class_name = "FunctionIC";
541 InputParameters params = _thm_factory.getValidParams(class_name);
542 params.set<VariableName>("variable") = var_name;
543 params.set<std::vector<SubdomainName>>("block") = block_names;
544 params.set<FunctionName>("function") = func_name;
545 addSimInitialCondition(class_name, genName(var_name, blk_str, "ic"), params);
546}

Referenced by FlowModel::addCommonInitialConditions(), HeatTransferBase::addHeatedPerimeter(), HeatConductionModel::addInitialConditions(), HeatTransferFromExternalAppTemperature1Phase::addVariables(), HeatTransferFromHeatStructure1Phase::addVariables(), HeatTransferFromHeatStructure3D1Phase::addVariables(), and HeatTransferFromSpecifiedTemperature1Phase::addVariables().

◆ addMooseObjects()

void Simulation::addMooseObjects ( )
virtualinherited

Add component MOOSE objects.

Definition at line 751 of file Simulation.C.

752{
753 for (auto && comp : _components)
754 comp->addMooseObjects();
755}
virtual void addMooseObjects()
Add component MOOSE objects.
Definition Simulation.C:751

Referenced by AddComponentMooseObjectsAction::act().

◆ addRelationshipManagers()

void Simulation::addRelationshipManagers ( )
inherited

Add additional relationship managers to run the simulation.

Definition at line 758 of file Simulation.C.

759{
760 {
761 const std::string class_name = "AugmentSparsityBetweenElements";
762 auto params = _thm_factory.getValidParams(class_name);
763 params.set<Moose::RelationshipManagerType>("rm_type") =
764 Moose::RelationshipManagerType::COUPLING | Moose::RelationshipManagerType::ALGEBRAIC |
765 Moose::RelationshipManagerType::GEOMETRIC;
766 params.set<std::string>("for_whom") = _fe_problem.name();
767 params.set<MooseMesh *>("mesh") = &_thm_mesh;
768 params.set<std::map<dof_id_type, std::vector<dof_id_type>> *>("_elem_map") =
770 auto rm =
771 _thm_factory.create<RelationshipManager>(class_name, "thm:sparsity_btw_elems", params);
774 }
775
776 for (auto && comp : _components)
778 Moose::RelationshipManagerType::ALGEBRAIC |
779 Moose::RelationshipManagerType::GEOMETRIC);
780}
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
const std::string & name() const
MooseMesh & _thm_mesh
THM mesh.
Definition Simulation.h:383
void addRelationshipManagers()
Add additional relationship managers to run the simulation.
Definition Simulation.C:758
MooseApp & _thm_app
The application this is associated with.
Definition Simulation.h:389
std::map< dof_id_type, std::vector< dof_id_type > > _sparsity_elem_augmentation
Additional sparsity pattern that needs to be added into the Jacobian matrix.
Definition Simulation.h:466
RelationshipManagerType

Referenced by THMAddRelationshipManagersAction::act().

◆ addScreenOutputter()

void Simulation::addScreenOutputter ( const std::string &  name)
inherited

Definition at line 1055 of file Simulation.C.

1056{
1057 _outputters_all.push_back(name);
1058 _outputters_screen.push_back(name);
1059}
std::vector< OutputName > _outputters_screen
Definition Simulation.h:452

Referenced by THMSetupOutputAction::act().

◆ addSimInitialCondition()

void Simulation::addSimInitialCondition ( const std::string &  type,
const std::string &  name,
InputParameters  params 
)
inherited

◆ addSimVariable() [1/3]

void Simulation::addSimVariable ( bool  nl,
const std::string &  var_type,
const VariableName &  name,
const InputParameters &  params 
)
inherited

Queues a generic variable to be added to the nonlinear or aux system.

Parameters
[in]nlTrue if this is a nonlinear (solution) variable
[in]var_typeType (class) of the variable
[in]nameName of the variable
[in]paramsInput parameters for the variable

Definition at line 402 of file Simulation.C.

406{
408
409 if (_vars.find(name) == _vars.end()) // variable is new
410 {
411 VariableInfo vi;
412 vi._nl = nl;
413 vi._var_type = var_type;
414 vi._params = params;
415
416 _vars[name] = vi;
417 }
418 else // variable was previously added
419 {
420 VariableInfo & vi = _vars[name];
421 InputParameters & vi_params = vi._params;
422
423 if (vi._nl != nl)
424 mooseError("The variable '",
425 name,
426 "' has already been added in a different system (nonlinear or aux).");
427
428 if (vi._var_type != var_type)
429 mooseError("The variable '",
430 name,
431 "' has already been added with a different type than '",
432 var_type,
433 "'.");
434
435 // Check that all valid parameters (other than 'block') are consistent
436 for (auto it = params.begin(); it != params.end(); it++)
437 {
438 const std::string param_name = it->first;
439 if (param_name == "block")
440 {
441 if (vi_params.isParamValid("block"))
442 {
443 auto blocks = vi_params.get<std::vector<SubdomainName>>("block");
444 const auto new_blocks = params.get<std::vector<SubdomainName>>("block");
445 for (const auto & subdomain_name : new_blocks)
446 if (std::find(blocks.begin(), blocks.end(), subdomain_name) == blocks.end())
447 blocks.push_back(subdomain_name);
448 vi_params.set<std::vector<SubdomainName>>("block") = blocks;
449 }
450 else
451 mooseError("The variable '", name, "' was added previously without block restriction.");
452 }
453 else if (params.isParamValid(param_name))
454 {
455 if (vi_params.isParamValid(param_name))
456 {
457 if (params.rawParamVal(param_name) != vi_params.rawParamVal(param_name))
458 mooseError("The variable '",
459 name,
460 "' was added previously with a different value for the parameter '",
461 param_name,
462 "'.");
463 }
464 else
465 mooseError("The variable '",
466 name,
467 "' was added previously without the parameter '",
468 param_name,
469 "'.");
470 }
471 }
472 }
473}
char ** blocks
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
std::string rawParamVal(const std::string &param) const
bool isParamValid(const std::string &name) const
std::map< VariableName, VariableInfo > _vars
variables for this simulation (name and info about the var)
Definition Simulation.h:407
void checkVariableNameLength(const std::string &name) const
Reports an error if the variable name is too long.
Definition Simulation.C:476
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
if(subdm)

◆ addSimVariable() [2/3]

void Simulation::addSimVariable ( bool  nl,
const VariableName &  name,
libMesh::FEType  fe_type,
const std::vector< SubdomainName > &  subdomain_names,
Real  scaling_factor = 1.0 
)
inherited

Queues a variable of type MooseVariable to be added to the nonlinear or aux system.

Parameters
[in]nlTrue if this is a nonlinear (solution) variable
[in]nameName of the variable
[in]fe_typeFEType of the variable
[in]subdomain_namesList of subdomain names to add the variable to
[in]scaling_factorScaling factor for the variable

◆ addSimVariable() [3/3]

void Simulation::addSimVariable ( bool  nl,
const VariableName &  name,
libMesh::FEType  fe_type,
Real  scaling_factor = 1.0 
)
inherited

◆ addVariables()

void Simulation::addVariables ( )
virtualinherited

Add variables involved in this simulation.

Definition at line 631 of file Simulation.C.

632{
633 TransientBase * trex = dynamic_cast<TransientBase *>(_thm_app.getExecutioner());
634 if (trex)
635 {
637 // This is only needed for the listed time integrators that are using the original approach to
638 // explicit integration in MOOSE. Currently, the new time integrators like
639 // ActuallyExplicitEuler do not need the implicit flag to be set.
640 if (ti_type == Moose::TI_EXPLICIT_TVD_RK_2 || ti_type == Moose::TI_EXPLICIT_MIDPOINT ||
641 ti_type == Moose::TI_EXPLICIT_EULER)
643 }
644
645 if (_components.size() == 0)
646 return;
647
648 // Cache the variables that components request to add
649 for (auto && comp : _components)
650 comp->addVariables();
651
652 // Sort the variables for a consistent ordering
653 const auto var_names = sortAddedComponentVariables();
654
655 // Report the ordering if the executioner is verbose
656 if (_fe_problem.getParam<MooseEnum>("verbose_setup") != "false")
657 {
658 std::stringstream ss;
659 ss << "The system ordering of variables added by Components is as follows:\n";
660 for (const auto & var : var_names)
661 ss << " " << var << "\n";
662 mooseInfo(ss.str());
663 }
664
665 // Add the variables to the problem
666 for (const auto & name : var_names)
667 {
668 VariableInfo & vi = _vars[name];
669
670 if (vi._nl)
671 _fe_problem.addVariable(vi._var_type, name, vi._params);
672 else
673 _fe_problem.addAuxVariable(vi._var_type, name, vi._params);
674 }
675
678 else
680}
void mooseInfo(Args &&... args)
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Executioner * getExecutioner() const
const T & getParam(const std::string &name) const
virtual void addVariables()
Add variables involved in this simulation.
Definition Simulation.C:631
bool _implicit_time_integration
true if using implicit time integration scheme
Definition Simulation.h:458
std::vector< VariableName > sortAddedComponentVariables() const
Returns a sorted list of the variables added by components.
Definition Simulation.C:575
void setupInitialConditionObjects()
Definition Simulation.C:740
void setupInitialConditionsFromFile()
Setup reading initial conditions from a specified file, see 'initial_from_file', 'initial_from_file_t...
Definition Simulation.C:683
Moose::TimeIntegratorType getTimeScheme() const
TimeIntegratorType
TI_EXPLICIT_EULER
TI_EXPLICIT_TVD_RK_2
TI_EXPLICIT_MIDPOINT

Referenced by THMAddVariablesAction::act().

◆ advanceState()

void THMProblem::advanceState ( )
overridevirtual

Reimplemented from FEProblem.

Definition at line 49 of file THMProblem.C.

50{
53}
virtual void advanceState()
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep.

◆ augmentSparsity()

void Simulation::augmentSparsity ( const dof_id_type &  elem_id1,
const dof_id_type &  elem_id2 
)
virtualinherited

Hint how to augment sparsity pattern between two elements.

The augmentation will be symmetric

Definition at line 68 of file Simulation.C.

69{
70 auto it = _sparsity_elem_augmentation.find(elem_id1);
71 if (it == _sparsity_elem_augmentation.end())
73 {elem_id1, std::vector<dof_id_type>()});
74 it->second.push_back(elem_id2);
75
76 it = _sparsity_elem_augmentation.find(elem_id2);
77 if (it == _sparsity_elem_augmentation.end())
79 {elem_id2, std::vector<dof_id_type>()});
80 it->second.push_back(elem_id1);
81}

Referenced by GateValve1Phase::setupMesh(), HeatStructure2DCouplerBase::setupMesh(), HeatTransferFromHeatStructure1Phase::setupMesh(), HeatTransferFromHeatStructure3D1Phase::setupMesh(), HSCoupler2D2DRadiation::setupMesh(), HSCoupler2D3D::setupMesh(), JunctionOneToOne1Phase::setupMesh(), and VolumeJunction1Phase::setupMesh().

◆ buildMesh()

void Simulation::buildMesh ( )
virtualinherited

Create mesh for this simulation.

Definition at line 84 of file Simulation.C.

85{
86 if (_components.size() == 0)
87 return;
88
89 // build mesh
90 for (auto && comp : _components)
91 comp->executeSetupMesh();
92}

Referenced by THMBuildMeshAction::act().

◆ checkVariableNameLength()

void Simulation::checkVariableNameLength ( const std::string &  name) const
inherited

Reports an error if the variable name is too long.

Definition at line 476 of file Simulation.C.

477{
478 if (name.size() > THM::MAX_VARIABLE_LENGTH)
480 "Variable name '", name, "' is too long. The limit is ", THM::MAX_VARIABLE_LENGTH, ".");
481}
static const size_t MAX_VARIABLE_LENGTH

Referenced by Simulation::addSimVariable().

◆ controlDataIntegrityCheck()

void Simulation::controlDataIntegrityCheck ( )
virtualinherited

Check the integrity of the control data.

Definition at line 924 of file Simulation.C.

925{
926 if (_check_jacobian)
927 return;
928
929 // check that control data are consistent
930 for (auto && i : _control_data)
931 {
932 if (!i.second->getDeclared())
933 logError("Control data '",
934 i.first,
935 "' was requested, but was not declared by any active control object.");
936 }
937
939
941
942 // initialize THM control objects
943 for (auto && i : ctrl_wh.getObjects())
944 {
945 THMControl * ctrl = dynamic_cast<THMControl *>(i.get());
946 if (ctrl != nullptr)
947 ctrl->init();
948 }
949
950 for (auto && i : ctrl_wh.getObjects())
951 {
952 THMControl * ctrl = dynamic_cast<THMControl *>(i.get());
953 // if it is a THM control
954 if (ctrl != nullptr)
955 {
956 // get its dependencies on control data
957 auto & cd_deps = ctrl->getControlDataDependencies();
958 for (auto && cd_name : cd_deps)
959 {
960 ControlDataValue * cdv = _control_data[cd_name];
961 // find out which control object built the control data
962 std::string dep_name = cdv->getControl()->name();
963 auto & deps = ctrl->getDependencies();
964 // and if it is not in its dependency list, add it
965 auto it = std::find(deps.begin(), deps.end(), dep_name);
966 if (it == deps.end())
967 deps.push_back(dep_name);
968 }
969 }
970 }
971
972 // Find all `TerminateControl`s and all their dependencies. Then add those
973 // objects into TIMESTEP_END control warehouse
974 MooseObjectWarehouse<Control> & ctrl_wh_tse =
976 for (auto && i : ctrl_wh.getObjects())
977 {
978 if (TerminateControl * ctrl = dynamic_cast<TerminateControl *>(i.get()))
979 {
980 std::list<const THMControl *> l;
981 l.push_back(ctrl);
982 while (l.size() > 0)
983 {
984 const THMControl * ctrl = l.front();
985 auto & cd_deps = ctrl->getControlDataDependencies();
986 for (auto && cd_name : cd_deps)
987 {
988 ControlDataValue * cdv = _control_data[cd_name];
989 l.push_back(cdv->getControl());
990 }
991 ctrl_wh_tse.addObject(ctrl_wh.getObject(ctrl->name()));
992 l.pop_front();
993 }
994 }
995 }
996}
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_TIMESTEP_BEGIN
Abstract definition of a ControlData value.
Definition ControlData.h:21
const THMControl * getControl() const
Get the pointer to the control object that declared this control data.
Definition ControlData.h:55
std::vector< std::string > & getDependencies()
void emitLoggedErrors() const
Calls mooseError if there are any logged errors.
Definition Logger.C:21
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
std::map< std::string, ControlDataValue * > _control_data
Control data created in the control logic system.
Definition Simulation.h:455
Logger _log
Definition Simulation.h:460
bool _check_jacobian
True if checking jacobian.
Definition Simulation.h:463
virtual void init()
Definition THMControl.h:21
const std::vector< std::string > & getControlDataDependencies() const
Return the Controls that must run before this Control.
Definition THMControl.h:26
This control block will terminate a run if its input indicates so.

Referenced by ControlDataIntegrityCheckAction::act().

◆ copySolutionsBackwards()

void THMProblem::copySolutionsBackwards ( )
overridevirtual

Reimplemented from FEProblem.

Definition at line 56 of file THMProblem.C.

57{
60}
virtual void copySolutionsBackwards()

◆ couplingMatrixIntegrityCheck()

void Simulation::couplingMatrixIntegrityCheck ( ) const
virtualinherited

Check integrity of coupling matrix used by the preconditioner.

Definition at line 820 of file Simulation.C.

821{
823 return;
824
825 const TimeIntegrator * ti = nullptr;
826 const auto & time_integrators =
828 if (!time_integrators.empty())
829 ti = time_integrators.front().get();
830 // Yes, this is horrible. Don't ask why...
831 if ((dynamic_cast<const ExplicitTimeIntegrator *>(ti) != nullptr) ||
832 (dynamic_cast<const ExplicitEuler *>(ti) != nullptr) ||
833 (dynamic_cast<const ExplicitRK2 *>(ti) != nullptr) ||
834 (dynamic_cast<const ExplicitTVDRK2 *>(ti) != nullptr))
835 return;
836
837 const CouplingMatrix * cm = _fe_problem.couplingMatrix(/*nl_sys_num=*/0);
838 if (cm == nullptr)
839 mooseError("Coupling matrix does not exists. Something really bad happened.");
840
841 bool full = true;
842 for (unsigned int i = 0; i < cm->size(); i++)
843 for (unsigned int j = 0; j < cm->size(); j++)
844 full &= (*cm)(i, j);
845
846 if (!full)
848 "Single matrix preconditioning with full coupling is required to run. Please, check that "
849 "your input file has the following preconditioning block:\n\n"
850 "[Preconditioning]\n"
851 " [pc]\n"
852 " type = SMP\n"
853 " full = true\n"
854 " []\n"
855 "[].\n");
856}
bool shouldSolve() const
const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
const std::vector< std::shared_ptr< TimeIntegrator > > & getTimeIntegrators()

Referenced by THMPreconditioningIntegrityCheckAction::act().

◆ declareControlData()

template<typename T >
ControlData< T > * Simulation::declareControlData ( const std::string &  name,
THMControl *  ctrl 
)
inlineinherited

Declare control data of type T and name 'name', if it does not exist it will be created.

Parameters
nameThe unique name of the control data
Returns
Pointer to the control data of type T

Definition at line 306 of file Simulation.h.

307 {
308 ControlData<T> * data = getControlData<T>(name);
309 if (!data->getDeclared())
310 {
311 // Mark the data for error checking
312 data->setDeclared();
313 data->setControl(ctrl);
314 }
315 else
316 logError("Trying to declare '", name, "', but it was already declared.");
317
318 return data;
319 }
bool getDeclared()
Get the declared state.
Definition ControlData.h:70
void setControl(THMControl *ctrl)
Set the pointer to the control object that declared this control data.
Definition ControlData.h:60
void setDeclared()
Mark the data as declared.
Definition ControlData.h:65
Concrete definition of a parameter value for a specified type.
Definition ControlData.h:92

Referenced by THMControl::declareComponentControlData(), and THMControl::declareControlData().

◆ genName() [1/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings.

Definition at line 66 of file NamingInterface.h.

69 {
70 std::stringstream ss;
71 ss << prefix << ":" << middle;
72 if (!suffix.empty())
73 ss << ":" << suffix;
74 return ss.str();
75 }

◆ genName() [2/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  name,
unsigned int  i 
) const
inlineinherited

Build a name from 2 strings and a number.

Definition at line 56 of file NamingInterface.h.

57 {
58 std::stringstream ss;
59 ss << prefix << ":" << name << ":" << i;
60 return ss.str();
61 }

◆ genName() [3/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  i,
unsigned int  j,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, 2 numbers and possible suffix.

Definition at line 41 of file NamingInterface.h.

45 {
46 std::stringstream ss;
47 ss << prefix << ":" << i << ":" << j;
48 if (!suffix.empty())
49 ss << ":" << suffix;
50 return ss.str();
51 }

◆ genName() [4/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  id,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, number and possible suffix.

Definition at line 29 of file NamingInterface.h.

30 {
31 std::stringstream ss;
32 ss << prefix << ":" << id;
33 if (!suffix.empty())
34 ss << ":" << suffix;
35 return ss.str();
36 }

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), FlowChannelBase::addCommonObjects(), Simulation::addComponentScalarIC(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), Simulation::addConstantIC(), Simulation::addConstantScalarIC(), FlowModel1PhaseBase::addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), FlowModel1PhaseBase::addEnergyGravityKernel(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), VolumeJunctionCoupledFlux1Phase::addFluxTransfer(), FlowModel1PhaseBase::addFunctionIC(), Simulation::addFunctionIC(), FlowModel1PhaseBase::addHeatConductionDGKernel(), HeatTransferBase::addHeatedPerimeter(), HeatConductionModel::addHeatEquationRZ(), HeatConductionModel::addHeatEquationXYZ(), HeatTransferFromTemperature1Phase::addHeatTransferKernels(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), FlowModel1PhaseBase::addMomentumAreaGradientKernel(), FlowModel1PhaseBase::addMomentumFrictionKernel(), FlowModel1PhaseBase::addMomentumGravityKernel(), FlowChannel1Phase::addMooseObjects(), FlowChannelBase::addMooseObjects(), FormLoss1PhaseBase::addMooseObjects(), FormLossFromExternalApp1Phase::addMooseObjects(), FormLossFromFunction1Phase::addMooseObjects(), GateValve1Phase::addMooseObjects(), HeatSourceFromPowerDensity::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructure2DCoupler::addMooseObjects(), HeatStructure2DRadiationCouplerRZ::addMooseObjects(), HeatTransferBase::addMooseObjects(), HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), HeatTransferFromHeatStructure3D1Phase::addMooseObjects(), HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects(), HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryExternalAppTemperature::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), HSBoundaryRadiation::addMooseObjects(), HSBoundarySpecifiedTemperature::addMooseObjects(), HSCoupler2D2DRadiation::addMooseObjects(), HSCoupler2D3D::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), JunctionOneToOne1Phase::addMooseObjects(), Shaft::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), TotalPower::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), FunctorClosures::addMooseObjectsFlowChannel(), Closures1PhaseSimple::addMooseObjectsHeatTransfer(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), VolumeJunctionCoupledFlux1Phase::addPropertyTransfer(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), FlowModel1PhaseBase::addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), FlowModel1PhaseBase::addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), FlowModel1PhaseBase::addSpecificInternalEnergyAux(), FlowModel1PhaseBase::addSpecificInternalEnergyIC(), FlowModel1PhaseBase::addSpecificTotalEnthalpyAux(), FlowModel1PhaseBase::addSpecificTotalEnthalpyIC(), FlowModel1PhaseBase::addSpecificVolumeAux(), FlowModel1PhaseBase::addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), FlowModel1PhaseBase::addTimeDerivativeKernelIfTransient(), FlowChannelBase::addVariables(), FlowModel1PhaseBase::addVelocityAux(), FlowModel1PhaseBase::addVelocityIC(), VolumeJunction1Phase::addVolumeJunctionIC(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), Closures1PhaseTHM::addWallFFMaterial(), Closures1PhaseBase::addWallFrictionFunctionMaterial(), Closures1PhaseTHM::addWallHTCMaterial(), ClosuresBase::addWallTemperatureFromAuxMaterial(), Closures1PhaseSimple::addWallTemperatureFromHeatFluxMaterial(), FlowBoundary1Phase::addWeakBCs(), FlowBoundaryGasMix::addWeakBCs(), ClosuresBase::addWeightedAverageMaterial(), FlowModelGasMix::addXiRhoAIC(), ClosuresBase::addZeroMaterial(), FileMeshComponent::buildMesh(), Component1D::buildMesh(), Component2D::buildMesh(), HeatSourceBase::HeatSourceBase(), Component::nonlinearConvergenceName(), and Simulation::setupInitialConditionsFromFile().

◆ genSafeName()

std::string NamingInterface::genSafeName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings that is safe to use in input files (i.e.

can be exposed to users)

Definition at line 80 of file NamingInterface.h.

83 {
84 std::stringstream ss;
85 ss << prefix << "_" << middle;
86 if (!suffix.empty())
87 ss << "_" << suffix;
88 return ss.str();
89 }

Referenced by HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), and HSBoundaryRadiation::addMooseObjects().

◆ getClosures()

std::shared_ptr< ClosuresBase > Simulation::getClosures ( const std::string &  name) const
inherited

Get a pointer to a closures object.

Parameters
[in]nameClosures object name

Definition at line 1038 of file Simulation.C.

1039{
1040 auto it = _closures_by_name.find(name);
1041 if (it != _closures_by_name.end())
1042 return it->second;
1043 else
1044 mooseError("The requested closures object '", name, "' does not exist.");
1045}

Referenced by FlowChannelBase::init().

◆ getComponentByName()

template<typename T >
const T & Simulation::getComponentByName ( const std::string &  name) const
inherited

Get component by its name.

Template Parameters
Tthe type of the component we are requesting
Parameters
nameThe name of the component
Returns
Pointer to the component if found, otherwise throws and error

Definition at line 499 of file Simulation.h.

500{
501 auto it = _comp_by_name.find(name);
502 if (it != _comp_by_name.end())
503 return *dynamic_cast<T *>((it->second).get());
504 else
505 mooseError("Component '",
506 name,
507 "' does not exist in the simulation. Use hasComponent or "
508 "checkComponnetByName before calling getComponent.");
509}
const double T
const Elem & get(const ElemType type_in)

Referenced by VolumeJunctionCoupledFlux1Phase::addFluxPostprocessor(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), Component::getComponentByName(), Component1DConnection::init(), FlowBoundary::init(), FlowBoundary1PhaseBase::init(), FlowJunction::init(), and FlowJunction1Phase::init().

◆ getComponents()

const std::vector< std::shared_ptr< Component > > & Simulation::getComponents ( ) const
inlineinherited

Return list of components available in the simulation.

Definition at line 117 of file Simulation.h.

117{ return _components; }

Referenced by ComponentsConvergence::initialSetup(), and ParaviewComponentAnnotationMap::output().

◆ getControlData()

template<typename T >
ControlData< T > * Simulation::getControlData ( const std::string &  name)
inlineinherited

Get control data of type T and name 'name', if it does not exist it will be created.

Parameters
nameThe unique name of the control data
Returns
Pointer to the control data of type T

Definition at line 285 of file Simulation.h.

286 {
287 ControlData<T> * data = nullptr;
288 if (_control_data.find(name) == _control_data.end())
289 {
290 data = new ControlData<T>(_thm_app, name);
291 _control_data[name] = data;
292 }
293 else
294 data = dynamic_cast<ControlData<T> *>(_control_data[name]);
295
296 return data;
297 }

Referenced by BoolControlDataValuePostprocessor::BoolControlDataValuePostprocessor(), THMControl::getControlDataByName(), THMControl::getControlDataOldByName(), THMParsedFunctionWrapper::initialize(), and RealControlDataValuePostprocessor::RealControlDataValuePostprocessor().

◆ getFlowFEType()

const libMesh::FEType & Simulation::getFlowFEType ( ) const
inlineinherited

Gets the FE type for the flow in this simulation.

Definition at line 48 of file Simulation.h.

48{ return _flow_fe_type; }
libMesh::FEType _flow_fe_type
finite element type for the flow in the simulation
Definition Simulation.h:425

Referenced by Simulation::setupQuadrature().

◆ getImplicitTimeIntegrationFlag()

const bool & Simulation::getImplicitTimeIntegrationFlag ( )
inlineinherited

◆ getOutputsVector()

std::vector< OutputName > Simulation::getOutputsVector ( const std::string &  key) const
inherited

Gets the vector of output names corresponding to a 1-word key string.

Parameters
[in]keystring key that corresponds to an output names vector
Returns
output names vector corresponding to key

Definition at line 1062 of file Simulation.C.

1063{
1064 std::string key_lowercase = key;
1065 std::transform(key_lowercase.begin(), key_lowercase.end(), key_lowercase.begin(), ::tolower);
1066
1067 std::vector<OutputName> outputs;
1068 if (key_lowercase == "none")
1069 outputs.push_back("none"); // provide non-existent name, so it does not get printed out
1070 else if (key_lowercase == "screen")
1071 outputs = _outputters_screen;
1072 else if (key_lowercase == "file")
1073 outputs = _outputters_file;
1074 else if (key_lowercase == "both")
1075 outputs = _outputters_all;
1076 else
1077 mooseError("The outputs vector key '" + key_lowercase + "' is invalid");
1078
1079 return outputs;
1080}

◆ getVectorValuedVelocity()

bool Simulation::getVectorValuedVelocity ( )
inlineinherited

Is velocity output as vector-valued field.

Returns
true for vector-valued field, false for scalar

Definition at line 354 of file Simulation.h.

354{ return _output_vector_velocity; }
bool _output_vector_velocity
Flag indicating if velocity is output as vector-valued field.
Definition Simulation.h:469

Referenced by FlowChannel1PhaseBase::buildFlowModel().

◆ hasClosures()

bool Simulation::hasClosures ( const std::string &  name) const
inherited

Return whether the simulation has a closures object.

Parameters
[in]nameClosures object name

Definition at line 1032 of file Simulation.C.

1033{
1034 return _closures_by_name.find(name) != _closures_by_name.end();
1035}

◆ hasComponent()

bool Simulation::hasComponent ( const std::string &  name) const
inherited

Find out if simulation has a component with the given name.

Parameters
nameThe name of the component
Returns
true if the components exists, otherwise false

Definition at line 1015 of file Simulation.C.

1016{
1017 auto it = _comp_by_name.find(name);
1018 return (it != _comp_by_name.end());
1019}

Referenced by Component::checkComponentExistsByName(), Component::checkComponentOfTypeExistsByName(), and Simulation::initSimulation().

◆ hasComponentOfType()

template<typename T >
bool Simulation::hasComponentOfType ( const std::string &  name) const
inherited

Find out if simulation has a component with the given name and specified type.

Template Parameters
Tthe type of the component we are requesting
Parameters
nameThe name of the component
Returns
true if the component exists and has specified type, otherwise false

Definition at line 488 of file Simulation.h.

489{
490 auto it = _comp_by_name.find(name);
491 if (it != _comp_by_name.end())
492 return dynamic_cast<T *>((it->second).get()) != nullptr;
493 else
494 return false;
495}

Referenced by Component::checkComponentOfTypeExistsByName(), and Component::hasComponentByName().

◆ hasControlData()

template<typename T >
bool Simulation::hasControlData ( const std::string &  name)
inlineinherited

Query if control data with name 'name' exists.

Parameters
nameThe unique name of the control data
Returns
true if control data 'name' exists, false otherwise

Definition at line 270 of file Simulation.h.

271 {
272 if (_control_data.find(name) == _control_data.end())
273 return false;
274 else
275 return dynamic_cast<ControlData<T> *>(_control_data[name]) != NULL;
276 }

Referenced by THMParsedFunctionWrapper::initialize().

◆ hasInitialConditionsFromFile()

bool Simulation::hasInitialConditionsFromFile ( ) const
inherited

Are initial conditions specified from a file.

Returns
true if initial conditions are specified from a file

Definition at line 1083 of file Simulation.C.

1084{
1085 return _thm_pars.isParamValid("initial_from_file");
1086}
const InputParameters & _thm_pars
"Global" of this simulation
Definition Simulation.h:422

Referenced by Simulation::addComponentScalarIC(), Simulation::addConstantIC(), Simulation::addConstantScalarIC(), Simulation::addFunctionIC(), Simulation::addSimInitialCondition(), Simulation::addVariables(), HeatStructureInterface::check(), FlowChannel1PhaseBase::check(), Shaft::check(), and VolumeJunction1Phase::check().

◆ hasPostprocessor()

bool THMProblem::hasPostprocessor ( const std::string &  name) const
virtual

Check if a postprocessor with a given name exists in the simulation.

Returns
true if postprocessor with the given name exists in the simulation, false otherwise
Parameters
nameThe name of the postprocessor

Definition at line 63 of file THMProblem.C.

64{
66 return true;
67
68 // Sometimes we want to know if a Postprocessor exists well before Postprocessor objects
69 // are actually constructed (within check() in Components) in order to provide a better
70 // error than MOOSE (which checks for Postprocessor existence well after objects are added).
71 // Therefore, if we can't find that we have a Reporter value that represents the PP,
72 // this method might have been called before the add_postprocessor task that sets up the
73 // Reporter values for the postprocessors. Therefore, let's also see which Postprocessors
74 // are slated to be constructed in the future (via the AddPostprocessorAction actions,
75 // in which the names are the PP names themselves)
76 for (const auto & action : getMooseApp().actionWarehouse().getActions<AddPostprocessorAction>())
77 if (action->name() == name)
78 return true;
79
80 return false;
81}
ReporterData _reporter_data
MooseApp & getMooseApp() const
bool hasReporterValue(const ReporterName &reporter_name) const

◆ identifyLoops()

void Simulation::identifyLoops ( )
inherited

Identifies the component loops.

Definition at line 161 of file Simulation.C.

162{
163 // loop over junctions and boundaries (non-geometrical components)
164 for (const auto & component : _components)
165 {
166 const auto flow_connection =
167 MooseSharedNamespace::dynamic_pointer_cast<Component1DConnection>(component);
168 if (flow_connection)
169 {
170 // create vector of names of this component and its connected flow channels, and then sort
171 // them
172 std::vector<std::string> names = flow_connection->getConnectedComponentNames();
173 names.push_back(component->name());
174 std::sort(names.begin(), names.end());
175
176 // pick first name alphabetically to be the proposed loop name
177 std::string proposed_loop_name = names[0];
178
179 for (const std::string & name : names)
180 {
181 // if the name is not yet in the map
183 // just add the new map key; nothing else needs updating
184 _component_name_to_loop_name[name] = proposed_loop_name;
185 else
186 {
187 // compare to the existing loop name for this component to make sure the
188 // proposed loop name is first alphabetically
189 const std::string current_loop_name = _component_name_to_loop_name[name];
190 // if proposed loop name comes later, change map values of the current
191 // loop name to be the proposed name, and then update the proposed name
192 // to be the current name
193 if (proposed_loop_name > current_loop_name)
194 {
195 for (auto && entry : _component_name_to_loop_name)
196 if (entry.second == proposed_loop_name)
197 entry.second = current_loop_name;
198 proposed_loop_name = current_loop_name;
199 }
200 // if proposed loop name comes earlier, change map values of the current
201 // loop name to be the proposed name
202 else if (proposed_loop_name < current_loop_name)
203 {
204 for (auto && entry : _component_name_to_loop_name)
205 if (entry.second == current_loop_name)
206 entry.second = proposed_loop_name;
207 }
208 }
209 }
210 }
211 }
212
213 // get the list of loops
214 std::vector<std::string> loops;
215 for (const auto & entry : _component_name_to_loop_name)
216 if (std::find(loops.begin(), loops.end(), entry.second) == loops.end())
217 loops.push_back(entry.second);
218
219 // fill the map of loop name to model ID
220 for (const auto & loop : loops)
221 {
222 // find a flow channel in this loop and get its model ID
223 THM::FlowModelID model_id;
224 bool found_model_id = false;
225 for (const auto & component : _components)
226 {
227 const auto flow_chan_base_component =
228 MooseSharedNamespace::dynamic_pointer_cast<FlowChannelBase>(component);
229 if (flow_chan_base_component && (_component_name_to_loop_name[component->name()] == loop))
230 {
231 model_id = flow_chan_base_component->getFlowModelID();
232 found_model_id = true;
233 break;
234 }
235 }
236 // set the value in the map or throw an error
237 if (found_model_id)
238 _loop_name_to_model_id[loop] = model_id;
239 else
240 logError("No FlowChannelBase-derived components were found in loop '", loop, "'");
241 }
242}
std::map< std::string, std::string > _component_name_to_loop_name
Map of component name to component loop name.
Definition Simulation.h:399
std::map< std::string, THM::FlowModelID > _loop_name_to_model_id
Map of loop name to model type.
Definition Simulation.h:401
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
unsigned int FlowModelID

Referenced by IdentifyLoopsAction::act().

◆ initComponents()

void Simulation::initComponents ( )
virtualinherited

Initialize this simulation's components.

Definition at line 148 of file Simulation.C.

149{
150 // initialize components
151 for (auto && comp : _components)
152 comp->executeInit();
153
154 // perform secondary initialization, which relies on init() being called
155 // already for all components
156 for (auto && comp : _components)
157 comp->executeInitSecondary();
158}

Referenced by THMInitComponentsAction::act().

◆ initSimulation()

void Simulation::initSimulation ( )
virtualinherited

Initialize this simulation.

Definition at line 132 of file Simulation.C.

133{
134 // sort the components using dependency resolver
136 for (const auto & comp : _components)
137 {
138 dependency_resolver.addNode(comp);
139 for (const auto & dep : comp->getDependencies())
140 if (hasComponent(dep))
141 dependency_resolver.addEdge(_comp_by_name[dep], comp);
142 }
143
144 _components = dependency_resolver.dfs();
145}
void addNode(const T &a)
const std::vector< T > & dfs()
bool hasComponent(const std::string &name) const
Find out if simulation has a component with the given name.

Referenced by THMInitSimulationAction::act().

◆ integrityCheck()

void Simulation::integrityCheck ( ) const
virtualinherited

Check the integrity of the simulation.

Definition at line 859 of file Simulation.C.

860{
861 if (_components.size() == 0)
862 return;
863
864 if (_check_jacobian)
865 return;
866
867 // go over components and put flow channels into one "bucket"
868 std::vector<Component *> flow_channels;
869 for (auto && comp : _components)
870 {
871 auto flow_channel = dynamic_cast<FlowChannelBase *>(comp.get());
872 if (flow_channel != nullptr)
873 flow_channels.push_back(flow_channel);
874 }
875
876 // initialize number of connected flow channel inlets and outlets to zero
877 std::map<std::string, unsigned int> flow_channel_inlets;
878 std::map<std::string, unsigned int> flow_channel_outlets;
879 for (auto && comp : flow_channels)
880 {
881 flow_channel_inlets[comp->name()] = 0;
882 flow_channel_outlets[comp->name()] = 0;
883 }
884
885 // mark connections of any Component1DConnection components
886 for (const auto & comp : _components)
887 {
888 auto pc_comp = dynamic_cast<Component1DConnection *>(comp.get());
889 if (pc_comp != nullptr)
890 {
891 for (const auto & connection : pc_comp->getConnections())
892 {
893 if (connection._end_type == Component1DConnection::IN)
894 flow_channel_inlets[connection._component_name]++;
895 else if (connection._end_type == Component1DConnection::OUT)
896 flow_channel_outlets[connection._component_name]++;
897 }
898 }
899 }
900
901 // finally, check that each flow channel has exactly one input and one output
902 for (auto && comp : flow_channels)
903 {
904 if (flow_channel_inlets[comp->name()] == 0)
905 logError("Component '", comp->name(), "' does not have connected inlet.");
906 else if (flow_channel_inlets[comp->name()] > 1)
907 logError("Multiple inlets specified for component '", comp->name(), "'.");
908
909 if (flow_channel_outlets[comp->name()] == 0)
910 logError("Component '", comp->name(), "' does not have connected outlet.");
911 else if (flow_channel_outlets[comp->name()] > 1)
912 logError("Multiple outlets specified for component '", comp->name(), "'.");
913 }
914
915 // let components check themselves
916 for (auto && comp : _components)
917 comp->executeCheck();
918
921}
Base class for 1D component junctions and boundaries.
A base class for flow channels.
void emitLoggedWarnings() const
Calls mooseWarning if there are any logged warnings.
Definition Logger.C:35

Referenced by IntegrityCheckAction::act().

◆ log()

Logger & Simulation::log ( )
inlineinherited

Definition at line 333 of file Simulation.h.

333{ return _log; }

Referenced by AddClosuresAction::act().

◆ logComponentError()

template<typename... Args>
void LoggingInterface::logComponentError ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs an error for a component.

Parameters
[in]component_nameName of the component

Definition at line 47 of file LoggingInterface.h.

48 {
49 _log.add(Logger::ERROR, component_name, ": ", std::forward<Args>(args)...);
50 }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition Logger.h:35
@ ERROR
Definition Logger.h:25

Referenced by Closures1PhaseSimple::checkFlowChannel(), Closures1PhaseSimple::checkHeatTransfer(), and Component::logError().

◆ logComponentWarning()

template<typename... Args>
void LoggingInterface::logComponentWarning ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs a warning for a component.

Parameters
[in]component_nameName of the component

Definition at line 67 of file LoggingInterface.h.

68 {
69 _log.add(Logger::WARNING, component_name, ": ", std::forward<Args>(args)...);
70 }
@ WARNING
Definition Logger.h:26

Referenced by Component::logWarning().

◆ logError()

template<typename... Args>
void LoggingInterface::logError ( Args &&...  args) const
inlineinherited

◆ logWarning()

template<typename... Args>
void LoggingInterface::logWarning ( Args &&...  args) const
inlineinherited

Logs a warning.

Definition at line 56 of file LoggingInterface.h.

57 {
58 _log.add(Logger::WARNING, std::forward<Args>(args)...);
59 }

◆ printComponentLoops()

void Simulation::printComponentLoops ( ) const
inherited

Prints the component loops.

Definition at line 245 of file Simulation.C.

246{
247 // get the list of loops
248 std::vector<std::string> loops;
249 for (auto && entry : _component_name_to_loop_name)
250 if (std::find(loops.begin(), loops.end(), entry.second) == loops.end())
251 loops.push_back(entry.second);
252
253 // for each loop
254 Moose::out << "\nListing of component loops:" << std::endl;
255 for (unsigned int i = 0; i < loops.size(); i++)
256 {
257 Moose::out << "\n Loop " << i + 1 << ":" << std::endl;
258
259 // print out each component in the loop
260 for (auto && entry : _component_name_to_loop_name)
261 if (entry.second == loops[i])
262 Moose::out << " " << entry.first << std::endl;
263 }
264 Moose::out << std::endl;
265}
OStreamProxy out(std::cout)

Referenced by THMPrintComponentLoopsAction::act().

◆ run()

void Simulation::run ( )
virtualinherited

Run the simulation.

Definition at line 999 of file Simulation.C.

1000{
1001}

◆ setCheckJacobian()

void Simulation::setCheckJacobian ( bool  state)
inlineinherited

Enable Jacobian checking.

Parameters
stateTrue for Jacobian checking, otherwise false

Definition at line 340 of file Simulation.h.

340{ _check_jacobian = state; }

Referenced by THMDebugAction::act().

◆ setComponentVariableOrder()

void Simulation::setComponentVariableOrder ( const VariableName &  var,
int  index 
)
staticinherited

Sets a component variable order index.

See Component system documentation for more information.

Parameters
[in]varVariable to order
[in]indexOrder index

Definition at line 37 of file Simulation.C.

38{
40}
static std::map< VariableName, int > _component_variable_order_map
Component variable order map; see setComponentVariableOrder for more info.
Definition Simulation.h:483

Referenced by ThermalHydraulicsApp::registerAll().

◆ setupCoordinateSystem()

void Simulation::setupCoordinateSystem ( )
protectedinherited

Sets the coordinate system for each subdomain.

Definition at line 783 of file Simulation.C.

784{
785 MultiMooseEnum coord_types("XYZ RZ RSPHERICAL");
786 std::vector<SubdomainName> blocks;
787
788 for (auto && comp : _components)
789 {
790 if (comp->parent() == nullptr)
791 {
792 const auto & subdomains = comp->getSubdomainNames();
793 const auto & coord_sys = comp->getCoordSysTypes();
794
795 for (unsigned int i = 0; i < subdomains.size(); i++)
796 {
797 blocks.push_back(subdomains[i]);
798 // coord_types.push_back("XYZ");
799 coord_types.setAdditionalValue(coord_sys[i] == Moose::COORD_RZ ? "RZ" : "XYZ");
800 }
801 }
802 }
803 _fe_problem.setCoordSystem(blocks, coord_types);
804
805 // RZ geometries are always aligned with x-axis
806 MooseEnum rz_coord_axis("X=0 Y=1", "X");
808}
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)

Referenced by Simulation::setupMesh().

◆ setupCriticalHeatFluxTable()

void Simulation::setupCriticalHeatFluxTable ( )
protectedinherited

Setup ctirical heat flux table user object.

◆ setupEquations()

void Simulation::setupEquations ( )
protectedinherited

Setup equations to be solved in this simulation.

◆ setupInitialConditionObjects()

void Simulation::setupInitialConditionObjects ( )
protectedinherited

Definition at line 740 of file Simulation.C.

741{
742 for (auto && i : _ics)
743 {
744 const std::string & name = i.first;
745 ICInfo & ic = i.second;
746 _fe_problem.addInitialCondition(ic._type, name, ic._params);
747 }
748}
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)

Referenced by Simulation::addVariables().

◆ setupInitialConditionsFromFile()

void Simulation::setupInitialConditionsFromFile ( )
protectedinherited

Setup reading initial conditions from a specified file, see 'initial_from_file', 'initial_from_file_timestep', and 'initial_from_file_weighting_type' parameters.

Definition at line 683 of file Simulation.C.

684{
685 const UserObjectName suo_name = genName("thm", "suo");
686 {
687 const std::string class_name = "SolutionUserObject";
688 InputParameters params = _thm_factory.getValidParams(class_name);
689 params.set<MeshFileName>("mesh") = _thm_pars.get<FileName>("initial_from_file");
690 params.set<std::string>("timestep") = _thm_pars.get<std::string>("initial_from_file_timestep");
691 _fe_problem.addUserObject(class_name, suo_name, params);
692 }
693
694 for (auto && v : _vars)
695 {
696 const VariableName & var_name = v.first;
697 const VariableInfo & vi = v.second;
698
699 if (vi._var_type == "MooseVariableScalar")
700 {
701 std::string class_name = "ScalarSolutionIC";
702 InputParameters params = _thm_factory.getValidParams(class_name);
703 params.set<VariableName>("variable") = var_name;
704 params.set<VariableName>("from_variable") = var_name;
705 params.set<UserObjectName>("solution_uo") = suo_name;
706 _fe_problem.addInitialCondition(class_name, genName(var_name, "ic"), params);
707 }
708 else
709 {
710 const std::string class_name = "SolutionIC";
711 InputParameters params = _thm_factory.getValidParams(class_name);
712 params.set<VariableName>("variable") = var_name;
713 params.set<VariableName>("from_variable") = var_name;
714 params.set<UserObjectName>("solution_uo") = suo_name;
715 if (_thm_pars.isParamSetByUser("initial_from_file_weighting_type"))
716 params.set<MooseEnum>("weighting_type") =
717 _thm_pars.get<MooseEnum>("initial_from_file_weighting_type");
718
719 if (vi._params.isParamValid("block"))
720 {
721 const auto & block_names = vi._params.get<std::vector<SubdomainName>>("block");
722
723 for (const auto & block_name : block_names)
724 {
725 InputParameters block_params = params;
726 block_params.set<std::vector<SubdomainName>>("block") = {block_name};
727 block_params.set<std::vector<SubdomainName>>("from_subdomains") = {block_name};
728
730 class_name, genName(var_name, block_name, "ic"), block_params);
731 }
732 }
733 else
734 _fe_problem.addInitialCondition(class_name, genName(var_name, "ic"), params);
735 }
736 }
737}
const double v
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
bool isParamSetByUser(const std::string &name) const

Referenced by Simulation::addVariables().

◆ setupMesh()

void Simulation::setupMesh ( )
virtualinherited

Perform mesh setup actions such as setting up the coordinate system(s) and creating ghosted elements.

Definition at line 811 of file Simulation.C.

812{
813 if (_components.size() == 0)
814 return;
815
817}
void setupCoordinateSystem()
Sets the coordinate system for each subdomain.
Definition Simulation.C:783

Referenced by THMSetupMeshAction::act().

◆ setupQuadrature()

void Simulation::setupQuadrature ( )
virtualinherited

Sets up quadrature rules.

Definition at line 95 of file Simulation.C.

96{
97 if (_components.size() == 0)
98 return;
99
100 Order order = CONSTANT;
101 unsigned int n_flow_channels = 0;
102 unsigned int n_heat_structures = 0;
103
104 for (auto && comp : _components)
105 {
106 auto flow_channel = dynamic_cast<FlowChannelBase *>(comp.get());
107 if (flow_channel != nullptr)
108 n_flow_channels++;
109
110 auto hs_interface = dynamic_cast<HeatStructureInterface *>(comp.get());
111 if (hs_interface)
112 n_heat_structures++;
113 }
114
115 if (n_flow_channels > 0)
116 {
117 const FEType & fe_type = getFlowFEType();
118 if (fe_type.default_quadrature_order() > order)
119 order = fe_type.default_quadrature_order();
120 }
121 if (n_heat_structures > 0)
122 {
123 const FEType & fe_type = HeatConductionModel::feType();
124 if (fe_type.default_quadrature_order() > order)
125 order = fe_type.default_quadrature_order();
126 }
127
128 _fe_problem.createQRules(libMesh::QGAUSS, order, order, order);
129}
virtual void createQRules(libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
Interface class for heat structure components.
const libMesh::FEType & getFlowFEType() const
Gets the FE type for the flow in this simulation.
Definition Simulation.h:48

Referenced by THMSetupQuadratureAction::act().

◆ setVectorValuedVelocity()

void Simulation::setVectorValuedVelocity ( bool  vector_velocity)
inlineinherited

Set if velocity is being output as a vector-valued field.

Definition at line 359 of file Simulation.h.

359{ _output_vector_velocity = vector_velocity; }

Referenced by THMOutputVectorVelocityAction::act().

◆ sortAddedComponentVariables()

std::vector< VariableName > Simulation::sortAddedComponentVariables ( ) const
privateinherited

Returns a sorted list of the variables added by components.

See Component system documentation for more information.

Definition at line 575 of file Simulation.C.

576{
577 // Check that no index in order map is used more than once.
578 // Also, convert the map to a vector of pairs to be sorted.
579 std::set<int> indices;
580 std::vector<std::pair<VariableName, int>> registered_var_index_pairs;
581 for (const auto & var_and_index : _component_variable_order_map)
582 {
583 registered_var_index_pairs.push_back(var_and_index);
584
585 const auto ind = var_and_index.second;
586 auto insert_return = indices.insert(ind);
587 if (!insert_return.second)
588 mooseError("The index ", ind, " was used for multiple component variables.");
589 }
590
591 // Collect all of the added variable names into an unsorted vector.
592 std::vector<VariableName> vars_unsorted;
593 for (const auto & var_and_data : _vars)
594 vars_unsorted.push_back(var_and_data.first);
595
596 // The sorting works as follows. For those variables that are listed in
597 // _component_variable_order_map, these are ordered before those that are not,
598 // in the order of their indices in the map. Those not in the map are sorted
599 // alphabetically.
600
601 // Sort registered_var_index_pairs by value (index)
602 std::sort(registered_var_index_pairs.begin(),
603 registered_var_index_pairs.end(),
604 [](const std::pair<VariableName, int> & a, const std::pair<VariableName, int> & b)
605 { return a.second < b.second; });
606
607 // Loop over the ordered, registered variable names and add a variable to the
608 // sorted list if in vars_unsorted. When this happens, delete the element from
609 // vars_unsorted, leaving only unregistered variable names after the loop.
610 std::vector<VariableName> vars_sorted;
611 for (const auto & var_index_pair : registered_var_index_pairs)
612 {
613 const auto & var = var_index_pair.first;
614 if (std::find(vars_unsorted.begin(), vars_unsorted.end(), var) != vars_unsorted.end())
615 {
616 vars_sorted.push_back(var);
617 vars_unsorted.erase(std::remove(vars_unsorted.begin(), vars_unsorted.end(), var),
618 vars_unsorted.end());
619 }
620 }
621
622 // Sort the remaining (unregistered) variables alphabetically and then add
623 // them to the end of the full list.
624 std::sort(vars_unsorted.begin(), vars_unsorted.end());
625 vars_sorted.insert(vars_sorted.end(), vars_unsorted.begin(), vars_unsorted.end());
626
627 return vars_sorted;
628}

Referenced by Simulation::addVariables().

◆ validParams()

InputParameters THMProblem::validParams ( )
static

Definition at line 17 of file THMProblem.C.

18{
20
21 params.addParam<bool>("2nd_order_mesh", false, "Use 2nd order elements in the mesh");
22
23 params.addParam<FileName>("initial_from_file",
24 "The name of an exodus file with initial conditions");
25 params.addParam<std::string>(
26 "initial_from_file_timestep",
27 "LATEST",
28 "Gives the timestep (or \"LATEST\") for which to read a solution from a file "
29 "for a given variable. (Default: LATEST)");
30 params.addParam<MooseEnum>(
31 "initial_from_file_weighting_type",
33 "The policy used to select a unique initial value when data imported from a file is "
34 "multivalued.");
35
36 params.set<bool>("boundary_restricted_elem_integrity_check") = false;
37
38 params.addClassDescription("Specialization of FEProblem to run with component subsystem");
39
40 return params;
41}
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static MooseEnum weightingType()

Member Data Documentation

◆ _check_jacobian

bool Simulation::_check_jacobian
protectedinherited

True if checking jacobian.

Definition at line 463 of file Simulation.h.

Referenced by Simulation::controlDataIntegrityCheck(), Simulation::integrityCheck(), and Simulation::setCheckJacobian().

◆ _closures_by_name

std::map<std::string, std::shared_ptr<ClosuresBase> > Simulation::_closures_by_name
protectedinherited

Map of closures by their names.

Definition at line 404 of file Simulation.h.

Referenced by Simulation::addClosures(), Simulation::getClosures(), and Simulation::hasClosures().

◆ _comp_by_name

std::map<std::string, std::shared_ptr<Component> > Simulation::_comp_by_name
protectedinherited

◆ _component_name_to_loop_name

std::map<std::string, std::string> Simulation::_component_name_to_loop_name
protectedinherited

Map of component name to component loop name.

Definition at line 399 of file Simulation.h.

Referenced by Simulation::identifyLoops(), and Simulation::printComponentLoops().

◆ _component_variable_order_map

std::map< VariableName, int > Simulation::_component_variable_order_map
staticprivateinherited

Component variable order map; see setComponentVariableOrder for more info.

Definition at line 483 of file Simulation.h.

Referenced by Simulation::setComponentVariableOrder(), and Simulation::sortAddedComponentVariables().

◆ _components

std::vector<std::shared_ptr<Component> > Simulation::_components
protectedinherited

◆ _control_data

std::map<std::string, ControlDataValue *> Simulation::_control_data
protectedinherited

◆ _fe_problem

FEProblemBase& Simulation::_fe_problem
protectedinherited

◆ _flow_fe_type

libMesh::FEType Simulation::_flow_fe_type
protectedinherited

finite element type for the flow in the simulation

Definition at line 425 of file Simulation.h.

Referenced by Simulation::getFlowFEType().

◆ _ics

std::map<std::string, ICInfo> Simulation::_ics
protectedinherited

◆ _implicit_time_integration

bool Simulation::_implicit_time_integration
protectedinherited

true if using implicit time integration scheme

Definition at line 458 of file Simulation.h.

Referenced by Simulation::addVariables(), and Simulation::getImplicitTimeIntegrationFlag().

◆ _log

Logger Simulation::_log
protectedinherited

◆ _loop_name_to_model_id

std::map<std::string, THM::FlowModelID> Simulation::_loop_name_to_model_id
protectedinherited

Map of loop name to model type.

Definition at line 401 of file Simulation.h.

Referenced by Simulation::identifyLoops().

◆ _output_vector_velocity

bool Simulation::_output_vector_velocity
protectedinherited

Flag indicating if velocity is output as vector-valued field.

Definition at line 469 of file Simulation.h.

Referenced by Simulation::getVectorValuedVelocity(), and Simulation::setVectorValuedVelocity().

◆ _outputters_all

std::vector<OutputName> Simulation::_outputters_all
protectedinherited

◆ _outputters_file

std::vector<OutputName> Simulation::_outputters_file
protectedinherited

Definition at line 451 of file Simulation.h.

Referenced by Simulation::addFileOutputter(), and Simulation::getOutputsVector().

◆ _outputters_screen

std::vector<OutputName> Simulation::_outputters_screen
protectedinherited

Definition at line 452 of file Simulation.h.

Referenced by Simulation::addScreenOutputter(), and Simulation::getOutputsVector().

◆ _sparsity_elem_augmentation

std::map<dof_id_type, std::vector<dof_id_type> > Simulation::_sparsity_elem_augmentation
protectedinherited

Additional sparsity pattern that needs to be added into the Jacobian matrix.

Definition at line 466 of file Simulation.h.

Referenced by Simulation::addRelationshipManagers(), and Simulation::augmentSparsity().

◆ _thm_app

MooseApp& Simulation::_thm_app
protectedinherited

The application this is associated with.

Definition at line 389 of file Simulation.h.

Referenced by Simulation::addRelationshipManagers(), Simulation::addVariables(), and Simulation::getControlData().

◆ _thm_factory

Factory& Simulation::_thm_factory
protectedinherited

◆ _thm_mesh

MooseMesh& Simulation::_thm_mesh
protectedinherited

THM mesh.

Definition at line 383 of file Simulation.h.

Referenced by Simulation::addRelationshipManagers().

◆ _thm_pars

const InputParameters& Simulation::_thm_pars
protectedinherited

"Global" of this simulation

Definition at line 422 of file Simulation.h.

Referenced by Simulation::hasInitialConditionsFromFile(), and Simulation::setupInitialConditionsFromFile().

◆ _vars

std::map<VariableName, VariableInfo> Simulation::_vars
protectedinherited

variables for this simulation (name and info about the var)

Definition at line 407 of file Simulation.h.

Referenced by Simulation::addSimVariable(), Simulation::addVariables(), Simulation::setupInitialConditionsFromFile(), and Simulation::sortAddedComponentVariables().

◆ _zero

Real Simulation::_zero
inherited

Definition at line 472 of file Simulation.h.


The documentation for this class was generated from the following files: