https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
AuxiliarySystem Class Reference

A system that holds auxiliary variables. More...

#include <AuxiliarySystem.h>

Inheritance diagram for AuxiliarySystem:
[legend]

Public Member Functions

 AuxiliarySystem (FEProblemBase &subproblem, const std::string &name)
 
virtual ~AuxiliarySystem ()
 
virtual void initialSetup () override
 Setup Functions. More...
 
virtual void timestepSetup () override
 
virtual void customSetup (const ExecFlagType &exec_type) override
 
virtual void subdomainSetup () override
 
virtual void residualSetup () override
 
virtual void jacobianSetup () override
 
virtual void updateActive (THREAD_ID tid)
 
virtual void addVariable (const std::string &var_type, const std::string &name, InputParameters &parameters) override
 Canonical method for adding a variable. More...
 
void addKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 Adds an auxiliary kernel. More...
 
void addScalarKernel (const std::string &kernel_name, const std::string &name, InputParameters &parameters)
 Adds a scalar kernel. More...
 
virtual void reinitElem (const Elem *elem, THREAD_ID tid) override
 Reinit an element assembly info. More...
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, THREAD_ID tid) override
 Reinit assembly info for a side of an element. More...
 
const NumericVector< Number > *const & currentSolution () const override
 The solution vector that is currently being operated on. More...
 
virtual void serializeSolution ()
 
virtual void augmentSparsity (libMesh::SparsityPattern::Graph &, std::vector< dof_id_type > &, std::vector< dof_id_type > &) override
 Will modify the sparsity pattern to add logical geometric connections. More...
 
virtual void compute (ExecFlagType type) override
 Compute auxiliary variables. More...
 
std::set< std::string > getDependObjects (ExecFlagType type)
 Get a list of dependent UserObjects for this exec type. More...
 
std::set< std::string > getDependObjects ()
 
virtual libMesh::Order getMinQuadratureOrder () override
 Get the minimum quadrature order for evaluating elemental auxiliary variables. More...
 
bool needMaterialOnSide (BoundaryID bnd_id)
 Indicated whether this system needs material properties on boundaries. More...
 
virtual libMesh::Systemsys ()
 
virtual libMesh::Systemsystem () override
 Get the reference to the libMesh system. More...
 
virtual const libMesh::Systemsystem () const override
 
virtual void copyCurrentIntoPreviousNL ()
 Copies the current solution into the previous nonlinear iteration solution. More...
 
void setScalarVariableCoupleableTags (ExecFlagType type)
 
void clearScalarVariableCoupleableTags ()
 
const ExecuteMooseObjectWarehouse< AuxKernel > & nodalAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< VectorAuxKernel > & nodalVectorAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & nodalArrayAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< AuxKernel > & elemAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< VectorAuxKernel > & elemVectorAuxWarehouse () const
 
const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & elemArrayAuxWarehouse () const
 
void variableWiseRelativeSolutionDifferenceNorm (std::vector< Number > &var_diffs) const
 Computes and stores ||current - old|| / ||current|| for each variable in the given vector. More...
 
unsigned int number () const
 Gets the number of this system. More...
 
MooseMeshmesh ()
 
const MooseMeshmesh () const
 
SubProblemsubproblem ()
 
const SubProblemsubproblem () const
 
FEProblemBasefeProblem ()
 
const FEProblemBasefeProblem () const
 
void applyScalingFactors (const std::vector< Real > &inverse_scaling_factors)
 Applies scaling factors to the system's variables. More...
 
bool computingScalingJacobian () const
 Whether we are computing an initial Jacobian for automatic variable scaling. More...
 
bool automaticScaling () const
 Getter for whether we are performing automatic scaling. More...
 
void automaticScaling (bool automatic_scaling)
 Setter for whether we are performing automatic scaling. More...
 
void setVerboseFlag (const bool &verbose)
 Sets the verbose flag. More...
 
virtual libMesh::DofMapdofMap ()
 Gets writeable reference to the dof map. More...
 
virtual const libMesh::DofMapdofMap () const
 Gets const reference to the dof map. More...
 
virtual void preInit ()
 This is called prior to the libMesh system has been init'd. More...
 
virtual void postInit ()
 
virtual void reinit ()
 Reinitialize the system when the degrees of freedom in this system have changed. More...
 
virtual void initializeObjects ()
 Called only once, just before the solve begins so objects can do some precalculations. More...
 
void update ()
 Update the system (doing libMesh magic) More...
 
virtual void solve ()
 Solve the system (using libMesh magic) More...
 
virtual void copyOldSolutions ()
 Shifts the solutions backwards in time. More...
 
virtual void copyPreviousNonlinearSolutions ()
 Shifts the solutions backwards in nonlinear iteration history. More...
 
virtual void restoreSolutions ()
 Restore current solutions (call after your solve failed) More...
 
NumericVector< Number > & solution ()
 
const NumericVector< Number > & solution () const
 
NumericVector< Number > & solutionOld ()
 
const NumericVector< Number > & solutionOld () const
 
NumericVector< Number > & solutionOlder ()
 
const NumericVector< Number > & solutionOlder () const
 
virtual const NumericVector< Number > * solutionPreviousNewton () const
 
virtual NumericVector< Number > * solutionPreviousNewton ()
 
virtual void initSolutionState ()
 Initializes the solution state. More...
 
virtual NumericVector< Number > & solutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
 Get a state of the solution (0 = current, 1 = old, 2 = older, etc). More...
 
virtual const NumericVector< Number > & solutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
 Get a state of the solution (0 = current, 1 = old, 2 = older, etc). More...
 
virtual void needSolutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
 Registers that the solution state state is needed. More...
 
virtual bool hasSolutionState (const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
 Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc). More...
 
virtual void addDotVectors ()
 Add u_dot, u_dotdot, u_dot_old and u_dotdot_old vectors if requested by the time integrator. More...
 
virtual std::vector< Number > & duDotDus ()
 
virtual NumberduDotDotDu ()
 
virtual const NumberduDotDotDu () const
 
virtual const NumberduDotDu (unsigned int var_num=0) const
 
virtual NumericVector< Number > * solutionUDot ()
 
virtual const NumericVector< Number > * solutionUDot () const
 
virtual NumericVector< Number > * solutionUDotDot ()
 
virtual const NumericVector< Number > * solutionUDotDot () const
 
virtual NumericVector< Number > * solutionUDotOld ()
 
virtual const NumericVector< Number > * solutionUDotOld () const
 
virtual NumericVector< Number > * solutionUDotDotOld ()
 
virtual const NumericVector< Number > * solutionUDotDotOld () const
 
virtual void saveOldSolutions ()
 Save the old and older solutions. More...
 
virtual void restoreOldSolutions ()
 Restore the old and older solutions when the saved solutions present. More...
 
bool hasVector (const std::string &tag_name) const
 Check if the named vector exists in the system. More...
 
virtual bool hasVector (TagID tag_id) const
 Check if the tagged vector exists in the system. More...
 
virtual TagID timeVectorTag () const
 Ideally, we should not need this API. More...
 
virtual TagID systemMatrixTag () const
 Return the Matrix Tag ID for System. More...
 
virtual TagID nonTimeVectorTag () const
 
virtual TagID residualVectorTag () const
 
virtual std::set< TagIDdefaultVectorTags () const
 Get the default vector tags associated with this system. More...
 
virtual std::set< TagIDdefaultMatrixTags () const
 Get the default matrix tags associted with this system. More...
 
virtual void associateVectorToTag (NumericVector< Number > &vec, TagID tag)
 Associate a vector for a given tag. More...
 
virtual void disassociateVectorFromTag (NumericVector< Number > &vec, TagID tag)
 Disassociate a given vector from a given tag. More...
 
virtual void disassociateVectorFromTag (TagID tag)
 Disassociate any vector that is associated with a given tag. More...
 
virtual void disassociateDefaultVectorTags ()
 Disassociate the vectors associated with the default vector tags of this system. More...
 
virtual bool hasMatrix (TagID tag) const
 Check if the tagged matrix exists in the system. More...
 
virtual libMesh::SparseMatrix< Number > & getMatrix (TagID tag)
 Get a raw SparseMatrix. More...
 
virtual const libMesh::SparseMatrix< Number > & getMatrix (TagID tag) const
 Get a raw SparseMatrix. More...
 
virtual void activeAllMatrixTags ()
 Make all exsiting matrices ative. More...
 
virtual void activeMatrixTag (TagID tag)
 Active a matrix for tag. More...
 
virtual bool matrixTagActive (TagID tag) const
 If or not a matrix tag is active. More...
 
virtual void deactiveMatrixTag (TagID tag)
 deactive a matrix for tag More...
 
virtual void deactiveAllMatrixTags ()
 Make matrices inactive. More...
 
void closeTaggedMatrices (const std::set< TagID > &tags)
 Close all matrices associated the tags. More...
 
void flushTaggedMatrices (const std::set< TagID > &tags)
 flushes all matrices associated to tags. More...
 
virtual void associateMatrixToTag (libMesh::SparseMatrix< Number > &matrix, TagID tag)
 Associate a matrix to a tag. More...
 
virtual void disassociateMatrixFromTag (libMesh::SparseMatrix< Number > &matrix, TagID tag)
 Disassociate a matrix from a tag. More...
 
virtual void disassociateMatrixFromTag (TagID tag)
 Disassociate any matrix that is associated with a given tag. More...
 
virtual void disassociateDefaultMatrixTags ()
 Disassociate the matrices associated with the default matrix tags of this system. More...
 
virtual NumericVector< Number > & serializedSolution ()
 Returns a reference to a serialized version of the solution vector for this subproblem. More...
 
virtual NumericVector< Number > & residualCopy ()
 
virtual NumericVector< Number > & residualGhosted ()
 
virtual void augmentSendList (std::vector< dof_id_type > &send_list)
 Will modify the send_list to add all of the extra ghosted dofs for this system. More...
 
virtual bool isArrayVariable (const std::string &var_name) const
 If a variable is an array variable. More...
 
virtual bool isScalarVariable (unsigned int var_name) const
 
MooseVariableFieldBasegetVariable (THREAD_ID tid, const std::string &var_name) const
 Gets a reference to a variable of with specified name. More...
 
MooseVariableFieldBasegetVariable (THREAD_ID tid, unsigned int var_number) const
 Gets a reference to a variable with specified number. More...
 
template<typename T >
MooseVariableFE< T > & getFieldVariable (THREAD_ID tid, const std::string &var_name)
 Gets a reference to a variable of with specified name. More...
 
template<typename T >
MooseVariableFE< T > & getFieldVariable (THREAD_ID tid, unsigned int var_number)
 Gets a reference to a variable with specified number. More...
 
template<typename T >
MooseVariableField< T > & getActualFieldVariable (THREAD_ID tid, const std::string &var_name)
 Returns a field variable pointer - this includes finite volume variables. More...
 
template<typename T >
MooseVariableField< T > & getActualFieldVariable (THREAD_ID tid, unsigned int var_number)
 Returns a field variable pointer - this includes finite volume variables. More...
 
template<typename T >
MooseVariableFV< T > & getFVVariable (THREAD_ID tid, const std::string &var_name)
 Return a finite volume variable. More...
 
virtual MooseVariableScalargetScalarVariable (THREAD_ID tid, const std::string &var_name) const
 Gets a reference to a scalar variable with specified number. More...
 
virtual MooseVariableScalargetScalarVariable (THREAD_ID tid, unsigned int var_number) const
 Gets a reference to a variable with specified number. More...
 
virtual const std::set< SubdomainID > * getVariableBlocks (unsigned int var_number)
 Get the block where a variable of this system is defined. More...
 
virtual unsigned int nVariables () const
 Get the number of variables in this system. More...
 
unsigned int nFieldVariables () const
 Get the number of field variables in this system. More...
 
unsigned int nFVVariables () const
 Get the number of finite volume variables in this system. More...
 
std::size_t getMaxVarNDofsPerElem () const
 Gets the maximum number of dofs used by any one variable on any one element. More...
 
std::size_t getMaxVarNDofsPerNode () const
 Gets the maximum number of dofs used by any one variable on any one node. More...
 
void assignMaxVarNDofsPerElem (std::size_t max_dofs)
 assign the maximum element dofs More...
 
void assignMaxVarNDofsPerNode (std::size_t max_dofs)
 assign the maximum node dofs More...
 
virtual void addVariableToZeroOnResidual (std::string var_name)
 Adds this variable to the list of variables to be zeroed during each residual evaluation. More...
 
virtual void addVariableToZeroOnJacobian (std::string var_name)
 Adds this variable to the list of variables to be zeroed during each Jacobian evaluation. More...
 
virtual void zeroVariables (std::vector< std::string > &vars_to_be_zeroed)
 Zero out the solution for the list of variables passed in. More...
 
virtual void zeroVariablesForResidual ()
 Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on residual evaluation by a call to addVariableToZeroOnResidual() More...
 
virtual void zeroVariablesForJacobian ()
 Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on Jacobian evaluation by a call to addVariableToZeroOnResidual() More...
 
virtual void prepare (THREAD_ID tid)
 Prepare the system for use. More...
 
virtual void prepareFace (THREAD_ID tid, bool resize_data)
 Prepare the system for use on sides. More...
 
virtual void prepareNeighbor (THREAD_ID tid)
 Prepare the system for use. More...
 
virtual void prepareLowerD (THREAD_ID tid)
 Prepare the system for use for lower dimensional elements. More...
 
virtual void reinitNeighborFace (const Elem *elem, unsigned int side, THREAD_ID tid)
 Compute the values of the variables at all the current points. More...
 
virtual void reinitNeighbor (const Elem *elem, THREAD_ID tid)
 Compute the values of the variables at all the current points. More...
 
virtual void reinitLowerD (THREAD_ID tid)
 Compute the values of the variables on the lower dimensional element. More...
 
virtual void reinitNode (const Node *node, THREAD_ID tid)
 Reinit nodal assembly info. More...
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, THREAD_ID tid)
 Reinit nodal assembly info on a face. More...
 
virtual void reinitNodes (const std::vector< dof_id_type > &nodes, THREAD_ID tid)
 Reinit variables at a set of nodes. More...
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, THREAD_ID tid)
 Reinit variables at a set of neighbor nodes. More...
 
virtual void reinitScalars (THREAD_ID tid, bool reinit_for_derivative_reordering=false)
 Reinit scalar varaibles. More...
 
virtual void addVariableToCopy (const std::string &dest_name, const std::string &source_name, const std::string &timestep)
 Add info about variable that will be copied. More...
 
const std::vector< MooseVariableFieldBase * > & getVariables (THREAD_ID tid)
 
const std::vector< MooseVariableScalar * > & getScalarVariables (THREAD_ID tid)
 
const std::set< SubdomainID > & getSubdomainsForVar (unsigned int var_number) const
 
const std::set< SubdomainID > & getSubdomainsForVar (const std::string &var_name) const
 Get the block where a variable of this system is defined. More...
 
void removeVector (const std::string &name)
 Remove a vector from the system with the given name. More...
 
void removeVector (TagID tag_id)
 Remove a solution length vector from the system with the specified TagID. More...
 
NumericVector< Number > & addVector (const std::string &vector_name, const bool project, const libMesh::ParallelType type)
 Adds a solution length vector to the system. More...
 
NumericVector< Number > & addVector (TagID tag, const bool project, const libMesh::ParallelType type)
 Adds a solution length vector to the system with the specified TagID. More...
 
void closeTaggedVector (const TagID tag)
 Close vector with the given tag. More...
 
void closeTaggedVectors (const std::set< TagID > &tags)
 Close all vectors for given tags. More...
 
void zeroTaggedVector (const TagID tag)
 Zero vector with the given tag. More...
 
void zeroTaggedVectors (const std::set< TagID > &tags)
 Zero all vectors for given tags. More...
 
void setVariableGlobalDoFs (const std::string &var_name)
 set all the global dof indices for a variable More...
 
const std::vector< dof_id_type > & getVariableGlobalDoFs ()
 Get the global dof indices of a variable, this needs to be called after the indices have been set by setVariableGlobalDoFs More...
 
libMesh::SparseMatrix< Number > & addMatrix (TagID tag)
 Adds a matrix with a given tag. More...
 
void removeMatrix (TagID tag)
 Removes a matrix with a given tag. More...
 
virtual const std::string & name () const
 
const std::vector< VariableName > & getVariableNames () const
 
void getStandardFieldVariableNames (std::vector< VariableName > &std_field_variables) const
 
unsigned int getMaxVariableNumber () const
 Returns the maximum number of all variables on the system. More...
 
virtual void computeVariables (const NumericVector< Number > &)
 
void copyVars (libMesh::ExodusII_IO &io)
 
virtual void copySolutionsBackwards ()
 Copy current solution into old and older. More...
 
void addTimeIntegrator (const std::string &type, const std::string &name, InputParameters &parameters)
 
bool hasVarCopy () const
 Whether or not there are variables to be restarted from an Exodus mesh file. More...
 
void addScalingVector ()
 Add the scaling factor vector to the system. More...
 
bool solutionStatesInitialized () const
 Whether or not the solution states have been initialized via initSolutionState() More...
 
void clearAllDofIndices ()
 Clear all dof indices from moose variables. More...
 
void setActiveVariableCoupleableVectorTags (const std::set< TagID > &vtags, THREAD_ID tid)
 Set the active vector tags for the variables. More...
 
void setActiveScalarVariableCoupleableVectorTags (const std::set< TagID > &vtags, THREAD_ID tid)
 Set the active vector tags for the scalar variables. More...
 
Moose::VarKindType varKind () const
 
const std::vector< std::unique_ptr< NumericVector< Number > > > & gradientContainer () const
 Reference to the container vector which hold gradients at dofs (if it can be interpreted). More...
 
void copyTimeIntegrators (const SystemBase &other_sys)
 Copy time integrators from another system. More...
 
const TimeIntegratorgetTimeIntegrator (const unsigned int var_num) const
 Retrieve the time integrator that integrates the given variable's equation. More...
 
const TimeIntegratorqueryTimeIntegrator (const unsigned int var_num) const
 Retrieve the time integrator that integrates the given variable's equation. More...
 
const std::vector< std::shared_ptr< TimeIntegrator > > & getTimeIntegrators ()
 
std::string prefix () const
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
PerfGraphperfGraph ()
 Get the PerfGraph. More...
 
virtual NumericVector< Number > & getVector (const std::string &name)
 Get a raw NumericVector by name. More...
 
virtual const NumericVector< Number > & getVector (const std::string &name) const
 
virtual NumericVector< Number > & getVector (TagID tag)
 Get a raw NumericVector by tag. More...
 
virtual const NumericVector< Number > & getVector (TagID tag) const
 
virtual bool hasVariable (const std::string &var_name) const
 Query a system for a variable. More...
 
virtual bool hasScalarVariable (const std::string &var_name) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

void computeScalarVars (ExecFlagType type)
 
void computeNodalVars (ExecFlagType type)
 
void computeMortarNodalVars (ExecFlagType type)
 
void computeNodalVecVars (ExecFlagType type)
 
void computeNodalArrayVars (ExecFlagType type)
 
void computeElementalVars (ExecFlagType type)
 
void computeElementalVecVars (ExecFlagType type)
 
void computeElementalArrayVars (ExecFlagType type)
 
template<typename AuxKernelType >
void computeElementalVarsHelper (const MooseObjectWarehouse< AuxKernelType > &warehouse)
 
template<typename AuxKernelType >
void computeNodalVarsHelper (const MooseObjectWarehouse< AuxKernelType > &warehouse)
 
NumericVector< Number > & solutionInternal () const override
 Internal getter for solution owned by libMesh. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing. More...
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

libMesh::System_sys
 
const NumericVector< Number > * _current_solution
 solution vector from nonlinear solver More...
 
std::vector< NumericVector< Number > * > _solution_state
 The current states of the solution (0 = current, 1 = old, etc) More...
 
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
 
ExecuteMooseObjectWarehouse< AuxScalarKernel_aux_scalar_storage
 
ExecuteMooseObjectWarehouse< AuxKernel_nodal_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernel_mortar_nodal_aux_storage
 
ExecuteMooseObjectWarehouse< AuxKernel_elemental_aux_storage
 
ExecuteMooseObjectWarehouse< VectorAuxKernel_nodal_vec_aux_storage
 
ExecuteMooseObjectWarehouse< VectorAuxKernel_elemental_vec_aux_storage
 
ExecuteMooseObjectWarehouse< ArrayAuxKernel_nodal_array_aux_storage
 
ExecuteMooseObjectWarehouse< ArrayAuxKernel_elemental_array_aux_storage
 
SubProblem_subproblem
 The subproblem for whom this class holds variable data, etc; this can either be the governing finite element/volume problem or a subjugate displaced problem. More...
 
FEProblemBase_fe_problem
 the governing finite element/volume problem More...
 
MooseApp_app
 
Factory_factory
 
MooseMesh_mesh
 
std::string _name
 The name of this system. More...
 
std::vector< VariableWarehouse_vars
 Variable warehouses (one for each thread) More...
 
std::map< unsigned int, std::set< SubdomainID > > _var_map
 Map of variables (variable id -> array of subdomains where it lives) More...
 
unsigned int _max_var_number
 Maximum variable number. More...
 
std::vector< std::string > _vars_to_be_zeroed_on_residual
 
std::vector< std::string > _vars_to_be_zeroed_on_jacobian
 
NumericVector< Number > * _u_dot
 solution vector for u^dot More...
 
NumericVector< Number > * _u_dotdot
 solution vector for u^dotdot More...
 
NumericVector< Number > * _u_dot_old
 old solution vector for u^dot More...
 
NumericVector< Number > * _u_dotdot_old
 old solution vector for u^dotdot More...
 
std::vector< Real_du_dot_du
 Derivative of time derivative of u with respect to uj. More...
 
Real _du_dotdot_du
 
std::vector< NumericVector< Number > * > _tagged_vectors
 Tagged vectors (pointer) More...
 
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
 Tagged matrices (pointer) More...
 
std::vector< bool > _matrix_tag_active_flags
 Active flags for tagged matrices. More...
 
NumericVector< Real > * _saved_old
 
NumericVector< Real > * _saved_older
 
NumericVector< Real > * _saved_dot_old
 
NumericVector< Real > * _saved_dotdot_old
 
Moose::VarKindType _var_kind
 default kind of variables in this system More...
 
std::vector< VarCopyInfo_var_to_copy
 
size_t _max_var_n_dofs_per_elem
 Maximum number of dofs for any one variable on any one element. More...
 
size_t _max_var_n_dofs_per_node
 Maximum number of dofs for any one variable on any one node. More...
 
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
 Time integrator. More...
 
std::vector< std::vector< MooseVariableFieldBase * > > _numbered_vars
 Map variable number to its pointer. More...
 
bool _automatic_scaling
 Whether to automatically scale the variables. More...
 
bool _verbose
 True if printing out additional information. More...
 
bool _solution_states_initialized
 Whether or not the solution states have been initialized. More...
 
std::vector< dof_id_type_var_all_dof_indices
 Container for the dof indices of a given variable. More...
 
std::unique_ptr< NumericVector< Number > > _serialized_solution
 Serialized version of the solution vector, or nullptr if a serialized solution is not needed. More...
 
std::vector< std::unique_ptr< NumericVector< Number > > > _raw_grad_container
 A cache for storing gradients at dof locations. More...
 
const Parallel::Communicator_communicator
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph. More...
 
const std::string _prefix
 A prefix to use for all sections. More...
 
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
 Elemental variables. More...
 

Friends

class ComputeIndicatorThread
 
class ComputeMarkerThread
 
class FlagElementsThread
 
