https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected 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 {
  CoverageCheckMode::FALSE, CoverageCheckMode::TRUE, CoverageCheckMode::OFF, CoverageCheckMode::ON,
  CoverageCheckMode::SKIP_LIST, CoverageCheckMode::ONLY_LIST
}
 
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. More...
 
virtual bool getUseNonlinear () const
 
virtual void setUseNonlinear (bool use_nonlinear)
 
virtual void setInputParametersFEProblem (InputParameters &parameters) override
 
virtual NonlinearSystemgetNonlinearSystem (const unsigned int nl_sys_num) override
 
virtual void addLineSearch (const InputParameters &parameters) override
 
virtual void init () override
 
virtual libMesh::EquationSystemses () override
 
virtual MooseMeshmesh () override
 
virtual const MooseMeshmesh () const override
 
const MooseMeshmesh (bool use_displaced) const override
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setCoupling (Moose::CouplingType type)
 
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::CouplingMatrixcouplingMatrix (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
 
void trustUserCouplingMatrix ()
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase *> > & couplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase *> > & nonlocalCouplingEntries (const THREAD_ID tid, const unsigned int nl_sys_num)
 
virtual bool hasVariable (const std::string &var_name) const override
 
bool hasSolverVariable (const std::string &var_name) const
 
virtual const MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
 
virtual const MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const =0
 
virtual MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
virtual MooseVariableFieldBasegetVariable (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
 
MooseVariableFieldBasegetActualFieldVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual MooseVariablegetStandardVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual VectorMooseVariablegetVectorVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual ArrayMooseVariablegetArrayVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 
virtual MooseVariableScalargetScalarVariable (const THREAD_ID tid, const std::string &var_name) override
 
virtual libMesh::SystemgetSystem (const std::string &var_name) override
 
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 Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) override
 
virtual const Assemblyassembly (const THREAD_ID tid, const unsigned int sys_num) const override
 
virtual std::vector< VariableName > getVariableNames ()
 
void initialSetup () override
 
void checkDuplicatePostprocessorVariableNames ()
 
void timestepSetup () override
 
void customSetup (const ExecFlagType &exec_type) override
 
void residualSetup () override
 
void jacobianSetup () override
 
virtual void prepare (const Elem *elem, const THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, const THREAD_ID tid) override
 
virtual void prepareFace (const Elem *elem, const THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, const THREAD_ID tid)
 
virtual void prepareAssembly (const THREAD_ID tid) override
 
virtual void addGhostedElem (dof_id_type elem_id) override
 
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 reinitNodes (const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
 
virtual void reinitNeighbor (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, const std::vector< Point > &physical_points, const THREAD_ID tid) override
 
virtual void reinitElemNeighborAndLowerD (const Elem *elem, unsigned int side, const THREAD_ID tid) override
 
virtual void reinitScalars (const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
 
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)
 
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 Realtime () const
 
virtual RealtimeOld () const
 
virtual inttimeStep () const
 
virtual Realdt () const
 
virtual RealdtOld () 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)
 
virtual void restoreSolutions ()
 
virtual void saveOldSolutions ()
 
virtual void restoreOldSolutions ()
 
void needSolutionState (unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
 
virtual void outputStep (ExecFlagType type)
 
virtual void postExecute ()
 
void forceOutput ()
 
virtual void initPetscOutputAndSomeSolverSettings ()
 
Moose::PetscSupport::PetscOptionsgetPetscOptions ()
 
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 FunctiongetFunction (const std::string &name, const THREAD_ID tid=0)
 
virtual void addMeshDivision (const std::string &type, const std::string &name, InputParameters &params)
 
MeshDivisiongetMeshDivision (const std::string &name, const THREAD_ID tid=0) const
 
virtual void addConvergence (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual ConvergencegetConvergence (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
 
void setNeedToAddDefaultNonlinearConvergence ()
 
void setNeedToAddDefaultMultiAppFixedPointConvergence ()
 
bool hasSetMultiAppFixedPointConvergenceName () const
 
virtual void addDefaultNonlinearConvergence (const InputParameters &params)
 
virtual bool onlyAllowDefaultNonlinearConvergence () const
 
void addDefaultMultiAppFixedPointConvergence (const InputParameters &params)
 
virtual void lineSearch ()
 
LineSearchgetLineSearch () override
 
virtual void addDistribution (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual DistributiongetDistribution (const std::string &name)
 
virtual void addSampler (const std::string &type, const std::string &name, InputParameters &parameters)
 
virtual SamplergetSampler (const std::string &name, const THREAD_ID tid=0)
 
NonlinearSystemBasegetNonlinearSystemBase (const unsigned int sys_num)
 
const NonlinearSystemBasegetNonlinearSystemBase (const unsigned int sys_num) const
 
void setCurrentNonlinearSystem (const unsigned int nl_sys_num)
 
NonlinearSystemBasecurrentNonlinearSystem ()
 
const NonlinearSystemBasecurrentNonlinearSystem () const
 
virtual const SystemBasesystemBaseNonlinear (const unsigned int sys_num) const override
 
virtual SystemBasesystemBaseNonlinear (const unsigned int sys_num) override
 
virtual const SystemBasesystemBaseSolver (const unsigned int sys_num) const override
 
virtual SystemBasesystemBaseSolver (const unsigned int sys_num) override
 
virtual const SystemBasesystemBaseAuxiliary () const override
 
virtual SystemBasesystemBaseAuxiliary () override
 
virtual const SystemBasegetSystemBase (const unsigned int sys_num) const
 
virtual SystemBasegetSystemBase (const unsigned int sys_num)
 
LinearSystemgetLinearSystem (unsigned int sys_num)
 
const LinearSystemgetLinearSystem (unsigned int sys_num) const
 
SolverSystemgetSolverSystem (unsigned int sys_num)
 
const SolverSystemgetSolverSystem (unsigned int sys_num) const
 
void setCurrentLinearSystem (unsigned int sys_num)
 
LinearSystemcurrentLinearSystem ()
 
const LinearSystemcurrentLinearSystem () const
 
virtual const SystemBasesystemBaseLinear (unsigned int sys_num) const override
 
virtual SystemBasesystemBaseLinear (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 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 addAuxArrayVariable (const std::string &var_name, const libMesh::FEType &type, unsigned int components, const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxScalarVariable (const std::string &var_name, libMesh::Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
 
virtual void addAuxKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addAuxScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
AuxiliarySystemgetAuxiliarySystem ()
 
virtual void addDiracKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addDGKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addLinearFVBC (const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInterfaceKernel (const std::string &fv_ik_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 
virtual void addInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
virtual void addFVInitialCondition (const std::string &ic_name, const std::string &name, InputParameters &parameters)
 
void projectSolution ()
 
unsigned short getCurrentICState ()
 
void projectInitialConditionOnCustomRange (libMesh::ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range)
 
virtual void addMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addMaterialHelper (std::vector< MaterialWarehouse * > warehouse, const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addInterfaceMaterial (const std::string &material_name, const std::string &name, InputParameters &parameters)
 
virtual void addFunctorMaterial (const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
 
void prepareMaterials (const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
 
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 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)
 
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)
 
const ReporterDatagetReporterData () const
 
ReporterDatagetReporterData (ReporterData::WriteKey)
 
virtual std::vector< std::shared_ptr< UserObject > > addUserObject (const std::string &user_object_name, const std::string &name, InputParameters &parameters)
 
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects () const
 
T & getUserObject (const std::string &name, unsigned int tid=0) const
 
const UserObjectgetUserObjectBase (const std::string &name, const THREAD_ID tid=0) const
 
const PositionsgetPositionsObject (const std::string &name) const
 
bool hasUserObject (const std::string &name) const
 
bool hasPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueByName (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 VectorPostprocessorValuegetVectorPostprocessorValueByName (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 VectorPostprocessorgetVectorPostprocessorObjectByName (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< MultiAppgetMultiApp (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)
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 
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)
 
void execTransfers (ExecFlagType type)
 
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 DisplacedProblemgetDisplacedProblem () const
 
virtual std::shared_ptr< DisplacedProblemgetDisplacedProblem ()
 
virtual void updateGeomSearch (GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
 
virtual void updateMortarMesh ()
 
void createMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle)
 
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces (bool on_displaced) const
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchDatageomSearchData () override
 
void setRestartFile (const std::string &file_name)
 
const MaterialPropertyRegistrygetMaterialPropertyRegistry () const
 
const InitialConditionWarehousegetInitialConditionWarehouse () const
 
const FVInitialConditionWarehousegetFVInitialConditionWarehouse () const
 
SolverParamssolverParams (unsigned int solver_sys_num=0)
 
const SolverParamssolverParams (unsigned int solver_sys_num=0) const
 
Adaptivityadaptivity ()
 
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< XFEMInterfacegetXFEM ()
 
bool haveXFEM ()
 
virtual bool updateMeshXFEM ()
 
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)
 
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 MaterialWarehousegetMaterialWarehouse () const
 
const MaterialWarehousegetRegularMaterialsWarehouse () const
 
const MaterialWarehousegetDiscreteMaterialWarehouse () const
 
const MaterialWarehousegetInterfaceMaterialsWarehouse () const
 
std::shared_ptr< MaterialBasegetMaterial (std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
 
MaterialDatagetMaterialData (Moose::MaterialDataType type, const THREAD_ID tid=0) 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 ExecutorgetExecutor (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
 
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 &)
 
TheWarehousetheWarehouse () 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 haveADObjects () const
 
bool shouldSolve () const
 
const MortarDatamortarData () const
 
MortarDatamortarData ()
 
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)
 
bool computingNonlinearResid () const
 
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
 
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)
 
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)
 
const std::vector< ConvergenceName > & getNonlinearConvergenceNames () const
 
const std::vector< ConvergenceName > & getLinearConvergenceNames () const
 
const ConvergenceName & getMultiAppFixedPointConvergenceName () const
 
void computingScalingJacobian (bool computing_scaling_jacobian)
 
bool computingScalingJacobian () const override final
 
void computingScalingResidual (bool computing_scaling_residual)
 
bool computingScalingResidual () const override final
 
MooseAppCoordTransformcoordTransform ()
 
virtual std::size_t numNonlinearSystems () const override
 
virtual std::size_t numLinearSystems () const override
 
virtual std::size_t numSolverSystems () const override
 
bool isSolverSystemNonlinear (const unsigned int sys_num)
 
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::CouplingMatrixnonlocalCouplingMatrix (const unsigned i) const override
 
virtual bool checkNonlocalCouplingRequirement () const override
 
virtual Moose::FEBackend feBackend () const
 
const bool & currentlyComputingResidual () const
 
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 VectorTaggetVectorTag (const TagID tag_id) const
 
std::vector< VectorTaggetVectorTags (const std::set< TagID > &tag_ids) const
 
virtual const std::vector< VectorTag > & getVectorTags (const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
 
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 DiracKernelInfodiracKernelInfo ()
 
void reinitNeighborLowerDElem (const Elem *elem, const THREAD_ID tid=0)
 
void reinitMortarElem (const Elem *elem, const THREAD_ID tid=0)
 
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< SubdomainIDgetMaterialPropertyBlocks (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< BoundaryIDgetMaterialPropertyBoundaryIDs (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 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
 
bool havePRefinement () const
 
MooseVariableFEBasegetVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &systems, const SystemBase &aux) const
 
void _setCLIOption ()
 
virtual void terminateSolve ()
 
virtual bool isSolveTerminationRequested () const
 
const ConsoleStreamconsole () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () 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
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (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
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) 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
 
PerfGraphperfGraph ()
 
const libMesh::ConstElemRangegetEvaluableElementRange ()
 
const libMesh::ConstElemRangegetEvaluableElementRange ()
 
const libMesh::ConstElemRangegetNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRangegetNonlinearEvaluableElementRange ()
 
const libMesh::ConstElemRangegetCurrentAlgebraicElementRange ()
 
const libMesh::ConstElemRangegetCurrentAlgebraicElementRange ()
 
const libMesh::ConstNodeRangegetCurrentAlgebraicNodeRange ()
 
const libMesh::ConstNodeRangegetCurrentAlgebraicNodeRange ()
 
const ConstBndNodeRangegetCurrentAlgebraicBndNodeRange ()
 
const ConstBndNodeRangegetCurrentAlgebraicBndNodeRange ()
 
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)
 
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 AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 
AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced) const
 
AutomaticMortarGenerationgetMortarInterface (const std::pair< BoundaryID, BoundaryID > &primary_secondary_boundary_pair, const std::pair< SubdomainID, SubdomainID > &primary_secondary_subdomain_pair, bool on_displaced)
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
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 needSubdomainMaterialOnSide (SubdomainID subdomain_id, const THREAD_ID tid)
 
bool needSubdomainMaterialOnSide (SubdomainID subdomain_id, const THREAD_ID tid)
 
const ExecFlagTypegetCurrentExecuteOnFlag () const
 
const ExecFlagTypegetCurrentExecuteOnFlag () 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::FETypegetFlowFEType () const
 Gets the FE type for the flow in this simulation. More...
 
virtual void setupQuadrature ()
 Sets up quadrature rules. More...
 
virtual void initSimulation ()
 Initialize this simulation. More...
 
virtual void initComponents ()
 Initialize this simulation's components. More...
 
void identifyLoops ()
 Identifies the component loops. More...
 
void printComponentLoops () const
 Prints the component loops. More...
 
virtual void run ()
 Run the simulation. More...
 
virtual void addComponent (const std::string &type, const std::string &name, InputParameters params)
 Add a component into this simulation. More...
 
bool hasComponent (const std::string &name) const
 Find out if simulation has a component with the given name. More...
 
template<typename T >
bool hasComponentOfType (const std::string &name) const
 Find out if simulation has a component with the given name and specified type. More...
 
template<typename T >
const T & getComponentByName (const std::string &name) const
 Get component by its name. More...
 
const std::vector< std::shared_ptr< Component > > & getComponents ()
 Return list of components available in the simulation. More...
 
virtual void addClosures (const std::string &type, const std::string &name, InputParameters params)
 Add a closures object into this simulation. More...
 
bool hasClosures (const std::string &name) const
 Return whether the simulation has a closures object. More...
 
std::shared_ptr< ClosuresBasegetClosures (const std::string &name) const
 Get a pointer to a closures object. More...
 
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. More...
 
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. More...
 
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. More...
 
void checkVariableNameLength (const std::string &name) const
 Reports an error if the variable name is too long. More...
 
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. More...
 
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. More...
 
virtual void buildMesh ()
 Create mesh for this simulation. More...
 
virtual void addVariables ()
 Add variables involved in this simulation. More...
 
virtual void addMooseObjects ()
 Add component MOOSE objects. More...
 
virtual void setupMesh ()
 Perform mesh setup actions such as setting up the coordinate system(s) and creating ghosted elements. More...
 
ThermalHydraulicsAppgetApp ()
 Get the ThermalHydraulicsApp. More...
 
virtual void integrityCheck () const
 Check the integrity of the simulation. More...
 
virtual void controlDataIntegrityCheck ()
 Check the integrity of the control data. More...
 
virtual void couplingMatrixIntegrityCheck () const
 Check integrity of coupling matrix used by the preconditioner. More...
 
template<typename T >
bool hasControlData (const std::string &name)
 Query if control data with name 'name' exists. More...
 
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. More...
 
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. More...
 
const bool & getImplicitTimeIntegrationFlag ()
 Gets the flag indicating whether an implicit time integration scheme is being used. More...
 
bool hasInitialConditionsFromFile () const
 Are initial conditions specified from a file. More...
 
Loggerlog ()
 
void setCheckJacobian (bool state)
 Enable Jacobian checking. More...
 
virtual void augmentSparsity (const dof_id_type &elem_id1, const dof_id_type &elem_id2)
 Hint how to augment sparsity pattern between two elements. More...
 
bool getVectorValuedVelocity ()
 Is velocity output as vector-valued field. More...
 
void setVectorValuedVelocity (bool vector_velocity)
 Set if velocity is being output as a vector-valued field. More...
 
void addRelationshipManagers ()
 Add additional relationship managers to run the simulation. More...
 
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. More...
 
template<typename... Args>
void logComponentError (const std::string &component_name, Args &&... args) const
 Logs an error for a component. More...
 
template<typename... Args>
void logWarning (Args &&... args) const
 Logs a warning. More...
 
template<typename... Args>
void logComponentWarning (const std::string &component_name, Args &&... args) const
 Logs a warning for a component. More...
 
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. More...
 
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. More...
 
std::string genName (const std::string &prefix, const std::string &name, unsigned int i) const
 Build a name from 2 strings and a number. More...
 
std::string genName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings. More...
 
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. More...
 

Static Public Member Functions

static InputParameters validParams ()
 
static void selectVectorTagsFromSystem (const SystemBase &system, const std::vector< VectorTag > &input_vector_tags, std::set< TagID > &selected_tags)
 
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. More...
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
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
 

Protected Member Functions

virtual void meshChanged ()
 
MooseVariableFieldBasegetVariableHelper (const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
 
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, const Moose::AuxGroup &group, 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 markFamilyPRefinement (const InputParameters &params)
 
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. More...
 
void setupInitialConditionsFromFile ()
 Setup reading initial conditions from a specified file, see 'initial_from_file' and 'initial_from_file_timestep' parameters. More...
 
void setupInitialConditionObjects ()
 
void setupCoordinateSystem ()
 Sets the coordinate system for each subdomain. More...
 
void setupCriticalHeatFluxTable ()
 Setup ctirical heat flux table user object. More...
 

Protected Attributes

bool _use_nonlinear
 
std::vector< std::shared_ptr< NonlinearSystem > > _nl_sys
 
MooseMesh_mesh
 
bool _initialized
 
std::optional< std::vector< ConvergenceName > > _nonlinear_convergence_names
 
std::optional< std::vector< ConvergenceName > > _linear_convergence_names
 
std::optional< ConvergenceName > _multiapp_fixed_point_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
 
int_t_step
 
Real_dt
 
Real_dt_old
 
bool _need_to_add_default_nonlinear_convergence
 
bool _need_to_add_default_multiapp_fixed_point_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
 
std::map< std::string, unsigned int_subspace_dim
 
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
 
MooseObjectWarehouse< MeshDivision_mesh_divisions
 
MooseObjectWarehouse< Function_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
 
MooseObjectWarehouse< Marker_markers
 
ReporterData _reporter_data
 
ExecuteMooseObjectWarehouse< UserObject_all_user_objects
 
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
 
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
 
MortarData _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
 
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
 
CoverageCheckMode _material_coverage_check
 
std::vector< SubdomainName > _material_coverage_blocks
 
bool _fv_bcs_integrity_check
 
const bool _material_dependency_check
 
const bool _uo_aux_state_check
 
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
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
ActionFactory_action_factory
 
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
 
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
 
THMMesh_thm_mesh
 THM mesh. More...
 
FEProblemBase_fe_problem
 Pointer to FEProblem representing this simulation. More...
 
ThermalHydraulicsApp_thm_app
 The application this is associated with. More...
 
Factory_thm_factory
 The Factory associated with the MooseApp. More...
 
std::vector< std::shared_ptr< Component > > _components
 List of components in this simulation. More...
 
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
 Map of components by their names. More...
 
std::map< std::string, std::string > _component_name_to_loop_name
 Map of component name to component loop name. More...
 
std::map< std::string, THM::FlowModelID_loop_name_to_model_id
 Map of loop name to model type. More...
 
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
 Map of closures by their names. More...
 
std::map< VariableName, VariableInfo_vars
 variables for this simulation (name and info about the var) More...
 
std::map< std::string, ICInfo_ics
 
const InputParameters_thm_pars
 "Global" of this simulation More...
 
libMesh::FEType _flow_fe_type
 finite element type for the flow in the simulation More...
 
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. More...
 
bool _implicit_time_integration
 true if using implicit time integration scheme More...
 
Logger _log
 
bool _check_jacobian
 True if checking jacobian. More...
 
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. More...
 
bool _output_vector_velocity
 Flag indicating if velocity is output as vector-valued field. More...
 
const Parallel::Communicator & _communicator
 

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 37 of file THMProblem.C.

39 {
40 }
FEProblem(const InputParameters &parameters)
Simulation(FEProblemBase &fe_problem, const InputParameters &params)
Definition: Simulation.C:45
const InputParameters & parameters() const

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 1009 of file Simulation.C.

Referenced by AddClosuresAction::act().

1010 {
1011  std::shared_ptr<ClosuresBase> obj_ptr = _thm_factory.create<ClosuresBase>(type, name, params);
1012  if (_closures_by_name.find(name) == _closures_by_name.end())
1013  _closures_by_name[name] = obj_ptr;
1014  else
1015  logError("A closures object with the name '", name, "' already exists.");
1016 }
Base class for closures implementations.
Definition: ClosuresBase.h:28
virtual std::unique_ptr< Base > create()=0
const std::string name
Definition: Setup.h:20
void logError(Args &&... args) const
Logs an error.
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
Map of closures by their names.
Definition: Simulation.h:409

◆ 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 991 of file Simulation.C.

Referenced by AddComponentAction::act().

992 {
993  std::shared_ptr<Component> comp = _thm_factory.create<Component>(type, name, params);
994  if (_comp_by_name.find(name) == _comp_by_name.end())
995  _comp_by_name[name] = comp;
996  else
997  logError("Component with name '", name, "' already exists");
998  _components.push_back(comp);
999 }
virtual std::unique_ptr< Base > create()=0
const std::string name
Definition: Setup.h:20
void logError(Args &&... args) const
Logs an error.
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
Base class for THM components.
Definition: Component.h:27
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition: Simulation.h:402

◆ addComponentScalarIC()

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

Definition at line 565 of file Simulation.C.

566 {
568  return;
569 
570  std::string class_name = "ScalarComponentIC";
571  InputParameters params = _thm_factory.getValidParams(class_name);
572  params.set<VariableName>("variable") = var_name;
573  params.set<std::vector<Real>>("values") = value;
574  addSimInitialCondition(class_name, genName(var_name, "ic"), params);
575 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition: Simulation.C:495
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
Definition: Simulation.C:1070

◆ addConstantIC()

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

Definition at line 512 of file Simulation.C.

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

515 {
517  return;
518 
519  std::string blk_str = block_names[0];
520  for (unsigned int i = 1; i < block_names.size(); i++)
521  blk_str += ":" + block_names[i];
522 
523  std::string class_name = "ConstantIC";
524  InputParameters params = _thm_factory.getValidParams(class_name);
525  params.set<VariableName>("variable") = var_name;
526  params.set<Real>("value") = value;
527  params.set<std::vector<SubdomainName>>("block") = block_names;
528  addSimInitialCondition(class_name, genName(var_name, blk_str, "ic"), params);
529 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition: Simulation.C:495
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
Definition: Simulation.C:1070

◆ addConstantScalarIC()

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

Definition at line 552 of file Simulation.C.

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

553 {
555  return;
556 
557  std::string class_name = "ScalarConstantIC";
558  InputParameters params = _thm_factory.getValidParams(class_name);
559  params.set<VariableName>("variable") = var_name;
560  params.set<Real>("value") = value;
561  addSimInitialCondition(class_name, genName(var_name, "ic"), params);
562 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition: Simulation.C:495
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
Definition: Simulation.C:1070

◆ 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 487 of file Simulation.C.

488 {
489  params.addPrivateParam<FEProblemBase *>("_fe_problem_base", &_fe_problem);
490  std::shared_ptr<Control> control = _thm_factory.create<Control>(type, name, params);
492 }
void addObject(std::shared_ptr< Control > object, THREAD_ID tid=0, bool recurse=true) override
void addPrivateParam(const std::string &name, const T &value)
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
virtual std::unique_ptr< Base > create()=0
const std::string name
Definition: Setup.h:20
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse()

◆ addFileOutputter()

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

Definition at line 1035 of file Simulation.C.

Referenced by THMSetupOutputAction::act().

1036 {
1037  _outputters_all.push_back(name);
1038  _outputters_file.push_back(name);
1039 }
const std::string name
Definition: Setup.h:20
std::vector< OutputName > _outputters_file
Definition: Simulation.h:456
std::vector< OutputName > _outputters_all
Definition: Simulation.h:455

◆ addFunctionIC()

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

Definition at line 532 of file Simulation.C.

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

535 {
537  return;
538 
539  std::string blk_str = block_names[0];
540  for (unsigned int i = 1; i < block_names.size(); i++)
541  blk_str += ":" + block_names[i];
542 
543  std::string class_name = "FunctionIC";
544  InputParameters params = _thm_factory.getValidParams(class_name);
545  params.set<VariableName>("variable") = var_name;
546  params.set<std::vector<SubdomainName>>("block") = block_names;
547  params.set<FunctionName>("function") = func_name;
548  addSimInitialCondition(class_name, genName(var_name, blk_str, "ic"), params);
549 }
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.
T & set(const std::string &name, bool quiet_mode=false)
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition: Simulation.C:495
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
Definition: Simulation.C:1070

◆ addMooseObjects()

void Simulation::addMooseObjects ( )
virtualinherited

Add component MOOSE objects.

Definition at line 738 of file Simulation.C.

Referenced by AddComponentMooseObjectsAction::act().

739 {
740  for (auto && comp : _components)
741  comp->addMooseObjects();
742 }
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400

◆ addRelationshipManagers()

void Simulation::addRelationshipManagers ( )
inherited

Add additional relationship managers to run the simulation.

Definition at line 745 of file Simulation.C.

Referenced by THMAddRelationshipManagersAction::act().

746 {
747  {
748  const std::string class_name = "AugmentSparsityBetweenElements";
749  auto params = _thm_factory.getValidParams(class_name);
750  params.set<Moose::RelationshipManagerType>("rm_type") =
753  params.set<std::string>("for_whom") = _fe_problem.name();
754  params.set<MooseMesh *>("mesh") = &_thm_mesh;
755  params.set<std::map<dof_id_type, std::vector<dof_id_type>> *>("_elem_map") =
757  auto rm =
758  _thm_factory.create<RelationshipManager>(class_name, "thm:sparsity_btw_elems", params);
760  _thm_factory.releaseSharedObjects(*rm);
761  }
762 
763  for (auto && comp : _components)
764  comp->addRelationshipManagers(Moose::RelationshipManagerType::COUPLING |
767 }
RelationshipManagerType
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
THMMesh & _thm_mesh
THM mesh.
Definition: Simulation.h:388
virtual const std::string & name() const
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
virtual std::unique_ptr< Base > create()=0
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
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:471
ThermalHydraulicsApp & _thm_app
The application this is associated with.
Definition: Simulation.h:394

◆ addScreenOutputter()

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

Definition at line 1042 of file Simulation.C.

Referenced by THMSetupOutputAction::act().

1043 {
1044  _outputters_all.push_back(name);
1045  _outputters_screen.push_back(name);
1046 }
const std::string name
Definition: Setup.h:20
std::vector< OutputName > _outputters_screen
Definition: Simulation.h:457
std::vector< OutputName > _outputters_all
Definition: Simulation.h:455

◆ addSimInitialCondition()

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

◆ addSimVariable() [1/3]

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

Queues a variable of type MooseVariableScalar 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]scaling_factorScaling factor for the variable

Definition at line 271 of file Simulation.C.

Referenced by FlowModel::addCommonVariables(), HeatTransferBase::addHeatedPerimeter(), HeatTransferFromTemperature1Phase::addVariables(), HSBoundaryExternalAppTemperature::addVariables(), FormLossFromExternalApp1Phase::addVariables(), Shaft::addVariables(), TotalPowerBase::addVariables(), HeatTransferFromExternalAppHeatFlux1Phase::addVariables(), HSBoundaryExternalAppConvection::addVariables(), FlowModelGasMix::addVariables(), FlowModel1PhaseBase::addVariables(), HeatTransferFromHeatStructure3D1Phase::addVariables(), HSBoundaryExternalAppHeatFlux::addVariables(), and HeatConductionModel::addVariables().

272 {
274 
275  if (fe_type.family != SCALAR)
276  mooseError("This method should only be used for scalar variables.");
277 
278  if (_vars.find(name) == _vars.end()) // variable is new
279  {
280  VariableInfo vi;
281  InputParameters & params = vi._params;
282 
283  vi._nl = nl;
284  vi._var_type = "MooseVariableScalar";
285  params = _thm_factory.getValidParams(vi._var_type);
286 
288  family = Utility::enum_to_string(fe_type.family);
289  params.set<MooseEnum>("family") = family;
290 
292  order = Utility::enum_to_string<Order>(fe_type.order);
293  params.set<MooseEnum>("order") = order;
294 
295  if (nl)
296  params.set<std::vector<Real>>("scaling") = {scaling_factor};
297  else if (!MooseUtils::absoluteFuzzyEqual(scaling_factor, 1.0))
298  mooseError("Aux variables cannot be provided a residual scaling factor.");
299 
300  _vars[name] = vi;
301  }
302  else
303  // One of the two cases is true:
304  // - This variable was previously added as a scalar variable, and scalar
305  // variables should not be added more than once, since there is no block
306  // restriction to extend, as there is in the field variable version of this
307  // method.
308  // - This variable was previously added as a field variable, and a variable
309  // may have only one type (this method is used for scalar variables only).
310  mooseError("The variable '", name, "' was already added.");
311 }
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
void mooseError(Args &&... args)
T & set(const std::string &name, bool quiet_mode=false)
OrderWrapper order
static MooseEnum getNonlinearVariableFamilies()
void checkVariableNameLength(const std::string &name) const
Reports an error if the variable name is too long.
Definition: Simulation.C:479
static MooseEnum getNonlinearVariableOrders()
std::map< VariableName, VariableInfo > _vars
variables for this simulation (name and info about the var)
Definition: Simulation.h:412
const std::string name
Definition: Setup.h:20
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397

◆ 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

Definition at line 314 of file Simulation.C.

319 {
321 
322  if (fe_type.family == SCALAR)
324  "The version of Simulation::addSimVariable() with subdomain names can no longer be used "
325  "with scalar variables since scalar variables cannot be block-restricted. Use the version "
326  "of Simulation::addSimVariable() without subdomain names instead.");
327 
328 #ifdef DEBUG
329  for (const auto & subdomain_name : subdomain_names)
330  mooseAssert(subdomain_name != "ANY_BLOCK_ID",
331  "'ANY_BLOCK_ID' cannot be used for adding field variables in components.");
332 #endif
333 
334  if (_vars.find(name) == _vars.end()) // variable is new
335  {
336  VariableInfo vi;
337  InputParameters & params = vi._params;
338 
339  vi._nl = nl;
340  vi._var_type = "MooseVariable";
341  params = _thm_factory.getValidParams(vi._var_type);
342  params.set<std::vector<SubdomainName>>("block") = subdomain_names;
343 
345  family = Utility::enum_to_string(fe_type.family);
346  params.set<MooseEnum>("family") = family;
347 
349  order = Utility::enum_to_string<Order>(fe_type.order);
350  params.set<MooseEnum>("order") = order;
351 
352  if (nl)
353  params.set<std::vector<Real>>("scaling") = {scaling_factor};
354  else if (!MooseUtils::absoluteFuzzyEqual(scaling_factor, 1.0))
355  mooseError("Aux variables cannot be provided a residual scaling factor.");
356 
357  _vars[name] = vi;
358  }
359  else // variable was previously added
360  {
361  VariableInfo & vi = _vars[name];
362  InputParameters & params = vi._params;
363 
364  if (vi._nl != nl)
365  mooseError("The variable '",
366  name,
367  "' has already been added in a different system (nonlinear or aux).");
368 
369  if (vi._var_type != "MooseVariable")
370  mooseError("The variable '",
371  name,
372  "' has already been added with a different type than 'MooseVariable'.");
373 
375  family = Utility::enum_to_string(fe_type.family);
376  if (!params.get<MooseEnum>("family").compareCurrent(family))
377  mooseError("The variable '", name, "' has already been added with a different FE family.");
378 
380  order = Utility::enum_to_string<Order>(fe_type.order);
381  if (!params.get<MooseEnum>("order").compareCurrent(order))
382  mooseError("The variable '", name, "' has already been added with a different FE order.");
383 
384  // If already block-restricted, extend the block restriction
385  if (params.isParamValid("block"))
386  {
387  auto blocks = params.get<std::vector<SubdomainName>>("block");
388  for (const auto & subdomain_name : subdomain_names)
389  if (std::find(blocks.begin(), blocks.end(), subdomain_name) == blocks.end())
390  blocks.push_back(subdomain_name);
391  params.set<std::vector<SubdomainName>>("block") = blocks;
392  }
393  else
394  params.set<std::vector<SubdomainName>>("block") = subdomain_names;
395 
396  if (params.isParamValid("scaling"))
397  if (!MooseUtils::absoluteFuzzyEqual(params.get<std::vector<Real>>("scaling")[0],
398  scaling_factor))
399  mooseError(
400  "The variable '", name, "' has already been added with a different scaling factor.");
401  }
402 }
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
char ** blocks
void mooseError(Args &&... args)
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
T & set(const std::string &name, bool quiet_mode=false)
OrderWrapper order
static MooseEnum getNonlinearVariableFamilies()
void checkVariableNameLength(const std::string &name) const
Reports an error if the variable name is too long.
Definition: Simulation.C:479
static MooseEnum getNonlinearVariableOrders()
std::map< VariableName, VariableInfo > _vars
variables for this simulation (name and info about the var)
Definition: Simulation.h:412
const std::string name
Definition: Setup.h:20
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
void mooseDeprecated(Args &&... args)
bool compareCurrent(const MooseEnum &other, CompareMode mode=CompareMode::COMPARE_NAME) const
std::map< std::string, Metadata > _params
bool isParamValid(const std::string &name) const

◆ addSimVariable() [3/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 405 of file Simulation.C.

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

◆ addVariables()

void Simulation::addVariables ( )
virtualinherited

Add variables involved in this simulation.

Definition at line 634 of file Simulation.C.

Referenced by THMAddVariablesAction::act().

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

◆ advanceState()

void THMProblem::advanceState ( )
overridevirtual

Reimplemented from FEProblem.

Definition at line 43 of file THMProblem.C.

44 {
47 }
virtual void advanceState()
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
Definition: Simulation.C:1076

◆ 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 71 of file Simulation.C.

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

72 {
73  auto it = _sparsity_elem_augmentation.find(elem_id1);
74  if (it == _sparsity_elem_augmentation.end())
76  {elem_id1, std::vector<dof_id_type>()});
77  it->second.push_back(elem_id2);
78 
79  it = _sparsity_elem_augmentation.find(elem_id2);
80  if (it == _sparsity_elem_augmentation.end())
82  {elem_id2, std::vector<dof_id_type>()});
83  it->second.push_back(elem_id1);
84 }
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:471

◆ buildMesh()

void Simulation::buildMesh ( )
virtualinherited

Create mesh for this simulation.

Definition at line 87 of file Simulation.C.

Referenced by THMBuildMeshAction::act().

88 {
89  if (_components.size() == 0)
90  return;
91 
92  // build mesh
93  for (auto && comp : _components)
94  comp->executeSetupMesh();
95 }
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400

◆ checkVariableNameLength()

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

Reports an error if the variable name is too long.

Definition at line 479 of file Simulation.C.

Referenced by Simulation::addSimVariable().

480 {
481  if (name.size() > THM::MAX_VARIABLE_LENGTH)
482  mooseError(
483  "Variable name '", name, "' is too long. The limit is ", THM::MAX_VARIABLE_LENGTH, ".");
484 }
void mooseError(Args &&... args)
static const size_t MAX_VARIABLE_LENGTH
const std::string name
Definition: Setup.h:20

◆ controlDataIntegrityCheck()

void Simulation::controlDataIntegrityCheck ( )
virtualinherited

Check the integrity of the control data.

Definition at line 911 of file Simulation.C.

Referenced by ControlDataIntegrityCheckAction::act().

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

◆ copySolutionsBackwards()

void THMProblem::copySolutionsBackwards ( )
overridevirtual

Reimplemented from FEProblem.

Definition at line 50 of file THMProblem.C.

51 {
54 }
virtual void copySolutionsBackwards()
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
Definition: Simulation.C:1076

◆ couplingMatrixIntegrityCheck()

void Simulation::couplingMatrixIntegrityCheck ( ) const
virtualinherited

Check integrity of coupling matrix used by the preconditioner.

Definition at line 807 of file Simulation.C.

Referenced by THMPreconditioningIntegrityCheckAction::act().

808 {
809  if (!_fe_problem.shouldSolve())
810  return;
811 
812  const TimeIntegrator * ti = nullptr;
813  const auto & time_integrators =
815  if (!time_integrators.empty())
816  ti = time_integrators.front().get();
817  // Yes, this is horrible. Don't ask why...
818  if ((dynamic_cast<const ExplicitTimeIntegrator *>(ti) != nullptr) ||
819  (dynamic_cast<const ExplicitEuler *>(ti) != nullptr) ||
820  (dynamic_cast<const ExplicitRK2 *>(ti) != nullptr) ||
821  (dynamic_cast<const ExplicitTVDRK2 *>(ti) != nullptr))
822  return;
823 
824  const CouplingMatrix * cm = _fe_problem.couplingMatrix(/*nl_sys_num=*/0);
825  if (cm == nullptr)
826  mooseError("Coupling matrix does not exists. Something really bad happened.");
827 
828  bool full = true;
829  for (unsigned int i = 0; i < cm->size(); i++)
830  for (unsigned int j = 0; j < cm->size(); j++)
831  full &= (*cm)(i, j);
832 
833  if (!full)
834  mooseError(
835  "Single matrix preconditioning with full coupling is required to run. Please, check that "
836  "your input file has the following preconditioning block:\n\n"
837  "[Preconditioning]\n"
838  " [pc]\n"
839  " type = SMP\n"
840  " full = true\n"
841  " []\n"
842  "[].\n");
843 }
bool shouldSolve() const
void mooseError(Args &&... args)
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override
std::size_t size() const
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
const std::vector< std::shared_ptr< TimeIntegrator > > & getTimeIntegrators()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ 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 311 of file Simulation.h.

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

312  {
313  ControlData<T> * data = getControlData<T>(name);
314  if (!data->getDeclared())
315  {
316  // Mark the data for error checking
317  data->setDeclared();
318  data->setControl(ctrl);
319  }
320  else
321  logError("Trying to declare '", name, "', but it was already declared.");
322 
323  return data;
324  }
void setDeclared()
Mark the data as declared.
Definition: ControlData.h:65
Concrete definition of a parameter value for a specified type.
Definition: ControlData.h:91
bool getDeclared()
Get the declared state.
Definition: ControlData.h:70
const std::string name
Definition: Setup.h:20
void logError(Args &&... args) const
Logs an error.
void setControl(THMControl *ctrl)
Set the pointer to the control object that declared this control data.
Definition: ControlData.h:60

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

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

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

◆ genName() [2/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  }
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ genName() [3/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  }
const std::string name
Definition: Setup.h:20

◆ genName() [4/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  }

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

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

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

◆ getApp()

ThermalHydraulicsApp& Simulation::getApp ( )
inlineinherited

Get the ThermalHydraulicsApp.

Definition at line 245 of file Simulation.h.

Referenced by Simulation::addVariables().

245 { return _thm_app; }
ThermalHydraulicsApp & _thm_app
The application this is associated with.
Definition: Simulation.h:394

◆ 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 1025 of file Simulation.C.

1026 {
1027  auto it = _closures_by_name.find(name);
1028  if (it != _closures_by_name.end())
1029  return it->second;
1030  else
1031  mooseError("The requested closures object '", name, "' does not exist.");
1032 }
void mooseError(Args &&... args)
const std::string name
Definition: Setup.h:20
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
Map of closures by their names.
Definition: Simulation.h:409

◆ 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 504 of file Simulation.h.

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

505 {
506  auto it = _comp_by_name.find(name);
507  if (it != _comp_by_name.end())
508  return *dynamic_cast<T *>((it->second).get());
509  else
510  mooseError("Component '",
511  name,
512  "' does not exist in the simulation. Use hasComponent or "
513  "checkComponnetByName before calling getComponent.");
514 }
void mooseError(Args &&... args)
const std::string name
Definition: Setup.h:20
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition: Simulation.h:402

◆ getComponents()

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

Return list of components available in the simulation.

Definition at line 117 of file Simulation.h.

Referenced by ParaviewComponentAnnotationMap::output().

117 { return _components; }
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400

◆ 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 290 of file Simulation.h.

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

291  {
292  ControlData<T> * data = nullptr;
293  if (_control_data.find(name) == _control_data.end())
294  {
295  data = new ControlData<T>(_thm_app, name);
296  _control_data[name] = data;
297  }
298  else
299  data = dynamic_cast<ControlData<T> *>(_control_data[name]);
300 
301  return data;
302  }
std::map< std::string, ControlDataValue * > _control_data
Control data created in the control logic system.
Definition: Simulation.h:460
Concrete definition of a parameter value for a specified type.
Definition: ControlData.h:91
const std::string name
Definition: Setup.h:20
ThermalHydraulicsApp & _thm_app
The application this is associated with.
Definition: Simulation.h:394

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

Referenced by Simulation::setupQuadrature().

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

◆ 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 1049 of file Simulation.C.

1050 {
1051  std::string key_lowercase = key;
1052  std::transform(key_lowercase.begin(), key_lowercase.end(), key_lowercase.begin(), ::tolower);
1053 
1054  std::vector<OutputName> outputs;
1055  if (key_lowercase == "none")
1056  outputs.push_back("none"); // provide non-existent name, so it does not get printed out
1057  else if (key_lowercase == "screen")
1058  outputs = _outputters_screen;
1059  else if (key_lowercase == "file")
1060  outputs = _outputters_file;
1061  else if (key_lowercase == "both")
1062  outputs = _outputters_all;
1063  else
1064  mooseError("The outputs vector key '" + key_lowercase + "' is invalid");
1065 
1066  return outputs;
1067 }
void mooseError(Args &&... args)
std::vector< OutputName > _outputters_file
Definition: Simulation.h:456
std::vector< OutputName > _outputters_screen
Definition: Simulation.h:457
std::vector< OutputName > _outputters_all
Definition: Simulation.h:455

◆ getVectorValuedVelocity()

bool Simulation::getVectorValuedVelocity ( )
inlineinherited

Is velocity output as vector-valued field.

Returns
true for vector-valued field, false for scalar

Definition at line 359 of file Simulation.h.

Referenced by FlowChannel1PhaseBase::buildFlowModel().

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

◆ 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 1019 of file Simulation.C.

1020 {
1021  return _closures_by_name.find(name) != _closures_by_name.end();
1022 }
const std::string name
Definition: Setup.h:20
std::map< std::string, std::shared_ptr< ClosuresBase > > _closures_by_name
Map of closures by their names.
Definition: Simulation.h:409

◆ 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 1002 of file Simulation.C.

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

1003 {
1004  auto it = _comp_by_name.find(name);
1005  return (it != _comp_by_name.end());
1006 }
const std::string name
Definition: Setup.h:20
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition: Simulation.h:402

◆ 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 493 of file Simulation.h.

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

494 {
495  auto it = _comp_by_name.find(name);
496  if (it != _comp_by_name.end())
497  return dynamic_cast<T *>((it->second).get()) != nullptr;
498  else
499  return false;
500 }
const std::string name
Definition: Setup.h:20
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition: Simulation.h:402

◆ 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 275 of file Simulation.h.

Referenced by THMParsedFunctionWrapper::initialize().

276  {
277  if (_control_data.find(name) == _control_data.end())
278  return false;
279  else
280  return dynamic_cast<ControlData<T> *>(_control_data[name]) != NULL;
281  }
std::map< std::string, ControlDataValue * > _control_data
Control data created in the control logic system.
Definition: Simulation.h:460
Concrete definition of a parameter value for a specified type.
Definition: ControlData.h:91
const std::string name
Definition: Setup.h:20

◆ 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 1070 of file Simulation.C.

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

1071 {
1072  return _thm_pars.isParamValid("initial_from_file");
1073 }
const InputParameters & _thm_pars
"Global" of this simulation
Definition: Simulation.h:427
bool isParamValid(const std::string &name) const

◆ 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 57 of file THMProblem.C.

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

◆ identifyLoops()

void Simulation::identifyLoops ( )
inherited

Identifies the component loops.

Definition at line 164 of file Simulation.C.

Referenced by IdentifyLoopsAction::act().

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

◆ initComponents()

void Simulation::initComponents ( )
virtualinherited

Initialize this simulation's components.

Definition at line 151 of file Simulation.C.

Referenced by THMInitComponentsAction::act().

152 {
153  // initialize components
154  for (auto && comp : _components)
155  comp->executeInit();
156 
157  // perform secondary initialization, which relies on init() being called
158  // already for all components
159  for (auto && comp : _components)
160  comp->executeInitSecondary();
161 }
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400

◆ initSimulation()

void Simulation::initSimulation ( )
virtualinherited

Initialize this simulation.

Definition at line 135 of file Simulation.C.

Referenced by THMInitSimulationAction::act().

136 {
137  // sort the components using dependency resolver
139  for (const auto & comp : _components)
140  {
141  dependency_resolver.addNode(comp);
142  for (const auto & dep : comp->getDependencies())
143  if (hasComponent(dep))
144  dependency_resolver.addEdge(_comp_by_name[dep], comp);
145  }
146 
147  _components = dependency_resolver.dfs();
148 }
void addEdge(const T &a, const T &b)
bool hasComponent(const std::string &name) const
Find out if simulation has a component with the given name.
Definition: Simulation.C:1002
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
std::map< std::string, std::shared_ptr< Component > > _comp_by_name
Map of components by their names.
Definition: Simulation.h:402
void addNode(const T &a)
const std::vector< T > & dfs()

◆ integrityCheck()

void Simulation::integrityCheck ( ) const
virtualinherited

Check the integrity of the simulation.

Definition at line 846 of file Simulation.C.

Referenced by IntegrityCheckAction::act().

847 {
848  if (_components.size() == 0)
849  return;
850 
851  if (_check_jacobian)
852  return;
853 
854  // go over components and put flow channels into one "bucket"
855  std::vector<Component *> flow_channels;
856  for (auto && comp : _components)
857  {
858  auto flow_channel = dynamic_cast<FlowChannelBase *>(comp.get());
859  if (flow_channel != nullptr)
860  flow_channels.push_back(flow_channel);
861  }
862 
863  // initialize number of connected flow channel inlets and outlets to zero
864  std::map<std::string, unsigned int> flow_channel_inlets;
865  std::map<std::string, unsigned int> flow_channel_outlets;
866  for (auto && comp : flow_channels)
867  {
868  flow_channel_inlets[comp->name()] = 0;
869  flow_channel_outlets[comp->name()] = 0;
870  }
871 
872  // mark connections of any Component1DConnection components
873  for (const auto & comp : _components)
874  {
875  auto pc_comp = dynamic_cast<Component1DConnection *>(comp.get());
876  if (pc_comp != nullptr)
877  {
878  for (const auto & connection : pc_comp->getConnections())
879  {
880  if (connection._end_type == Component1DConnection::IN)
881  flow_channel_inlets[connection._component_name]++;
882  else if (connection._end_type == Component1DConnection::OUT)
883  flow_channel_outlets[connection._component_name]++;
884  }
885  }
886  }
887 
888  // finally, check that each flow channel has exactly one input and one output
889  for (auto && comp : flow_channels)
890  {
891  if (flow_channel_inlets[comp->name()] == 0)
892  logError("Component '", comp->name(), "' does not have connected inlet.");
893  else if (flow_channel_inlets[comp->name()] > 1)
894  logError("Multiple inlets specified for component '", comp->name(), "'.");
895 
896  if (flow_channel_outlets[comp->name()] == 0)
897  logError("Component '", comp->name(), "' does not have connected outlet.");
898  else if (flow_channel_outlets[comp->name()] > 1)
899  logError("Multiple outlets specified for component '", comp->name(), "'.");
900  }
901 
902  // let components check themselves
903  for (auto && comp : _components)
904  comp->executeCheck();
905 
908 }
void emitLoggedErrors() const
Calls mooseError if there are any logged errors.
Definition: Logger.C:21
Base class for 1D component junctions and boundaries.
bool _check_jacobian
True if checking jacobian.
Definition: Simulation.h:468
A base class for flow channels.
void emitLoggedWarnings() const
Calls mooseWarning if there are any logged warnings.
Definition: Logger.C:35
void logError(Args &&... args) const
Logs an error.
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
Logger _log
Definition: Simulation.h:465

◆ log()

Logger& Simulation::log ( )
inlineinherited

Definition at line 338 of file Simulation.h.

Referenced by AddClosuresAction::act().

338 { return _log; }
Logger _log
Definition: Simulation.h:465

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

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

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

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

Referenced by Component::logWarning().

68  {
69  _log.add(Logger::WARNING, component_name, ": ", std::forward<Args>(args)...);
70  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ logError()

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

Logs an error.

Definition at line 36 of file LoggingInterface.h.

Referenced by Simulation::addClosures(), Simulation::addComponent(), Simulation::controlDataIntegrityCheck(), Simulation::declareControlData(), Simulation::identifyLoops(), and Simulation::integrityCheck().

37  {
38  _log.add(Logger::ERROR, std::forward<Args>(args)...);
39  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ 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  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ printComponentLoops()

void Simulation::printComponentLoops ( ) const
inherited

Prints the component loops.

Definition at line 248 of file Simulation.C.

Referenced by THMPrintComponentLoopsAction::act().

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

◆ run()

void Simulation::run ( )
virtualinherited

Run the simulation.

Definition at line 986 of file Simulation.C.

987 {
988 }

◆ setCheckJacobian()

void Simulation::setCheckJacobian ( bool  state)
inlineinherited

Enable Jacobian checking.

Parameters
stateTrue for Jacobian checking, otherwise false

Definition at line 345 of file Simulation.h.

Referenced by THMDebugAction::act().

345 { _check_jacobian = state; }
bool _check_jacobian
True if checking jacobian.
Definition: Simulation.h:468

◆ 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 40 of file Simulation.C.

Referenced by ThermalHydraulicsApp::registerAll().

41 {
42  _component_variable_order_map[var] = index;
43 }
static std::map< VariableName, int > _component_variable_order_map
Component variable order map; see setComponentVariableOrder for more info.
Definition: Simulation.h:488

◆ setupCoordinateSystem()

void Simulation::setupCoordinateSystem ( )
protectedinherited

Sets the coordinate system for each subdomain.

Definition at line 770 of file Simulation.C.

Referenced by Simulation::setupMesh().

771 {
772  MultiMooseEnum coord_types("XYZ RZ RSPHERICAL");
773  std::vector<SubdomainName> blocks;
774 
775  for (auto && comp : _components)
776  {
777  if (comp->parent() == nullptr)
778  {
779  const auto & subdomains = comp->getSubdomainNames();
780  const auto & coord_sys = comp->getCoordSysTypes();
781 
782  for (unsigned int i = 0; i < subdomains.size(); i++)
783  {
784  blocks.push_back(subdomains[i]);
785  // coord_types.push_back("XYZ");
786  coord_types.setAdditionalValue(coord_sys[i] == Moose::COORD_RZ ? "RZ" : "XYZ");
787  }
788  }
789  }
790  _fe_problem.setCoordSystem(blocks, coord_types);
791 
792  // RZ geometries are always aligned with x-axis
793  MooseEnum rz_coord_axis("X=0 Y=1", "X");
794  _fe_problem.setAxisymmetricCoordAxis(rz_coord_axis);
795 }
char ** blocks
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)

◆ 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 727 of file Simulation.C.

Referenced by Simulation::addVariables().

728 {
729  for (auto && i : _ics)
730  {
731  const std::string & name = i.first;
732  ICInfo & ic = i.second;
733  _fe_problem.addInitialCondition(ic._type, name, ic._params);
734  }
735 }
std::map< std::string, ICInfo > _ics
Definition: Simulation.h:424
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
const std::string name
Definition: Setup.h:20

◆ setupInitialConditionsFromFile()

void Simulation::setupInitialConditionsFromFile ( )
protectedinherited

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

Definition at line 686 of file Simulation.C.

Referenced by Simulation::addVariables().

687 {
688  const UserObjectName suo_name = genName("thm", "suo");
689  {
690  const std::string class_name = "SolutionUserObject";
691  InputParameters params = _thm_factory.getValidParams(class_name);
692  params.set<MeshFileName>("mesh") = _thm_pars.get<FileName>("initial_from_file");
693  params.set<std::string>("timestep") = _thm_pars.get<std::string>("initial_from_file_timestep");
694  _fe_problem.addUserObject(class_name, suo_name, params);
695  }
696 
697  for (auto && v : _vars)
698  {
699  const VariableName & var_name = v.first;
700  const VariableInfo & vi = v.second;
701 
702  if (vi._var_type == "MooseVariableScalar")
703  {
704  std::string class_name = "ScalarSolutionIC";
705  InputParameters params = _thm_factory.getValidParams(class_name);
706  params.set<VariableName>("variable") = var_name;
707  params.set<VariableName>("from_variable") = var_name;
708  params.set<UserObjectName>("solution_uo") = suo_name;
709  _fe_problem.addInitialCondition(class_name, genName(var_name, "ic"), params);
710  }
711  else
712  {
713  std::string class_name = "SolutionIC";
714  InputParameters params = _thm_factory.getValidParams(class_name);
715  params.set<VariableName>("variable") = var_name;
716  params.set<VariableName>("from_variable") = var_name;
717  params.set<UserObjectName>("solution_uo") = suo_name;
718  if (vi._params.isParamValid("block"))
719  params.set<std::vector<SubdomainName>>("block") =
720  vi._params.get<std::vector<SubdomainName>>("block");
721  _fe_problem.addInitialCondition(class_name, genName(var_name, "ic"), params);
722  }
723  }
724 }
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::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
T & set(const std::string &name, bool quiet_mode=false)
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
std::map< VariableName, VariableInfo > _vars
variables for this simulation (name and info about the var)
Definition: Simulation.h:412
Factory & _thm_factory
The Factory associated with the MooseApp.
Definition: Simulation.h:397
const InputParameters & _thm_pars
"Global" of this simulation
Definition: Simulation.h:427
static const std::string v
Definition: NS.h:84
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)

◆ setupMesh()

void Simulation::setupMesh ( )
virtualinherited

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

Definition at line 798 of file Simulation.C.

Referenced by THMSetupMeshAction::act().

799 {
800  if (_components.size() == 0)
801  return;
802 
804 }
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
void setupCoordinateSystem()
Sets the coordinate system for each subdomain.
Definition: Simulation.C:770

◆ setupQuadrature()

void Simulation::setupQuadrature ( )
virtualinherited

Sets up quadrature rules.

Definition at line 98 of file Simulation.C.

Referenced by THMSetupQuadratureAction::act().

99 {
100  if (_components.size() == 0)
101  return;
102 
103  Order order = CONSTANT;
104  unsigned int n_flow_channels = 0;
105  unsigned int n_heat_structures = 0;
106 
107  for (auto && comp : _components)
108  {
109  auto flow_channel = dynamic_cast<FlowChannelBase *>(comp.get());
110  if (flow_channel != nullptr)
111  n_flow_channels++;
112 
113  auto hs_interface = dynamic_cast<HeatStructureInterface *>(comp.get());
114  if (hs_interface)
115  n_heat_structures++;
116  }
117 
118  if (n_flow_channels > 0)
119  {
120  const FEType & fe_type = getFlowFEType();
121  if (fe_type.default_quadrature_order() > order)
122  order = fe_type.default_quadrature_order();
123  }
124  if (n_heat_structures > 0)
125  {
126  const FEType & fe_type = HeatConductionModel::feType();
127  if (fe_type.default_quadrature_order() > order)
128  order = fe_type.default_quadrature_order();
129  }
130 
131  _fe_problem.createQRules(QGAUSS, order, order, order);
132 }
Order
FEProblemBase & _fe_problem
Pointer to FEProblem representing this simulation.
Definition: Simulation.h:391
Order default_quadrature_order() const
A base class for flow channels.
CONSTANT
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)
Interface class for heat structure components.
std::vector< std::shared_ptr< Component > > _components
List of components in this simulation.
Definition: Simulation.h:400
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
const libMesh::FEType & getFlowFEType() const
Gets the FE type for the flow in this simulation.
Definition: Simulation.h:48

◆ setVectorValuedVelocity()

void Simulation::setVectorValuedVelocity ( bool  vector_velocity)
inlineinherited

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

Definition at line 364 of file Simulation.h.

Referenced by THMOutputVectorVelocityAction::act().

364 { _output_vector_velocity = vector_velocity; }
bool _output_vector_velocity
Flag indicating if velocity is output as vector-valued field.
Definition: Simulation.h:474

◆ validParams()

InputParameters THMProblem::validParams ( )
static

Definition at line 16 of file THMProblem.C.

17 {
19 
20  params.addParam<bool>("2nd_order_mesh", false, "Use 2nd order elements in the mesh");
21 
22  params.addParam<FileName>("initial_from_file",
23  "The name of an exodus file with initial conditions");
24  params.addParam<std::string>(
25  "initial_from_file_timestep",
26  "LATEST",
27  "Gives the timestep (or \"LATEST\") for which to read a solution from a file "
28  "for a given variable. (Default: LATEST)");
29 
30  params.set<bool>("boundary_restricted_elem_integrity_check") = false;
31 
32  params.addClassDescription("Specialization of FEProblem to run with component subsystem");
33 
34  return params;
35 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _check_jacobian

bool Simulation::_check_jacobian
protectedinherited

True if checking jacobian.

Definition at line 468 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 409 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 404 of file Simulation.h.

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

◆ _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 430 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 463 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 406 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 474 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 456 of file Simulation.h.

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

◆ _outputters_screen

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

Definition at line 457 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 471 of file Simulation.h.

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

◆ _thm_app

ThermalHydraulicsApp& Simulation::_thm_app
protectedinherited

The application this is associated with.

Definition at line 394 of file Simulation.h.

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

◆ _thm_factory

Factory& Simulation::_thm_factory
protectedinherited

◆ _thm_mesh

THMMesh& Simulation::_thm_mesh
protectedinherited

THM mesh.

Definition at line 388 of file Simulation.h.

Referenced by Simulation::addRelationshipManagers().

◆ _thm_pars

const InputParameters& Simulation::_thm_pars
protectedinherited

"Global" of this simulation

Definition at line 427 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 412 of file Simulation.h.

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

◆ _zero

Real Simulation::_zero
inherited

Definition at line 477 of file Simulation.h.


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