class ComputeNodalKernelsThread
 
class ComputeNodalKernelBcsThread
 
class ComputeNodalKernelJacobiansThread
 
class ComputeNodalKernelBCJacobiansThread
 

Detailed Description

A system that holds auxiliary variables.

Definition at line 41 of file AuxiliarySystem.h.

Constructor & Destructor Documentation

◆ AuxiliarySystem()

AuxiliarySystem::AuxiliarySystem ( FEProblemBase subproblem,
const std::string &  name 
)

Definition at line 38 of file AuxiliarySystem.C.

40  PerfGraphInterface(subproblem.getMooseApp().perfGraph(), "AuxiliarySystem"),
51 {
54 
56  {
57  auto & dof_map = _sys.get_dof_map();
58  dof_map.remove_algebraic_ghosting_functor(dof_map.default_algebraic_ghosting());
59  dof_map.set_implicit_neighbor_dofs(false);
60  }
61 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition: MooseApp.h:1045
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
const NumericVector< Number > * _current_solution
solution vector from nonlinear solver
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
virtual const std::string & name() const
Definition: SystemBase.C:1330
virtual libMesh::EquationSystems & es()=0
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
SubProblem & subproblem()
Definition: SystemBase.h:101
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
Elemental variables.
MooseApp & _app
Definition: SystemBase.h:982
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
std::unique_ptr< NumericVector< Number > > current_local_solution
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
PerfGraphInterface(const MooseObject *moose_object)
For objects that are MooseObjects with a default prefix of type()
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
virtual System & add_system(std::string_view system_type, std::string_view name)
SystemBase(SubProblem &subproblem, FEProblemBase &fe_problem, const std::string &name, Moose::VarKindType var_kind)
Definition: SystemBase.C:56
bool defaultGhosting()
Whether or not the user has requested default ghosting ot be on.
Definition: SubProblem.h:144
libMesh::System & _sys
const DofMap & get_dof_map() const
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition: MooseApp.h:161

◆ ~AuxiliarySystem()

AuxiliarySystem::~AuxiliarySystem ( )
virtualdefault

Member Function Documentation

◆ activeAllMatrixTags()

void SystemBase::activeAllMatrixTags ( )
virtualinherited

Make all exsiting matrices ative.

Definition at line 1137 of file SystemBase.C.

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

1138 {
1139  auto num_matrix_tags = _subproblem.numMatrixTags();
1140 
1141  _matrix_tag_active_flags.resize(num_matrix_tags);
1142 
1143  for (decltype(num_matrix_tags) tag = 0; tag < num_matrix_tags; tag++)
1144  if (hasMatrix(tag))
1145  _matrix_tag_active_flags[tag] = true;
1146  else
1147  _matrix_tag_active_flags[tag] = false;
1148 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
Definition: SystemBase.h:1019
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:248

◆ activeMatrixTag()

void SystemBase::activeMatrixTag ( TagID  tag)
virtualinherited

Active a matrix for tag.

Definition at line 1102 of file SystemBase.C.

1103 {
1104  mooseAssert(_subproblem.matrixTagExists(tag),
1105  "Cannot active Matrix with matrix_tag : " << tag << "that does not exist");
1106 
1107  if (_matrix_tag_active_flags.size() < tag + 1)
1108  _matrix_tag_active_flags.resize(tag + 1);
1109 
1110  _matrix_tag_active_flags[tag] = true;
1111 }
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
Definition: SystemBase.h:1019
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ addDotVectors()

void SystemBase::addDotVectors ( )
virtualinherited

Add u_dot, u_dotdot, u_dot_old and u_dotdot_old vectors if requested by the time integrator.

Reimplemented in DisplacedSystem.

Definition at line 1600 of file SystemBase.C.

Referenced by DisplacedSystem::addDotVectors().

1601 {
1602  if (_fe_problem.uDotRequested())
1603  _u_dot = &addVector("u_dot", true, GHOSTED);
1605  _u_dot_old = &addVector("u_dot_old", true, GHOSTED);
1607  _u_dotdot = &addVector("u_dotdot", true, GHOSTED);
1609  _u_dotdot_old = &addVector("u_dotdot_old", true, GHOSTED);
1610 }
virtual bool uDotDotOldRequested()
Get boolean flag to check whether old solution second time derivative needs to be stored...
NumericVector< Number > * _u_dot_old
old solution vector for u^dot
Definition: SystemBase.h:1005
virtual bool uDotRequested()
Get boolean flag to check whether solution time derivative needs to be stored.
virtual bool uDotDotRequested()
Get boolean flag to check whether solution second time derivative needs to be stored.
NumericVector< Number > * _u_dotdot
solution vector for u^dotdot
Definition: SystemBase.h:1002
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
virtual bool uDotOldRequested()
Get boolean flag to check whether old solution time derivative needs to be stored.
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
NumericVector< Number > * _u_dot
solution vector for u^dot
Definition: SystemBase.h:1000
NumericVector< Number > * _u_dotdot_old
old solution vector for u^dotdot
Definition: SystemBase.h:1007

◆ addKernel()

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

Adds an auxiliary kernel.

Parameters
kernel_nameThe type of the kernel
nameThe name of the kernel
parametersParameters for this kernel

Definition at line 258 of file AuxiliarySystem.C.

261 {
262  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
263  {
264  if (parameters.get<std::string>("_moose_base") == "AuxKernel" ||
265  parameters.get<std::string>("_moose_base") == "Bounds")
266  {
267  std::shared_ptr<AuxKernel> kernel =
268  _factory.create<AuxKernel>(kernel_name, name, parameters, tid);
269  if (kernel->isNodal())
270  {
271  if (kernel->isMortar())
272  _mortar_nodal_aux_storage.addObject(kernel, tid);
273  else
274  _nodal_aux_storage.addObject(kernel, tid);
275  }
276  else
277  _elemental_aux_storage.addObject(kernel, tid);
278  }
279 
280  else if (parameters.get<std::string>("_moose_base") == "VectorAuxKernel")
281  {
282  std::shared_ptr<VectorAuxKernel> kernel =
283  _factory.create<VectorAuxKernel>(kernel_name, name, parameters, tid);
284  if (kernel->isNodal())
285  {
286  if (kernel->isMortar())
287  mooseError("Vector mortar aux kernels not yet implemented");
288  _nodal_vec_aux_storage.addObject(kernel, tid);
289  }
290  else
291  _elemental_vec_aux_storage.addObject(kernel, tid);
292  }
293 
294  else if (parameters.get<std::string>("_moose_base") == "ArrayAuxKernel")
295  {
296  std::shared_ptr<ArrayAuxKernel> kernel =
297  _factory.create<ArrayAuxKernel>(kernel_name, name, parameters, tid);
298  if (kernel->isNodal())
299  {
300  if (kernel->isMortar())
301  mooseError("Vector mortar aux kernels not yet implemented");
302  _nodal_array_aux_storage.addObject(kernel, tid);
303  }
304  else
305  _elemental_array_aux_storage.addObject(kernel, tid);
306  }
307  else
308  mooseAssert(false,
309  "Attempting to add AuxKernel of type '" + kernel_name + "' and name '" + name +
310  "' to the auxiliary system with invalid _moose_base: " +
311  parameters.get<std::string>("_moose_base"));
312  }
313 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
Factory & _factory
Definition: SystemBase.h:983
virtual const std::string & name() const
Definition: SystemBase.C:1330
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
virtual std::unique_ptr< Base > create()=0
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addMatrix()

SparseMatrix< Number > & SystemBase::addMatrix ( TagID  tag)
inherited

Adds a matrix with a given tag.

Parameters
tag_nameThe name of the tag

Definition at line 562 of file SystemBase.C.

563 {
564  if (!_subproblem.matrixTagExists(tag))
565  mooseError("Cannot add tagged matrix with TagID ",
566  tag,
567  " in system '",
568  name(),
569  "' because the tag does not exist in the problem");
570 
571  if (hasMatrix(tag))
572  return getMatrix(tag);
573 
574  const auto matrix_name = _subproblem.matrixTagName(tag);
575  SparseMatrix<Number> & mat = system().add_matrix(matrix_name);
576  associateMatrixToTag(mat, tag);
577 
578  return mat;
579 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual void associateMatrixToTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Associate a matrix to a tag.
Definition: SystemBase.C:1059
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
SparseMatrix< Number > & add_matrix(std::string_view mat_name, ParallelType type=PARALLEL, MatrixBuildType mat_build_type=MatrixBuildType::AUTOMATIC)
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:357

◆ addScalarKernel()

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

Adds a scalar kernel.

Parameters
kernel_nameThe type of the kernel
nameThe name of the kernel
parametersKernel parameters

Definition at line 316 of file AuxiliarySystem.C.

319 {
320  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
321  {
322  std::shared_ptr<AuxScalarKernel> kernel =
323  _factory.create<AuxScalarKernel>(kernel_name, name, parameters, tid);
324  _aux_scalar_storage.addObject(kernel, tid);
325  }
326 }
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int n_threads()
Factory & _factory
Definition: SystemBase.h:983
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
virtual const std::string & name() const
Definition: SystemBase.C:1330
virtual std::unique_ptr< Base > create()=0
Base class for making kernels that work on auxiliary scalar variables.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addScalingVector()

void SystemBase::addScalingVector ( )
inherited

Add the scaling factor vector to the system.

Definition at line 1512 of file SystemBase.C.

Referenced by MooseVariableBase::initialSetup().

1513 {
1514  addVector("scaling_factors", /*project=*/false, libMesh::ParallelType::GHOSTED);
1516 }
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
void hasScalingVector(const unsigned int nl_sys_num)
Tells this problem that the assembly associated with the given nonlinear system number involves a sca...
Definition: SubProblem.C:1164
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159

◆ addTimeIntegrator()

void SystemBase::addTimeIntegrator ( const std::string &  type,
const std::string &  name,
InputParameters parameters 
)
inherited

Definition at line 1625 of file SystemBase.C.

1628 {
1629  parameters.set<SystemBase *>("_sys") = this;
1630  _time_integrators.push_back(_factory.create<TimeIntegrator>(type, name, parameters));
1631 }
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Definition: SystemBase.h:1041
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Factory & _factory
Definition: SystemBase.h:983
Base class for a system (of equations)
Definition: SystemBase.h:84
virtual const std::string & name() const
Definition: SystemBase.C:1330
virtual std::unique_ptr< Base > create()=0
Base class for time integrators.

◆ addVariable()

void AuxiliarySystem::addVariable ( const std::string &  var_type,
const std::string &  var_name,
InputParameters parameters 
)
overridevirtual

Canonical method for adding a variable.

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

Reimplemented from SystemBase.

Definition at line 204 of file AuxiliarySystem.C.

207 {
208  SystemBase::addVariable(var_type, name, parameters);
209 
210  auto fe_type = FEType(Utility::string_to_enum<Order>(parameters.get<MooseEnum>("order")),
211  Utility::string_to_enum<FEFamily>(parameters.get<MooseEnum>("family")));
212 
213  if (var_type == "MooseVariableScalar")
214  return;
215 
216  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
217  {
218  if (FEInterface::field_type(fe_type) == TYPE_VECTOR)
219  {
220  auto * var = _vars[tid].getActualFieldVariable<RealVectorValue>(name);
221  if (var)
222  {
223  if (var->feType().family == LAGRANGE_VEC)
224  _nodal_vars[tid].push_back(var);
225  else
226  _elem_vars[tid].push_back(var);
227  }
228  }
229 
230  else
231  {
232  MooseVariableBase * var_base = _vars[tid].getVariable(name);
233 
234  auto * const var = dynamic_cast<MooseVariableField<Real> *>(var_base);
235 
236  if (var)
237  {
238  if (var->feType().family == LAGRANGE)
239  _nodal_vars[tid].push_back(var);
240  else
241  _elem_vars[tid].push_back(var);
242  }
243 
244  auto * const avar = dynamic_cast<MooseVariableField<RealEigenVector> *>(var_base);
245 
246  if (avar)
247  {
248  if (avar->feType().family == LAGRANGE)
249  _nodal_vars[tid].push_back(avar);
250  else
251  _elem_vars[tid].push_back(avar);
252  }
253  }
254  }
255 }
LAGRANGE
unsigned int n_threads()
LAGRANGE_VEC
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &parameters)
Canonical method for adding a variable.
Definition: SystemBase.C:710
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual const std::string & name() const
Definition: SystemBase.C:1330
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
Elemental variables.
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
TYPE_VECTOR
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ addVariableToCopy()

void SystemBase::addVariableToCopy ( const std::string &  dest_name,
const std::string &  source_name,
const std::string &  timestep 
)
virtualinherited

Add info about variable that will be copied.

Parameters
dest_nameName of the nodal variable being used for copying into (name is from the exodusII file)
source_nameName of the nodal variable being used for copying from (name is from the exodusII file)
timestepTimestep in the file being used

Definition at line 1177 of file SystemBase.C.

Referenced by CopyNodalVarsAction::act(), and PhysicsBase::copyVariablesFromMesh().

1180 {
1181  _var_to_copy.push_back(VarCopyInfo(dest_name, source_name, timestep));
1182 }
std::vector< VarCopyInfo > _var_to_copy
Definition: SystemBase.h:1032
Information about variables that will be copied.
Definition: SystemBase.h:66

◆ addVariableToZeroOnJacobian()

void SystemBase::addVariableToZeroOnJacobian ( std::string  var_name)
virtualinherited

Adds this variable to the list of variables to be zeroed during each Jacobian evaluation.

Parameters
var_nameThe name of the variable to be zeroed.

Reimplemented in DisplacedSystem.

Definition at line 179 of file SystemBase.C.

Referenced by ADDGKernel::ADDGKernel(), DisplacedSystem::addVariableToZeroOnJacobian(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ArrayDGKernel::ArrayDGKernel(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), DGKernel::DGKernel(), IntegratedBC::IntegratedBC(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), Kernel::Kernel(), NodalBC::NodalBC(), and NodalKernel::NodalKernel().

180 {
181  _vars_to_be_zeroed_on_jacobian.push_back(var_name);
182 }
std::vector< std::string > _vars_to_be_zeroed_on_jacobian
Definition: SystemBase.h:997

◆ addVariableToZeroOnResidual()

void SystemBase::addVariableToZeroOnResidual ( std::string  var_name)
virtualinherited

Adds this variable to the list of variables to be zeroed during each residual evaluation.

Parameters
var_nameThe name of the variable to be zeroed.

Reimplemented in DisplacedSystem.

Definition at line 173 of file SystemBase.C.

Referenced by ADDGKernel::ADDGKernel(), DisplacedSystem::addVariableToZeroOnResidual(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ArrayDGKernel::ArrayDGKernel(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), DGKernel::DGKernel(), IntegratedBC::IntegratedBC(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), Kernel::Kernel(), NodalBC::NodalBC(), and NodalKernel::NodalKernel().

174 {
175  _vars_to_be_zeroed_on_residual.push_back(var_name);
176 }
std::vector< std::string > _vars_to_be_zeroed_on_residual
Definition: SystemBase.h:996

◆ addVector() [1/2]

NumericVector<Number>& SystemBase::addVector ( const std::string &  vector_name,
const bool  project,
const libMesh::ParallelType  type 
)
inherited

Adds a solution length vector to the system.

Parameters
vector_nameThe name of the vector.
projectWhether or not to project this vector when doing mesh refinement. If the vector is just going to be recomputed then there is no need to project it.
typeWhat type of parallel vector. This is usually either PARALLEL or GHOSTED. GHOSTED is needed if you are going to be accessing off-processor entries. The ghosting pattern is the same as the solution vector.

Referenced by SystemBase::addDotVectors(), SystemBase::addScalingVector(), NonlinearTimeIntegratorInterface::addVector(), SecantSolve::allocateStorage(), SteffensenSolve::allocateStorage(), PicardSolve::allocateStorage(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), CentralDifference::initialSetup(), SystemBase::needSolutionState(), NonlinearSystemBase::residualGhosted(), and SystemBase::saveOldSolutions().

◆ addVector() [2/2]

NumericVector<Number>& SystemBase::addVector ( TagID  tag,
const bool  project,
const libMesh::ParallelType  type 
)
inherited

Adds a solution length vector to the system with the specified TagID.

Parameters
tag_nameThe name of the tag
projectWhether or not to project this vector when doing mesh refinement. If the vector is just going to be recomputed then there is no need to project it.
typeWhat type of parallel vector. This is usually either PARALLEL or GHOSTED. GHOSTED is needed if you are going to be accessing off-processor entries. The ghosting pattern is the same as the solution vector.

◆ applyScalingFactors()

void SystemBase::applyScalingFactors ( const std::vector< Real > &  inverse_scaling_factors)
inherited

Applies scaling factors to the system's variables.

Parameters
inverse_scaling_factorsA vector containing the inverse of each variable's scaling factor, e.g. 1 / scaling_factor

Definition at line 1462 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeScaling().

1463 {
1464  for (MooseIndex(_vars) thread = 0; thread < _vars.size(); ++thread)
1465  {
1466  auto & field_variables = _vars[thread].fieldVariables();
1467  for (MooseIndex(field_variables) i = 0, p = 0; i < field_variables.size(); ++i)
1468  {
1469  auto factors = field_variables[i]->arrayScalingFactor();
1470  for (unsigned int j = 0; j < field_variables[i]->count(); ++j, ++p)
1471  factors[j] /= inverse_scaling_factors[p];
1472 
1473  field_variables[i]->scalingFactor(factors);
1474  }
1475 
1476  auto offset = field_variables.size();
1477 
1478  auto & scalar_variables = _vars[thread].scalars();
1479  for (MooseIndex(scalar_variables) i = 0; i < scalar_variables.size(); ++i)
1480  scalar_variables[i]->scalingFactor(
1481  {1. / inverse_scaling_factors[offset + i] * scalar_variables[i]->scalingFactor()});
1482 
1483  if (thread == 0 && _verbose)
1484  {
1485  _console << "Automatic scaling factors:\n";
1486  auto original_flags = _console.flags();
1487  auto original_precision = _console.precision();
1488  _console.unsetf(std::ios_base::floatfield);
1489  _console.precision(6);
1490 
1491  for (const auto & field_variable : field_variables)
1492  {
1493  const auto & factors = field_variable->arrayScalingFactor();
1494  _console << " " << field_variable->name() << ":";
1495  for (const auto i : make_range(field_variable->count()))
1496  _console << " " << factors[i];
1497  _console << "\n";
1498  }
1499  for (const auto & scalar_variable : scalar_variables)
1500  _console << " " << scalar_variable->name() << ": " << scalar_variable->scalingFactor()
1501  << "\n";
1502  _console << "\n" << std::endl;
1503 
1504  // restore state
1505  _console.flags(original_flags);
1506  _console.precision(original_precision);
1507  }
1508  }
1509 }
std::ios_base::fmtflags flags() const
Return the current flags.
Definition: ConsoleStream.C:56
void unsetf(std::ios_base::fmtflags mask) const
Unset format flags.
Definition: ConsoleStream.C:38
std::streamsize precision() const
Return the current precision.
Definition: ConsoleStream.C:44
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
bool _verbose
True if printing out additional information.
Definition: SystemBase.h:1050
IntRange< T > make_range(T beg, T end)
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ assignMaxVarNDofsPerElem()

void SystemBase::assignMaxVarNDofsPerElem ( std::size_t  max_dofs)
inlineinherited

assign the maximum element dofs

Definition at line 598 of file SystemBase.h.

598 { _max_var_n_dofs_per_elem = max_dofs; }
size_t _max_var_n_dofs_per_elem
Maximum number of dofs for any one variable on any one element.
Definition: SystemBase.h:1035

◆ assignMaxVarNDofsPerNode()

void SystemBase::assignMaxVarNDofsPerNode ( std::size_t  max_dofs)
inlineinherited

assign the maximum node dofs

Definition at line 603 of file SystemBase.h.

603 { _max_var_n_dofs_per_node = max_dofs; }
size_t _max_var_n_dofs_per_node
Maximum number of dofs for any one variable on any one node.
Definition: SystemBase.h:1038

◆ associateMatrixToTag()

void SystemBase::associateMatrixToTag ( libMesh::SparseMatrix< Number > &  matrix,
TagID  tag 
)
virtualinherited

Associate a matrix to a tag.

Reimplemented in DisplacedSystem.

Definition at line 1059 of file SystemBase.C.

Referenced by SystemBase::addMatrix(), DisplacedSystem::associateMatrixToTag(), NonlinearSystemBase::computeJacobian(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeLinearSystemSys(), and FEProblemBase::computeResidualAndJacobian().

1060 {
1061  if (!_subproblem.matrixTagExists(tag))
1062  mooseError("Cannot associate matrix to tag ", tag, " because that tag does not exist");
1063 
1064  if (_tagged_matrices.size() < tag + 1)
1065  _tagged_matrices.resize(tag + 1);
1066 
1067  _tagged_matrices[tag] = &matrix;
1068 }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ associateVectorToTag()

void SystemBase::associateVectorToTag ( NumericVector< Number > &  vec,
TagID  tag 
)
virtualinherited

Associate a vector for a given tag.

Reimplemented in DisplacedSystem.

Definition at line 964 of file SystemBase.C.

Referenced by DisplacedSystem::associateVectorToTag(), FEProblemBase::computeLinearSystemSys(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), NonlinearSystemBase::computeResidualTag(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualType(), LinearSystem::LinearSystem(), and SolverSystem::setSolution().

965 {
966  if (!_subproblem.vectorTagExists(tag))
967  mooseError("Cannot associate vector to tag ", tag, " because that tag does not exist");
968 
969  if (_tagged_vectors.size() < tag + 1)
970  _tagged_vectors.resize(tag + 1);
971 
972  _tagged_vectors[tag] = &vec;
973 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ augmentSendList()

void SystemBase::augmentSendList ( std::vector< dof_id_type > &  send_list)
virtualinherited

Will modify the send_list to add all of the extra ghosted dofs for this system.

Reimplemented in DisplacedSystem.

Definition at line 444 of file SystemBase.C.

Referenced by DisplacedSystem::augmentSendList(), and extraSendList().

445 {
446  std::set<dof_id_type> & ghosted_elems = _subproblem.ghostedElems();
447 
448  DofMap & dof_map = dofMap();
449 
450  std::vector<dof_id_type> dof_indices;
451 
452  System & sys = system();
453 
454  unsigned int sys_num = sys.number();
455 
456  unsigned int n_vars = sys.n_vars();
457 
458  for (const auto & elem_id : ghosted_elems)
459  {
460  Elem * elem = _mesh.elemPtr(elem_id);
461 
462  if (elem->active())
463  {
464  dof_map.dof_indices(elem, dof_indices);
465 
466  // Only need to ghost it if it's actually not on this processor
467  for (const auto & dof : dof_indices)
468  if (dof < dof_map.first_dof() || dof >= dof_map.end_dof())
469  send_list.push_back(dof);
470 
471  // Now add the DoFs from all of the nodes. This is necessary because of block
472  // restricted variables. A variable might not live _on_ this element but it
473  // might live on nodes connected to this element.
474  for (unsigned int n = 0; n < elem->n_nodes(); n++)
475  {
476  Node * node = elem->node_ptr(n);
477 
478  // Have to get each variable's dofs
479  for (unsigned int v = 0; v < n_vars; v++)
480  {
481  const Variable & var = sys.variable(v);
482  unsigned int var_num = var.number();
483  unsigned int n_comp = var.n_components();
484 
485  // See if this variable has any dofs at this node
486  if (node->n_dofs(sys_num, var_num) > 0)
487  {
488  // Loop over components of the variable
489  for (unsigned int c = 0; c < n_comp; c++)
490  send_list.push_back(node->dof_number(sys_num, var_num, c));
491  }
492  }
493  }
494  }
495  }
496 }
dof_id_type end_dof(const processor_id_type proc) const
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
const Variable & variable(unsigned int var) const
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3108
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
unsigned int n_dofs(const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1165
unsigned int number() const
unsigned int n_vars
virtual unsigned int n_nodes() const=0
unsigned int n_components() const
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual std::set< dof_id_type > & ghostedElems()
Return the list of elements that should have their DoFs ghosted to this processor.
Definition: SubProblem.h:672
MooseMesh & _mesh
Definition: SystemBase.h:985
const Node * node_ptr(const unsigned int i) const
dof_id_type first_dof(const processor_id_type proc) const
unsigned int number() const
unsigned int n_vars() const
bool active() const

◆ augmentSparsity()

void AuxiliarySystem::augmentSparsity ( libMesh::SparsityPattern::Graph sparsity,
std::vector< dof_id_type > &  n_nz,
std::vector< dof_id_type > &  n_oz 
)
overridevirtual

Will modify the sparsity pattern to add logical geometric connections.

Implements SystemBase.

Definition at line 757 of file AuxiliarySystem.C.

761 {
762 }

◆ automaticScaling() [1/2]

bool SystemBase::automaticScaling ( ) const
inlineinherited

Getter for whether we are performing automatic scaling.

Returns
whether we are performing automatic scaling

Definition at line 122 of file SystemBase.h.

Referenced by SubProblem::automaticScaling().

122 { return _automatic_scaling; }
bool _automatic_scaling
Whether to automatically scale the variables.
Definition: SystemBase.h:1047

◆ automaticScaling() [2/2]

void SystemBase::automaticScaling ( bool  automatic_scaling)
inlineinherited

Setter for whether we are performing automatic scaling.

Parameters
automatic_scalingA boolean representing whether we are performing automatic scaling

Definition at line 128 of file SystemBase.h.

128 { _automatic_scaling = automatic_scaling; }
bool _automatic_scaling
Whether to automatically scale the variables.
Definition: SystemBase.h:1047

◆ clearAllDofIndices()

void SystemBase::clearAllDofIndices ( )
inherited

Clear all dof indices from moose variables.

Definition at line 1580 of file SystemBase.C.

Referenced by SubProblem::clearAllDofIndices().

1581 {
1582  for (auto & var_warehouse : _vars)
1583  var_warehouse.clearAllDofIndices();
1584 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ clearScalarVariableCoupleableTags()

void AuxiliarySystem::clearScalarVariableCoupleableTags ( )

Definition at line 607 of file AuxiliarySystem.C.

Referenced by computeScalarVars().

608 {
611 }
virtual void clearActiveScalarVariableCoupleableVectorTags(const THREAD_ID tid) override
virtual void clearActiveScalarVariableCoupleableMatrixTags(const THREAD_ID tid) override
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980

◆ closeTaggedMatrices()

void SystemBase::closeTaggedMatrices ( const std::set< TagID > &  tags)
inherited

Close all matrices associated the tags.

Definition at line 1043 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), and NonlinearSystemBase::computeResidualAndJacobianTags().

1044 {
1045  for (auto tag : tags)
1046  if (hasMatrix(tag))
1047  getMatrix(tag).close();
1048 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual void close()=0
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007

◆ closeTaggedVector()

void SystemBase::closeTaggedVector ( const TagID  tag)
inherited

Close vector with the given tag.

Definition at line 641 of file SystemBase.C.

Referenced by SystemBase::closeTaggedVectors().

642 {
643  if (!_subproblem.vectorTagExists(tag))
644  mooseError("Cannot close vector with TagID ",
645  tag,
646  " in system '",
647  name(),
648  "' because that tag does not exist in the problem");
649  else if (!hasVector(tag))
650  mooseError("Cannot close vector tag with name '",
652  "' in system '",
653  name(),
654  "' because there is no vector associated with that tag");
655  getVector(tag).close();
656 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
virtual void close()=0
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:221
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ closeTaggedVectors()

void SystemBase::closeTaggedVectors ( const std::set< TagID > &  tags)
inherited

Close all vectors for given tags.

Definition at line 659 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeResidualAndJacobianTags(), NonlinearSystemBase::computeResidualTags(), NonlinearSystem::stopSolve(), and LinearSystem::stopSolve().

660 {
661  for (const auto tag : tags)
662  closeTaggedVector(tag);
663 }
void closeTaggedVector(const TagID tag)
Close vector with the given tag.
Definition: SystemBase.C:641

◆ compute()

void AuxiliarySystem::compute ( ExecFlagType  type)
overridevirtual

Compute auxiliary variables.

Parameters
typeTime flag of which variables should be computed

Implements SystemBase.

Definition at line 372 of file AuxiliarySystem.C.

373 {
374  // avoid division by dt which might be zero.
375  if (_fe_problem.dt() > 0.)
376  for (auto & ti : _time_integrators)
377  ti->preStep();
378 
379  // We need to compute time derivatives every time each kind of the variables is finished, because:
380  //
381  // a) the user might want to use the aux variable value somewhere, thus we need to provide the
382  // up-to-date value
383  // b) time integration system works with the whole vectors of solutions, thus we cannot update
384  // only a part of the vector
385  //
386 
387  if (_vars[0].scalars().size() > 0)
388  {
389  computeScalarVars(type);
390  // compute time derivatives of scalar aux variables _after_ the values were updated
391  if (_fe_problem.dt() > 0.)
392  for (auto & ti : _time_integrators)
393  ti->computeTimeDerivatives();
394  }
395 
396  if (_vars[0].fieldVariables().size() > 0)
397  {
398  computeNodalArrayVars(type);
399  computeNodalVecVars(type);
400  computeNodalVars(type);
404  computeElementalVars(type);
405 
406  // compute time derivatives of nodal aux variables _after_ the values were updated
407  if (_fe_problem.dt() > 0.)
408  for (auto & ti : _time_integrators)
409  ti->computeTimeDerivatives();
410  }
411 
412  if (_serialized_solution.get())
414 }
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Definition: SystemBase.h:1041
void computeScalarVars(ExecFlagType type)
std::unique_ptr< NumericVector< Number > > _serialized_solution
Serialized version of the solution vector, or nullptr if a serialized solution is not needed...
Definition: SystemBase.h:1060
void computeMortarNodalVars(ExecFlagType type)
void computeNodalArrayVars(ExecFlagType type)
void computeElementalVars(ExecFlagType type)
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
void computeNodalVars(ExecFlagType type)
virtual void serializeSolution()
void computeNodalVecVars(ExecFlagType type)
void computeElementalArrayVars(ExecFlagType type)
virtual Real & dt() const
void computeElementalVecVars(ExecFlagType type)

◆ computeElementalArrayVars()

void AuxiliarySystem::computeElementalArrayVars ( ExecFlagType  type)
protected

Definition at line 750 of file AuxiliarySystem.C.

Referenced by compute().

751 {
753  computeElementalVarsHelper<ArrayAuxKernel>(elemental);
754 }
A storage container for MooseObjects that inherit from SetupInterface.
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage

◆ computeElementalVars()

void AuxiliarySystem::computeElementalVars ( ExecFlagType  type)
protected

Definition at line 732 of file AuxiliarySystem.C.

Referenced by compute().

733 {
734  TIME_SECTION("computeElementalVars", 3);
735 
737  computeElementalVarsHelper<AuxKernel>(elemental);
738 }
A storage container for MooseObjects that inherit from SetupInterface.
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage

◆ computeElementalVarsHelper()

template<typename AuxKernelType >
template void AuxiliarySystem::computeElementalVarsHelper< VectorAuxKernel > ( const MooseObjectWarehouse< AuxKernelType > &  warehouse)
protected

Definition at line 798 of file AuxiliarySystem.C.

799 {
800  if (warehouse.hasActiveBlockObjects())
801  {
802  // Block Elemental AuxKernels
803  PARALLEL_TRY
804  {
807  try
808  {
809  Threads::parallel_reduce(range, eavt);
810  }
811  catch (MooseException & e)
812  {
813  _fe_problem.setException("The following MooseException was raised during elemental "
814  "Auxiliary variable computation:\n" +
815  std::string(e.what()));
816  }
817  }
818  PARALLEL_CATCH;
819 
820  // We need to make sure we propagate exceptions to all processes before trying to close
821  // here, which is a parallel operation
822  solution().close();
823  _sys.update();
824  }
825 
826  // Boundary Elemental AuxKernels
827  if (warehouse.hasActiveBoundaryObjects())
828  {
829  TIME_SECTION("computeElementalVecVars", 3);
830 
831  PARALLEL_TRY
832  {
835  try
836  {
837  Threads::parallel_reduce(bnd_elems, eabt);
838  }
839  catch (MooseException & e)
840  {
841  _fe_problem.setException("The following MooseException was raised during boundary "
842  "elemental Auxiliary variable computation:\n" +
843  std::string(e.what()));
844  }
845  }
846  PARALLEL_CATCH;
847 
848  // We need to make sure we propagate exceptions to all processes before trying to close
849  // here, which is a parallel operation
850  solution().close();
851  _sys.update();
852  }
853 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
virtual const char * what() const
Get out the error message.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void close()=0
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
Provides a way for users to bail out of the current solve.
virtual void update()
MooseMesh & _mesh
Definition: SystemBase.h:985
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1300
libMesh::System & _sys

◆ computeElementalVecVars()

void AuxiliarySystem::computeElementalVecVars ( ExecFlagType  type)
protected

Definition at line 741 of file AuxiliarySystem.C.

Referenced by compute().

742 {
743  TIME_SECTION("computeElementalVecVars", 3);
744 
746  computeElementalVarsHelper<VectorAuxKernel>(elemental);
747 }
A storage container for MooseObjects that inherit from SetupInterface.
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ computeMortarNodalVars()

void AuxiliarySystem::computeMortarNodalVars ( ExecFlagType  type)
protected

Definition at line 680 of file AuxiliarySystem.C.

Referenced by compute().

681 {
682  TIME_SECTION("computeMortarNodalVars", 3);
683 
684  const MooseObjectWarehouse<AuxKernel> & mortar_nodal_warehouse = _mortar_nodal_aux_storage[type];
685 
686  mooseAssert(!mortar_nodal_warehouse.hasActiveBlockObjects(),
687  "We don't allow creation of block restricted mortar nodal aux kernels.");
688 
689  if (mortar_nodal_warehouse.hasActiveBoundaryObjects())
690  {
692  for (const auto & [bnd_id, mortar_nodal_auxes] :
693  mortar_nodal_warehouse.getActiveBoundaryObjects())
694  for (const auto index : index_range(mortar_nodal_auxes))
695  {
696  PARALLEL_TRY
697  {
698  try
699  {
701  _fe_problem, mortar_nodal_warehouse, bnd_id, index);
702  Threads::parallel_reduce(bnd_nodes, mnabt);
703  }
704  catch (libMesh::LogicError & e)
705  {
706  _fe_problem.setException("The following libMesh::LogicError was raised during mortar "
707  "nodal Auxiliary variable computation:\n" +
708  std::string(e.what()));
709  }
710  catch (MooseException & e)
711  {
712  _fe_problem.setException("The following MooseException was raised during mortar nodal "
713  "Auxiliary variable computation:\n" +
714  std::string(e.what()));
715  }
716  catch (MetaPhysicL::LogicError & e)
717  {
719  }
720  }
721  PARALLEL_CATCH;
722 
723  // We need to make sure we propagate exceptions to all processes before trying to close
724  // here, which is a parallel operation
725  solution().close();
726  _sys.update();
727  }
728  }
729 }
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
virtual const char * what() const
Get out the error message.
bool hasActiveBlockObjects(THREAD_ID tid=0) const
This class evaluates a single mortar nodal aux kernel.
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition: MooseError.C:112
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
A storage container for MooseObjects that inherit from SetupInterface.
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void close()=0
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
Provides a way for users to bail out of the current solve.
virtual void update()
MooseMesh & _mesh
Definition: SystemBase.h:985
libMesh::System & _sys
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1286
auto index_range(const T &sizable)

◆ computeNodalArrayVars()

void AuxiliarySystem::computeNodalArrayVars ( ExecFlagType  type)
protected

Definition at line 673 of file AuxiliarySystem.C.

Referenced by compute().

674 {
676  computeNodalVarsHelper<ArrayAuxKernel>(nodal);
677 }
A storage container for MooseObjects that inherit from SetupInterface.
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage

◆ computeNodalVars()

void AuxiliarySystem::computeNodalVars ( ExecFlagType  type)
protected

Definition at line 655 of file AuxiliarySystem.C.

Referenced by compute().

656 {
657  TIME_SECTION("computeNodalVars", 3);
658 
660  computeNodalVarsHelper<AuxKernel>(nodal);
661 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
A storage container for MooseObjects that inherit from SetupInterface.

◆ computeNodalVarsHelper()

template<typename AuxKernelType >
template void AuxiliarySystem::computeNodalVarsHelper< VectorAuxKernel > ( const MooseObjectWarehouse< AuxKernelType > &  warehouse)
protected

Definition at line 857 of file AuxiliarySystem.C.

858 {
859  if (warehouse.hasActiveBlockObjects())
860  {
861  // Block Nodal AuxKernels
862  PARALLEL_TRY
863  {
866  Threads::parallel_reduce(range, navt);
867 
868  solution().close();
869  _sys.update();
870  }
871  PARALLEL_CATCH;
872  }
873 
874  if (warehouse.hasActiveBoundaryObjects())
875  {
876  TIME_SECTION("computeBoundaryObjects", 3);
877 
878  // Boundary Nodal AuxKernels
879  PARALLEL_TRY
880  {
883  Threads::parallel_reduce(bnd_nodes, nabt);
884 
885  solution().close();
886  _sys.update();
887  }
888  PARALLEL_CATCH;
889  }
890 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1272
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
virtual void close()=0
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
virtual void update()
MooseMesh & _mesh
Definition: SystemBase.h:985
libMesh::System & _sys
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1286

◆ computeNodalVecVars()

void AuxiliarySystem::computeNodalVecVars ( ExecFlagType  type)
protected

Definition at line 664 of file AuxiliarySystem.C.

Referenced by compute().

665 {
666  TIME_SECTION("computeNodalVecVars", 3);
667 
669  computeNodalVarsHelper<VectorAuxKernel>(nodal);
670 }
A storage container for MooseObjects that inherit from SetupInterface.
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage

◆ computeScalarVars()

void AuxiliarySystem::computeScalarVars ( ExecFlagType  type)
protected

Definition at line 614 of file AuxiliarySystem.C.

Referenced by compute().

615 {
617 
618  // Reference to the current storage container
620 
621  if (storage.hasActiveObjects())
622  {
623  TIME_SECTION("computeScalarVars", 1);
624 
625  PARALLEL_TRY
626  {
627  // FIXME: run multi-threaded
628  THREAD_ID tid = 0;
629  if (storage.hasActiveObjects())
630  {
632 
633  const std::vector<std::shared_ptr<AuxScalarKernel>> & objects =
634  storage.getActiveObjects(tid);
635 
636  // Call compute() method on all active AuxScalarKernel objects
637  for (const auto & obj : objects)
638  obj->compute();
639 
640  const std::vector<MooseVariableScalar *> & scalar_vars = getScalarVariables(tid);
641  for (const auto & var : scalar_vars)
642  var->insert(solution());
643  }
644  }
645  PARALLEL_CATCH;
646 
647  solution().close();
648  _sys.update();
649  }
650 
652 }
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:757
NumericVector< Number > & solution()
Definition: SystemBase.h:195
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
void setScalarVariableCoupleableTags(ExecFlagType type)
void clearScalarVariableCoupleableTags()
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
virtual void close()=0
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980
virtual void update()
bool hasActiveObjects(THREAD_ID tid=0) const
libMesh::System & _sys
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ computeVariables()

virtual void SystemBase::computeVariables ( const NumericVector< Number > &  )
inlinevirtualinherited

Definition at line 870 of file SystemBase.h.

870 {}

◆ computingScalingJacobian()

bool SystemBase::computingScalingJacobian ( ) const
inherited

Whether we are computing an initial Jacobian for automatic variable scaling.

Definition at line 1519 of file SystemBase.C.

Referenced by Assembly::addJacobianBlock(), Assembly::addJacobianBlockNonlocal(), VectorKernel::computeJacobian(), Kernel::computeJacobian(), EigenKernel::computeJacobian(), and FEProblemBase::computeJacobianTags().

1520 {
1522 }
virtual bool computingScalingJacobian() const =0
Getter for whether we&#39;re computing the scaling jacobian.
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977

◆ copyCurrentIntoPreviousNL()

void AuxiliarySystem::copyCurrentIntoPreviousNL ( )
virtual

Copies the current solution into the previous nonlinear iteration solution.

Definition at line 790 of file AuxiliarySystem.C.

791 {
794 }
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
virtual const NumericVector< Number > * solutionPreviousNewton() const
Definition: SystemBase.C:1345

◆ copyOldSolutions()

void SystemBase::copyOldSolutions ( )
virtualinherited

Shifts the solutions backwards in time.

Definition at line 1288 of file SystemBase.C.

Referenced by SystemBase::copySolutionsBackwards(), and EigenExecutionerBase::inversePowerIteration().

1289 {
1290  // Copying the solutions backward so the current solution will become the old, and the old will
1291  // become older. 0 index is for time, 1 would be nonlinear iteration.
1292  const auto states = _solution_states[0].size();
1293  if (states > 1)
1294  for (unsigned int i = states - 1; i > 0; --i)
1295  solutionState(i) = solutionState(i - 1);
1296 
1297  if (solutionUDotOld())
1298  *solutionUDotOld() = *solutionUDot();
1299  if (solutionUDotDotOld())
1301 }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253

◆ copyPreviousNonlinearSolutions()

void SystemBase::copyPreviousNonlinearSolutions ( )
virtualinherited

Shifts the solutions backwards in nonlinear iteration history.

Definition at line 1271 of file SystemBase.C.

Referenced by SystemBase::copySolutionsBackwards().

1272 {
1273  // 1 is for nonlinear, 0 is for time, we do this for nonlinear only here
1274  const auto states = _solution_states[1].size();
1275  if (states > 1)
1276  for (unsigned int i = states - 1; i > 0; --i)
1279 
1280  if (solutionPreviousNewton())
1282 }
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
virtual const NumericVector< Number > * solutionPreviousNewton() const
Definition: SystemBase.C:1345

◆ copySolutionsBackwards()

void SystemBase::copySolutionsBackwards ( )
virtualinherited

Copy current solution into old and older.

Definition at line 1260 of file SystemBase.C.

1261 {
1262  system().update();
1263  copyOldSolutions();
1265 }
virtual void copyOldSolutions()
Shifts the solutions backwards in time.
Definition: SystemBase.C:1288
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual void copyPreviousNonlinearSolutions()
Shifts the solutions backwards in nonlinear iteration history.
Definition: SystemBase.C:1271
virtual void update()

◆ copyTimeIntegrators()

void SystemBase::copyTimeIntegrators ( const SystemBase other_sys)
inherited

Copy time integrators from another system.

Definition at line 1634 of file SystemBase.C.

1635 {
1637 }
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Definition: SystemBase.h:1041

◆ copyVars()

void SystemBase::copyVars ( libMesh::ExodusII_IO io)
inherited

Definition at line 1185 of file SystemBase.C.

1186 {
1187  int n_steps = io.get_num_time_steps();
1188 
1189  bool did_copy = false;
1190  for (const auto & vci : _var_to_copy)
1191  {
1192  int timestep = -1;
1193 
1194  if (vci._timestep == "LATEST")
1195  // Use the last time step in the file from which to retrieve the solution
1196  timestep = n_steps;
1197  else
1198  {
1199  timestep = MooseUtils::convert<int>(vci._timestep);
1200  if (timestep > n_steps)
1201  mooseError("Invalid value passed as \"initial_from_file_timestep\". Expected \"LATEST\" or "
1202  "a valid integer between 1 and ",
1203  n_steps,
1204  " inclusive, received ",
1205  vci._timestep);
1206  }
1207 
1208  did_copy = true;
1209 
1210  if (hasVariable(vci._dest_name))
1211  {
1212  const auto & var = getVariable(0, vci._dest_name);
1213  if (var.isArray())
1214  {
1215  const auto & array_var = getFieldVariable<RealEigenVector>(0, vci._dest_name);
1216  for (MooseIndex(var.count()) i = 0; i < var.count(); ++i)
1217  {
1218  const auto & exodus_var = var.arrayVariableComponent(i);
1219  const auto & system_var = array_var.componentName(i);
1220  if (var.isNodal())
1221  io.copy_nodal_solution(system(), exodus_var, system_var, timestep);
1222  else
1223  io.copy_elemental_solution(system(), exodus_var, system_var, timestep);
1224  }
1225  }
1226  else
1227  {
1228  if (var.isNodal())
1229  io.copy_nodal_solution(system(), vci._dest_name, vci._source_name, timestep);
1230  else
1231  io.copy_elemental_solution(system(), vci._dest_name, vci._source_name, timestep);
1232  }
1233  }
1234  else if (hasScalarVariable(vci._dest_name))
1235  io.copy_scalar_solution(system(), {vci._dest_name}, {vci._source_name}, timestep);
1236  else
1237  mooseError("Unrecognized variable ", vci._dest_name, " in variables to copy.");
1238  }
1239 
1240  if (did_copy)
1241  solution().close();
1242 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
std::vector< VarCopyInfo > _var_to_copy
Definition: SystemBase.h:1032
int convert< int >(const std::string &str, bool throw_on_failure)
Definition: MooseUtils.C:1009
void copy_nodal_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)
void copy_elemental_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834
virtual void close()=0
void copy_scalar_solution(System &system, std::vector< std::string > system_var_names, std::vector< std::string > exodus_var_names, unsigned int timestep=1)
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
virtual bool hasScalarVariable(const std::string &var_name) const
Definition: SystemBase.C:859

◆ currentSolution()

const NumericVector<Number>* const& AuxiliarySystem::currentSolution ( ) const
inlineoverridevirtual

The solution vector that is currently being operated on.

This is typically a ghosted vector that comes in from the Nonlinear solver.

Implements SystemBase.

Definition at line 82 of file AuxiliarySystem.h.

Referenced by copyCurrentIntoPreviousNL(), FlagElementsThread::onElement(), AB2PredictorCorrector::step(), and DisplacedProblem::syncSolutions().

83  {
84  return _current_solution;
85  }
const NumericVector< Number > * _current_solution
solution vector from nonlinear solver

◆ customSetup()

void AuxiliarySystem::customSetup ( const ExecFlagType exec_type)
overridevirtual

Reimplemented from SystemBase.

Definition at line 119 of file AuxiliarySystem.C.

120 {
121  SystemBase::customSetup(exec_type);
122 
123  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
124  {
125  _aux_scalar_storage.customSetup(exec_type, tid);
126  _nodal_aux_storage.customSetup(exec_type, tid);
127  _mortar_nodal_aux_storage.customSetup(exec_type, tid);
128  _nodal_vec_aux_storage.customSetup(exec_type, tid);
129  _nodal_array_aux_storage.customSetup(exec_type, tid);
130  _elemental_aux_storage.customSetup(exec_type, tid);
131  _elemental_vec_aux_storage.customSetup(exec_type, tid);
132  _elemental_array_aux_storage.customSetup(exec_type, tid);
133  }
134 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
virtual void customSetup(const ExecFlagType &exec_type, THREAD_ID tid=0) const
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
virtual void customSetup(const ExecFlagType &exec_type)
Definition: SystemBase.C:1552
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ deactiveAllMatrixTags()

void SystemBase::deactiveAllMatrixTags ( )
virtualinherited

Make matrices inactive.

Definition at line 1126 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeResidualTags(), and NonlinearSystemBase::setInitialSolution().

1127 {
1128  auto num_matrix_tags = _subproblem.numMatrixTags();
1129 
1130  _matrix_tag_active_flags.resize(num_matrix_tags);
1131 
1132  for (decltype(num_matrix_tags) tag = 0; tag < num_matrix_tags; tag++)
1133  _matrix_tag_active_flags[tag] = false;
1134 }
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
Definition: SystemBase.h:1019
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:248

◆ deactiveMatrixTag()

void SystemBase::deactiveMatrixTag ( TagID  tag)
virtualinherited

deactive a matrix for tag

Definition at line 1114 of file SystemBase.C.

1115 {
1116  mooseAssert(_subproblem.matrixTagExists(tag),
1117  "Cannot deactivate Matrix with matrix_tag : " << tag << "that does not exist");
1118 
1119  if (_matrix_tag_active_flags.size() < tag + 1)
1120  _matrix_tag_active_flags.resize(tag + 1);
1121 
1122  _matrix_tag_active_flags[tag] = false;
1123 }
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
Definition: SystemBase.h:1019
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ defaultMatrixTags()

virtual std::set<TagID> SystemBase::defaultMatrixTags ( ) const
inlinevirtualinherited

Get the default matrix tags associted with this system.

Reimplemented in NonlinearEigenSystem, and DisplacedSystem.

Definition at line 310 of file SystemBase.h.

Referenced by DisplacedSystem::defaultMatrixTags(), NonlinearEigenSystem::defaultMatrixTags(), and SystemBase::disassociateDefaultMatrixTags().

310 { return {systemMatrixTag()}; }
virtual TagID systemMatrixTag() const
Return the Matrix Tag ID for System.
Definition: SystemBase.h:288

◆ defaultVectorTags()

virtual std::set<TagID> SystemBase::defaultVectorTags ( ) const
inlinevirtualinherited

Get the default vector tags associated with this system.

Reimplemented in NonlinearEigenSystem, and DisplacedSystem.

Definition at line 303 of file SystemBase.h.

Referenced by DisplacedSystem::defaultVectorTags(), NonlinearEigenSystem::defaultVectorTags(), and SystemBase::disassociateDefaultVectorTags().

304  {
306  }
virtual TagID timeVectorTag() const
Ideally, we should not need this API.
Definition: SystemBase.h:283
virtual TagID nonTimeVectorTag() const
Definition: SystemBase.h:293
virtual TagID residualVectorTag() const
Definition: SystemBase.h:298

◆ disassociateDefaultMatrixTags()

void SystemBase::disassociateDefaultMatrixTags ( )
virtualinherited

Disassociate the matrices associated with the default matrix tags of this system.

Reimplemented in DisplacedSystem.

Definition at line 1093 of file SystemBase.C.

Referenced by DisplacedSystem::disassociateDefaultMatrixTags().

1094 {
1095  const auto tags = defaultMatrixTags();
1096  for (const auto tag : tags)
1097  if (_subproblem.matrixTagExists(tag))
1099 }
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual std::set< TagID > defaultMatrixTags() const
Get the default matrix tags associted with this system.
Definition: SystemBase.h:310
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ disassociateDefaultVectorTags()

void SystemBase::disassociateDefaultVectorTags ( )
virtualinherited

Disassociate the vectors associated with the default vector tags of this system.

Reimplemented in DisplacedSystem.

Definition at line 998 of file SystemBase.C.

Referenced by DisplacedSystem::disassociateDefaultVectorTags().

999 {
1000  const auto tags = defaultVectorTags();
1001  for (const auto tag : tags)
1002  if (_subproblem.vectorTagExists(tag))
1004 }
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual void disassociateVectorFromTag(NumericVector< Number > &vec, TagID tag)
Disassociate a given vector from a given tag.
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
virtual std::set< TagID > defaultVectorTags() const
Get the default vector tags associated with this system.
Definition: SystemBase.h:303

◆ disassociateMatrixFromTag() [1/2]

void SystemBase::disassociateMatrixFromTag ( libMesh::SparseMatrix< Number > &  matrix,
TagID  tag 
)
virtualinherited

Disassociate a matrix from a tag.

Reimplemented in DisplacedSystem.

Definition at line 1071 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeJacobian(), FEProblemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTag(), FEProblemBase::computeLinearSystemSys(), FEProblemBase::computeResidualAndJacobian(), SystemBase::disassociateDefaultMatrixTags(), and DisplacedSystem::disassociateMatrixFromTag().

1072 {
1073  if (!_subproblem.matrixTagExists(tag))
1074  mooseError("Cannot disassociate matrix from tag ", tag, " because that tag does not exist");
1075  if (hasMatrix(tag) && &getMatrix(tag) != &matrix)
1076  mooseError("You can not disassociate a matrix from a tag which it was not associated to");
1077 
1079 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual void disassociateMatrixFromTag(libMesh::SparseMatrix< Number > &matrix, TagID tag)
Disassociate a matrix from a tag.
Definition: SystemBase.C:1071
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ disassociateMatrixFromTag() [2/2]

void SystemBase::disassociateMatrixFromTag ( TagID  tag)
virtualinherited

Disassociate any matrix that is associated with a given tag.

Reimplemented in DisplacedSystem.

Definition at line 1082 of file SystemBase.C.

1083 {
1084  if (!_subproblem.matrixTagExists(tag))
1085  mooseError("Cannot disassociate matrix from tag ", tag, " because that tag does not exist");
1086 
1087  if (_tagged_matrices.size() < tag + 1)
1088  _tagged_matrices.resize(tag + 1);
1089  _tagged_matrices[tag] = nullptr;
1090 }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ disassociateVectorFromTag() [1/2]

virtual void SystemBase::disassociateVectorFromTag ( NumericVector< Number > &  vec,
TagID  tag 
)
virtualinherited

◆ disassociateVectorFromTag() [2/2]

void SystemBase::disassociateVectorFromTag ( TagID  tag)
virtualinherited

Disassociate any vector that is associated with a given tag.

Reimplemented in DisplacedSystem.

Definition at line 987 of file SystemBase.C.

988 {
989  if (!_subproblem.vectorTagExists(tag))
990  mooseError("Cannot disassociate vector from tag ", tag, " because that tag does not exist");
991 
992  if (_tagged_vectors.size() < tag + 1)
993  _tagged_vectors.resize(tag + 1);
994  _tagged_vectors[tag] = nullptr;
995 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ dofMap() [1/2]

DofMap & SystemBase::dofMap ( )
virtualinherited

◆ dofMap() [2/2]

const DofMap & SystemBase::dofMap ( ) const
virtualinherited

Gets const reference to the dof map.

Definition at line 1171 of file SystemBase.C.

1172 {
1173  return system().get_dof_map();
1174 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const DofMap & get_dof_map() const

◆ duDotDotDu() [1/2]

virtual Number& SystemBase::duDotDotDu ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 248 of file SystemBase.h.

Referenced by DisplacedSystem::duDotDotDu(), and MooseVariableScalar::reinit().

248 { return _du_dotdot_du; }
Real _du_dotdot_du
Definition: SystemBase.h:1012

◆ duDotDotDu() [2/2]

virtual const Number& SystemBase::duDotDotDu ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 250 of file SystemBase.h.

250 { return _du_dotdot_du; }
Real _du_dotdot_du
Definition: SystemBase.h:1012

◆ duDotDu()

const Number & SystemBase::duDotDu ( unsigned int  var_num = 0) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1668 of file SystemBase.C.

Referenced by DisplacedSystem::duDotDu(), and MooseVariableScalar::reinit().

1669 {
1670  return _du_dot_du[var_num];
1671 }
std::vector< Real > _du_dot_du
Derivative of time derivative of u with respect to uj.
Definition: SystemBase.h:1011

◆ duDotDus()

virtual std::vector<Number>& SystemBase::duDotDus ( )
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 247 of file SystemBase.h.

Referenced by DisplacedSystem::duDotDus().

247 { return _du_dot_du; }
std::vector< Real > _du_dot_du
Derivative of time derivative of u with respect to uj.
Definition: SystemBase.h:1011

◆ elemArrayAuxWarehouse()

const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & AuxiliarySystem::elemArrayAuxWarehouse ( ) const
inline

Definition at line 235 of file AuxiliarySystem.h.

236 {
238 }
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage

◆ elemAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernel > & AuxiliarySystem::elemAuxWarehouse ( ) const
inline

Definition at line 223 of file AuxiliarySystem.h.

224 {
225  return _elemental_aux_storage;
226 }
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage

◆ elemVectorAuxWarehouse()

const ExecuteMooseObjectWarehouse< VectorAuxKernel > & AuxiliarySystem::elemVectorAuxWarehouse ( ) const
inline

Definition at line 229 of file AuxiliarySystem.h.

230 {
232 }
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ feProblem() [1/2]

FEProblemBase& SystemBase::feProblem ( )
inlineinherited

Definition at line 103 of file SystemBase.h.

Referenced by DMMooseGetEmbedding_Private(), and DMSetUp_Moose_Pre().

103 { return _fe_problem; }
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980

◆ feProblem() [2/2]

const FEProblemBase& SystemBase::feProblem ( ) const
inlineinherited

Definition at line 104 of file SystemBase.h.

104 { return _fe_problem; }
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980

◆ flushTaggedMatrices()

void SystemBase::flushTaggedMatrices ( const std::set< TagID > &  tags)
inherited

flushes all matrices associated to tags.

Flush assembles the matrix but doesn't shrink memory allocation

Definition at line 1051 of file SystemBase.C.

1052 {
1053  for (auto tag : tags)
1054  if (hasMatrix(tag))
1055  getMatrix(tag).flush();
1056 }
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual void flush()
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007

◆ getActualFieldVariable() [1/2]

template<typename T >
MooseVariableField< T > & SystemBase::getActualFieldVariable ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Returns a field variable pointer - this includes finite volume variables.

Definition at line 117 of file SystemBase.C.

Referenced by BoundsBase::BoundsBase(), Assembly::copyFaceShapes(), Assembly::copyNeighborShapes(), and Assembly::copyShapes().

118 {
119  return *_vars[tid].getActualFieldVariable<T>(var_name);
120 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getActualFieldVariable() [2/2]

template<typename T >
MooseVariableField< T > & SystemBase::getActualFieldVariable ( THREAD_ID  tid,
unsigned int  var_number 
)
inherited

Returns a field variable pointer - this includes finite volume variables.

Definition at line 138 of file SystemBase.C.

139 {
140  return *_vars[tid].getActualFieldVariable<T>(var_number);
141 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getDependObjects() [1/2]

std::set< std::string > AuxiliarySystem::getDependObjects ( ExecFlagType  type)

Get a list of dependent UserObjects for this exec type.

Parameters
typeExecution flag type
Returns
a set of dependent user objects

Definition at line 417 of file AuxiliarySystem.C.

Referenced by groupUserObjects().

418 {
419  std::set<std::string> depend_objects;
420 
421  // Elemental AuxKernels
422  {
423  const std::vector<std::shared_ptr<AuxKernel>> & auxs =
424  _elemental_aux_storage[type].getActiveObjects();
425  for (const auto & aux : auxs)
426  {
427  const std::set<UserObjectName> & uo = aux->getDependObjects();
428  depend_objects.insert(uo.begin(), uo.end());
429  }
430  }
431 
432  // Elemental VectorAuxKernels
433  {
434  const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
435  _elemental_vec_aux_storage[type].getActiveObjects();
436  for (const auto & aux : auxs)
437  {
438  const std::set<UserObjectName> & uo = aux->getDependObjects();
439  depend_objects.insert(uo.begin(), uo.end());
440  }
441  }
442 
443  // Elemental ArrayAuxKernels
444  {
445  const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
446  _elemental_array_aux_storage[type].getActiveObjects();
447  for (const auto & aux : auxs)
448  {
449  const std::set<UserObjectName> & uo = aux->getDependObjects();
450  depend_objects.insert(uo.begin(), uo.end());
451  }
452  }
453 
454  // Nodal AuxKernels
455  {
456  const std::vector<std::shared_ptr<AuxKernel>> & auxs =
457  _nodal_aux_storage[type].getActiveObjects();
458  for (const auto & aux : auxs)
459  {
460  const std::set<UserObjectName> & uo = aux->getDependObjects();
461  depend_objects.insert(uo.begin(), uo.end());
462  }
463  }
464 
465  // Mortar Nodal AuxKernels
466  {
467  const std::vector<std::shared_ptr<AuxKernel>> & auxs =
468  _mortar_nodal_aux_storage[type].getActiveObjects();
469  for (const auto & aux : auxs)
470  {
471  const std::set<UserObjectName> & uo = aux->getDependObjects();
472  depend_objects.insert(uo.begin(), uo.end());
473  }
474  }
475 
476  // Nodal VectorAuxKernels
477  {
478  const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
479  _nodal_vec_aux_storage[type].getActiveObjects();
480  for (const auto & aux : auxs)
481  {
482  const std::set<UserObjectName> & uo = aux->getDependObjects();
483  depend_objects.insert(uo.begin(), uo.end());
484  }
485  }
486 
487  // Nodal ArrayAuxKernels
488  {
489  const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
490  _nodal_array_aux_storage[type].getActiveObjects();
491  for (const auto & aux : auxs)
492  {
493  const std::set<UserObjectName> & uo = aux->getDependObjects();
494  depend_objects.insert(uo.begin(), uo.end());
495  }
496  }
497 
498  return depend_objects;
499 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ getDependObjects() [2/2]

std::set< std::string > AuxiliarySystem::getDependObjects ( )

Definition at line 502 of file AuxiliarySystem.C.

503 {
504  std::set<std::string> depend_objects;
505 
506  // Elemental AuxKernels
507  {
508  const std::vector<std::shared_ptr<AuxKernel>> & auxs =
509  _elemental_aux_storage.getActiveObjects();
510  for (const auto & aux : auxs)
511  {
512  const std::set<UserObjectName> & uo = aux->getDependObjects();
513  depend_objects.insert(uo.begin(), uo.end());
514  }
515  }
516 
517  // Elemental VectorAuxKernels
518  {
519  const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
520  _elemental_vec_aux_storage.getActiveObjects();
521  for (const auto & aux : auxs)
522  {
523  const std::set<UserObjectName> & uo = aux->getDependObjects();
524  depend_objects.insert(uo.begin(), uo.end());
525  }
526  }
527 
528  // Elemental ArrayAuxKernels
529  {
530  const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
531  _elemental_array_aux_storage.getActiveObjects();
532  for (const auto & aux : auxs)
533  {
534  const std::set<UserObjectName> & uo = aux->getDependObjects();
535  depend_objects.insert(uo.begin(), uo.end());
536  }
537  }
538 
539  // Nodal AuxKernels
540  {
541  const std::vector<std::shared_ptr<AuxKernel>> & auxs = _nodal_aux_storage.getActiveObjects();
542  for (const auto & aux : auxs)
543  {
544  const std::set<UserObjectName> & uo = aux->getDependObjects();
545  depend_objects.insert(uo.begin(), uo.end());
546  }
547  }
548 
549  // Mortar Nodal AuxKernels
550  {
551  const std::vector<std::shared_ptr<AuxKernel>> & auxs =
552  _mortar_nodal_aux_storage.getActiveObjects();
553  for (const auto & aux : auxs)
554  {
555  const std::set<UserObjectName> & uo = aux->getDependObjects();
556  depend_objects.insert(uo.begin(), uo.end());
557  }
558  }
559 
560  // Nodal VectorAuxKernels
561  {
562  const std::vector<std::shared_ptr<VectorAuxKernel>> & auxs =
563  _nodal_vec_aux_storage.getActiveObjects();
564  for (const auto & aux : auxs)
565  {
566  const std::set<UserObjectName> & uo = aux->getDependObjects();
567  depend_objects.insert(uo.begin(), uo.end());
568  }
569  }
570 
571  // Nodal ArrayAuxKernels
572  {
573  const std::vector<std::shared_ptr<ArrayAuxKernel>> & auxs =
574  _nodal_array_aux_storage.getActiveObjects();
575  for (const auto & aux : auxs)
576  {
577  const std::set<UserObjectName> & uo = aux->getDependObjects();
578  depend_objects.insert(uo.begin(), uo.end());
579  }
580  }
581 
582  return depend_objects;
583 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ getFieldVariable() [1/2]

template<typename T >
MooseVariableFE< T > & SystemBase::getFieldVariable ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Gets a reference to a variable of with specified name.

This excludes and cannot return finite volume variables.

Parameters
tidThread id
var_namevariable name
Returns
reference the variable (class)

Definition at line 110 of file SystemBase.C.

Referenced by Marker::getMarkerValue().

111 {
112  return *_vars[tid].getFieldVariable<T>(var_name);
113 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getFieldVariable() [2/2]

template<typename T >
MooseVariableFE< T > & SystemBase::getFieldVariable ( THREAD_ID  tid,
unsigned int  var_number 
)
inherited

Gets a reference to a variable with specified number.

This excludes and cannot return finite volume variables.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 131 of file SystemBase.C.

132 {
133  return *_vars[tid].getFieldVariable<T>(var_number);
134 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getFVVariable()

template<typename T >
template MooseVariableFV< Real > & SystemBase::getFVVariable< Real > ( THREAD_ID  tid,
const std::string &  var_name 
)
inherited

Return a finite volume variable.

Definition at line 124 of file SystemBase.C.

125 {
126  return *_vars[tid].getFVVariable<T>(var_name);
127 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getMatrix() [1/2]

SparseMatrix< Number > & SystemBase::getMatrix ( TagID  tag)
virtualinherited

Get a raw SparseMatrix.

Reimplemented in DisplacedSystem.

Definition at line 1007 of file SystemBase.C.

Referenced by Assembly::addCachedJacobian(), NonlinearSystemBase::addImplicitGeometricCouplingEntries(), Assembly::addJacobianCoupledVarPair(), Assembly::addJacobianLowerD(), Assembly::addJacobianNeighbor(), Assembly::addJacobianNeighborLowerD(), Assembly::addJacobianNonlocal(), SystemBase::addMatrix(), SystemBase::closeTaggedMatrices(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), LinearSystem::computeLinearSystemInternal(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::constraintJacobians(), SystemBase::disassociateMatrixFromTag(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), SystemBase::flushTaggedMatrices(), DisplacedSystem::getMatrix(), LinearSystemContributionObject::linkTaggedVectorsAndMatrices(), MooseVariableScalar::reinit(), Assembly::setCachedJacobian(), and Assembly::zeroCachedJacobian().

1008 {
1009  if (!hasMatrix(tag))
1010  {
1011  if (!_subproblem.matrixTagExists(tag))
1012  mooseError("Cannot retreive matrix with tag ", tag, " because that tag does not exist");
1013  else
1014  mooseError("Cannot retreive matrix with tag ",
1015  tag,
1016  " in system '",
1017  name(),
1018  "'\nbecause a matrix has not been associated with that tag.");
1019  }
1020 
1021  return *_tagged_matrices[tag];
1022 }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ getMatrix() [2/2]

const SparseMatrix< Number > & SystemBase::getMatrix ( TagID  tag) const
virtualinherited

Get a raw SparseMatrix.

Reimplemented in DisplacedSystem.

Definition at line 1025 of file SystemBase.C.

1026 {
1027  if (!hasMatrix(tag))
1028  {
1029  if (!_subproblem.matrixTagExists(tag))
1030  mooseError("Cannot retreive matrix with tag ", tag, " because that tag does not exist");
1031  else
1032  mooseError("Cannot retreive matrix with tag ",
1033  tag,
1034  " in system '",
1035  name(),
1036  "'\nbecause a matrix has not been associated with that tag.");
1037  }
1038 
1039  return *_tagged_matrices[tag];
1040 }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ getMaxVariableNumber()

unsigned int SystemBase::getMaxVariableNumber ( ) const
inlineinherited

Returns the maximum number of all variables on the system.

Definition at line 868 of file SystemBase.h.

868 { return _max_var_number; }
unsigned int _max_var_number
Maximum variable number.
Definition: SystemBase.h:994

◆ getMaxVarNDofsPerElem()

std::size_t SystemBase::getMaxVarNDofsPerElem ( ) const
inlineinherited

Gets the maximum number of dofs used by any one variable on any one element.

Returns
The max

Definition at line 586 of file SystemBase.h.

Referenced by Moose::globalDofIndexToDerivative().

586 { return _max_var_n_dofs_per_elem; }
size_t _max_var_n_dofs_per_elem
Maximum number of dofs for any one variable on any one element.
Definition: SystemBase.h:1035

◆ getMaxVarNDofsPerNode()

std::size_t SystemBase::getMaxVarNDofsPerNode ( ) const
inlineinherited

Gets the maximum number of dofs used by any one variable on any one node.

Returns
The max

Definition at line 593 of file SystemBase.h.

593 { return _max_var_n_dofs_per_node; }
size_t _max_var_n_dofs_per_node
Maximum number of dofs for any one variable on any one node.
Definition: SystemBase.h:1038

◆ getMinQuadratureOrder()

Order AuxiliarySystem::getMinQuadratureOrder ( )
overridevirtual

Get the minimum quadrature order for evaluating elemental auxiliary variables.

Reimplemented from SystemBase.

Definition at line 765 of file AuxiliarySystem.C.

766 {
767  Order order = CONSTANT;
768  std::vector<MooseVariableFEBase *> vars = _vars[0].fieldVariables();
769  for (const auto & var : vars)
770  {
771  if (!var->isNodal()) // nodal aux variables do not need quadrature
772  {
773  FEType fe_type = var->feType();
774  if (fe_type.default_quadrature_order() > order)
775  order = fe_type.default_quadrature_order();
776  }
777  }
778 
779  return order;
780 }
Order
char ** vars
Order default_quadrature_order() const
CONSTANT
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getScalarVariable() [1/2]

MooseVariableScalar & SystemBase::getScalarVariable ( THREAD_ID  tid,
const std::string &  var_name 
) const
virtualinherited

Gets a reference to a scalar variable with specified number.

Parameters
tidThread id
var_nameA string which is the name of the variable to get.
Returns
reference the variable (class)

Definition at line 144 of file SystemBase.C.

Referenced by Assembly::addJacobianOffDiagScalar(), ODEKernel::computeOffDiagJacobianScalar(), VectorKernel::computeOffDiagJacobianScalar(), ArrayKernel::computeOffDiagJacobianScalar(), IntegratedBC::computeOffDiagJacobianScalar(), VectorIntegratedBC::computeOffDiagJacobianScalar(), Kernel::computeOffDiagJacobianScalar(), ArrayIntegratedBC::computeOffDiagJacobianScalar(), ScalarLagrangeMultiplier::computeOffDiagJacobianScalar(), MortarScalarBase::computeOffDiagJacobianScalar(), KernelScalarBase::computeOffDiagJacobianScalarLocal(), KernelScalarBase::computeScalarOffDiagJacobianScalar(), MortarScalarBase::computeScalarOffDiagJacobianScalar(), DMMooseSetVariables(), Assembly::init(), ReferenceResidualConvergence::initialSetup(), and NonlinearSystemBase::setupScalingData().

145 {
146  MooseVariableScalar * var = dynamic_cast<MooseVariableScalar *>(_vars[tid].getVariable(var_name));
147  if (!var)
148  mooseError("Scalar variable '" + var_name + "' does not exist in this system");
149  return *var;
150 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
Class for scalar variables (they are different).

◆ getScalarVariable() [2/2]

MooseVariableScalar & SystemBase::getScalarVariable ( THREAD_ID  tid,
unsigned int  var_number 
) const
virtualinherited

Gets a reference to a variable with specified number.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 153 of file SystemBase.C.

154 {
155  MooseVariableScalar * var =
156  dynamic_cast<MooseVariableScalar *>(_vars[tid].getVariable(var_number));
157  if (!var)
158  mooseError("variable #" + Moose::stringify(var_number) + " does not exist in this system");
159  return *var;
160 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
Class for scalar variables (they are different).

◆ getScalarVariables()

const std::vector<MooseVariableScalar *>& SystemBase::getScalarVariables ( THREAD_ID  tid)
inlineinherited

◆ getStandardFieldVariableNames()

void SystemBase::getStandardFieldVariableNames ( std::vector< VariableName > &  std_field_variables) const
inherited

◆ getSubdomainsForVar() [1/2]

const std::set<SubdomainID>& SystemBase::getSubdomainsForVar ( unsigned int  var_number) const
inlineinherited

Definition at line 762 of file SystemBase.h.

Referenced by NonlinearSystemBase::checkKernelCoverage(), and SystemBase::getSubdomainsForVar().

763  {
764  return _var_map.at(var_number);
765  }
std::map< unsigned int, std::set< SubdomainID > > _var_map
Map of variables (variable id -> array of subdomains where it lives)
Definition: SystemBase.h:992

◆ getSubdomainsForVar() [2/2]

const std::set< SubdomainID > & SystemBase::getSubdomainsForVar ( const std::string &  var_name) const
inherited

Get the block where a variable of this system is defined.

Parameters
var_nameThe name of the variable
Returns
the set of subdomain ids where the variable is active (defined)

Definition at line 1674 of file SystemBase.C.

1675 {
1676  return getSubdomainsForVar(getVariable(0, var_name).number());
1677 }
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
const std::set< SubdomainID > & getSubdomainsForVar(unsigned int var_number) const
Definition: SystemBase.h:762
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89

◆ getTimeIntegrator()

const TimeIntegrator & SystemBase::getTimeIntegrator ( const unsigned int  var_num) const
inherited

Retrieve the time integrator that integrates the given variable's equation.

Definition at line 1650 of file SystemBase.C.

Referenced by AB2PredictorCorrector::estimateTimeError().

1651 {
1652  const auto * const ti = queryTimeIntegrator(var_num);
1653 
1654  if (ti)
1655  return *ti;
1656  else
1657  mooseError("No time integrator found that integrates variable number ",
1658  std::to_string(var_num));
1659 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const TimeIntegrator * queryTimeIntegrator(const unsigned int var_num) const
Retrieve the time integrator that integrates the given variable&#39;s equation.
Definition: SystemBase.C:1640

◆ getTimeIntegrators()

const std::vector< std::shared_ptr< TimeIntegrator > > & SystemBase::getTimeIntegrators ( )
inherited
Returns
All the time integrators owned by this system

Definition at line 1662 of file SystemBase.C.

1663 {
1664  return _time_integrators;
1665 }
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Definition: SystemBase.h:1041

◆ getVariable() [1/2]

MooseVariableFieldBase & SystemBase::getVariable ( THREAD_ID  tid,
const std::string &  var_name 
) const
inherited

Gets a reference to a variable of with specified name.

Parameters
tidThread id
var_namevariable name
Returns
reference the variable (class)

Definition at line 89 of file SystemBase.C.

Referenced by AdaptivityAction::act(), Assembly::addJacobianBlockNonlocal(), FEProblemBase::addJacobianBlockTags(), NonlocalKernel::computeNonlocalOffDiagJacobian(), NonlocalIntegratedBC::computeNonlocalOffDiagJacobian(), Assembly::copyFaceShapes(), Assembly::copyNeighborShapes(), Assembly::copyShapes(), SystemBase::copyVars(), DMMooseSetVariables(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NodeElemConstraint::getConnectedDofIndices(), NodeFaceConstraint::getConnectedDofIndices(), SystemBase::getSubdomainsForVar(), ResidualObject::getVariable(), SubProblem::getVariableHelper(), Assembly::init(), NodalNormalsPreprocessor::initialize(), ExplicitTimeIntegrator::initialSetup(), ReferenceResidualConvergence::initialSetup(), LinearSystem::initialSetup(), Assembly::initNonlocalCoupling(), PNGOutput::makeMeshFunc(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), UpdateErrorVectorsThread::onElement(), Assembly::prepareBlock(), Assembly::prepareBlockNonlocal(), AddPeriodicBCAction::setPeriodicVars(), NonlinearSystemBase::setupScalingData(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

90 {
92  dynamic_cast<MooseVariableFieldBase *>(_vars[tid].getVariable(var_name));
93  if (!var)
94  mooseError("Variable '", var_name, "' does not exist in this system");
95  return *var;
96 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ getVariable() [2/2]

MooseVariableFieldBase & SystemBase::getVariable ( THREAD_ID  tid,
unsigned int  var_number 
) const
inherited

Gets a reference to a variable with specified number.

Parameters
tidThread id
var_numberlibMesh variable number
Returns
reference the variable (class)

Definition at line 99 of file SystemBase.C.

100 {
101  if (var_number < _numbered_vars[tid].size())
102  if (_numbered_vars[tid][var_number])
103  return *_numbered_vars[tid][var_number];
104 
105  mooseError("Variable #", Moose::stringify(var_number), " does not exist in this system");
106 }
std::vector< std::vector< MooseVariableFieldBase * > > _numbered_vars
Map variable number to its pointer.
Definition: SystemBase.h:1044
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64

◆ getVariableBlocks()

const std::set< SubdomainID > * SystemBase::getVariableBlocks ( unsigned int  var_number)
virtualinherited

Get the block where a variable of this system is defined.

Parameters
var_numberThe number of the variable
Returns
the set of subdomain ids where the variable is active (defined)

Definition at line 163 of file SystemBase.C.

Referenced by PhysicsBasedPreconditioner::addSystem().

164 {
165  mooseAssert(_var_map.find(var_number) != _var_map.end(), "Variable does not exist.");
166  if (_var_map[var_number].empty())
167  return nullptr;
168  else
169  return &_var_map[var_number];
170 }
std::map< unsigned int, std::set< SubdomainID > > _var_map
Map of variables (variable id -> array of subdomains where it lives)
Definition: SystemBase.h:992

◆ getVariableGlobalDoFs()

const std::vector<dof_id_type>& SystemBase::getVariableGlobalDoFs ( )
inlineinherited

Get the global dof indices of a variable, this needs to be called after the indices have been set by setVariableGlobalDoFs

Definition at line 843 of file SystemBase.h.

843 { return _var_all_dof_indices; }
std::vector< dof_id_type > _var_all_dof_indices
Container for the dof indices of a given variable.
Definition: SystemBase.h:1056

◆ getVariableNames()

const std::vector<VariableName>& SystemBase::getVariableNames ( ) const
inlineinherited

◆ getVariables()

const std::vector<MooseVariableFieldBase *>& SystemBase::getVariables ( THREAD_ID  tid)
inlineinherited

◆ getVector() [1/4]

NumericVector< Number > & SystemBase::getVector ( const std::string &  name)
virtualinherited

Get a raw NumericVector by name.

Get a raw NumericVector with the given name.

Reimplemented in DisplacedSystem.

Definition at line 916 of file SystemBase.C.

Referenced by Assembly::addCachedResiduals(), Assembly::addResidual(), Assembly::addResidualLower(), Assembly::addResidualNeighbor(), Assembly::addResidualScalar(), NonlinearSystemBase::assembleScalingVector(), SystemBase::closeTaggedVector(), FEProblemBase::computeBounds(), FEProblemBase::computeNearNullSpace(), FEProblemBase::computeNullSpace(), NonlinearSystemBase::computeResidualAndJacobianTags(), NonlinearSystemBase::computeResidualTags(), CentralDifference::computeTimeDerivatives(), FEProblemBase::computeTransposeNullSpace(), DisplacedSystem::getVector(), Assembly::hasScalingVector(), LinearSystemContributionObject::linkTaggedVectorsAndMatrices(), SystemBase::needSolutionState(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MooseVariableScalar::reinit(), SecantSolve::saveVariableValues(), SteffensenSolve::saveVariableValues(), PicardSolve::saveVariableValues(), NonlinearSystemBase::setPreviousNewtonSolution(), TaggingInterface::setResidual(), SystemBase::solutionPreviousNewton(), SystemBase::solutionState(), MultiAppDofCopyTransfer::transfer(), SecantSolve::transformVariables(), SteffensenSolve::transformVariables(), PicardSolve::transformVariables(), and SystemBase::zeroTaggedVector().

917 {
918  return system().get_vector(name);
919 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual const std::string & name() const
Definition: SystemBase.C:1330
const NumericVector< Number > & get_vector(std::string_view vec_name) const

◆ getVector() [2/4]

const NumericVector< Number > & SystemBase::getVector ( const std::string &  name) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 922 of file SystemBase.C.

923 {
924  return system().get_vector(name);
925 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual const std::string & name() const
Definition: SystemBase.C:1330
const NumericVector< Number > & get_vector(std::string_view vec_name) const

◆ getVector() [3/4]

NumericVector< Number > & SystemBase::getVector ( TagID  tag)
virtualinherited

Get a raw NumericVector by tag.

Reimplemented in DisplacedSystem.

Definition at line 928 of file SystemBase.C.

929 {
930  if (!hasVector(tag))
931  {
932  if (!_subproblem.vectorTagExists(tag))
933  mooseError("Cannot retreive vector with tag ", tag, " because that tag does not exist");
934  else
935  mooseError("Cannot retreive vector with tag ",
936  tag,
937  " in system '",
938  name(),
939  "'\nbecause a vector has not been associated with that tag.");
940  }
941 
942  return *_tagged_vectors[tag];
943 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ getVector() [4/4]

const NumericVector< Number > & SystemBase::getVector ( TagID  tag) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 946 of file SystemBase.C.

947 {
948  if (!hasVector(tag))
949  {
950  if (!_subproblem.vectorTagExists(tag))
951  mooseError("Cannot retreive vector with tag ", tag, " because that tag does not exist");
952  else
953  mooseError("Cannot retreive vector with tag ",
954  tag,
955  " in system '",
956  name(),
957  "'\nbecause a vector has not been associated with that tag.");
958  }
959 
960  return *_tagged_vectors[tag];
961 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ gradientContainer()

const std::vector<std::unique_ptr<NumericVector<Number> > >& SystemBase::gradientContainer ( ) const
inlineinherited

Reference to the container vector which hold gradients at dofs (if it can be interpreted).

Mainly used for finite volume systems.

Definition at line 931 of file SystemBase.h.

932  {
933  return _raw_grad_container;
934  }
std::vector< std::unique_ptr< NumericVector< Number > > > _raw_grad_container
A cache for storing gradients at dof locations.
Definition: SystemBase.h:1065

◆ hasMatrix()

virtual bool SystemBase::hasMatrix ( TagID  tag) const
inlinevirtualinherited

Check if the tagged matrix exists in the system.

Reimplemented in DisplacedSystem.

Definition at line 351 of file SystemBase.h.

Referenced by SystemBase::activeAllMatrixTags(), Assembly::addCachedJacobian(), NonlinearSystemBase::addImplicitGeometricCouplingEntries(), Assembly::addJacobianCoupledVarPair(), Assembly::addJacobianLowerD(), Assembly::addJacobianNeighbor(), Assembly::addJacobianNeighborLowerD(), Assembly::addJacobianNonlocal(), SystemBase::addMatrix(), Assembly::cacheJacobian(), Assembly::cacheJacobianBlockNonzero(), Assembly::cacheJacobianCoupledVarPair(), Assembly::cacheJacobianMortar(), Assembly::cacheJacobianNeighbor(), Assembly::cacheJacobianNonlocal(), SystemBase::closeTaggedMatrices(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::constraintJacobians(), SystemBase::disassociateMatrixFromTag(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), SystemBase::flushTaggedMatrices(), SystemBase::getMatrix(), DisplacedSystem::hasMatrix(), MooseVariableScalar::reinit(), SystemBase::removeMatrix(), SubProblem::selectMatrixTagsFromSystem(), Assembly::setCachedJacobian(), and Assembly::zeroCachedJacobian().

352  {
353  return tag < _tagged_matrices.size() && _tagged_matrices[tag];
354  }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017

◆ hasScalarVariable()

bool SystemBase::hasScalarVariable ( const std::string &  var_name) const
virtualinherited

Definition at line 859 of file SystemBase.C.

Referenced by MortarScalarBase::computeJacobian(), NonlinearSystemBase::computeJacobianInternal(), ComputeFullJacobianThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), SystemBase::copyVars(), ExplicitTimeIntegrator::initialSetup(), NonlinearEigenSystem::postAddResidualObject(), AddPeriodicBCAction::setPeriodicVars(), and NonlinearSystemBase::setupScalingData().

860 {
861  if (system().has_variable(var_name))
862  return system().variable_type(var_name).family == SCALAR;
863  else
864  return false;
865 }
SCALAR
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const FEType & variable_type(const unsigned int i) const

◆ hasSolutionState()

bool SystemBase::hasSolutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
) const
inlinevirtualinherited

Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).

Reimplemented in DisplacedSystem.

Definition at line 1081 of file SystemBase.h.

Referenced by PointwiseRenormalizeVector::execute(), PointwiseRenormalizeVector::finalize(), DisplacedSystem::hasSolutionState(), SystemBase::needSolutionState(), SystemBase::restoreSolutions(), ElementSubdomainModifierBase::setOldAndOlderSolutions(), and SystemBase::solutionState().

1083 {
1084  return _solution_states[static_cast<unsigned short>(iteration_type)].size() > state;
1085 }
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075

◆ hasVarCopy()

bool SystemBase::hasVarCopy ( ) const
inlineinherited

Whether or not there are variables to be restarted from an Exodus mesh file.

Definition at line 884 of file SystemBase.h.

884 { return _var_to_copy.size() > 0; }
std::vector< VarCopyInfo > _var_to_copy
Definition: SystemBase.h:1032

◆ hasVariable()

bool SystemBase::hasVariable ( const std::string &  var_name) const
virtualinherited

Query a system for a variable.

Parameters
var_namename of the variable
Returns
true if the variable exists

Definition at line 834 of file SystemBase.C.

Referenced by ADDGKernel::ADDGKernel(), ArrayDGKernel::ArrayDGKernel(), SystemBase::copyVars(), DGKernel::DGKernel(), DMMooseSetVariables(), FEProblemBase::duplicateVariableCheck(), SubProblem::getVariableHelper(), SubProblem::hasAuxiliaryVariable(), ExplicitTimeIntegrator::initialSetup(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), PNGOutput::makeMeshFunc(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NonlinearSystemBase::setupScalingData(), and Coupleable::writableCoupledValue().

835 {
836  auto & names = getVariableNames();
837  if (system().has_variable(var_name))
838  return system().variable_type(var_name).family != SCALAR;
839  if (std::find(names.begin(), names.end(), var_name) != names.end())
840  // array variable
841  return true;
842  else
843  return false;
844 }
SCALAR
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const FEType & variable_type(const unsigned int i) const
const std::vector< VariableName > & getVariableNames() const
Definition: SystemBase.h:861

◆ hasVector() [1/2]

bool SystemBase::hasVector ( const std::string &  tag_name) const
inherited

◆ hasVector() [2/2]

virtual bool SystemBase::hasVector ( TagID  tag_id) const
inlinevirtualinherited

Check if the tagged vector exists in the system.

Reimplemented in DisplacedSystem.

Definition at line 272 of file SystemBase.h.

273  {
274  return tag_id < _tagged_vectors.size() && _tagged_vectors[tag_id];
275  }
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ initializeObjects()

virtual void SystemBase::initializeObjects ( )
inlinevirtualinherited

Called only once, just before the solve begins so objects can do some precalculations.

Definition at line 173 of file SystemBase.h.

173 {}

◆ initialSetup()

void AuxiliarySystem::initialSetup ( )
overridevirtual

Setup Functions.

Reimplemented from SystemBase.

Definition at line 66 of file AuxiliarySystem.C.

67 {
68  TIME_SECTION("initialSetup", 3, "Initializing Auxiliary System");
69 
71 
72  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
73  {
76 
77  _nodal_aux_storage.sort(tid);
78  _nodal_aux_storage.initialSetup(tid);
79 
80  _mortar_nodal_aux_storage.sort(tid);
81  _mortar_nodal_aux_storage.initialSetup(tid);
82 
83  _nodal_vec_aux_storage.sort(tid);
84  _nodal_vec_aux_storage.initialSetup(tid);
85 
86  _nodal_array_aux_storage.sort(tid);
87  _nodal_array_aux_storage.initialSetup(tid);
88 
89  _elemental_aux_storage.sort(tid);
90  _elemental_aux_storage.initialSetup(tid);
91 
93  _elemental_vec_aux_storage.initialSetup(tid);
94 
96  _elemental_array_aux_storage.initialSetup(tid);
97  }
98 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
void sort(THREAD_ID tid=0)
Performs a sort using the DependencyResolver.
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
virtual void initialSetup(THREAD_ID tid=0) const
Convenience methods for calling object setup methods.
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
virtual void initialSetup()
Setup Functions.
Definition: SystemBase.C:1525

◆ initSolutionState()

void SystemBase::initSolutionState ( )
virtualinherited

Initializes the solution state.

Reimplemented in DisplacedSystem.

Definition at line 1354 of file SystemBase.C.

Referenced by DisplacedSystem::initSolutionState().

1355 {
1356  // Default is the current solution
1357  unsigned int state = 0;
1358 
1359  // Add additional states as required by the variable states requested
1360  for (const auto & var : getVariables(/* tid = */ 0))
1361  state = std::max(state, var->oldestSolutionStateRequested());
1362  for (const auto & var : getScalarVariables(/* tid = */ 0))
1363  state = std::max(state, var->oldestSolutionStateRequested());
1364 
1366 
1368 }
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Registers that the solution state state is needed.
Definition: SystemBase.C:1428
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:757
bool _solution_states_initialized
Whether or not the solution states have been initialized.
Definition: SystemBase.h:1053
auto max(const L &left, const R &right)

◆ isArrayVariable()

bool SystemBase::isArrayVariable ( const std::string &  var_name) const
virtualinherited

If a variable is an array variable.

Definition at line 847 of file SystemBase.C.

848 {
849  auto & names = getVariableNames();
850  if (!system().has_variable(var_name) &&
851  std::find(names.begin(), names.end(), var_name) != names.end())
852  // array variable
853  return true;
854  else
855  return false;
856 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const std::vector< VariableName > & getVariableNames() const
Definition: SystemBase.h:861

◆ isScalarVariable()

bool SystemBase::isScalarVariable ( unsigned int  var_name) const
virtualinherited

Definition at line 868 of file SystemBase.C.

Referenced by Assembly::init(), ReferenceResidualConvergence::initialSetup(), and Assembly::initNonlocalCoupling().

869 {
870  return (system().variable(var_num).type().family == SCALAR);
871 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.

◆ jacobianSetup()

void AuxiliarySystem::jacobianSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 155 of file AuxiliarySystem.C.

156 {
158 
159  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
160  {
162  _nodal_aux_storage.jacobianSetup(tid);
163  _mortar_nodal_aux_storage.jacobianSetup(tid);
164  _nodal_vec_aux_storage.jacobianSetup(tid);
165  _nodal_array_aux_storage.jacobianSetup(tid);
166  _elemental_aux_storage.jacobianSetup(tid);
167  _elemental_vec_aux_storage.jacobianSetup(tid);
168  _elemental_array_aux_storage.jacobianSetup(tid);
169  }
170 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
virtual void jacobianSetup()
Definition: SystemBase.C:1573
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
void jacobianSetup(THREAD_ID tid=0) const override
Convenience methods for calling object setup methods.
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ matrixTagActive()

bool SystemBase::matrixTagActive ( TagID  tag) const
virtualinherited

If or not a matrix tag is active.

Definition at line 1151 of file SystemBase.C.

1152 {
1153  mooseAssert(_subproblem.matrixTagExists(tag), "Matrix tag " << tag << " does not exist");
1154 
1155  return tag < _matrix_tag_active_flags.size() && _matrix_tag_active_flags[tag];
1156 }
std::vector< bool > _matrix_tag_active_flags
Active flags for tagged matrices.
Definition: SystemBase.h:1019
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328

◆ mesh() [1/2]

MooseMesh& SystemBase::mesh ( )
inlineinherited

◆ mesh() [2/2]

const MooseMesh& SystemBase::mesh ( ) const
inlineinherited

Definition at line 100 of file SystemBase.h.

100 { return _mesh; }
MooseMesh & _mesh
Definition: SystemBase.h:985

◆ name()

const std::string & SystemBase::name ( ) const
virtualinherited

Definition at line 1330 of file SystemBase.C.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addConstraint(), NonlinearSystemBase::addDamper(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), addKernel(), NonlinearSystemBase::addKernel(), SystemBase::addMatrix(), NonlinearSystemBase::addNodalKernel(), addScalarKernel(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), SystemBase::addTimeIntegrator(), addVariable(), SystemBase::addVariable(), DiffusionLHDGAssemblyHelper::checkCoupling(), SystemBase::closeTaggedVector(), LinearSystem::computeGradients(), LinearSystem::computeLinearSystemTags(), DisplacedProblem::DisplacedProblem(), SystemBase::getMatrix(), NonlinearSystemBase::getSplit(), DisplacedSystem::getVector(), SystemBase::getVector(), SystemBase::hasVector(), MooseStaticCondensationPreconditioner::initialSetup(), LinearSystem::initialSetup(), Moose::PetscSupport::petscSetDefaults(), NonlinearEigenSystem::postAddResidualObject(), SystemBase::removeMatrix(), SystemBase::removeVector(), SystemBase::solutionState(), LinearSystem::solve(), LinearTimeIntegratorInterface::timeDerivativeMatrixContribution(), LinearTimeIntegratorInterface::timeDerivativeRHSContribution(), and SystemBase::zeroTaggedVector().

1331 {
1332  return system().name();
1333 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const std::string & name() const

◆ needMaterialOnSide()

bool AuxiliarySystem::needMaterialOnSide ( BoundaryID  bnd_id)

Indicated whether this system needs material properties on boundaries.

Returns
Boolean if IntegratedBCs are active

Definition at line 783 of file AuxiliarySystem.C.

784 {
785  return _elemental_aux_storage.hasActiveBoundaryObjects(bnd_id) ||
786  _elemental_vec_aux_storage.hasActiveBoundaryObjects(bnd_id);
787 }
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ needSolutionState()

void SystemBase::needSolutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
)
virtualinherited

Registers that the solution state state is needed.

Reimplemented in DisplacedSystem.

Definition at line 1428 of file SystemBase.C.

Referenced by EigenExecutionerBase::EigenExecutionerBase(), SystemBase::initSolutionState(), DisplacedSystem::needSolutionState(), and SystemBase::solutionState().

1430 {
1431  libmesh_parallel_only(this->comm());
1432  mooseAssert(!Threads::in_threads,
1433  "This routine is not thread-safe. Request the solution state before using it in "
1434  "a threaded region.");
1435 
1436  if (hasSolutionState(state, iteration_type))
1437  return;
1438 
1439  auto & solution_states = _solution_states[static_cast<unsigned short>(iteration_type)];
1440  solution_states.resize(state + 1);
1441 
1442  // The 0-th (current) solution state is owned by libMesh
1443  if (!solution_states[0])
1444  solution_states[0] = &solutionInternal();
1445  else
1446  mooseAssert(solution_states[0] == &solutionInternal(), "Inconsistent current solution");
1447 
1448  // We will manually add all states past current
1449  for (unsigned int i = 1; i <= state; ++i)
1450  if (!solution_states[i])
1451  {
1452  auto tag = _subproblem.addVectorTag(oldSolutionStateVectorName(i, iteration_type),
1454  solution_states[i] = &addVector(tag, true, GHOSTED);
1455  }
1456  else
1457  mooseAssert(solution_states[i] == &getVector(oldSolutionStateVectorName(i, iteration_type)),
1458  "Inconsistent solution state");
1459 }
virtual NumericVector< Number > & solutionInternal() const =0
Internal getter for solution owned by libMesh.
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
Definition: SubProblem.C:92
const Parallel::Communicator & comm() const
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.h:1081
TagName oldSolutionStateVectorName(const unsigned int, Moose::SolutionIterationType iteration_type) const
Gets the vector name used for an old (not current) solution state.
Definition: SystemBase.C:1371
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ nFieldVariables()

unsigned int SystemBase::nFieldVariables ( ) const
inherited

Get the number of field variables in this system.

Returns
the number of field variables

Definition at line 883 of file SystemBase.C.

Referenced by SystemBase::nVariables().

884 {
885  unsigned int n = 0;
886  for (auto & var : _vars[0].fieldVariables())
887  n += var->count();
888 
889  return n;
890 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ nFVVariables()

unsigned int SystemBase::nFVVariables ( ) const
inherited

Get the number of finite volume variables in this system.

Returns
the number of finite volume variables

Definition at line 893 of file SystemBase.C.

894 {
895  unsigned int n = 0;
896  for (auto & var : _vars[0].fieldVariables())
897  if (var->isFV())
898  n += var->count();
899 
900  return n;
901 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ nodalArrayAuxWarehouse()

const ExecuteMooseObjectWarehouse< ArrayAuxKernel > & AuxiliarySystem::nodalArrayAuxWarehouse ( ) const
inline

Definition at line 217 of file AuxiliarySystem.h.

218 {
220 }
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage

◆ nodalAuxWarehouse()

const ExecuteMooseObjectWarehouse< AuxKernel > & AuxiliarySystem::nodalAuxWarehouse ( ) const
inline

Definition at line 205 of file AuxiliarySystem.h.

206 {
207  return _nodal_aux_storage;
208 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage

◆ nodalVectorAuxWarehouse()

const ExecuteMooseObjectWarehouse< VectorAuxKernel > & AuxiliarySystem::nodalVectorAuxWarehouse ( ) const
inline

Definition at line 211 of file AuxiliarySystem.h.

212 {
213  return _nodal_vec_aux_storage;
214 }
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage

◆ nonTimeVectorTag()

virtual TagID SystemBase::nonTimeVectorTag ( ) const
inlinevirtualinherited

Reimplemented in NonlinearSystemBase, and DisplacedSystem.

Definition at line 293 of file SystemBase.h.

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::nonTimeVectorTag().

293 { mooseError("Not implemented yet"); }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ number()

unsigned int SystemBase::number ( ) const
inherited

Gets the number of this system.

Returns
The number of this system

Definition at line 1159 of file SystemBase.C.

Referenced by SetupResidualDebugAction::act(), FEProblemBase::addCachedResidualDirectly(), FEProblemBase::addJacobian(), FEProblemBase::addJacobianBlockTags(), FEProblemBase::addJacobianLowerD(), FEProblemBase::addJacobianNeighbor(), FEProblemBase::addJacobianNeighborLowerD(), FEProblemBase::addJacobianOffDiagScalar(), FEProblemBase::addJacobianScalar(), FEProblemBase::addResidual(), FEProblemBase::addResidualLower(), FEProblemBase::addResidualNeighbor(), FEProblemBase::addResidualScalar(), SystemBase::addScalingVector(), ADKernelTempl< T >::ADKernelTempl(), ElementSubdomainModifierBase::applyIC(), ArrayKernel::ArrayKernel(), NonlinearSystemBase::assembleScalingVector(), NonlinearEigenSystem::attachPreconditioner(), DiffusionLHDGAssemblyHelper::checkCoupling(), SolverSystem::compute(), MooseVariableScalar::computeAD(), FEProblemBase::computeBounds(), Assembly::computeFaceMap(), InternalSideIndicatorBase::computeIndicator(), ArrayNodalBC::computeJacobian(), VectorNodalBC::computeJacobian(), NodalBC::computeJacobian(), FVBoundaryScalarLagrangeMultiplierConstraint::computeJacobian(), FVFluxBC::computeJacobian(), FVFluxKernel::computeJacobian(), FVInterfaceKernel::computeJacobian(), FEProblemBase::computeJacobianBlock(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeJacobianTags(), LinearSystem::computeLinearSystemInternal(), FEProblemBase::computeNearNullSpace(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), FEProblemBase::computeNullSpace(), VectorNodalBC::computeOffDiagJacobian(), ArrayNodalBC::computeOffDiagJacobian(), NodalBC::computeOffDiagJacobian(), NodalKernel::computeOffDiagJacobian(), ComputeFullJacobianThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInternalFace(), FEProblemBase::computePostCheck(), FVOrthogonalBoundaryDiffusion::computeQpResidual(), FVBoundaryScalarLagrangeMultiplierConstraint::computeResidual(), FVFluxKernel::computeResidual(), FVInterfaceKernel::computeResidual(), Kernel::computeResidualAndJacobian(), NodalBC::computeResidualAndJacobian(), IntegratedBC::computeResidualAndJacobian(), FEProblemBase::computeResidualAndJacobian(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::computeScaling(), Assembly::computeSinglePointMapAD(), FEProblemBase::computeTransposeNullSpace(), DebugResidualAux::computeValue(), NearestNodeValueAux::computeValue(), SlepcEigenSolverConfiguration::configure_solver(), NonlinearSystemBase::constraintJacobians(), LinearSystem::containsTimeKernel(), Coupleable::coupled(), FEProblemBase::currentLinearSysNum(), FEProblemBase::currentNlSysNum(), PseudoTimestep::currentResidualNorm(), ComputeResidualThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), Moose::doDerivatives(), VariableResidual::execute(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), GreaterThanLessThanPostprocessor::execute(), NodalNormalsPreprocessor::execute(), ExplicitTimeIntegrator::ExplicitTimeIntegrator(), InternalSideIndicatorBase::finalize(), NumNonlinearIterations::finalize(), BoundsBase::getDoFIndex(), NonlinearSystemBase::getNodeDofs(), NonlinearEigenSystem::getSNES(), SystemBase::getSubdomainsForVar(), NumLinearIterations::getValue(), NumResidualEvaluations::getValue(), Residual::getValue(), Moose::globalDofIndexToDerivative(), FVBoundaryCondition::hasFaceSide(), ExplicitTimeIntegrator::init(), ExplicitTimeIntegrator::initialSetup(), NonlinearSystemBase::initialSetup(), ActivateElementsUserObjectBase::initSolutions(), EigenExecutionerBase::inversePowerIteration(), Kernel::Kernel(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionA(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionAB(), Moose::SlepcSupport::mooseSlepcEigenFormFunctionB(), Moose::SlepcSupport::mooseSlepcEigenFormJacobianA(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableInterface< Real >::MooseVariableInterface(), EigenExecutionerBase::nonlinearSolve(), ComputeDiracThread::onElement(), ComputeNodalKernelBCJacobiansThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), VariableResidualNormsDebugOutput::output(), Moose::PetscSupport::petscLinearConverged(), Moose::PetscSupport::petscNonlinearConverged(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), ComputeJacobianThread::postElement(), FEProblemBase::prepareAssembly(), SystemBase::prepareFace(), FEProblemBase::prepareFaceShapes(), FEProblemBase::prepareNeighborShapes(), FEProblemBase::prepareShapes(), FEProblemBase::reinitDirac(), FEProblemBase::reinitOffDiagScalars(), NonlinearSystem::residualAndJacobianTogether(), FEProblemBase::setResidual(), FEProblemBase::setResidualNeighbor(), PhysicsBasedPreconditioner::setup(), FVInterfaceKernel::setupData(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), ActuallyExplicitEuler::solve(), NonlinearEigenSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitSSPRungeKutta::solveStage(), NonlinearThread::subdomainChanged(), UserObject::systemNumber(), MultiAppDofCopyTransfer::transferDofObject(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), FVFluxBC::updateCurrentFace(), and MortarConstraintBase::zeroInactiveLMDofs().

1160 {
1161  return system().number();
1162 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
unsigned int number() const

◆ nVariables()

unsigned int SystemBase::nVariables ( ) const
virtualinherited

Get the number of variables in this system.

Returns
the number of variables

Definition at line 874 of file SystemBase.C.

Referenced by AdaptivityAction::act(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), NonlinearSystemBase::getNodeDofs(), Assembly::init(), ExplicitTimeIntegrator::initialSetup(), MaxVarNDofsPerElem::onElement(), MaxVarNDofsPerNode::onNode(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), and variableWiseRelativeSolutionDifferenceNorm().

875 {
876  unsigned int n = nFieldVariables();
877  n += _vars[0].scalars().size();
878 
879  return n;
880 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
unsigned int nFieldVariables() const
Get the number of field variables in this system.
Definition: SystemBase.C:883

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 78 of file PerfGraphInterface.C.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), and PerfGraphOutput::output().

79 {
80  return _pg_moose_app.perfGraph();
81 }
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition: MooseApp.h:161

◆ postInit()

virtual void SystemBase::postInit ( )
inlinevirtualinherited

Reimplemented in NonlinearEigenSystem.

Definition at line 162 of file SystemBase.h.

Referenced by NonlinearEigenSystem::postInit().

162 {}

◆ prefix()

std::string SystemBase::prefix ( ) const
inherited
Returns
A prefix for solvers

Definition at line 1680 of file SystemBase.C.

Referenced by MoosePreconditioner::initialSetup().

1681 {
1682  return "-" + (system().prefix_with_name() ? system().prefix() : "");
1683 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
std::string prefix() const
void prefix_with_name(bool value)

◆ preInit()

virtual void SystemBase::preInit ( )
inlinevirtualinherited

This is called prior to the libMesh system has been init'd.

MOOSE system wrappers can use this method to add vectors and matrices to the libMesh system

Reimplemented in NonlinearSystemBase, and SolverSystem.

Definition at line 156 of file SystemBase.h.

Referenced by SolverSystem::preInit().

156 {}

◆ prepare()

void SystemBase::prepare ( THREAD_ID  tid)
virtualinherited

Prepare the system for use.

Parameters
tidID of the thread

Definition at line 255 of file SystemBase.C.

Referenced by SubProblem::reinitElemFaceRef().

256 {
258  {
259  const std::set<MooseVariableFieldBase *> & active_elemental_moose_variables =
261  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
262  for (const auto & var : vars)
263  var->clearDofIndices();
264 
265  for (const auto & var : active_elemental_moose_variables)
266  if (&(var->sys()) == this)
267  var->prepare();
268  }
269  else
270  {
271  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
272  for (const auto & var : vars)
273  var->prepare();
274  }
275 }
char ** vars
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:454
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const
Whether or not a list of active elemental moose variables has been set.
Definition: SubProblem.C:460

◆ prepareFace()

void SystemBase::prepareFace ( THREAD_ID  tid,
bool  resize_data 
)
virtualinherited

Prepare the system for use on sides.

This will try to reuse the preparation done on the element.

Parameters
tidID of the thread
resize_dataPass True if this system needs to resize residual and jacobian datastructures based on preparing this face

Definition at line 278 of file SystemBase.C.

279 {
280  // We only need to do something if the element prepare was restricted
282  {
283  const std::set<MooseVariableFieldBase *> & active_elemental_moose_variables =
285 
286  std::vector<MooseVariableFieldBase *> newly_prepared_vars;
287 
288  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
289  for (const auto & var : vars)
290  {
291  mooseAssert(&var->sys() == this,
292  "I will cry if we store variables in our warehouse that don't belong to us");
293 
294  // If it wasn't in the active list, we need to prepare it. This has the potential to duplicate
295  // prepare if we have these conditions:
296  //
297  // 1. We have a displaced problem
298  // 2. We are using AD
299  // 3. We are not using global AD indexing
300  //
301  // But I think I would rather risk duplicate prepare than introduce an additional member set
302  // variable for tracking prepared variables. Set insertion is slow and some simulations have a
303  // ton of variables
304  if (!active_elemental_moose_variables.count(var))
305  {
306  var->prepare();
307  newly_prepared_vars.push_back(var);
308  }
309  }
310 
311  // Make sure to resize the residual and jacobian datastructures for all the new variables
312  if (resize_data)
313  for (const auto var_ptr : newly_prepared_vars)
314  {
315  _subproblem.assembly(tid, number()).prepareVariable(var_ptr);
318  }
319  }
320 }
virtual bool checkNonlocalCouplingRequirement() const =0
char ** vars
virtual const std::set< MooseVariableFieldBase * > & getActiveElementalMooseVariables(const THREAD_ID tid) const
Get the MOOSE variables to be reinited on each element.
Definition: SubProblem.C:454
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990
void prepareVariableNonlocal(MooseVariableFieldBase *var)
Definition: Assembly.C:2777
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
void prepareVariable(MooseVariableFieldBase *var)
Used for preparing the dense residual and jacobian blocks for one particular variable.
Definition: Assembly.C:2749
virtual bool hasActiveElementalMooseVariables(const THREAD_ID tid) const
Whether or not a list of active elemental moose variables has been set.
Definition: SubProblem.C:460

◆ prepareLowerD()

void SystemBase::prepareLowerD ( THREAD_ID  tid)
virtualinherited

Prepare the system for use for lower dimensional elements.

Parameters
tidID of the thread

Definition at line 331 of file SystemBase.C.

Referenced by SubProblem::reinitLowerDElem().

332 {
333  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
334  for (const auto & var : vars)
335  var->prepareLowerD();
336 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ prepareNeighbor()

void SystemBase::prepareNeighbor ( THREAD_ID  tid)
virtualinherited

Prepare the system for use.

Parameters
tidID of the thread

Definition at line 323 of file SystemBase.C.

Referenced by SubProblem::reinitNeighborFaceRef().

324 {
325  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
326  for (const auto & var : vars)
327  var->prepareNeighbor();
328 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ queryTimeIntegrator()

const TimeIntegrator * SystemBase::queryTimeIntegrator ( const unsigned int  var_num) const
inherited

Retrieve the time integrator that integrates the given variable's equation.

If no suitable time integrator is found (this could happen for instance if we're solving a non-transient problem), then a nullptr will be returned

Definition at line 1640 of file SystemBase.C.

Referenced by SystemBase::getTimeIntegrator(), HDGKernel::HDGKernel(), and MooseVariableData< OutputType >::MooseVariableData().

1641 {
1642  for (auto & ti : _time_integrators)
1643  if (ti->integratesVar(var_num))
1644  return ti.get();
1645 
1646  return nullptr;
1647 }
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
Definition: SystemBase.h:1041

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 53 of file PerfGraphInterface.C.

55 {
56  const auto timed_section_name = timedSectionName(section_name);
57  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
58  return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
59  else
60  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
61 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 64 of file PerfGraphInterface.C.

68 {
69  const auto timed_section_name = timedSectionName(section_name);
70  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
72  timedSectionName(section_name), level, live_message, print_dots);
73  else
74  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
75 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ reinit()

virtual void SystemBase::reinit ( )
inlinevirtualinherited

Reinitialize the system when the degrees of freedom in this system have changed.

This is called after the libMesh system has been reinit'd

Reimplemented in NonlinearEigenSystem.

Definition at line 168 of file SystemBase.h.

Referenced by NonlinearEigenSystem::reinit().

168 {}

◆ reinitElem()

void AuxiliarySystem::reinitElem ( const Elem elem,
THREAD_ID  tid 
)
overridevirtual

Reinit an element assembly info.

Parameters
elemWhich element we are reinitializing for
tidID of the thread

Reimplemented from SystemBase.

Definition at line 329 of file AuxiliarySystem.C.

330 {
331  for (auto * var : _nodal_vars[tid])
332  var->computeElemValues();
333 
334  for (auto * var : _elem_vars[tid])
335  {
336  var->reinitAux();
337  var->computeElemValues();
338  }
339 }
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
Elemental variables.

◆ reinitElemFace()

void AuxiliarySystem::reinitElemFace ( const Elem elem,
unsigned int  side,
THREAD_ID  tid 
)
overridevirtual

Reinit assembly info for a side of an element.

Parameters
elemThe element
sideSide of of the element
tidThread ID

Reimplemented from SystemBase.

Definition at line 342 of file AuxiliarySystem.C.

343 {
344  for (auto * var : _nodal_vars[tid])
345  var->computeElemValuesFace();
346 
347  for (auto * var : _elem_vars[tid])
348  {
349  var->reinitAux();
350  var->reinitAuxNeighbor();
351  var->computeElemValuesFace();
352  }
353 }
std::vector< std::vector< MooseVariableFEBase * > > _nodal_vars
std::vector< std::vector< MooseVariableFieldBase * > > _elem_vars
Elemental variables.

◆ reinitLowerD()

void SystemBase::reinitLowerD ( THREAD_ID  tid)
virtualinherited

Compute the values of the variables on the lower dimensional element.

Definition at line 382 of file SystemBase.C.

Referenced by SubProblem::reinitLowerDElem().

383 {
384  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
385  for (const auto & var : vars)
386  var->computeLowerDValues();
387 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNeighbor()

void SystemBase::reinitNeighbor ( const Elem elem,
THREAD_ID  tid 
)
virtualinherited

Compute the values of the variables at all the current points.

Definition at line 374 of file SystemBase.C.

375 {
376  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
377  for (const auto & var : vars)
378  var->computeNeighborValues();
379 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNeighborFace()

void SystemBase::reinitNeighborFace ( const Elem elem,
unsigned int  side,
THREAD_ID  tid 
)
virtualinherited

Compute the values of the variables at all the current points.

Definition at line 366 of file SystemBase.C.

Referenced by SubProblem::reinitNeighborFaceRef().

367 {
368  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
369  for (const auto & var : vars)
370  var->computeNeighborValuesFace();
371 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNode()

void SystemBase::reinitNode ( const Node node,
THREAD_ID  tid 
)
virtualinherited

Reinit nodal assembly info.

Parameters
nodeNode to reinit for
tidThread ID

Definition at line 390 of file SystemBase.C.

391 {
392  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
393  for (const auto & var : vars)
394  {
395  var->reinitNode();
396  if (var->isNodalDefined())
397  var->computeNodalValues();
398  }
399 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNodeFace()

void SystemBase::reinitNodeFace ( const Node node,
BoundaryID  bnd_id,
THREAD_ID  tid 
)
virtualinherited

Reinit nodal assembly info on a face.

Parameters
nodeNode to reinit
bnd_idBoundary ID
tidThread ID

Definition at line 402 of file SystemBase.C.

403 {
404  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
405  for (const auto & var : vars)
406  {
407  var->reinitNode();
408  if (var->isNodalDefined())
409  var->computeNodalValues();
410  }
411 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNodes()

void SystemBase::reinitNodes ( const std::vector< dof_id_type > &  nodes,
THREAD_ID  tid 
)
virtualinherited

Reinit variables at a set of nodes.

Parameters
nodesList of node ids to reinit
tidThread ID

Definition at line 414 of file SystemBase.C.

415 {
416  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
417  for (const auto & var : vars)
418  {
419  var->reinitNodes(nodes);
420  var->computeNodalValues();
421  }
422 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitNodesNeighbor()

void SystemBase::reinitNodesNeighbor ( const std::vector< dof_id_type > &  nodes,
THREAD_ID  tid 
)
virtualinherited

Reinit variables at a set of neighbor nodes.

Parameters
nodesList of node ids to reinit
tidThread ID

Definition at line 425 of file SystemBase.C.

426 {
427  const std::vector<MooseVariableFieldBase *> & vars = _vars[tid].fieldVariables();
428  for (const auto & var : vars)
429  {
430  var->reinitNodesNeighbor(nodes);
431  var->computeNodalNeighborValues();
432  }
433 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ reinitScalars()

void SystemBase::reinitScalars ( THREAD_ID  tid,
bool  reinit_for_derivative_reordering = false 
)
virtualinherited

Reinit scalar varaibles.

Parameters
tidThread ID
reinit_for_derivative_reorderingA flag indicating whether we are reinitializing for the purpose of re-ordering derivative information for ADNodalBCs

Definition at line 436 of file SystemBase.C.

437 {
438  const std::vector<MooseVariableScalar *> & vars = _vars[tid].scalars();
439  for (const auto & var : vars)
440  var->reinit(reinit_for_derivative_reordering);
441 }
char ** vars
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ removeMatrix()

void SystemBase::removeMatrix ( TagID  tag)
inherited

Removes a matrix with a given tag.

Parameters
tag_nameThe name of the tag

Definition at line 582 of file SystemBase.C.

583 {
584  if (!_subproblem.matrixTagExists(tag_id))
585  mooseError("Cannot remove the matrix with TagID ",
586  tag_id,
587  "\nin system '",
588  name(),
589  "', because that tag does not exist in the problem");
590 
591  if (hasMatrix(tag_id))
592  {
593  const auto matrix_name = _subproblem.matrixTagName(tag_id);
594  system().remove_matrix(matrix_name);
595  _tagged_matrices[tag_id] = nullptr;
596  }
597 }
std::vector< libMesh::SparseMatrix< Number > * > _tagged_matrices
Tagged matrices (pointer)
Definition: SystemBase.h:1017
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual const std::string & name() const
Definition: SystemBase.C:1330
void remove_matrix(std::string_view mat_name)
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:357

◆ removeVector() [1/2]

void SystemBase::removeVector ( const std::string &  name)
inherited

Remove a vector from the system with the given name.

Definition at line 1324 of file SystemBase.C.

Referenced by SystemBase::restoreOldSolutions().

1325 {
1327 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual const std::string & name() const
Definition: SystemBase.C:1330
void remove_vector(std::string_view vec_name)

◆ removeVector() [2/2]

void SystemBase::removeVector ( TagID  tag_id)
inherited

Remove a solution length vector from the system with the specified TagID.

Parameters
tag_idTag ID

Definition at line 692 of file SystemBase.C.

693 {
694  if (!_subproblem.vectorTagExists(tag_id))
695  mooseError("Cannot remove the vector with TagID ",
696  tag_id,
697  "\nin system '",
698  name(),
699  "', because that tag does not exist in the problem");
700 
701  if (hasVector(tag_id))
702  {
703  auto vector_name = _subproblem.vectorTagName(tag_id);
704  system().remove_vector(vector_name);
705  _tagged_vectors[tag_id] = nullptr;
706  }
707 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual const std::string & name() const
Definition: SystemBase.C:1330
void remove_vector(std::string_view vec_name)
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:221
std::vector< NumericVector< Number > * > _tagged_vectors
Tagged vectors (pointer)
Definition: SystemBase.h:1015

◆ residualCopy()

virtual NumericVector<Number>& SystemBase::residualCopy ( )
inlinevirtualinherited

Reimplemented in NonlinearSystemBase, and DisplacedSystem.

Definition at line 427 of file SystemBase.h.

Referenced by DisplacedSystem::residualCopy().

428  {
429  mooseError("This system does not support getting a copy of the residual");
430  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ residualGhosted()

virtual NumericVector<Number>& SystemBase::residualGhosted ( )
inlinevirtualinherited

Reimplemented in NonlinearSystemBase, and DisplacedSystem.

Definition at line 431 of file SystemBase.h.

Referenced by DisplacedSystem::residualGhosted().

432  {
433  mooseError("This system does not support getting a ghosted copy of the residual");
434  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ residualSetup()

void AuxiliarySystem::residualSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 173 of file AuxiliarySystem.C.

174 {
176 
177  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
178  {
180  _nodal_aux_storage.residualSetup(tid);
181  _mortar_nodal_aux_storage.residualSetup(tid);
182  _nodal_vec_aux_storage.residualSetup(tid);
183  _nodal_array_aux_storage.residualSetup(tid);
184  _elemental_aux_storage.residualSetup(tid);
185  _elemental_vec_aux_storage.residualSetup(tid);
186  _elemental_array_aux_storage.residualSetup(tid);
187  }
188 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
virtual void residualSetup()
Definition: SystemBase.C:1566
void residualSetup(THREAD_ID tid=0) const override

◆ residualVectorTag()

virtual TagID SystemBase::residualVectorTag ( ) const
inlinevirtualinherited

Reimplemented in NonlinearSystemBase, and DisplacedSystem.

Definition at line 298 of file SystemBase.h.

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::residualVectorTag().

298 { mooseError("Not implemented yet"); }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ restoreOldSolutions()

void SystemBase::restoreOldSolutions ( )
virtualinherited

Restore the old and older solutions when the saved solutions present.

Definition at line 534 of file SystemBase.C.

535 {
536  const auto states =
537  _solution_states[static_cast<unsigned short>(Moose::SolutionIterationType::Time)].size();
538  if (states > 1)
539  for (unsigned int i = 1; i <= states - 1; ++i)
540  if (_saved_solution_states[i])
541  {
543  removeVector("save_solution_state_" + std::to_string(i));
544  _saved_solution_states[i] = nullptr;
545  }
546 
548  {
550  removeVector("save_solution_dot_old");
551  _saved_dot_old = nullptr;
552  }
554  {
556  removeVector("save_solution_dotdot_old");
557  _saved_dotdot_old = nullptr;
558  }
559 }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
NumericVector< Real > * _saved_dot_old
Definition: SystemBase.h:1026
void removeVector(const std::string &name)
Remove a vector from the system with the given name.
Definition: SystemBase.C:1324
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
NumericVector< Real > * _saved_dotdot_old
Definition: SystemBase.h:1027
std::vector< NumericVector< Number > * > _saved_solution_states
The saved solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1077

◆ restoreSolutions()

void SystemBase::restoreSolutions ( )
virtualinherited

Restore current solutions (call after your solve failed)

Reimplemented in SolverSystem.

Definition at line 1307 of file SystemBase.C.

Referenced by SolverSystem::restoreSolutions().

1308 {
1309  if (!hasSolutionState(1))
1310  mooseError("Cannot restore solutions without old solution");
1311 
1312  *(const_cast<NumericVector<Number> *&>(currentSolution())) = solutionOld();
1313  solution() = solutionOld();
1314  if (solutionUDotOld())
1315  *solutionUDot() = *solutionUDotOld();
1316  if (solutionUDotDotOld())
1318  if (solutionPreviousNewton())
1320  system().update();
1321 }
virtual const NumericVector< Number > *const & currentSolution() const =0
The solution vector that is currently being operated on.
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
virtual NumericVector< Number > * solutionUDot()
Definition: SystemBase.h:252
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.h:1081
virtual void update()
virtual const NumericVector< Number > * solutionPreviousNewton() const
Definition: SystemBase.C:1345
virtual NumericVector< Number > * solutionUDotDot()
Definition: SystemBase.h:253
NumericVector< Number > & solutionOld()
Definition: SystemBase.h:196

◆ saveOldSolutions()

void SystemBase::saveOldSolutions ( )
virtualinherited

Save the old and older solutions.

Definition at line 502 of file SystemBase.C.

503 {
504  const auto states =
505  _solution_states[static_cast<unsigned short>(Moose::SolutionIterationType::Time)].size();
506  if (states > 1)
507  {
508  _saved_solution_states.resize(states);
509  for (unsigned int i = 1; i <= states - 1; ++i)
510  if (!_saved_solution_states[i])
512  &addVector("save_solution_state_" + std::to_string(i), false, PARALLEL);
513 
514  for (unsigned int i = 1; i <= states - 1; ++i)
516  }
517 
519  _saved_dot_old = &addVector("save_solution_dot_old", false, PARALLEL);
521  _saved_dotdot_old = &addVector("save_solution_dotdot_old", false, PARALLEL);
522 
523  if (solutionUDotOld())
525 
526  if (solutionUDotDotOld())
528 }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419
virtual NumericVector< Number > * solutionUDotDotOld()
Definition: SystemBase.h:255
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const libMesh::ParallelType type)
Adds a solution length vector to the system.
virtual NumericVector< Number > * solutionUDotOld()
Definition: SystemBase.h:254
NumericVector< Real > * _saved_dot_old
Definition: SystemBase.h:1026
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
NumericVector< Real > * _saved_dotdot_old
Definition: SystemBase.h:1027
std::vector< NumericVector< Number > * > _saved_solution_states
The saved solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1077

◆ serializedSolution()

NumericVector< Number > & SystemBase::serializedSolution ( )
virtualinherited

Returns a reference to a serialized version of the solution vector for this subproblem.

Reimplemented in DisplacedSystem.

Definition at line 1613 of file SystemBase.C.

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

1614 {
1615  if (!_serialized_solution.get())
1616  {
1618  _serialized_solution->init(system().n_dofs(), false, SERIAL);
1619  }
1620 
1621  return *_serialized_solution;
1622 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
const Parallel::Communicator & _communicator
std::unique_ptr< NumericVector< Number > > _serialized_solution
Serialized version of the solution vector, or nullptr if a serialized solution is not needed...
Definition: SystemBase.h:1060

◆ serializeSolution()

void AuxiliarySystem::serializeSolution ( )
virtual

Definition at line 356 of file AuxiliarySystem.C.

Referenced by compute().

357 {
358  if (_serialized_solution.get() &&
359  _sys.n_dofs() > 0) // libMesh does not like serializing of empty vectors
360  {
361  if (!_serialized_solution->initialized() || _serialized_solution->size() != _sys.n_dofs())
362  {
363  _serialized_solution->clear();
364  _serialized_solution->init(_sys.n_dofs(), false, SERIAL);
365  }
366 
368  }
369 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
std::unique_ptr< NumericVector< Number > > _serialized_solution
Serialized version of the solution vector, or nullptr if a serialized solution is not needed...
Definition: SystemBase.h:1060
dof_id_type n_dofs() const
SERIAL
libMesh::System & _sys
virtual void localize(std::vector< T > &v_local) const=0

◆ setActiveScalarVariableCoupleableVectorTags()

void SystemBase::setActiveScalarVariableCoupleableVectorTags ( const std::set< TagID > &  vtags,
THREAD_ID  tid 
)
inherited

Set the active vector tags for the scalar variables.

Definition at line 1593 of file SystemBase.C.

Referenced by SubProblem::setActiveScalarVariableCoupleableVectorTags().

1595 {
1596  _vars[tid].setActiveScalarVariableCoupleableVectorTags(vtags);
1597 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ setActiveVariableCoupleableVectorTags()

void SystemBase::setActiveVariableCoupleableVectorTags ( const std::set< TagID > &  vtags,
THREAD_ID  tid 
)
inherited

Set the active vector tags for the variables.

Definition at line 1587 of file SystemBase.C.

Referenced by SubProblem::setActiveFEVariableCoupleableVectorTags().

1588 {
1589  _vars[tid].setActiveVariableCoupleableVectorTags(vtags);
1590 }
std::vector< VariableWarehouse > _vars
Variable warehouses (one for each thread)
Definition: SystemBase.h:990

◆ setScalarVariableCoupleableTags()

void AuxiliarySystem::setScalarVariableCoupleableTags ( ExecFlagType  type)

Definition at line 586 of file AuxiliarySystem.C.

Referenced by computeScalarVars().

587 {
589  const std::vector<std::shared_ptr<AuxScalarKernel>> & objects = storage.getActiveObjects(0);
590 
591  std::set<TagID> needed_sc_var_matrix_tags;
592  std::set<TagID> needed_sc_var_vector_tags;
593  for (const auto & obj : objects)
594  {
595  auto & sc_var_coup_vtags = obj->getScalarVariableCoupleableVectorTags();
596  needed_sc_var_vector_tags.insert(sc_var_coup_vtags.begin(), sc_var_coup_vtags.end());
597 
598  auto & sc_var_coup_mtags = obj->getScalarVariableCoupleableMatrixTags();
599  needed_sc_var_matrix_tags.insert(sc_var_coup_mtags.begin(), sc_var_coup_mtags.end());
600  }
601 
602  _fe_problem.setActiveScalarVariableCoupleableMatrixTags(needed_sc_var_matrix_tags, 0);
603  _fe_problem.setActiveScalarVariableCoupleableVectorTags(needed_sc_var_vector_tags, 0);
604 }
virtual void setActiveScalarVariableCoupleableMatrixTags(std::set< TagID > &mtags, const THREAD_ID tid) override
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
virtual void setActiveScalarVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
FEProblemBase & _fe_problem
the governing finite element/volume problem
Definition: SystemBase.h:980

◆ setVariableGlobalDoFs()

void SystemBase::setVariableGlobalDoFs ( const std::string &  var_name)
inherited

set all the global dof indices for a variable

Parameters
var_nameThe name of the variable

Definition at line 185 of file SystemBase.C.

186 {
187  AllLocalDofIndicesThread aldit(_subproblem, {var_name});
189  Threads::parallel_reduce(elem_range, aldit);
190 
191  // Gather the dof indices across procs to get all the dof indices for var_name
192  aldit.dofIndicesSetUnion();
193 
194  const auto & all_dof_indices = aldit.getDofIndices();
195  _var_all_dof_indices.assign(all_dof_indices.begin(), all_dof_indices.end());
196 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
std::vector< dof_id_type > _var_all_dof_indices
Container for the dof indices of a given variable.
Definition: SystemBase.h:1056
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed in...
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
MooseMesh & _mesh
Definition: SystemBase.h:985

◆ setVerboseFlag()

void SystemBase::setVerboseFlag ( const bool &  verbose)
inlineinherited

Sets the verbose flag.

Parameters
[in]verboseVerbose flag

Definition at line 134 of file SystemBase.h.

Referenced by Executioner::Executioner().

134 { _verbose = verbose; }
bool _verbose
True if printing out additional information.
Definition: SystemBase.h:1050

◆ solution() [1/2]

NumericVector<Number>& SystemBase::solution ( )
inlineinherited

Definition at line 195 of file SystemBase.h.

Referenced by Adaptivity::adaptMesh(), TransientMultiApp::appTransferVector(), MooseEigenSystem::combineSystemSolution(), NonlinearSystemBase::computeDamping(), computeElementalVarsHelper(), NonlinearSystemBase::computeJacobianInternal(), computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCs(), computeNodalVarsHelper(), NonlinearSystemBase::computeResidualTags(), computeScalarVars(), NonlinearSystemBase::constraintResiduals(), SystemBase::copyVars(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalNormalsCorner::execute(), NodalNormalsEvaluator::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), NodalNormalsPreprocessor::execute(), NodalNormalsCorner::finalize(), NodalNormalsEvaluator::finalize(), NodalNormalsPreprocessor::finalize(), NodalNormalsEvaluator::initialize(), NodalNormalsCorner::initialize(), NodalNormalsPreprocessor::initialize(), MooseEigenSystem::initSystemSolution(), ComputeMarkerThread::onElement(), ComputeIndicatorThread::onElement(), ComputeUserObjectsThread::onElement(), ComputeNodalUserObjectsThread::onNode(), FEProblemBase::projectInitialConditionOnCustomRange(), FEProblemBase::projectSolution(), Transient::relativeSolutionDifferenceNorm(), MultiApp::restore(), SystemBase::restoreSolutions(), SecantSolve::saveVariableValues(), SteffensenSolve::saveVariableValues(), PicardSolve::saveVariableValues(), MooseEigenSystem::scaleSystemSolution(), serializeSolution(), NonlinearSystemBase::setConstraintSecondaryValues(), NonlinearSystemBase::setInitialSolution(), DisplacedSystem::solutionInternal(), NonlinearEigenSystem::solve(), MultiAppDofCopyTransfer::transfer(), SecantSolve::transformVariables(), SteffensenSolve::transformVariables(), PicardSolve::transformVariables(), variableWiseRelativeSolutionDifferenceNorm(), and SystemBase::zeroVariables().

195 { return solutionState(0); }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419

◆ solution() [2/2]

const NumericVector<Number>& SystemBase::solution ( ) const
inlineinherited

Definition at line 198 of file SystemBase.h.

198 { return solutionState(0); }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419

◆ solutionInternal()

NumericVector<Number>& AuxiliarySystem::solutionInternal ( ) const
inlineoverrideprotectedvirtual

Internal getter for solution owned by libMesh.

Implements SystemBase.

Definition at line 201 of file AuxiliarySystem.h.

201 { return *_sys.solution; }
std::unique_ptr< NumericVector< Number > > solution
libMesh::System & _sys

◆ solutionOld() [1/2]

NumericVector<Number>& SystemBase::solutionOld ( )
inlineinherited

◆ solutionOld() [2/2]

const NumericVector<Number>& SystemBase::solutionOld ( ) const
inlineinherited

Definition at line 199 of file SystemBase.h.

199 { return solutionState(1); }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419

◆ solutionOlder() [1/2]

NumericVector<Number>& SystemBase::solutionOlder ( )
inlineinherited

Definition at line 197 of file SystemBase.h.

Referenced by MooseEigenSystem::combineSystemSolution(), CentralDifference::computeTimeDerivatives(), ActivateElementsUserObjectBase::initSolutions(), MooseVariableScalar::reinit(), and ElementSubdomainModifierBase::setOldAndOlderSolutions().

197 { return solutionState(2); }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419

◆ solutionOlder() [2/2]

const NumericVector<Number>& SystemBase::solutionOlder ( ) const
inlineinherited

Definition at line 200 of file SystemBase.h.

200 { return solutionState(2); }
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.C:1419

◆ solutionPreviousNewton() [1/2]

const NumericVector< Number > * SystemBase::solutionPreviousNewton ( ) const
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1345 of file SystemBase.C.

Referenced by copyCurrentIntoPreviousNL(), SystemBase::copyPreviousNonlinearSolutions(), and SystemBase::restoreSolutions().

1346 {
1349  else
1350  return nullptr;
1351 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ solutionPreviousNewton() [2/2]

NumericVector< Number > * SystemBase::solutionPreviousNewton ( )
virtualinherited

Reimplemented in DisplacedSystem.

Definition at line 1336 of file SystemBase.C.

1337 {
1340  else
1341  return nullptr;
1342 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:28
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ solutionState() [1/2]

NumericVector< Number > & SystemBase::solutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
)
virtualinherited

Get a state of the solution (0 = current, 1 = old, 2 = older, etc).

If the state does not exist, it will be initialized in addition to any newer states before it that have not been initialized.

Reimplemented in DisplacedSystem.

Definition at line 1419 of file SystemBase.C.

Referenced by SystemBase::copyOldSolutions(), SystemBase::copyPreviousNonlinearSolutions(), PointwiseRenormalizeVector::execute(), PointwiseRenormalizeVector::finalize(), SystemBase::restoreOldSolutions(), SystemBase::saveOldSolutions(), SystemBase::solution(), SystemBase::solutionOld(), SystemBase::solutionOlder(), and DisplacedSystem::solutionState().

1421 {
1422  if (!hasSolutionState(state, iteration_type))
1423  needSolutionState(state, iteration_type);
1424  return *_solution_states[static_cast<unsigned short>(iteration_type)][state];
1425 }
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Registers that the solution state state is needed.
Definition: SystemBase.C:1428
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.h:1081
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075

◆ solutionState() [2/2]

const NumericVector< Number > & SystemBase::solutionState ( const unsigned int  state,
Moose::SolutionIterationType  iteration_type = Moose::SolutionIterationType::Time 
) const
virtualinherited

Get a state of the solution (0 = current, 1 = old, 2 = older, etc).

Reimplemented in DisplacedSystem.

Definition at line 1390 of file SystemBase.C.

1392 {
1393  if (!hasSolutionState(state, iteration_type))
1394  mooseError("For iteration type '",
1395  Moose::stringify(iteration_type),
1396  "': solution state ",
1397  state,
1398  " was requested in ",
1399  name(),
1400  " but only up to state ",
1401  (_solution_states[static_cast<unsigned short>(iteration_type)].size() == 0)
1402  ? 0
1403  : _solution_states[static_cast<unsigned short>(iteration_type)].size() - 1,
1404  " is available.");
1405 
1406  const auto & solution_states = _solution_states[static_cast<unsigned short>(iteration_type)];
1407 
1408  if (state == 0)
1409  mooseAssert(solution_states[0] == &solutionInternal(), "Inconsistent current solution");
1410  else
1411  mooseAssert(solution_states[state] ==
1412  &getVector(oldSolutionStateVectorName(state, iteration_type)),
1413  "Inconsistent solution state");
1414 
1415  return *solution_states[state];
1416 }
virtual NumericVector< Number > & solutionInternal() const =0
Internal getter for solution owned by libMesh.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Definition: SystemBase.C:1330
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
Definition: SystemBase.h:1081
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
TagName oldSolutionStateVectorName(const unsigned int, Moose::SolutionIterationType iteration_type) const
Gets the vector name used for an old (not current) solution state.
Definition: SystemBase.C:1371
std::array< std::vector< NumericVector< Number > * >, 2 > _solution_states
The solution states (0 = current, 1 = old, 2 = older, etc)
Definition: SystemBase.h:1075
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ solutionStatesInitialized()

bool SystemBase::solutionStatesInitialized ( ) const
inlineinherited

Whether or not the solution states have been initialized via initSolutionState()

After the solution states have been initialized, additional solution states cannot be added.

Definition at line 897 of file SystemBase.h.

Referenced by ScalarKernelBase::uOld(), and AuxScalarKernel::uOld().

bool _solution_states_initialized
Whether or not the solution states have been initialized.
Definition: SystemBase.h:1053

◆ solutionUDot() [1/2]

virtual NumericVector<Number>* SystemBase::solutionUDot ( )
inlinevirtualinherited

◆ solutionUDot() [2/2]

virtual const NumericVector<Number>* SystemBase::solutionUDot ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 256 of file SystemBase.h.

256 { return _u_dot; }
NumericVector< Number > * _u_dot
solution vector for u^dot
Definition: SystemBase.h:1000

◆ solutionUDotDot() [1/2]

virtual NumericVector<Number>* SystemBase::solutionUDotDot ( )
inlinevirtualinherited

◆ solutionUDotDot() [2/2]

virtual const NumericVector<Number>* SystemBase::solutionUDotDot ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 257 of file SystemBase.h.

257 { return _u_dotdot; }
NumericVector< Number > * _u_dotdot
solution vector for u^dotdot
Definition: SystemBase.h:1002

◆ solutionUDotDotOld() [1/2]

virtual NumericVector<Number>* SystemBase::solutionUDotDotOld ( )
inlinevirtualinherited

◆ solutionUDotDotOld() [2/2]

virtual const NumericVector<Number>* SystemBase::solutionUDotDotOld ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 259 of file SystemBase.h.

259 { return _u_dotdot_old; }
NumericVector< Number > * _u_dotdot_old
old solution vector for u^dotdot
Definition: SystemBase.h:1007

◆ solutionUDotOld() [1/2]

virtual NumericVector<Number>* SystemBase::solutionUDotOld ( )
inlinevirtualinherited

◆ solutionUDotOld() [2/2]

virtual const NumericVector<Number>* SystemBase::solutionUDotOld ( ) const
inlinevirtualinherited

Reimplemented in DisplacedSystem.

Definition at line 258 of file SystemBase.h.

258 { return _u_dot_old; }
NumericVector< Number > * _u_dot_old
old solution vector for u^dot
Definition: SystemBase.h:1005

◆ solve()

void SystemBase::solve ( )
virtualinherited

Solve the system (using libMesh magic)

Reimplemented in NonlinearSystemBase, LinearSystem, NonlinearEigenSystem, NonlinearSystem, DumpObjectsLinearSystem, and DumpObjectsNonlinearSystem.

Definition at line 1251 of file SystemBase.C.

1252 {
1253  system().solve();
1254 }
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual void solve()

◆ subdomainSetup()

void AuxiliarySystem::subdomainSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 137 of file AuxiliarySystem.C.

138 {
140 
141  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
142  {
144  _nodal_aux_storage.subdomainSetup(tid);
145  _mortar_nodal_aux_storage.subdomainSetup(tid);
146  _nodal_vec_aux_storage.subdomainSetup(tid);
147  _nodal_array_aux_storage.subdomainSetup(tid);
148  _elemental_aux_storage.subdomainSetup(tid);
149  _elemental_vec_aux_storage.subdomainSetup(tid);
150  _elemental_array_aux_storage.subdomainSetup(tid);
151  }
152 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
virtual void subdomainSetup()
Definition: SystemBase.C:1559
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
virtual void subdomainSetup(THREAD_ID tid=0) const

◆ subproblem() [1/2]

SubProblem& SystemBase::subproblem ( )
inlineinherited

◆ subproblem() [2/2]

const SubProblem& SystemBase::subproblem ( ) const
inlineinherited

Definition at line 102 of file SystemBase.h.

102 { return _subproblem; }
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977

◆ sys()

virtual libMesh::System& AuxiliarySystem::sys ( )
inlinevirtual

◆ system() [1/2]

virtual libMesh::System& AuxiliarySystem::system ( )
inlineoverridevirtual

◆ system() [2/2]

virtual const libMesh::System& AuxiliarySystem::system ( ) const
inlineoverridevirtual

Implements SystemBase.

Definition at line 122 of file AuxiliarySystem.h.

122 { return _sys; }
libMesh::System & _sys

◆ systemMatrixTag()

virtual TagID SystemBase::systemMatrixTag ( ) const
inlinevirtualinherited

Return the Matrix Tag ID for System.

Reimplemented in NonlinearSystemBase, LinearSystem, and DisplacedSystem.

Definition at line 288 of file SystemBase.h.

Referenced by SystemBase::defaultMatrixTags(), and DisplacedSystem::systemMatrixTag().

288 { mooseError("Not implemented yet"); }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 47 of file PerfGraphInterface.C.

Referenced by PerfGraphInterface::registerTimedSection().

48 {
49  return _prefix.empty() ? "" : (_prefix + "::") + section_name;
50 }
const std::string _prefix
A prefix to use for all sections.

◆ timestepSetup()

void AuxiliarySystem::timestepSetup ( )
overridevirtual

Reimplemented from SystemBase.

Definition at line 101 of file AuxiliarySystem.C.

102 {
104 
105  for (unsigned int tid = 0; tid < libMesh::n_threads(); tid++)
106  {
108  _nodal_aux_storage.timestepSetup(tid);
109  _mortar_nodal_aux_storage.timestepSetup(tid);
110  _nodal_vec_aux_storage.timestepSetup(tid);
111  _nodal_array_aux_storage.timestepSetup(tid);
112  _elemental_aux_storage.timestepSetup(tid);
113  _elemental_vec_aux_storage.timestepSetup(tid);
114  _elemental_array_aux_storage.timestepSetup(tid);
115  }
116 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
unsigned int n_threads()
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
virtual void timestepSetup(THREAD_ID tid=0) const
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage
virtual void timestepSetup()
Definition: SystemBase.C:1545

◆ timeVectorTag()

virtual TagID SystemBase::timeVectorTag ( ) const
inlinevirtualinherited

Ideally, we should not need this API.

There exists a really bad API "addCachedResidualDirectly " in FEProblem and DisplacedProblem This API should go away once addCachedResidualDirectly is removed in the future Return Tag ID for Time

Reimplemented in NonlinearSystemBase, and DisplacedSystem.

Definition at line 283 of file SystemBase.h.

Referenced by SystemBase::defaultVectorTags(), and DisplacedSystem::timeVectorTag().

283 { mooseError("Not implemented yet"); }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ update()

void SystemBase::update ( )
inherited

◆ updateActive()

void AuxiliarySystem::updateActive ( THREAD_ID  tid)
virtual

Definition at line 191 of file AuxiliarySystem.C.

192 {
194  _nodal_aux_storage.updateActive(tid);
195  _mortar_nodal_aux_storage.updateActive(tid);
196  _nodal_vec_aux_storage.updateActive(tid);
197  _nodal_array_aux_storage.updateActive(tid);
198  _elemental_aux_storage.updateActive(tid);
199  _elemental_vec_aux_storage.updateActive(tid);
200  _elemental_array_aux_storage.updateActive(tid);
201 }
ExecuteMooseObjectWarehouse< AuxKernel > _nodal_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _mortar_nodal_aux_storage
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _nodal_array_aux_storage
ExecuteMooseObjectWarehouse< AuxScalarKernel > _aux_scalar_storage
ExecuteMooseObjectWarehouse< ArrayAuxKernel > _elemental_array_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _nodal_vec_aux_storage
ExecuteMooseObjectWarehouse< AuxKernel > _elemental_aux_storage
ExecuteMooseObjectWarehouse< VectorAuxKernel > _elemental_vec_aux_storage

◆ validParams()

InputParameters PerfGraphInterface::validParams ( )
staticinherited

Definition at line 16 of file PerfGraphInterface.C.

Referenced by Convergence::validParams().

17 {
19  return params;
20 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()

◆ variableWiseRelativeSolutionDifferenceNorm()

void AuxiliarySystem::variableWiseRelativeSolutionDifferenceNorm ( std::vector< Number > &  var_diffs) const

Computes and stores ||current - old|| / ||current|| for each variable in the given vector.

Parameters
var_diffsa vector being filled with the L2 norm of the solution difference

Definition at line 893 of file AuxiliarySystem.C.

Referenced by TransientBase::convergedToSteadyState().

895 {
896  rel_diff_norms.resize(nVariables(), 0);
897  // Get dof map from system
898  const auto & dof_map = _sys.get_dof_map();
899 
900  for (const auto n : make_range(nVariables()))
901  {
902  // Get local indices from dof map for each variable
903  std::vector<dof_id_type> local_indices_n;
904  dof_map.local_variable_indices(local_indices_n, _mesh, n);
905  Number diff_norm_n = 0;
906  Number norm_n = 0;
907  // Get values from system, update norm
908  for (const auto local_index : local_indices_n)
909  {
910  const Number & value = solution()(local_index);
911  const Number & value_old = solutionOld()(local_index);
912  diff_norm_n += Utility::pow<2, Number>(value - value_old);
913  norm_n += Utility::pow<2, Number>(value);
914  }
915  // Aggregate norm over proceccors
916  _communicator.sum(diff_norm_n);
917  _communicator.sum(norm_n);
918  diff_norm_n = sqrt(diff_norm_n);
919  norm_n = sqrt(norm_n);
920  rel_diff_norms[n] = diff_norm_n / norm_n;
921  }
922 }
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void local_variable_indices(T &idx, const MeshBase &mesh, unsigned int var_num) const
const Parallel::Communicator & _communicator
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition: SystemBase.C:874
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MooseMesh & _mesh
Definition: SystemBase.h:985
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
IntRange< T > make_range(T beg, T end)
Real Number
NumericVector< Number > & solutionOld()
Definition: SystemBase.h:196
libMesh::System & _sys
const DofMap & get_dof_map() const

◆ varKind()

Moose::VarKindType SystemBase::varKind ( ) const
inlineinherited
Returns
the type of variables this system holds, e.g. nonlinear or auxiliary

Definition at line 925 of file SystemBase.h.

Referenced by Coupleable::coupled().

925 { return _var_kind; }
Moose::VarKindType _var_kind
default kind of variables in this system
Definition: SystemBase.h:1030

◆ zeroTaggedVector()

void SystemBase::zeroTaggedVector ( const TagID  tag)
inherited

Zero vector with the given tag.

Definition at line 666 of file SystemBase.C.

Referenced by SystemBase::zeroTaggedVectors().

667 {
668  if (!_subproblem.vectorTagExists(tag))
669  mooseError("Cannot zero vector with TagID ",
670  tag,
671  " in system '",
672  name(),
673  "' because that tag does not exist in the problem");
674  else if (!hasVector(tag))
675  mooseError("Cannot zero vector tag with name '",
677  "' in system '",
678  name(),
679  "' because there is no vector associated with that tag");
681  getVector(tag).zero();
682 }
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool vectorTagNotZeroed(const TagID tag) const
Checks if a vector tag is in the list of vectors that will not be zeroed when other tagged vectors ar...
Definition: SubProblem.C:155
virtual void zero()=0
virtual const std::string & name() const
Definition: SystemBase.C:1330
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
Definition: SubProblem.C:221
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ zeroTaggedVectors()

void SystemBase::zeroTaggedVectors ( const std::set< TagID > &  tags)
inherited

Zero all vectors for given tags.

Definition at line 685 of file SystemBase.C.

Referenced by NonlinearSystemBase::computeResidualAndJacobianTags(), and NonlinearSystemBase::computeResidualTags().

686 {
687  for (const auto tag : tags)
688  zeroTaggedVector(tag);
689 }
void zeroTaggedVector(const TagID tag)
Zero vector with the given tag.
Definition: SystemBase.C:666

◆ zeroVariables()

void SystemBase::zeroVariables ( std::vector< std::string > &  vars_to_be_zeroed)
virtualinherited

Zero out the solution for the list of variables passed in.

@ param vars_to_be_zeroed The variable names in this vector will have their solutions set to zero after this call

Reimplemented in DisplacedSystem.

Definition at line 199 of file SystemBase.C.

Referenced by DisplacedSystem::zeroVariables(), SystemBase::zeroVariablesForJacobian(), and SystemBase::zeroVariablesForResidual().

200 {
201  if (vars_to_be_zeroed.size() > 0)
202  {
204 
205  auto problem = dynamic_cast<FEProblemBase *>(&_subproblem);
206  if (!problem)
207  mooseError("System needs to be registered in FEProblemBase for using zeroVariables.");
208 
209  AllLocalDofIndicesThread aldit(*problem, vars_to_be_zeroed, true);
211  Threads::parallel_reduce(elem_range, aldit);
212 
213  const auto & dof_indices_to_zero = aldit.getDofIndices();
214 
215  solution.close();
216 
217  for (const auto & dof : dof_indices_to_zero)
218  solution.set(dof, 0);
219 
220  solution.close();
221 
222  // Call update to update the current_local_solution for this system
223  system().update();
224  }
225 }
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1235
NumericVector< Number > & solution()
Definition: SystemBase.h:195
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed in...
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
Definition: SystemBase.h:977
virtual void close()=0
virtual void update()
MooseMesh & _mesh
Definition: SystemBase.h:985
virtual void set(const numeric_index_type i, const T value)=0

◆ zeroVariablesForJacobian()

void SystemBase::zeroVariablesForJacobian ( )
virtualinherited

Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on Jacobian evaluation by a call to addVariableToZeroOnResidual()

Definition at line 234 of file SystemBase.C.

235 {
237 }
std::vector< std::string > _vars_to_be_zeroed_on_jacobian
Definition: SystemBase.h:997
virtual void zeroVariables(std::vector< std::string > &vars_to_be_zeroed)
Zero out the solution for the list of variables passed in.
Definition: SystemBase.C:199

◆ zeroVariablesForResidual()

void SystemBase::zeroVariablesForResidual ( )
virtualinherited

Zero out the solution for the variables that were registered as needing to have their solutions zeroed on out on residual evaluation by a call to addVariableToZeroOnResidual()

Definition at line 228 of file SystemBase.C.

229 {
231 }
std::vector< std::string > _vars_to_be_zeroed_on_residual
Definition: SystemBase.h:996
virtual void zeroVariables(std::vector< std::string > &vars_to_be_zeroed)
Zero out the solution for the list of variables passed in.
Definition: SystemBase.C:199

Friends And Related Function Documentation

◆ ComputeIndicatorThread

friend class ComputeIndicatorThread
friend

Definition at line 193 of file AuxiliarySystem.h.

◆ ComputeMarkerThread

friend class ComputeMarkerThread
friend

Definition at line 194 of file AuxiliarySystem.h.

◆ ComputeNodalKernelBCJacobiansThread

Definition at line 199 of file AuxiliarySystem.h.

◆ ComputeNodalKernelBcsThread

friend class ComputeNodalKernelBcsThread
friend

Definition at line 197 of file AuxiliarySystem.h.

◆ ComputeNodalKernelJacobiansThread

friend class ComputeNodalKernelJacobiansThread
friend

Definition at line 198 of file AuxiliarySystem.h.

◆ ComputeNodalKernelsThread

friend class ComputeNodalKernelsThread
friend

Definition at line 196 of file AuxiliarySystem.h.

◆ FlagElementsThread

friend class FlagElementsThread
friend

Definition at line 195 of file AuxiliarySystem.h.

Member Data Documentation

◆ _app

MooseApp& SystemBase::_app
protectedinherited

◆ _automatic_scaling

bool SystemBase::_automatic_scaling
protectedinherited

Whether to automatically scale the variables.

Definition at line 1047 of file SystemBase.h.

Referenced by SystemBase::automaticScaling(), NonlinearSystemBase::initialSetup(), and NonlinearSystemBase::preSolve().

◆ _aux_scalar_storage

ExecuteMooseObjectWarehouse<AuxScalarKernel> AuxiliarySystem::_aux_scalar_storage
protected

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), LinearSystem::computeLinearSystemTags(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MFEMSteady::execute(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), SolutionInvalidityOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), EigenProblem::solve(), NonlinearSystem::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_solution

const NumericVector<Number>* AuxiliarySystem::_current_solution
protected

solution vector from nonlinear solver

Definition at line 162 of file AuxiliarySystem.h.

Referenced by currentSolution().

◆ _du_dot_du

std::vector<Real> SystemBase::_du_dot_du
protectedinherited

Derivative of time derivative of u with respect to uj.

This depends on the time integration scheme

Definition at line 1011 of file SystemBase.h.

Referenced by SystemBase::addVariable(), SystemBase::duDotDu(), and SystemBase::duDotDus().

◆ _du_dotdot_du

Real SystemBase::_du_dotdot_du
protectedinherited

Definition at line 1012 of file SystemBase.h.

Referenced by SystemBase::duDotDotDu().

◆ _elem_vars

std::vector<std::vector<MooseVariableFieldBase *> > AuxiliarySystem::_elem_vars
protected

◆ _elemental_array_aux_storage

ExecuteMooseObjectWarehouse<ArrayAuxKernel> AuxiliarySystem::_elemental_array_aux_storage
protected

◆ _elemental_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_elemental_aux_storage
protected

◆ _elemental_vec_aux_storage

ExecuteMooseObjectWarehouse<VectorAuxKernel> AuxiliarySystem::_elemental_vec_aux_storage
protected

◆ _factory

Factory& SystemBase::_factory
protectedinherited

◆ _fe_problem

FEProblemBase& SystemBase::_fe_problem
protectedinherited

the governing finite element/volume problem

Definition at line 980 of file SystemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addDGKernel(), NonlinearSystemBase::addDiracKernel(), SystemBase::addDotVectors(), NonlinearSystemBase::addHDGKernel(), NonlinearSystemBase::addInterfaceKernel(), NonlinearSystemBase::addKernel(), NonlinearSystemBase::addNodalKernel(), NonlinearSystemBase::addScalarKernel(), NonlinearSystemBase::addSplit(), NonlinearSystemBase::assembleScalingVector(), NonlinearSystemBase::augmentSparsity(), AuxiliarySystem(), SolverSystem::checkInvalidSolution(), NonlinearSystemBase::checkKernelCoverage(), clearScalarVariableCoupleableTags(), SolverSystem::compute(), compute(), NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeDiracContributions(), computeElementalVarsHelper(), LinearSystem::computeGradients(), NonlinearSystemBase::computeJacobian(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), LinearSystem::computeLinearSystemTags(), computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), computeNodalVarsHelper(), NonlinearSystemBase::computeResidualAndJacobianInternal(), NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::computeResidualTags(), NonlinearSystemBase::computeScalarKernelsJacobians(), computeScalarVars(), NonlinearSystemBase::computeScaling(), NonlinearSystem::computeScalingJacobian(), NonlinearSystem::computeScalingResidual(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), LinearSystem::containsTimeKernel(), NonlinearSystem::converged(), NonlinearSystemBase::customSetup(), MooseEigenSystem::eigenKernelOnCurrent(), MooseEigenSystem::eigenKernelOnOld(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), NonlinearSystemBase::enforceNodalConstraintsResidual(), SystemBase::feProblem(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), NonlinearSystemBase::initialSetup(), NonlinearSystemBase::jacobianSetup(), LinearSystem::LinearSystem(), NonlinearSystemBase::NonlinearSystemBase(), NonlinearSystemBase::overwriteNodeFace(), NonlinearSystem::potentiallySetupFiniteDifferencing(), NonlinearSystemBase::preInit(), NonlinearSystemBase::reinitNodeFace(), NonlinearSystem::residualAndJacobianTogether(), NonlinearSystemBase::residualSetup(), NonlinearSystemBase::setConstraintSecondaryValues(), NonlinearSystemBase::setInitialSolution(), setScalarVariableCoupleableTags(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), NonlinearSystem::solve(), and NonlinearSystemBase::timestepSetup().

◆ _matrix_tag_active_flags

std::vector<bool> SystemBase::_matrix_tag_active_flags
protectedinherited

◆ _max_var_n_dofs_per_elem

size_t SystemBase::_max_var_n_dofs_per_elem
protectedinherited

Maximum number of dofs for any one variable on any one element.

Definition at line 1035 of file SystemBase.h.

Referenced by SystemBase::assignMaxVarNDofsPerElem(), and SystemBase::getMaxVarNDofsPerElem().

◆ _max_var_n_dofs_per_node

size_t SystemBase::_max_var_n_dofs_per_node
protectedinherited

Maximum number of dofs for any one variable on any one node.

Definition at line 1038 of file SystemBase.h.

Referenced by SystemBase::assignMaxVarNDofsPerNode(), and SystemBase::getMaxVarNDofsPerNode().

◆ _max_var_number

unsigned int SystemBase::_max_var_number
protectedinherited

Maximum variable number.

Definition at line 994 of file SystemBase.h.

Referenced by SystemBase::addVariable(), and SystemBase::getMaxVariableNumber().

◆ _mesh

MooseMesh& SystemBase::_mesh
protectedinherited

◆ _mortar_nodal_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_mortar_nodal_aux_storage
protected

◆ _name

std::string SystemBase::_name
protectedinherited

The name of this system.

Definition at line 987 of file SystemBase.h.

◆ _nodal_array_aux_storage

ExecuteMooseObjectWarehouse<ArrayAuxKernel> AuxiliarySystem::_nodal_array_aux_storage
protected

◆ _nodal_aux_storage

ExecuteMooseObjectWarehouse<AuxKernel> AuxiliarySystem::_nodal_aux_storage
protected

◆ _nodal_vars

std::vector<std::vector<MooseVariableFEBase *> > AuxiliarySystem::_nodal_vars
protected

◆ _nodal_vec_aux_storage

ExecuteMooseObjectWarehouse<VectorAuxKernel> AuxiliarySystem::_nodal_vec_aux_storage
protected

◆ _numbered_vars

std::vector<std::vector<MooseVariableFieldBase *> > SystemBase::_numbered_vars
protectedinherited

Map variable number to its pointer.

Definition at line 1044 of file SystemBase.h.

Referenced by SystemBase::addVariable(), and SystemBase::getVariable().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 127 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _raw_grad_container

std::vector<std::unique_ptr<NumericVector<Number> > > SystemBase::_raw_grad_container
protectedinherited

A cache for storing gradients at dof locations.

We store it on the system because we create copies of variables on each thread and that would lead to increased data duplication when using threading-based parallelism.

Definition at line 1065 of file SystemBase.h.

Referenced by LinearSystem::computeGradients(), SystemBase::gradientContainer(), and SystemBase::initialSetup().

◆ _saved_dot_old

NumericVector<Real>* SystemBase::_saved_dot_old
protectedinherited

Definition at line 1026 of file SystemBase.h.

Referenced by SystemBase::restoreOldSolutions(), and SystemBase::saveOldSolutions().

◆ _saved_dotdot_old

NumericVector<Real>* SystemBase::_saved_dotdot_old
protectedinherited

Definition at line 1027 of file SystemBase.h.

Referenced by SystemBase::restoreOldSolutions(), and SystemBase::saveOldSolutions().

◆ _saved_old

NumericVector<Real>* SystemBase::_saved_old
protectedinherited

Definition at line 1022 of file SystemBase.h.

◆ _saved_older

NumericVector<Real>* SystemBase::_saved_older
protectedinherited

Definition at line 1023 of file SystemBase.h.

◆ _serialized_solution

std::unique_ptr<NumericVector<Number> > SystemBase::_serialized_solution
protectedinherited

Serialized version of the solution vector, or nullptr if a serialized solution is not needed.

Definition at line 1060 of file SystemBase.h.

Referenced by compute(), SolverSystem::preInit(), SystemBase::serializedSolution(), SolverSystem::serializeSolution(), serializeSolution(), and SolverSystem::setSolution().

◆ _solution_state

std::vector<NumericVector<Number> *> AuxiliarySystem::_solution_state
protected

The current states of the solution (0 = current, 1 = old, etc)

Definition at line 165 of file AuxiliarySystem.h.

◆ _solution_states_initialized

bool SystemBase::_solution_states_initialized
protectedinherited

Whether or not the solution states have been initialized.

Definition at line 1053 of file SystemBase.h.

Referenced by SystemBase::initSolutionState(), and SystemBase::solutionStatesInitialized().

◆ _subproblem

SubProblem& SystemBase::_subproblem
protectedinherited

◆ _sys

libMesh::System& AuxiliarySystem::_sys
protected

◆ _tagged_matrices

std::vector<libMesh::SparseMatrix<Number> *> SystemBase::_tagged_matrices
protectedinherited

◆ _tagged_vectors

std::vector<NumericVector<Number> *> SystemBase::_tagged_vectors
protectedinherited

◆ _time_integrators

std::vector<std::shared_ptr<TimeIntegrator> > SystemBase::_time_integrators
protectedinherited

◆ _u_dot

NumericVector<Number>* SystemBase::_u_dot
protectedinherited

solution vector for u^dot

Definition at line 1000 of file SystemBase.h.

Referenced by SystemBase::addDotVectors(), NonlinearSystemBase::setSolutionUDot(), and SystemBase::solutionUDot().

◆ _u_dot_old

NumericVector<Number>* SystemBase::_u_dot_old
protectedinherited

old solution vector for u^dot

Definition at line 1005 of file SystemBase.h.

Referenced by SystemBase::addDotVectors(), NonlinearSystemBase::setSolutionUDotOld(), and SystemBase::solutionUDotOld().

◆ _u_dotdot

NumericVector<Number>* SystemBase::_u_dotdot
protectedinherited

solution vector for u^dotdot

Definition at line 1002 of file SystemBase.h.

Referenced by SystemBase::addDotVectors(), NonlinearSystemBase::setSolutionUDotDot(), and SystemBase::solutionUDotDot().

◆ _u_dotdot_old

NumericVector<Number>* SystemBase::_u_dotdot_old
protectedinherited

old solution vector for u^dotdot

Definition at line 1007 of file SystemBase.h.

Referenced by SystemBase::addDotVectors(), NonlinearSystemBase::setSolutionUDotDotOld(), and SystemBase::solutionUDotDotOld().

◆ _var_all_dof_indices

std::vector<dof_id_type> SystemBase::_var_all_dof_indices
protectedinherited

Container for the dof indices of a given variable.

Definition at line 1056 of file SystemBase.h.

Referenced by SystemBase::getVariableGlobalDoFs(), and SystemBase::setVariableGlobalDoFs().

◆ _var_kind

Moose::VarKindType SystemBase::_var_kind
protectedinherited

default kind of variables in this system

Definition at line 1030 of file SystemBase.h.

Referenced by SystemBase::varKind().

◆ _var_map

std::map<unsigned int, std::set<SubdomainID> > SystemBase::_var_map
protectedinherited

Map of variables (variable id -> array of subdomains where it lives)

Definition at line 992 of file SystemBase.h.

Referenced by SystemBase::addVariable(), SystemBase::getSubdomainsForVar(), and SystemBase::getVariableBlocks().

◆ _var_to_copy

std::vector<VarCopyInfo> SystemBase::_var_to_copy
protectedinherited

◆ _vars

std::vector<VariableWarehouse> SystemBase::_vars
protectedinherited

Variable warehouses (one for each thread)

Definition at line 990 of file SystemBase.h.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addInterfaceKernel(), addVariable(), SystemBase::addVariable(), SystemBase::applyScalingFactors(), NonlinearSystemBase::assembleScalingVector(), SystemBase::clearAllDofIndices(), compute(), SystemBase::customSetup(), SystemBase::getActualFieldVariable(), SystemBase::getFieldVariable(), SystemBase::getFVVariable(), getMinQuadratureOrder(), SystemBase::getMinQuadratureOrder(), SystemBase::getScalarVariable(), SystemBase::getScalarVariables(), SystemBase::getVariable(), SystemBase::getVariableNames(), SystemBase::getVariables(), LinearSystem::initialSetup(), SystemBase::initialSetup(), SystemBase::jacobianSetup(), SystemBase::nFieldVariables(), SystemBase::nFVVariables(), SystemBase::nVariables(), SystemBase::prepare(), SystemBase::prepareFace(), SystemBase::prepareLowerD(), SystemBase::prepareNeighbor(), SystemBase::reinitElem(), SystemBase::reinitElemFace(), SystemBase::reinitLowerD(), SystemBase::reinitNeighbor(), SystemBase::reinitNeighborFace(), SystemBase::reinitNode(), SystemBase::reinitNodeFace(), SystemBase::reinitNodes(), SystemBase::reinitNodesNeighbor(), SystemBase::reinitScalars(), SystemBase::residualSetup(), SystemBase::setActiveScalarVariableCoupleableVectorTags(), SystemBase::setActiveVariableCoupleableVectorTags(), NonlinearSystemBase::setupScalingData(), SystemBase::subdomainSetup(), and SystemBase::timestepSetup().

◆ _vars_to_be_zeroed_on_jacobian

std::vector<std::string> SystemBase::_vars_to_be_zeroed_on_jacobian
protectedinherited

◆ _vars_to_be_zeroed_on_residual

std::vector<std::string> SystemBase::_vars_to_be_zeroed_on_residual
protectedinherited

◆ _verbose

bool SystemBase::_verbose
protectedinherited

True if printing out additional information.

Definition at line 1050 of file SystemBase.h.

Referenced by SystemBase::applyScalingFactors(), and SystemBase::setVerboseFlag().


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