www.mooseframework.org
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DumpObjectsProblem Class Reference

Specialization of SubProblem for dumping generated objects as input file syntax. More...

#include <DumpObjectsProblem.h>

Inheritance diagram for DumpObjectsProblem:
[legend]

Public Member Functions

 DumpObjectsProblem (const InputParameters &parameters)
 
void addVariable (const std::string &var_name, const FEType &type, Real scale_factor, const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addScalarVariable (const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addAuxVariable (const std::string &var_name, const FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addAuxScalarVariable (const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL) override
 
void addFunction (std::string type, const std::string &name, InputParameters parameters) override
 
void addKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addNodalKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addScalarKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addBoundaryCondition (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addConstraint (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addAuxKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addAuxScalarKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addDiracKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addDGKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addInterfaceKernel (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addInitialCondition (const std::string &type, const std::string &name, InputParameters parameters) override
 
void addMaterial (const std::string &type, const std::string &name, InputParameters parameters) override
 
void dumpGeneratedSyntax (const std::string path)
 output input blocks for a given action path More...
 
virtual void solve () override
 output data in solve More...
 
virtual void initialSetup () override
 
virtual void advanceState () override
 Advance all of the state holding vectors / datastructures so that we can move to the next timestep. More...
 
virtual void timestepSetup () override
 
virtual void execute (const ExecFlagType &) override
 Convenience function for performing execution of MOOSE systems. More...
 
virtual void outputStep (ExecFlagType) override
 Output the current step. More...
 
virtual void updateActiveObjects () override
 Update the active objects in the warehouses. More...
 
virtual void onTimestepEnd () override
 
virtual void computeIndicators () override
 
virtual void computeMarkers () override
 
virtual bool adaptMesh () override
 
virtual void addLineSearch (const InputParameters &) override
 add a MOOSE line search More...
 
virtual EquationSystems & es () override
 
virtual MooseMeshmesh () override
 
virtual Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) override
 
virtual void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setCoupling (Moose::CouplingType type)
 Set the coupling between variables TODO: allow user-defined coupling. More...
 
Moose::CouplingType coupling ()
 
void setCouplingMatrix (std::unique_ptr< CouplingMatrix > cm)
 Set custom coupling matrix. More...
 
void setCouplingMatrix (CouplingMatrix *cm)
 
const CouplingMatrix * couplingMatrix ()
 
void setNonlocalCouplingMatrix ()
 Set custom coupling matrix for variables requiring nonlocal contribution. More...
 
bool areCoupled (unsigned int ivar, unsigned int jvar)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries (THREAD_ID tid)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries (THREAD_ID tid)
 
virtual MooseNonlinearConvergenceReason checkNonlinearConvergence (std::string &msg, const PetscInt it, const Real xnorm, const Real snorm, const Real fnorm, const Real rtol, const Real stol, const Real abstol, const PetscInt nfuncs, const PetscInt max_funcs, const PetscBool force_iteration, const Real initial_residual_before_preset_bcs, const Real div_threshold)
 Check for converence of the nonlinear solution. More...
 
virtual MooseLinearConvergenceReason checkLinearConvergence (std::string &msg, const PetscInt n, const Real rnorm, const Real rtol, const Real atol, const Real dtol, const PetscInt maxits)
 Check for convergence of the linear solution. More...
 
virtual bool hasVariable (const std::string &var_name) const override
 
virtual MooseVariableFEBasegetVariable (THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) override
 Returns the variable reference for requested variable which must be of the expected_var_type (Nonlinear vs. More...
 
virtual MooseVariablegetStandardVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested MooseVariable which may be in any system. More...
 
virtual VectorMooseVariablegetVectorVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the variable reference for requested VectorMooseVariable which may be in any system. More...
 
virtual bool hasScalarVariable (const std::string &var_name) const override
 Returns a Boolean indicating whether any system contains a variable with the name provided. More...
 
virtual MooseVariableScalargetScalarVariable (THREAD_ID tid, const std::string &var_name) override
 Returns the scalar variable reference from whichever system contains it. More...
 
virtual System & getSystem (const std::string &var_name) override
 Returns the equation system containing the variable provided. More...
 
virtual void setActiveElementalMooseVariables (const std::set< MooseVariableFEBase *> &moose_vars, THREAD_ID tid) override
 Set the MOOSE variables to be reinited on each element. More...
 
virtual void clearActiveElementalMooseVariables (THREAD_ID tid) override
 Clear the active elemental MooseVariableFEBase. More...
 
virtual void clearActiveFEVariableCoupleableMatrixTags (THREAD_ID tid) override
 
virtual void clearActiveFEVariableCoupleableVectorTags (THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableVectorTags (std::set< TagID > &vtags, THREAD_ID tid) override
 
virtual void setActiveFEVariableCoupleableMatrixTags (std::set< TagID > &mtags, THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableMatrixTags (THREAD_ID tid) override
 
virtual void clearActiveScalarVariableCoupleableVectorTags (THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableVectorTags (std::set< TagID > &vtags, THREAD_ID tid) override
 
virtual void setActiveScalarVariableCoupleableMatrixTags (std::set< TagID > &mtags, THREAD_ID tid) override
 
virtual void setActiveMaterialProperties (const std::set< unsigned int > &mat_prop_ids, THREAD_ID tid) override
 Record and set the material properties required by the current computing thread. More...
 
virtual void clearActiveMaterialProperties (THREAD_ID tid) override
 Clear the active material properties. More...
 
virtual void createQRules (QuadratureType type, Order order, Order volume_order=INVALID_ORDER, Order face_order=INVALID_ORDER)
 
unsigned int getMaxQps () const
 
unsigned int getMaxShapeFunctions () const
 
Order getMaxScalarOrder () const
 
void checkNonlocalCoupling ()
 
void checkUserObjectJacobianRequirement (THREAD_ID tid)
 
void setVariableAllDoFMap (const std::vector< MooseVariableFEBase *> moose_vars)
 
const std::vector< MooseVariableFEBase * > & getUserObjectJacobianVariables (THREAD_ID tid) const
 
virtual Assemblyassembly (THREAD_ID tid) override
 
virtual std::vector< VariableName > getVariableNames ()
 Returns a list of all the variables in the problem (both from the NL and Aux systems. More...
 
virtual void addExtraVectors ()
 A place to add extra vectors to the simulation. More...
 
virtual void prepare (const Elem *elem, THREAD_ID tid) override
 
virtual void prepare (const Elem *elem, unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &dof_indices, THREAD_ID tid) override
 
virtual void prepareFace (const Elem *elem, THREAD_ID tid) override
 
virtual void setCurrentSubdomainID (const Elem *elem, THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, unsigned int side, THREAD_ID tid) override
 
virtual void setNeighborSubdomainID (const Elem *elem, THREAD_ID tid)
 
virtual void prepareAssembly (THREAD_ID tid) override
 
virtual void addGhostedElem (dof_id_type elem_id) override
 Will make sure that all dofs connected to elem_id are ghosted to this processor. More...
 
virtual void addGhostedBoundary (BoundaryID boundary_id) override
 Will make sure that all necessary elements from boundary_id are ghosted to this processor. More...
 
virtual void ghostGhostedBoundaries () override
 Causes the boundaries added using addGhostedBoundary to actually be ghosted. More...
 
virtual void sizeZeroes (unsigned int size, THREAD_ID tid)
 
virtual bool reinitDirac (const Elem *elem, THREAD_ID tid) override
 Returns true if the Problem has Dirac kernels it needs to compute on elem. More...
 
virtual void reinitElem (const Elem *elem, THREAD_ID tid) override
 
virtual void reinitElemPhys (const Elem *elem, const std::vector< Point > &phys_points_in_elem, THREAD_ID tid, bool suppress_displaced_init=false) override
 
virtual void reinitElemFace (const Elem *elem, unsigned int side, BoundaryID bnd_id, THREAD_ID tid) override
 
virtual void reinitNode (const Node *node, THREAD_ID tid) override
 
virtual void reinitNodeFace (const Node *node, BoundaryID bnd_id, THREAD_ID tid) override
 
virtual void reinitNodes (const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
 
virtual void reinitNodesNeighbor (const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
 
virtual void reinitNeighbor (const Elem *elem, unsigned int side, THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, THREAD_ID tid) override
 
virtual void reinitNeighborPhys (const Elem *neighbor, const std::vector< Point > &physical_points, THREAD_ID tid) override
 
virtual void reinitScalars (THREAD_ID tid) override
 
virtual void reinitOffDiagScalars (THREAD_ID tid) override
 
virtual void getDiracElements (std::set< const Elem *> &elems) override
 Fills "elems" with the elements that should be looped over for Dirac Kernels. More...
 
virtual void clearDiracInfo () override
 Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in. More...
 
virtual void subdomainSetup (SubdomainID subdomain, THREAD_ID tid)
 
virtual void neighborSubdomainSetup (SubdomainID subdomain, THREAD_ID tid)
 
virtual void newAssemblyArray (NonlinearSystemBase &nl)
 
virtual void initNullSpaceVectors (const InputParameters &parameters, NonlinearSystemBase &nl)
 
virtual void init () override
 
const ConstElemRange & getEvaluableElementRange ()
 
virtual void setException (const std::string &message)
 Set an exception. More...
 
virtual bool hasException ()
 Whether or not an exception has occurred. More...
 
virtual void checkExceptionAndStopSolve ()
 Check to see if an exception has occurred on any processor and stop the solve. More...
 
virtual bool converged () override
 
virtual unsigned int nNonlinearIterations () const override
 
virtual unsigned int nLinearIterations () const override
 
virtual Real finalNonlinearResidual () const override
 
virtual bool computingInitialResidual () const override
 Returns true if the problem is in the process of computing it's initial residual. More...
 
virtual bool startedInitialSetup ()
 Returns true if we are in or beyond the initialSetup stage. More...
 
virtual void onTimestepBegin () override
 
virtual Real & time () const
 
virtual Real & timeOld () const
 
virtual int & timeStep () const
 
virtual Real & dt () const
 
virtual Real & dtOld () const
 
virtual void transient (bool trans)
 
virtual bool isTransient () const override
 
virtual void addTimeIntegrator (const std::string &type, const std::string &name, InputParameters parameters)
 
virtual void addPredictor (const std::string &type, const std::string &name, InputParameters parameters)
 
virtual void copySolutionsBackwards ()
 
virtual void restoreSolutions ()
 
virtual void saveOldSolutions ()
 Allocate vectors and save old solutions into them. More...
 
virtual void restoreOldSolutions ()
 Restore old solutions from the backup vectors and deallocate them. More...
 
virtual void postExecute ()
 Method called at the end of the simulation. More...
 
void forceOutput ()
 Indicates that the next call to outputStep should be forced. More...
 
void initPetscOutput ()
 Reinitialize petsc output for proper linear/nonlinear iteration display. More...
 
Moose::PetscSupport::PetscOptionsgetPetscOptions ()
 Retrieve a writable reference the PETSc options (used by PetscSupport) More...
 
virtual bool hasFunction (const std::string &name, THREAD_ID tid=0)
 
virtual FunctiongetFunction (const std::string &name, THREAD_ID tid=0)
 
virtual void lineSearch ()
 execute MOOSE line search More...
 
std::shared_ptr< LineSearchgetLineSearch ()
 getter for the MOOSE line search More...
 
virtual void addDistribution (std::string type, const std::string &name, InputParameters parameters)
 The following functions will enable MOOSE to have the capability to import distributions. More...
 
virtual DistributiongetDistribution (const std::string &name)
 
virtual void addSampler (std::string type, const std::string &name, InputParameters parameters)
 The following functions will enable MOOSE to have the capability to import Samplers. More...
 
virtual SamplergetSampler (const std::string &name, THREAD_ID tid=0)
 
NonlinearSystemBasegetNonlinearSystemBase ()
 
const NonlinearSystemBasegetNonlinearSystemBase () const
 
virtual NonlinearSystemgetNonlinearSystem ()
 
virtual void setInputParametersFEProblem (InputParameters &parameters)
 
AuxiliarySystemgetAuxiliarySystem ()
 
void projectSolution ()
 
virtual void addADResidualMaterial (const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void addADJacobianMaterial (const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void addMaterialHelper (std::vector< MaterialWarehouse *> warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)
 
virtual void prepareMaterials (SubdomainID blk_id, THREAD_ID tid)
 Add the MooseVariables that the current materials depend on to the dependency list. More...
 
virtual void reinitMaterials (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsFace (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsNeighbor (SubdomainID blk_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void reinitMaterialsBoundary (BoundaryID boundary_id, THREAD_ID tid, bool swap_stateful=true)
 
virtual void swapBackMaterials (THREAD_ID tid)
 
virtual void swapBackMaterialsFace (THREAD_ID tid)
 
virtual void swapBackMaterialsNeighbor (THREAD_ID tid)
 
virtual void addPostprocessor (std::string pp_name, const std::string &name, InputParameters parameters)
 
virtual void addVectorPostprocessor (std::string pp_name, const std::string &name, InputParameters parameters)
 
void initPostprocessorData (const std::string &name)
 Initializes the postprocessor data. More...
 
void initVectorPostprocessorData (const std::string &name)
 Initialize the VectorPostprocessor data. More...
 
virtual void addUserObject (std::string user_object_name, const std::string &name, InputParameters parameters)
 
const ExecuteMooseObjectWarehouse< UserObject > & getUserObjects () const
 
template<class T >
T & getUserObject (const std::string &name, unsigned int tid=0) const
 Get the user object by its name. More...
 
const UserObjectgetUserObjectBase (const std::string &name) const
 Get the user object by its name. More...
 
bool hasUserObject (const std::string &name) const
 Check if there if a user object of given name. More...
 
bool hasPostprocessor (const std::string &name)
 Check existence of the postprocessor. More...
 
PostprocessorValuegetPostprocessorValue (const PostprocessorName &name)
 Get a reference to the value associated with the postprocessor. More...
 
PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 Get the reference to the old value of a post-processor. More...
 
PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 Get the reference to the older value of a post-processor. More...
 
bool hasVectorPostprocessor (const std::string &name)
 Check existence of the VectorPostprocessor. More...
 
VectorPostprocessorValuegetVectorPostprocessorValue (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
VectorPostprocessorValuegetVectorPostprocessorValue (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Get a reference to the value associated with the VectorPostprocessor. More...
 
VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Get the reference to the old value of a post-processor. More...
 
ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const VectorPostprocessorName &vpp_name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const VectorPostprocessorName &vpp_name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
VectorPostprocessorValuedeclareVectorPostprocessorVector (const VectorPostprocessorName &name, const std::string &vector_name, bool contains_complete_history, bool is_broadcast)
 Declare a new VectorPostprocessor vector. More...
 
bool vectorPostprocessorHasVectors (const std::string &vpp_name)
 Whether or not the specified VectorPostprocessor has declared any vectors. More...
 
const std::vector< std::pair< std::string, VectorPostprocessorData::VectorPostprocessorState > > & getVectorPostprocessorVectors (const std::string &vpp_name)
 Get the vectors for a specific VectorPostprocessor. More...
 
virtual void addDamper (std::string damper_name, const std::string &name, InputParameters parameters)
 
void setupDampers ()
 
bool hasDampers ()
 Whether or not this system has dampers. More...
 
void addIndicator (std::string indicator_name, const std::string &name, InputParameters parameters)
 
virtual void addMarker (std::string marker_name, const std::string &name, InputParameters parameters)
 
virtual void addMultiApp (const std::string &multi_app_name, const std::string &name, InputParameters parameters)
 Add a MultiApp to the problem. More...
 
std::shared_ptr< MultiAppgetMultiApp (const std::string &multi_app_name) const
 Get a MultiApp object by name. More...
 
std::vector< std::shared_ptr< Transfer > > getTransfers (ExecFlagType type, MultiAppTransfer::DIRECTION direction) const
 Get Transfers by ExecFlagType and direction. More...
 
void execMultiAppTransfers (ExecFlagType type, MultiAppTransfer::DIRECTION direction)
 Execute MultiAppTransfers associate with execution flag and direction. More...
 
bool execMultiApps (ExecFlagType type, bool auto_advance=true)
 Execute the MultiApps associated with the ExecFlagType. More...
 
void finalizeMultiApps ()
 
void incrementMultiAppTStep (ExecFlagType type)
 Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType. More...
 
void advanceMultiApps (ExecFlagType type)
 Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep depending on your purpose. More...
 
void finishMultiAppStep (ExecFlagType type)
 Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType. More...
 
void backupMultiApps (ExecFlagType type)
 Backup the MultiApps associated with the ExecFlagType. More...
 
void restoreMultiApps (ExecFlagType type, bool force=false)
 Restore the MultiApps associated with the ExecFlagType. More...
 
Real computeMultiAppsDT (ExecFlagType type)
 Find the smallest timestep over all MultiApps. More...
 
virtual void addTransfer (const std::string &transfer_name, const std::string &name, InputParameters parameters)
 Add a Transfer to the problem. More...
 
void execTransfers (ExecFlagType type)
 Execute the Transfers associated with the ExecFlagType. More...
 
void computeTransientImplicitResidual (Real time, const NumericVector< Number > &u, const NumericVector< Number > &udot, const NumericVector< Number > &udotdot, NumericVector< Number > &residual)
 Evaluates transient residual G in canonical semidiscrete form G(t,U,Udot,Udotdot) = F(t,U) More...
 
void computeTransientImplicitJacobian (Real time, const NumericVector< Number > &u, const NumericVector< Number > &udot, const NumericVector< Number > &udotdot, Real duDotDu_shift, Real duDotDotDu_shift, SparseMatrix< Number > &jacobian)
 Evaluates transient Jacobian J_a = dG/dU + a*dG/dUdot from canonical semidiscrete form G(t,U,Udot) = F(t,U) More...
 
virtual Real computeResidualL2Norm ()
 Computes the residual using whatever is sitting in the current solution vector then returns the L2 norm. More...
 
virtual void computeResidualSys (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
void computeResidual (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
 This function is called by Libmesh to form a residual. More...
 
virtual void computeResidual (const NumericVector< Number > &soln, NumericVector< Number > &residual)
 Form a residual with default tags (nontime, time, residual). More...
 
virtual void computeResidualTag (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag. More...
 
virtual void computeResidualType (const NumericVector< Number > &soln, NumericVector< Number > &residual, TagID tag)
 Form a residual vector for a given tag and "residual" tag. More...
 
virtual void computeResidualInternal (const NumericVector< Number > &soln, NumericVector< Number > &residual, const std::set< TagID > &tags)
 Form a residual vector for a set of tags. More...
 
virtual void computeResidualTags (const std::set< TagID > &tags)
 Form multiple residual vectors and each is associated with one tag. More...
 
virtual void computeJacobianSys (NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
 Form a Jacobian matrix. More...
 
virtual void computeJacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
 Form a Jacobian matrix with the default tag (system). More...
 
virtual void computeJacobianTag (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, TagID tag)
 Form a Jacobian matrix for a given tag. More...
 
virtual void computeJacobianInternal (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
 Form a Jacobian matrix for multiple tags. More...
 
virtual void computeJacobianTags (const std::set< TagID > &tags)
 Form multiple matrices, and each is associated with a tag. More...
 
virtual void computeJacobianBlocks (std::vector< JacobianBlock *> &blocks)
 Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices. More...
 
virtual void computeJacobianBlock (SparseMatrix< Number > &jacobian, libMesh::System &precond_system, unsigned int ivar, unsigned int jvar)
 Really not a good idea to use this. More...
 
virtual Real computeDamping (const NumericVector< Number > &soln, const NumericVector< Number > &update)
 
virtual bool shouldUpdateSolution ()
 Check to see whether the problem should update the solution. More...
 
virtual bool updateSolution (NumericVector< Number > &vec_solution, NumericVector< Number > &ghosted_solution)
 Update the solution. More...
 
virtual void predictorCleanup (NumericVector< Number > &ghosted_solution)
 Perform cleanup tasks after application of predictor to solution vector. More...
 
virtual void computeBounds (NonlinearImplicitSystem &sys, NumericVector< Number > &lower, NumericVector< Number > &upper)
 
virtual void computeNearNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computeTransposeNullSpace (NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > *> &sp)
 
virtual void computePostCheck (NonlinearImplicitSystem &sys, const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
 
virtual void computeIndicatorsAndMarkers ()
 
virtual void addResidual (THREAD_ID tid) override
 
virtual void addResidualNeighbor (THREAD_ID tid) override
 
virtual void addResidualScalar (THREAD_ID tid=0)
 
virtual void cacheResidual (THREAD_ID tid) override
 
virtual void cacheResidualNeighbor (THREAD_ID tid) override
 
virtual void addCachedResidual (THREAD_ID tid) override
 
virtual void addCachedResidualDirectly (NumericVector< Number > &residual, THREAD_ID tid)
 Allows for all the residual contributions that are currently cached to be added directly into the vector passed in. More...
 
virtual void setResidual (NumericVector< Number > &residual, THREAD_ID tid) override
 
virtual void setResidualNeighbor (NumericVector< Number > &residual, THREAD_ID tid) override
 
virtual void addJacobian (THREAD_ID tid) override
 
virtual void addJacobianNeighbor (THREAD_ID tid) override
 
virtual void addJacobianNeighbor (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, THREAD_ID tid) override
 
virtual void addJacobianBlock (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, THREAD_ID tid) override
 
virtual void addJacobianScalar (THREAD_ID tid=0)
 
virtual void addJacobianOffDiagScalar (unsigned int ivar, THREAD_ID tid=0)
 
virtual void cacheJacobian (THREAD_ID tid) override
 
virtual void cacheJacobianNeighbor (THREAD_ID tid) override
 
virtual void addCachedJacobian (THREAD_ID tid) override
 
virtual void prepareShapes (unsigned int var, THREAD_ID tid) override
 
virtual void prepareFaceShapes (unsigned int var, THREAD_ID tid) override
 
virtual void prepareNeighborShapes (unsigned int var, THREAD_ID tid) override
 
virtual void addDisplacedProblem (std::shared_ptr< DisplacedProblem > displaced_problem)
 
virtual std::shared_ptr< DisplacedProblemgetDisplacedProblem ()
 
virtual void updateGeomSearch (GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
 
virtual void possiblyRebuildGeomSearchPatches ()
 
virtual GeometricSearchDatageomSearchData () override
 
void setRestartFile (const std::string &file_name)
 Communicate to the Resurector the name of the restart filer. More...
 
const InitialConditionWarehousegetInitialConditionWarehouse () const
 Return InitialCondition storage. More...
 
SolverParamssolverParams ()
 Get the solver parameters. More...
 
Adaptivityadaptivity ()
 
virtual void initialAdaptMesh ()
 
unsigned int getNumCyclesCompleted ()
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
bool hasInitialAdaptivity () const
 Return a Boolean indicating whether initial AMR is turned on. More...
 
void initXFEM (std::shared_ptr< XFEMInterface > xfem)
 Create XFEM controller object. More...
 
std::shared_ptr< XFEMInterfacegetXFEM ()
 Get a pointer to the XFEM controller object. More...
 
bool haveXFEM ()
 Find out whether the current analysis is using XFEM. More...
 
virtual bool updateMeshXFEM ()
 Update the mesh due to changing XFEM cuts. More...
 
virtual void meshChanged () override
 Update data after a mesh change. More...
 
void notifyWhenMeshChanges (MeshChangedInterface *mci)
 Register an object that derives from MeshChangedInterface to be notified when the mesh changes. More...
 
virtual void checkProblemIntegrity ()
 Method called to perform a series of sanity checks before a simulation is run. More...
 
void serializeSolution ()
 
void registerRandomInterface (RandomInterface &random_interface, const std::string &name)
 
void setConstJacobian (bool state)
 Set flag that Jacobian is constant (for optimization purposes) More...
 
void setKernelCoverageCheck (bool flag)
 Set flag to indicate whether kernel coverage checks should be performed. More...
 
void setMaterialCoverageCheck (bool flag)
 Set flag to indicate whether material coverage checks should be performed. More...
 
void setParallelBarrierMessaging (bool flag)
 Toggle parallel barrier messaging (defaults to on). More...
 
void parentOutputPositionChanged ()
 Calls parentOutputPositionChanged() on all sub apps. More...
 
unsigned int subspaceDim (const std::string &prefix) const
 Dimension of the subspace spanned by vectors with a given prefix. More...
 
const MaterialWarehousegetMaterialWarehouse () const
 
const MaterialWarehousegetResidualMaterialsWarehouse () const
 
const MaterialWarehousegetJacobianMaterialsWarehouse () const
 
const MaterialWarehousegetDiscreteMaterialWarehouse () const
 
std::shared_ptr< MaterialgetMaterial (std::string name, Moose::MaterialDataType type, THREAD_ID tid=0, bool no_warn=false)
 Return a pointer to a Material object. More...
 
std::shared_ptr< MaterialDatagetMaterialData (Moose::MaterialDataType type, THREAD_ID tid=0)
 
bool errorOnJacobianNonzeroReallocation () const
 Will return True if the user wants to get an error when a nonzero is reallocated in the Jacobian by PETSc. More...
 
void setErrorOnJacobianNonzeroReallocation (bool state)
 
bool ignoreZerosInJacobian () const
 
void setIgnoreZerosInJacobian (bool state)
 
bool hasTimeIntegrator () const
 Returns whether or not this Problem has a TimeIntegrator. More...
 
virtual void computeUserObjects (const ExecFlagType &type, const Moose::AuxGroup &group)
 Call compute methods on UserObjects. More...
 
virtual void computeAuxiliaryKernels (const ExecFlagType &type)
 Call compute methods on AuxKernels. More...
 
void needsPreviousNewtonIteration (bool state)
 Set a flag that indicated that user required values for the previous Newton iterate. More...
 
bool needsPreviousNewtonIteration () const
 Check to see whether we need to compute the variable values of the previous Newton iterate. More...
 
bool skipAdditionalRestartData () const
 Whether or not to skip loading the additional data when restarting. More...
 
ExecuteMooseObjectWarehouse< Control > & getControlWarehouse ()
 Reference to the control logic warehouse. More...
 
void executeControls (const ExecFlagType &exec_type)
 Performs setup and execute calls for Control objects. More...
 
void executeSamplers (const ExecFlagType &exec_type)
 Performs setup and execute calls for Sampler objects. More...
 
void reportMooseObjectDependency (MooseObject *a, MooseObject *b)
 Register a MOOSE object dependency so we can either order operations properly or report when we cannot. More...
 
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse ()
 
const VectorPostprocessorDatagetVectorPostprocessorData () const
 
bool hasJacobian () const
 Returns _has_jacobian. More...
 
bool constJacobian () const
 Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the previous time it was computed) More...
 
void addOutput (const std::string &, const std::string &, InputParameters)
 Adds an Output object. More...
 
TheWarehousetheWarehouse () const
 
void setSNESMFReuseBase (bool reuse, bool set_by_user)
 If or not to reuse the base vector for matrix-free calculation. More...
 
bool useSNESMFReuseBase ()
 Return a flag that indicates if we are reusing the vector base. More...
 
bool isSNESMFReuseBaseSetbyUser ()
 Return a flag to indicate if _snesmf_reuse_base is set by users. More...
 
void usingADMatProps (bool using_ad_mat_props)
 Set the global automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property. More...
 
bool usingADMatProps () const
 Whether any object has requested/supplied an AD material property. More...
 
virtual void setUDotRequested (const bool u_dot_requested)
 Set boolean flag to true to store solution time derivative. More...
 
virtual void setUDotDotRequested (const bool u_dotdot_requested)
 Set boolean flag to true to store solution second time derivative. More...
 
virtual void setUDotOldRequested (const bool u_dot_old_requested)
 Set boolean flag to true to store old solution time derivative. More...
 
virtual void setUDotDotOldRequested (const bool u_dotdot_old_requested)
 Set boolean flag to true to store old solution second time derivative. More...
 
virtual bool uDotRequested ()
 Get boolean flag to check whether solution time derivative needs to be stored. More...
 
virtual bool uDotDotRequested ()
 Get boolean flag to check whether solution second time derivative needs to be stored. More...
 
virtual bool uDotOldRequested ()
 Get boolean flag to check whether old solution time derivative needs to be stored. More...
 
virtual bool uDotDotOldRequested ()
 Get boolean flag to check whether old solution second time derivative needs to be stored. More...
 
void haveADObjects (bool have_ad_objects) override
 Method for setting whether we have any ad objects. More...
 
virtual void haveADObjects (bool have_ad_objects)
 Method for setting whether we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
bool haveADObjects () const
 Method for reading wehther we have any ad objects. More...
 
virtual bool checkNonlocalCouplingRequirement ()
 
virtual TagID addVectorTag (TagName tag_name)
 Create a Tag. More...
 
virtual TagID getVectorTagID (const TagName &tag_name)
 Get a TagID from a TagName. More...
 
virtual TagName vectorTagName (TagID tag)
 Retrieve the name associated with a TagID. More...
 
virtual std::map< TagName, TagID > & getVectorTags ()
 Return all vector tags, where a tag is represented by a map from name to ID. More...
 
virtual bool vectorTagExists (TagID tag)
 Check to see if a particular Tag exists. More...
 
bool vectorTagExists (const TagName &tag_name)
 Check to see if a particular Tag exists by using Tag name. More...
 
virtual unsigned int numVectorTags ()
 The total number of tags. More...
 
virtual TagID addMatrixTag (TagName tag_name)
 Create a Tag. More...
 
virtual TagID getMatrixTagID (const TagName &tag_name)
 Get a TagID from a TagName. More...
 
virtual TagName matrixTagName (TagID tag)
 Retrieve the name associated with a TagID. More...
 
virtual bool matrixTagExists (const TagName &tag_name)
 Check to see if a particular Tag exists. More...
 
virtual bool matrixTagExists (TagID tag_id)
 Check to see if a particular Tag exists. More...
 
virtual unsigned int numMatrixTags ()
 The total number of tags. More...
 
virtual std::map< TagName, TagID > & getMatrixTags ()
 Return all matrix tags in the sytem, where a tag is represented by a map from name to ID. More...
 
virtual const std::set< MooseVariableFEBase * > & getActiveElementalMooseVariables (THREAD_ID tid) const
 Get the MOOSE variables to be reinited on each element. More...
 
virtual bool hasActiveElementalMooseVariables (THREAD_ID tid) const
 Whether or not a list of active elemental moose variables has been set. More...
 
virtual const std::set< unsigned int > & getActiveMaterialProperties (THREAD_ID tid) const
 Get the material properties required by the current computing thread. More...
 
virtual bool hasActiveMaterialProperties (THREAD_ID tid) const
 Method to check whether or not a list of active material roperties has been set. More...
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation. More...
 
virtual DiracKernelInfodiracKernelInfo ()
 
virtual void storeSubdomainMatPropName (SubdomainID block_id, const std::string &name)
 Adds the given material property to a storage map based on block ids. More...
 
virtual void storeBoundaryMatPropName (BoundaryID boundary_id, const std::string &name)
 Adds the given material property to a storage map based on boundary ids. More...
 
virtual void storeSubdomainZeroMatProp (SubdomainID block_id, const MaterialPropertyName &name)
 Adds to a map based on block ids of material properties for which a zero value can be returned. More...
 
virtual void storeBoundaryZeroMatProp (BoundaryID boundary_id, const MaterialPropertyName &name)
 Adds to a map based on boundary ids of material properties for which a zero value can be returned. More...
 
virtual void storeSubdomainDelayedCheckMatProp (const std::string &requestor, SubdomainID block_id, const std::string &name)
 Adds to a map based on block ids of material properties to validate. More...
 
virtual void storeBoundaryDelayedCheckMatProp (const std::string &requestor, BoundaryID boundary_id, const std::string &name)
 Adds to a map based on boundary ids of material properties to validate. More...
 
virtual void checkBlockMatProps ()
 Checks block material properties integrity. More...
 
virtual void checkBoundaryMatProps ()
 Checks boundary material properties integrity. More...
 
virtual void markMatPropRequested (const std::string &)
 Helper method for adding a material property name to the _material_property_requested set. More...
 
virtual bool isMatPropRequested (const std::string &prop_name) const
 Find out if a material property has been requested by any object. More...
 
virtual std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBlockMaterialProperty (SubdomainID block_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &prop_name)
 Get a vector containing the block ids the material property is defined on. More...
 
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &prop_name)
 Get a vector of block id equivalences that the material property is defined on. More...
 
virtual bool hasBoundaryMaterialProperty (BoundaryID boundary_id, const std::string &prop_name)
 Check if a material property is defined on a block. More...
 
virtual std::set< dof_id_type > & ghostedElems ()
 Return the list of elements that should have their DoFs ghosted to this processor. More...
 
const CouplingMatrix & nonlocalCouplingMatrix () const
 
virtual const bool & currentlyComputingJacobian () const
 Returns true if the problem is in the process of computing Jacobian. More...
 
virtual void setCurrentlyComputingJacobian (const bool &flag)
 
bool & computingNonlinearResid ()
 Check whether residual being evaulated is non-linear. More...
 
bool safeAccessTaggedMatrices ()
 Is it safe to access the tagged matrices. More...
 
bool safeAccessTaggedVectors ()
 Is it safe to access the tagged vectors. More...
 
std::set< TagID > & getActiveScalarVariableCoupleableVectorTags (THREAD_ID tid)
 
std::set< TagID > & getActiveScalarVariableCoupleableMatrixTags (THREAD_ID tid)
 
std::set< TagID > & getActiveFEVariableCoupleableVectorTags (THREAD_ID tid)
 
std::set< TagID > & getActiveFEVariableCoupleableMatrixTags (THREAD_ID tid)
 
void _setCLIOption ()
 For Internal Use. More...
 
virtual void terminateSolve ()
 Allow objects to request clean termination of the solve. More...
 
virtual bool isSolveTerminationRequested ()
 Check of termination has been requested. More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void allowOutput (bool state)
 Ability to enable/disable all output calls. More...
 
template<typename T >
void allowOutput (bool state)
 
bool hasMultiApps () const
 Returns whether or not the current simulation has any multiapps. More...
 
bool hasMultiApps (ExecFlagType type) const
 
bool hasMultiApp (const std::string &name) const
 
const MaterialPropertyStoragegetMaterialPropertyStorage ()
 Return a reference to the material property storage. More...
 
const MaterialPropertyStoragegetBndMaterialPropertyStorage ()
 
const MaterialPropertyStoragegetNeighborMaterialPropertyStorage ()
 
const MooseObjectWarehouse< Indicator > & getIndicatorWarehouse ()
 Return indicator/marker storage. More...
 
const MooseObjectWarehouse< InternalSideIndicator > & getInternalSideIndicatorWarehouse ()
 
const MooseObjectWarehouse< Marker > & getMarkerWarehouse ()
 
bool needBoundaryMaterialOnSide (BoundaryID bnd_id, THREAD_ID tid)
 These methods are used to determine whether stateful material properties need to be stored on internal sides. More...
 
bool needSubdomainMaterialOnSide (SubdomainID subdomain_id, THREAD_ID tid)
 
const ExecFlagTypegetCurrentExecuteOnFlag () const
 Return/set the current execution flag. More...
 
void setCurrentExecuteOnFlag (const ExecFlagType &)
 

Public Attributes

std::map< std::string, std::vector< dof_id_type > > _var_dof_map
 
const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 
std::vector< Real > _real_zero
 Convenience zeros. More...
 
std::vector< VariableValue_scalar_zero
 
std::vector< VariableValue_zero
 
std::vector< MooseArray< DualReal > > _ad_zero
 
std::vector< VariableGradient_grad_zero
 
std::vector< MooseArray< DualRealVectorValue > > _ad_grad_zero
 
std::vector< VariableSecond_second_zero
 
std::vector< MooseArray< DualRealTensorValue > > _ad_second_zero
 
std::vector< VariablePhiSecond_second_phi_zero
 
std::vector< Point > _point_zero
 
std::vector< VectorVariableValue_vector_zero
 
std::vector< VectorVariableCurl_vector_curl_zero
 

Protected Member Functions

void dumpObjectHelper (const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
 
void dumpVariableHelper (const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)
 
std::string deduceNecessaryParameters (const std::string &type, const InputParameters &parameters)
 build a text snippet of the minimal set of parameters that need to be specified More...
 
std::map< std::string, std::string > stringifyParameters (const InputParameters &parameters)
 create a string map form parameter names to stringified parameter values More...
 
void createTagVectors ()
 Create extra tagged vectors and matrices. More...
 
void meshChangedHelper (bool intermediate_change=false)
 Helper method to update some or all data after a mesh change. More...
 
bool duplicateVariableCheck (const std::string &var_name, const FEType &type, bool is_aux)
 Helper to check for duplicate variable names across systems or within a single system. More...
 
void checkDisplacementOrders ()
 Verify that SECOND order mesh uses SECOND order displacements. More...
 
void checkUserObjects ()
 
void checkDependMaterialsHelper (const std::map< SubdomainID, std::vector< std::shared_ptr< Material >>> &materials_map)
 Helper method for checking Material object dependency. More...
 
void checkCoordinateSystems ()
 Verify that there are no element type/coordinate type conflicts. More...
 
void reinitBecauseOfGhostingOrNewGeomObjects ()
 Call when it is possible that the needs for ghosted elements has changed. More...
 
MooseVariableFEBasegetVariableHelper (THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, SystemBase &nl, SystemBase &aux)
 Helper function called by getVariable that handles the logic for checking whether Variables of the requested type are available. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 

Protected Attributes

std::map< std::string, std::map< std::string, std::string > > _generated_syntax
 store input syntax to build objects generated by a specific action More...
 
std::shared_ptr< DumpObjectsNonlinearSystem_nl_sys
 
MooseMesh_mesh
 
EquationSystems _eq
 
bool _initialized
 
std::set< TagID_fe_vector_tags
 
std::set< TagID_fe_matrix_tags
 
bool _solve
 Whether or not to actually solve the nonlinear system. More...
 
bool _transient
 
Real & _time
 
Real & _time_old
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
std::shared_ptr< NonlinearSystemBase_nl
 
std::shared_ptr< AuxiliarySystem_aux
 
Moose::CouplingType _coupling
 Type of variable coupling. More...
 
std::unique_ptr< CouplingMatrix > _cm
 Coupling matrix for variables. More...
 
std::map< std::string, unsigned int > _subspace_dim
 
std::vector< std::unique_ptr< Assembly > > _assembly
 
MooseObjectWarehouse< Function_functions
 functions More...
 
MooseObjectWarehouseBase< Distribution_distributions
 distributions More...
 
ExecuteMooseObjectWarehouse< Sampler_samplers
 Samplers. More...
 
MooseObjectWarehouse< KernelBase_nonlocal_kernels
 nonlocal kernels More...
 
MooseObjectWarehouse< IntegratedBCBase_nonlocal_integrated_bcs
 nonlocal integrated_bcs More...
 
MaterialPropertyStorage_material_props
 
MaterialPropertyStorage_bnd_material_props
 
MaterialPropertyStorage_neighbor_material_props
 
std::vector< std::shared_ptr< MaterialData > > _material_data
 
std::vector< std::shared_ptr< MaterialData > > _bnd_material_data
 
std::vector< std::shared_ptr< MaterialData > > _neighbor_material_data
 
MooseObjectWarehouse< Marker_markers
 
PostprocessorData _pps_data
 
VectorPostprocessorData _vpps_data
 
ExecuteMooseObjectWarehouse< UserObject_all_user_objects
 
ExecuteMooseObjectWarehouse< MultiApp_multi_apps
 MultiApp Warehouse. More...
 
ExecuteMooseObjectWarehouse< TransientMultiApp_transient_multi_apps
 Storage for TransientMultiApps (only needed for calling 'computeDT') More...
 
ExecuteMooseObjectWarehouse< Transfer_transfers
 Normal Transfers. More...
 
ExecuteMooseObjectWarehouse< Transfer_to_multi_app_transfers
 Transfers executed just before MultiApps to transfer data to them. More...
 
ExecuteMooseObjectWarehouse< Transfer_from_multi_app_transfers
 Transfers executed just after MultiApps to transfer data from them. More...
 
std::map< std::string, std::unique_ptr< RandomData > > _random_data_objects
 A map of objects that consume random numbers. More...
 
std::vector< std::unordered_map< SubdomainID, bool > > _block_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< std::unordered_map< BoundaryID, bool > > _bnd_mat_side_cache
 Cache for calculating materials on side. More...
 
std::vector< MeshChangedInterface * > _notify_when_mesh_changes
 Objects to be notified when the mesh changes. More...
 
Adaptivity _adaptivity
 
unsigned int _cycles_completed
 
std::shared_ptr< XFEMInterface_xfem
 Pointer to XFEM controller. More...
 
MooseMesh_displaced_mesh
 
std::shared_ptr< DisplacedProblem_displaced_problem
 
GeometricSearchData _geometric_search_data
 
bool _reinit_displaced_elem
 
bool _reinit_displaced_face
 
bool _input_file_saved
 whether input file has been written More...
 
bool _has_dampers
 Whether or not this system has any Dampers associated with it. More...
 
bool _has_constraints
 Whether or not this system has any Constraints. More...
 
bool _snesmf_reuse_base
 If or not to resuse the base vector for matrix-free calculation. More...
 
bool _snesmf_reuse_base_set_by_user
 If or not _snesmf_reuse_base is set by user. More...
 
bool _has_initialized_stateful
 Whether nor not stateful materials have been initialized. More...
 
std::unique_ptr< Resurrector_resurrector
 Object responsible for restart (read/write) More...
 
bool _const_jacobian
 true if the Jacobian is constant More...
 
bool _has_jacobian
 Indicates if the Jacobian was computed. More...
 
bool _needs_old_newton_iter
 Indicates that we need to compute variable values for previous Newton iteration. More...
 
bool _has_nonlocal_coupling
 Indicates if nonlocal coupling is required/exists. More...
 
bool _calculate_jacobian_in_uo
 
std::vector< std::vector< MooseVariableFEBase * > > _uo_jacobian_moose_vars
 
SolverParams _solver_params
 
bool _kernel_coverage_check
 Determines whether a check to verify an active kernel on every subdomain. More...
 
bool _material_coverage_check
 Determines whether a check to verify an active material on every subdomain. More...
 
unsigned int _max_qps
 Maximum number of quadrature points used in the problem. More...
 
unsigned int _max_shape_funcs
 Maximum number of shape functions on any element in the problem. More...
 
Order _max_scalar_order
 Maximum scalar variable order. More...
 
bool _has_time_integrator
 Indicates whether or not this executioner has a time integrator (during setup) More...
 
bool _has_exception
 Whether or not an exception has occurred. More...
 
bool _parallel_barrier_messaging
 Whether or not information about how many transfers have completed is printed. More...
 
std::string _exception_message
 The error message to go with an exception. More...
 
ExecFlagType _current_execute_on_flag
 Current execute_on flag. More...
 
ExecuteMooseObjectWarehouse< Control_control_warehouse
 The control logic warehouse. More...
 
Moose::PetscSupport::PetscOptions _petsc_options
 PETSc option storage. More...
 
std::shared_ptr< LineSearch_line_search
 
std::unique_ptr< ConstElemRange > _evaluable_local_elem_range
 
bool _using_ad_mat_props
 Automatic differentiaion (AD) flag which indicates whether any consumer has requested an AD material property or whether any suppier has declared an AD material property. More...
 
std::map< TagName, TagID_vector_tag_name_to_tag_id
 The currently declared tags. More...
 
std::map< TagID, TagName > _vector_tag_id_to_tag_name
 Reverse map. More...
 
std::map< TagName, TagID_matrix_tag_name_to_tag_id
 The currently declared tags. More...
 
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
 Reverse map. More...
 
Factory_factory
 The Factory for building objects. More...
 
CouplingMatrix _nonlocal_cm
 
std::map< SubdomainID, Moose::CoordinateSystemType_coord_sys
 nonlocal coupling matrix; More...
 
DiracKernelInfo _dirac_kernel_info
 
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
 Map of material properties (block_id -> list of properties) More...
 
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
 Map for boundary material properties (boundary_id -> list of properties) More...
 
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
 Set of properties returned as zero properties. More...
 
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
 
std::set< std::string > _material_property_requested
 set containing all material property names that have been requested by getMaterialProperty* More...
 
std::vector< std::set< MooseVariableFEBase * > > _active_elemental_moose_variables
 This is the set of MooseVariableFEBases that will actually get reinited by a call to reinit(elem) More...
 
std::vector< unsigned int > _has_active_elemental_moose_variables
 Whether or not there is currently a list of active elemental moose variables. More...
 
std::vector< std::set< unsigned int > > _active_material_property_ids
 Set of material property ids that determine whether materials get reinited. More...
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_fe_var_coupleable_vector_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_matrix_tags
 
std::vector< std::set< TagID > > _active_sc_var_coupleable_vector_tags
 
bool _requires_nonlocal_coupling
 nonlocal coupling requirement flag More...
 
std::set< dof_id_type > _ghosted_elems
 Elements that should have Dofs ghosted to the local processor. More...
 
unsigned int _rz_coord_axis
 Storage for RZ axis selection. More...
 
bool _currently_computing_jacobian
 Flag to determine whether the problem is currently computing Jacobian. More...
 
bool _computing_nonlinear_residual
 Whether residual being evaulated is non-linear. More...
 
bool _safe_access_tagged_matrices
 Is it safe to retrieve data from tagged matrices. More...
 
bool _safe_access_tagged_vectors
 Is it safe to retrieve data from tagged vectors. More...
 
bool _have_ad_objects
 AD flag indicating whether any AD objects have been added. More...
 
bool _cli_option_found
 True if the CLI option is found. More...
 
bool _color_output
 True if we're going to attempt to write color output. More...
 
bool _termination_requested
 True if termination of the solve has been requested. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 
InitialConditionWarehouse _ics
 
MooseObjectWarehouseBase< ScalarInitialCondition_scalar_ics
 
MaterialWarehouse _residual_materials
 
MaterialWarehouse _jacobian_materials
 
MaterialWarehouse _discrete_materials
 
MaterialWarehouse _all_materials
 
MooseObjectWarehouse< Indicator_indicators
 
MooseObjectWarehouse< InternalSideIndicator_internal_side_indicators
 
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
 Data structures of the requested material properties. More...
 
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
 

Detailed Description

Specialization of SubProblem for dumping generated objects as input file syntax.

Definition at line 24 of file DumpObjectsProblem.h.

Constructor & Destructor Documentation

◆ DumpObjectsProblem()

DumpObjectsProblem::DumpObjectsProblem ( const InputParameters parameters)

Definition at line 32 of file DumpObjectsProblem.C.

33  : FEProblemBase(parameters), _nl_sys(std::make_shared<DumpObjectsNonlinearSystem>(*this, "nl0"))
34 {
35  _nl = _nl_sys;
36  _aux = std::make_shared<AuxiliarySystem>(*this, "aux0");
38 
39  // Create extra vectors and matrices if any
41 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< DumpObjectsNonlinearSystem > _nl_sys
FEProblemBase(const InputParameters &parameters)
virtual void newAssemblyArray(NonlinearSystemBase &nl)
void createTagVectors()
Create extra tagged vectors and matrices.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux

Member Function Documentation

◆ _setCLIOption()

void Problem::_setCLIOption ( )
inlineinherited

For Internal Use.

Definition at line 36 of file Problem.h.

36 { _cli_option_found = true; }
bool _cli_option_found
True if the CLI option is found.
Definition: Problem.h:47

◆ adaptivity()

Adaptivity& FEProblemBase::adaptivity ( )
inlineinherited

Definition at line 1253 of file FEProblemBase.h.

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

1253 { return _adaptivity; }
Adaptivity _adaptivity

◆ adaptMesh()

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

Reimplemented from FEProblemBase.

Definition at line 99 of file DumpObjectsProblem.h.

99 { return false; }

◆ addADJacobianMaterial()

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

Definition at line 2366 of file FEProblemBase.C.

2369 {
2371 }
MaterialWarehouse _jacobian_materials
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addADResidualMaterial()

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

Definition at line 2358 of file FEProblemBase.C.

2361 {
2363 }
virtual void addMaterialHelper(std::vector< MaterialWarehouse *> warehouse, const std::string &kernel_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
MaterialWarehouse _residual_materials
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addAuxKernel()

void DumpObjectsProblem::addAuxKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 138 of file DumpObjectsProblem.C.

141 {
142  dumpObjectHelper("AuxKernels", type, name, parameters);
144 }
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addAuxScalarKernel()

void DumpObjectsProblem::addAuxScalarKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 147 of file DumpObjectsProblem.C.

150 {
151  dumpObjectHelper("AuxScalarKernels", type, name, parameters);
153 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
virtual void addAuxScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addAuxScalarVariable()

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

Reimplemented from FEProblemBase.

Definition at line 74 of file DumpObjectsProblem.C.

78 {
79  dumpVariableHelper("AuxVariables", var_name, SCALAR, order, 1.0, active_subdomains);
80  FEProblemBase::addScalarVariable(var_name, order, scale_factor, active_subdomains);
81 }
virtual void addScalarVariable(const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addAuxVariable()

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

Reimplemented from FEProblemBase.

Definition at line 65 of file DumpObjectsProblem.C.

68 {
69  dumpVariableHelper("AuxVariables", var_name, type.family, type.order, 1.0, active_subdomains);
70  FEProblemBase::addAuxVariable(var_name, type, active_subdomains);
71 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)
virtual void addAuxVariable(const std::string &var_name, const FEType &type, const std::set< SubdomainID > *const active_subdomains=NULL)

◆ addBoundaryCondition()

void DumpObjectsProblem::addBoundaryCondition ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 120 of file DumpObjectsProblem.C.

123 {
126 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters parameters)

◆ addCachedJacobian()

void FEProblemBase::addCachedJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1269 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::enforceNodalConstraintsJacobian(), and ComputeJacobianThread::postElement().

1270 {
1271  _assembly[tid]->addCachedJacobian();
1272  if (_displaced_problem)
1273  _displaced_problem->addCachedJacobian(tid);
1274 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addCachedResidual()

void FEProblemBase::addCachedResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1178 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal(), NonlinearSystemBase::constraintResiduals(), ComputeNodalKernelBcsThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeResidualThread::postElement().

1179 {
1180  _assembly[tid]->addCachedResiduals();
1181 
1182  if (_displaced_problem)
1183  _displaced_problem->addCachedResidual(tid);
1184 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addCachedResidualDirectly()

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

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

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

Definition at line 1187 of file FEProblemBase.C.

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

1188 {
1189  _assembly[tid]->addCachedResidual(residual, _nl->timeVectorTag());
1190  _assembly[tid]->addCachedResidual(residual, _nl->nonTimeVectorTag());
1191 
1192  if (_displaced_problem)
1193  _displaced_problem->addCachedResidualDirectly(residual, tid);
1194 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addConstraint()

void DumpObjectsProblem::addConstraint ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 129 of file DumpObjectsProblem.C.

132 {
133  dumpObjectHelper("Constraints", type, name, parameters);
135 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
virtual void addConstraint(const std::string &c_name, const std::string &name, InputParameters parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addDamper()

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

Definition at line 3341 of file FEProblemBase.C.

3344 {
3345  parameters.set<SubProblem *>("_subproblem") = this;
3346  parameters.set<SystemBase *>("_sys") = _nl.get();
3347 
3348  _has_dampers = true;
3349  _nl->addDamper(damper_name, name, parameters);
3350 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_dampers
Whether or not this system has any Dampers associated with it.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for a system (of equations)
Definition: SystemBase.h:93
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addDGKernel()

void DumpObjectsProblem::addDGKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 165 of file DumpObjectsProblem.C.

168 {
169  dumpObjectHelper("DGKernels", type, name, parameters);
171 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
virtual void addDGKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addDiracKernel()

void DumpObjectsProblem::addDiracKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 156 of file DumpObjectsProblem.C.

159 {
160  dumpObjectHelper("DiracKernels", type, name, parameters);
162 }
virtual void addDiracKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addDisplacedProblem()

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

Definition at line 4972 of file FEProblemBase.C.

4973 {
4974  _displaced_mesh = &displaced_problem->mesh();
4975  _displaced_problem = displaced_problem;
4976 }
std::shared_ptr< DisplacedProblem > _displaced_problem
MooseMesh * _displaced_mesh

◆ addDistribution()

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

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

Definition at line 1744 of file FEProblemBase.C.

1747 {
1748  parameters.set<std::string>("type") = type;
1749  std::shared_ptr<Distribution> dist = _factory.create<Distribution>(type, name, parameters);
1750  _distributions.addObject(dist);
1751 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
All Distributions should inherit from this class.
Definition: Distribution.h:23
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
MooseObjectWarehouseBase< Distribution > _distributions
distributions

◆ addExtraVectors()

void FEProblemBase::addExtraVectors ( )
virtualinherited

A place to add extra vectors to the simulation.

It is called early during initialSetup.

Definition at line 548 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

549 {
550  _nl->addExtraVectors();
551  _aux->addExtraVectors();
552 }
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< AuxiliarySystem > _aux

◆ addFunction()

void DumpObjectsProblem::addFunction ( std::string  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 84 of file DumpObjectsProblem.C.

87 {
88  dumpObjectHelper("Functions", type, name, parameters);
90 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
virtual void addFunction(std::string type, const std::string &name, InputParameters parameters)
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addGhostedBoundary()

void FEProblemBase::addGhostedBoundary ( BoundaryID  boundary_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 1348 of file FEProblemBase.C.

Referenced by DisplacedProblem::addGhostedBoundary().

1349 {
1350  _mesh.addGhostedBoundary(boundary_id);
1351  if (_displaced_problem)
1352  _displaced_mesh->addGhostedBoundary(boundary_id);
1353 }
MooseMesh & _mesh
std::shared_ptr< DisplacedProblem > _displaced_problem
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:2368
MooseMesh * _displaced_mesh

◆ addGhostedElem()

void FEProblemBase::addGhostedElem ( dof_id_type  elem_id)
overridevirtualinherited

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

Implements SubProblem.

Definition at line 1341 of file FEProblemBase.C.

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

1342 {
1343  if (_mesh.elemPtr(elem_id)->processor_id() != processor_id())
1344  _ghosted_elems.insert(elem_id);
1345 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2262
std::set< dof_id_type > _ghosted_elems
Elements that should have Dofs ghosted to the local processor.
Definition: SubProblem.h:636
MooseMesh & _mesh

◆ addIndicator()

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

Definition at line 3359 of file FEProblemBase.C.

3362 {
3363  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3364  {
3365  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3366  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3367  _reinit_displaced_elem = true;
3368  }
3369  else
3370  {
3371  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3372  {
3373  // We allow Indicators to request that they use_displaced_mesh,
3374  // but then be overridden when no displacements variables are
3375  // provided in the Mesh block. If that happened, update the value
3376  // of use_displaced_mesh appropriately for this Indicator.
3377  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3378  parameters.set<bool>("use_displaced_mesh") = false;
3379  }
3380 
3381  parameters.set<SubProblem *>("_subproblem") = this;
3382  parameters.set<SystemBase *>("_sys") = _aux.get();
3383  }
3384 
3385  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3386  {
3387  std::shared_ptr<Indicator> indicator =
3388  _factory.create<Indicator>(indicator_name, name, parameters, tid);
3389 
3390  std::shared_ptr<InternalSideIndicator> isi =
3392  if (isi)
3394  else
3395  _indicators.addObject(indicator, tid);
3396  }
3397 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
Base class for a system (of equations)
Definition: SystemBase.h:93
MooseObjectWarehouse< InternalSideIndicator > _internal_side_indicators
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux
MooseObjectWarehouse< Indicator > _indicators
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:126

◆ addInitialCondition()

void DumpObjectsProblem::addInitialCondition ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 183 of file DumpObjectsProblem.C.

186 {
189 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters parameters)

◆ addInterfaceKernel()

void DumpObjectsProblem::addInterfaceKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 174 of file DumpObjectsProblem.C.

177 {
178  dumpObjectHelper("InterfaceKernels", type, name, parameters);
180 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addInterfaceKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addJacobian()

void FEProblemBase::addJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1213 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1214 {
1215  _assembly[tid]->addJacobian();
1217  _assembly[tid]->addJacobianNonlocal();
1218  if (_displaced_problem)
1219  {
1220  _displaced_problem->addJacobian(tid);
1222  _displaced_problem->addJacobianNonlocal(tid);
1223  }
1224 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianBlock()

void FEProblemBase::addJacobianBlock ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1277 of file FEProblemBase.C.

Referenced by ComputeJacobianBlocksThread::postElement().

1283 {
1284  _assembly[tid]->addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices);
1286  if (_nonlocal_cm(ivar, jvar) != 0)
1287  {
1288  MooseVariableFEBase & jv = _nl->getVariable(tid, jvar);
1289  _assembly[tid]->addJacobianBlockNonlocal(
1290  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices());
1291  }
1292 
1293  if (_displaced_problem)
1294  {
1295  _displaced_problem->addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, tid);
1297  if (_nonlocal_cm(ivar, jvar) != 0)
1298  {
1299  MooseVariableFEBase & jv = _nl->getVariable(tid, jvar);
1300  _displaced_problem->addJacobianBlockNonlocal(
1301  jacobian, ivar, jvar, dof_map, dof_indices, jv.allDofIndices(), tid);
1302  }
1303  }
1304 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
DofMap & dof_map
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
std::shared_ptr< DisplacedProblem > _displaced_problem
CouplingMatrix _nonlocal_cm
Definition: SubProblem.h:584
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianNeighbor() [1/2]

void FEProblemBase::addJacobianNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1227 of file FEProblemBase.C.

Referenced by ComputeJacobianThread::onInterface(), and ComputeJacobianThread::onInternalSide().

1228 {
1229  _assembly[tid]->addJacobianNeighbor();
1230  if (_displaced_problem)
1231  _displaced_problem->addJacobianNeighbor(tid);
1232 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianNeighbor() [2/2]

void FEProblemBase::addJacobianNeighbor ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
std::vector< dof_id_type > &  neighbor_dof_indices,
THREAD_ID  tid 
)
overridevirtualinherited

Implements SubProblem.

Definition at line 1307 of file FEProblemBase.C.

1314 {
1315  _assembly[tid]->addJacobianNeighbor(
1316  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices);
1317  if (_displaced_problem)
1318  _displaced_problem->addJacobianNeighbor(
1319  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, tid);
1320 }
DofMap & dof_map
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianOffDiagScalar()

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

Definition at line 1241 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1242 {
1243  _assembly[tid]->addJacobianOffDiagScalar(ivar);
1244 }
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addJacobianScalar()

void FEProblemBase::addJacobianScalar ( THREAD_ID  tid = 0)
virtualinherited

Definition at line 1235 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeScalarKernelsJacobians().

1236 {
1237  _assembly[tid]->addJacobianScalar();
1238 }
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addKernel()

void DumpObjectsProblem::addKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 93 of file DumpObjectsProblem.C.

96 {
97  dumpObjectHelper("Kernels", type, name, parameters);
99 }
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addLineSearch()

virtual void DumpObjectsProblem::addLineSearch ( const InputParameters )
inlineoverridevirtual

add a MOOSE line search

Reimplemented from FEProblemBase.

Definition at line 100 of file DumpObjectsProblem.h.

100 {}

◆ addMarker()

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

Definition at line 3400 of file FEProblemBase.C.

3403 {
3404  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3405  {
3406  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3407  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3408  _reinit_displaced_elem = true;
3409  }
3410  else
3411  {
3412  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3413  {
3414  // We allow Markers to request that they use_displaced_mesh,
3415  // but then be overridden when no displacements variables are
3416  // provided in the Mesh block. If that happened, update the value
3417  // of use_displaced_mesh appropriately for this Marker.
3418  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3419  parameters.set<bool>("use_displaced_mesh") = false;
3420  }
3421 
3422  parameters.set<SubProblem *>("_subproblem") = this;
3423  parameters.set<SystemBase *>("_sys") = _aux.get();
3424  }
3425 
3426  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
3427  {
3428  std::shared_ptr<Marker> marker = _factory.create<Marker>(marker_name, name, parameters, tid);
3429  _markers.addObject(marker, tid);
3430  }
3431 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: Marker.h:40
Base class for a system (of equations)
Definition: SystemBase.h:93
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MooseObjectWarehouse< Marker > _markers
unsigned int THREAD_ID
Definition: MooseTypes.h:126

◆ addMaterial()

void DumpObjectsProblem::addMaterial ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 192 of file DumpObjectsProblem.C.

195 {
196  dumpObjectHelper("Materials", type, name, parameters);
198 }
virtual void addMaterial(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addMaterialHelper()

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

Definition at line 2374 of file FEProblemBase.C.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), and FEProblemBase::addMaterial().

2378 {
2379  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2380  {
2381  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2382  _reinit_displaced_elem = true;
2383  }
2384  else
2385  {
2386  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
2387  {
2388  // We allow Materials to request that they use_displaced_mesh,
2389  // but then be overridden when no displacements variables are
2390  // provided in the Mesh block. If that happened, update the value
2391  // of use_displaced_mesh appropriately for this Material.
2392  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2393  parameters.set<bool>("use_displaced_mesh") = false;
2394  }
2395 
2396  parameters.set<SubProblem *>("_subproblem") = this;
2397  }
2398 
2399  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
2400  {
2401  // Create the general Block/Boundary Material object
2402  std::shared_ptr<Material> material = _factory.create<Material>(mat_name, name, parameters, tid);
2403  bool discrete = !material->getParam<bool>("compute");
2404 
2405  // If the object is boundary restricted do not create the neighbor and face objects
2406  if (material->boundaryRestricted())
2407  {
2408  _all_materials.addObject(material, tid);
2409  if (discrete)
2410  _discrete_materials.addObject(material, tid);
2411  else
2412  for (auto && warehouse : warehouses)
2413  warehouse->addObject(material, tid);
2414  }
2415 
2416  // Non-boundary restricted require face and neighbor objects
2417  else
2418  {
2419  // The name of the object being created, this is changed multiple times as objects are created
2420  // below
2421  std::string object_name;
2422 
2423  // Create a copy of the supplied parameters to the setting for "_material_data_type" isn't
2424  // used from a previous tid loop
2425  InputParameters current_parameters = parameters;
2426 
2427  // face material
2428  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
2430  object_name = name + "_face";
2431  std::shared_ptr<Material> face_material =
2432  _factory.create<Material>(mat_name, object_name, current_parameters, tid);
2433 
2434  // neighbor material
2435  current_parameters.set<Moose::MaterialDataType>("_material_data_type") =
2437  current_parameters.set<bool>("_neighbor") = true;
2438  object_name = name + "_neighbor";
2439  std::shared_ptr<Material> neighbor_material =
2440  _factory.create<Material>(mat_name, object_name, current_parameters, tid);
2441 
2442  // Store the material objects
2443  _all_materials.addObjects(material, neighbor_material, face_material, tid);
2444 
2445  if (discrete)
2446  _discrete_materials.addObjects(material, neighbor_material, face_material, tid);
2447  else
2448  for (auto && warehouse : warehouses)
2449  warehouse->addObjects(material, neighbor_material, face_material, tid);
2450 
2451  // link parameters of face and neighbor materials
2452  MooseObjectParameterName name(MooseObjectName("Material", material->name()), "*");
2453  MooseObjectParameterName face_name(MooseObjectName("Material", face_material->name()), "*");
2454  MooseObjectParameterName neighbor_name(MooseObjectName("Material", neighbor_material->name()),
2455  "*");
2458  name, neighbor_name, false);
2459  }
2460  }
2461 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:1321
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:421
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:188
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
Materials compute MaterialProperties.
Definition: Material.h:47
void addControllableParameterConnection(const MooseObjectParameterName &master, const MooseObjectParameterName &slave, bool error_on_empty=true)
Method for linking control parameters of different names.
MaterialWarehouse _discrete_materials
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
A class for storing an input parameter name.
void addObjects(std::shared_ptr< Material > block, std::shared_ptr< Material > neighbor, std::shared_ptr< Material > face, THREAD_ID tid=0)
A special method unique to this class for adding Block, Neighbor, and Face material objects...
A class for storing the names of MooseObject by tag and object name.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:126

◆ addMatrixTag()

TagID SubProblem::addMatrixTag ( TagName  tag_name)
virtualinherited

Create a Tag.

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

Note: If the tag is already present then this will simply return the TagID of that Tag

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

Reimplemented in DisplacedProblem.

Definition at line 102 of file SubProblem.C.

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

103 {
104  auto tag_name_upper = MooseUtils::toUpper(tag_name);
105  auto existing_tag = _matrix_tag_name_to_tag_id.find(tag_name_upper);
106  if (existing_tag == _matrix_tag_name_to_tag_id.end())
107  {
108  auto tag_id = _matrix_tag_name_to_tag_id.size();
109 
110  _matrix_tag_name_to_tag_id[tag_name_upper] = tag_id;
111 
112  _matrix_tag_id_to_tag_name[tag_id] = tag_name_upper;
113  }
114 
115  return _matrix_tag_name_to_tag_id.at(tag_name_upper);
116 }
std::map< TagName, TagID > _matrix_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:576
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:697
std::map< TagID, TagName > _matrix_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:579

◆ addMultiApp()

void FEProblemBase::addMultiApp ( const std::string &  multi_app_name,
const std::string &  name,
InputParameters  parameters 
)
virtualinherited

Add a MultiApp to the problem.

Definition at line 3434 of file FEProblemBase.C.

3437 {
3438  parameters.set<MPI_Comm>("_mpi_comm") = _communicator.get();
3439  parameters.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
3440 
3441  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3442  {
3443  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3444  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3445  _reinit_displaced_elem = true;
3446  }
3447  else
3448  {
3449  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3450  {
3451  // We allow MultiApps to request that they use_displaced_mesh,
3452  // but then be overridden when no displacements variables are
3453  // provided in the Mesh block. If that happened, update the value
3454  // of use_displaced_mesh appropriately for this MultiApp.
3455  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3456  parameters.set<bool>("use_displaced_mesh") = false;
3457  }
3458 
3459  parameters.set<SubProblem *>("_subproblem") = this;
3460  parameters.set<SystemBase *>("_sys") = _aux.get();
3461  }
3462 
3463  std::shared_ptr<MultiApp> multi_app = _factory.create<MultiApp>(multi_app_name, name, parameters);
3464 
3465  multi_app->setupPositions();
3466 
3467  _multi_apps.addObject(multi_app);
3468 
3469  // Store TranseintMultiApp objects in another container, this is needed for calling computeDT
3470  std::shared_ptr<TransientMultiApp> trans_multi_app =
3472  if (trans_multi_app)
3473  _transient_multi_apps.addObject(trans_multi_app);
3474 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
void setupPositions()
Called just after construction to allow derived classes to set _positions;.
Definition: MultiApp.C:223
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:294
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
MultiApp Implementation for Transient Apps.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< TransientMultiApp > _transient_multi_apps
Storage for TransientMultiApps (only needed for calling &#39;computeDT&#39;)
Base class for a system (of equations)
Definition: SystemBase.h:93
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:58

◆ addNodalKernel()

void DumpObjectsProblem::addNodalKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 102 of file DumpObjectsProblem.C.

105 {
106  dumpObjectHelper("NodalKernel", type, name, parameters);
108 }
virtual void addNodalKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addOutput()

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

Adds an Output object.

Definition at line 5858 of file FEProblemBase.C.

5861 {
5862  // Get a reference to the OutputWarehouse
5863  OutputWarehouse & output_warehouse = _app.getOutputWarehouse();
5864 
5865  // Reject the reserved names for objects not built by MOOSE
5866  if (!parameters.get<bool>("_built_by_moose") && output_warehouse.isReservedName(object_name))
5867  mooseError("The name '", object_name, "' is a reserved name for output objects");
5868 
5869  // Check that an object by the same name does not already exist; this must be done before the
5870  // object is created to avoid getting misleading errors from the Parser
5871  if (output_warehouse.hasOutput(object_name))
5872  mooseError("An output object named '", object_name, "' already exists");
5873 
5874  // Add a pointer to the FEProblemBase class
5875  parameters.addPrivateParam<FEProblemBase *>("_fe_problem_base", this);
5876 
5877  // Create common parameter exclude list
5878  std::vector<std::string> exclude;
5879  if (object_type == "Console")
5880  {
5881  exclude.push_back("execute_on");
5882 
5883  // --show-input should enable the display of the input file on the screen
5884  if (_app.getParam<bool>("show_input") && parameters.get<bool>("output_screen"))
5885  parameters.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
5886  }
5887 
5888  // Apply the common parameters
5889  InputParameters * common = output_warehouse.getCommonParameters();
5890  if (common != NULL)
5891  parameters.applyParameters(*common, exclude);
5892 
5893  // Set the correct value for the binary flag for XDA/XDR output
5894  if (object_type == "XDR")
5895  parameters.set<bool>("_binary") = true;
5896  else if (object_type == "XDA")
5897  parameters.set<bool>("_binary") = false;
5898 
5899  // Adjust the checkpoint suffix if auto recovery was enabled
5900  if (object_name == "auto_recovery_checkpoint")
5901  parameters.set<std::string>("suffix") = "auto_recovery";
5902 
5903  // Create the object and add it to the warehouse
5904  std::shared_ptr<Output> output = _factory.create<Output>(object_type, object_name, parameters);
5905  output_warehouse.addOutput(output);
5906 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
void addOutput(std::shared_ptr< Output > &output)
Adds an existing output object to the warehouse.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool isReservedName(const std::string &name)
Test if the given name is reserved.
bool hasOutput(const std::string &name) const
Returns true if the output object exists.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Based class for output objects.
Definition: Output.h:42
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
Class for storing and utilizing output objects.
void applyParameters(const InputParameters &common, std::vector< std::string > exclude=std::vector< std::string >())
Method for applying common parameters.
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:916
InputParameters * getCommonParameters()
Get a reference to the common output parameters.
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1049
const ExecFlagType EXEC_INITIAL

◆ addPostprocessor()

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

Definition at line 2711 of file FEProblemBase.C.

2714 {
2715  // Check for name collision
2716  if (hasUserObject(name))
2717  mooseError(std::string("A UserObject with the name \"") + name +
2718  "\" already exists. You may not add a Postprocessor by the same name.");
2719 
2720  addUserObject(pp_name, name, parameters);
2722 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
void initPostprocessorData(const std::string &name)
Initializes the postprocessor data.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addUserObject(std::string user_object_name, const std::string &name, InputParameters parameters)

◆ addPredictor()

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

Definition at line 4380 of file FEProblemBase.C.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector().

4383 {
4384  parameters.set<SubProblem *>("_subproblem") = this;
4385  std::shared_ptr<Predictor> predictor = _factory.create<Predictor>(type, name, parameters);
4386  _nl->setPredictor(predictor);
4387 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
std::shared_ptr< NonlinearSystemBase > _nl
Base class for predictors.
Definition: Predictor.h:34
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addResidual()

void FEProblemBase::addResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1138 of file FEProblemBase.C.

Referenced by ComputeDiracThread::postElement().

1139 {
1140  _assembly[tid]->addResidual(getVectorTags());
1141 
1142  if (_displaced_problem)
1143  _displaced_problem->addResidual(tid);
1144 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:102
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addResidualNeighbor()

void FEProblemBase::addResidualNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1147 of file FEProblemBase.C.

Referenced by ComputeResidualThread::onInterface(), and ComputeResidualThread::onInternalSide().

1148 {
1149  _assembly[tid]->addResidualNeighbor(getVectorTags());
1150 
1151  if (_displaced_problem)
1152  _displaced_problem->addResidualNeighbor(tid);
1153 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:102
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addResidualScalar()

void FEProblemBase::addResidualScalar ( THREAD_ID  tid = 0)
virtualinherited

Definition at line 1156 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeResidualInternal().

1157 {
1158  _assembly[tid]->addResidualScalar(getVectorTags());
1159 }
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:102
std::vector< std::unique_ptr< Assembly > > _assembly

◆ addSampler()

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

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

Definition at line 1763 of file FEProblemBase.C.

1764 {
1765  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
1766  {
1767  std::shared_ptr<Sampler> dist = _factory.create<Sampler>(type, name, parameters, tid);
1768  _samplers.addObject(dist, tid);
1769  }
1770 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
This is the base class for Samplers.
Definition: Sampler.h:41
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
ExecuteMooseObjectWarehouse< Sampler > _samplers
Samplers.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
unsigned int THREAD_ID
Definition: MooseTypes.h:126

◆ addScalarKernel()

void DumpObjectsProblem::addScalarKernel ( const std::string &  type,
const std::string &  name,
InputParameters  parameters 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 111 of file DumpObjectsProblem.C.

114 {
115  dumpObjectHelper("ScalarKernels", type, name, parameters);
117 }
void dumpObjectHelper(const std::string &system, const std::string &type, const std::string &name, const InputParameters &parameters)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addScalarKernel(const std::string &kernel_name, const std::string &name, InputParameters parameters)

◆ addScalarVariable()

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

Reimplemented from FEProblemBase.

Definition at line 55 of file DumpObjectsProblem.C.

59 {
60  dumpVariableHelper("Variables", var_name, SCALAR, order, scale_factor, active_subdomains);
61  FEProblemBase::addScalarVariable(var_name, order, scale_factor, active_subdomains);
62 }
virtual void addScalarVariable(const std::string &var_name, Order order, Real scale_factor=1., const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addTimeIntegrator()

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

Definition at line 4364 of file FEProblemBase.C.

Referenced by Transient::setupTimeIntegrator().

4367 {
4368  parameters.set<SubProblem *>("_subproblem") = this;
4369  _aux->addTimeIntegrator(type, name + ":aux", parameters);
4370  _nl->addTimeIntegrator(type, name, parameters);
4371  _has_time_integrator = true;
4372 
4373  // add vectors to store u_dot, u_dotdot, udot_old and u_dotdot_old if requested by the time
4374  // integrator
4375  _aux->addDotVectors();
4376  _nl->addDotVectors();
4377 }
std::shared_ptr< NonlinearSystemBase > _nl
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool _has_time_integrator
Indicates whether or not this executioner has a time integrator (during setup)
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ addTransfer()

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

Add a Transfer to the problem.

Definition at line 3696 of file FEProblemBase.C.

3699 {
3700  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
3701  {
3702  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
3703  parameters.set<SystemBase *>("_sys") = &_displaced_problem->auxSys();
3704  _reinit_displaced_elem = true;
3705  }
3706  else
3707  {
3708  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
3709  {
3710  // We allow Transfers to request that they use_displaced_mesh,
3711  // but then be overridden when no displacements variables are
3712  // provided in the Mesh block. If that happened, update the value
3713  // of use_displaced_mesh appropriately for this Transfer.
3714  if (parameters.have_parameter<bool>("use_displaced_mesh"))
3715  parameters.set<bool>("use_displaced_mesh") = false;
3716  }
3717 
3718  parameters.set<SubProblem *>("_subproblem") = this;
3719  parameters.set<SystemBase *>("_sys") = _aux.get();
3720  }
3721 
3722  // Handle the "SAME_AS_MULTIAPP" execute option
3723  ExecFlagEnum & exec_enum = parameters.set<ExecFlagEnum>("execute_on", true);
3724  if (exec_enum.contains(EXEC_SAME_AS_MULTIAPP))
3725  {
3726  std::shared_ptr<MultiApp> multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
3727  exec_enum = multiapp->getParam<ExecFlagEnum>("execute_on");
3728  }
3729 
3730  // Create the Transfer objects
3731  std::shared_ptr<Transfer> transfer = _factory.create<Transfer>(transfer_name, name, parameters);
3732 
3733  // Add MultiAppTransfer object
3734  std::shared_ptr<MultiAppTransfer> multi_app_transfer =
3736  if (multi_app_transfer)
3737  {
3738  if (multi_app_transfer->direction() == MultiAppTransfer::TO_MULTIAPP)
3739  _to_multi_app_transfers.addObject(multi_app_transfer);
3740  else
3741  _from_multi_app_transfers.addObject(multi_app_transfer);
3742  }
3743  else
3744  _transfers.addObject(transfer);
3745 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< Transfer > _from_multi_app_transfers
Transfers executed just after MultiApps to transfer data from them.
Base class for a system (of equations)
Definition: SystemBase.h:93
std::shared_ptr< MultiApp > getMultiApp(const std::string &multi_app_name) const
Get a MultiApp object by name.
ExecuteMooseObjectWarehouse< Transfer > _transfers
Normal Transfers.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
ExecuteMooseObjectWarehouse< Transfer > _to_multi_app_transfers
Transfers executed just before MultiApps to transfer data to them.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
std::shared_ptr< AuxiliarySystem > _aux
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
Base class for all MultiAppTransfer objects.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
const ExecFlagType EXEC_SAME_AS_MULTIAPP
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
Base class for all Transfer objects.
Definition: Transfer.h:41

◆ addUserObject()

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

Definition at line 2739 of file FEProblemBase.C.

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

2742 {
2743  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2744  parameters.set<SubProblem *>("_subproblem") = _displaced_problem.get();
2745  else
2746  {
2747  if (_displaced_problem == NULL && parameters.get<bool>("use_displaced_mesh"))
2748  {
2749  // We allow UserObjects to request that they use_displaced_mesh,
2750  // but then be overridden when no displacements variables are
2751  // provided in the Mesh block. If that happened, update the value
2752  // of use_displaced_mesh appropriately for this UserObject.
2753  if (parameters.have_parameter<bool>("use_displaced_mesh"))
2754  parameters.set<bool>("use_displaced_mesh") = false;
2755  }
2756 
2757  parameters.set<SubProblem *>("_subproblem") = this;
2758  }
2759 
2760  UserObject * primary = nullptr;
2761  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
2762  {
2763  // Create the UserObject
2764  std::shared_ptr<UserObject> user_object =
2765  _factory.create<UserObject>(user_object_name, name, parameters, tid);
2766  if (tid == 0)
2767  primary = user_object.get();
2768  else
2769  user_object->setPrimaryThreadCopy(primary);
2770 
2771  // TODO: delete this line after apps have been updated to not call getUserObjects
2772  _all_user_objects.addObject(user_object, tid);
2773 
2774  theWarehouse().add(user_object, "UserObject");
2775 
2776  // Attempt to create all the possible UserObject types
2777  auto euo = std::dynamic_pointer_cast<ElementUserObject>(user_object);
2778  auto suo = std::dynamic_pointer_cast<SideUserObject>(user_object);
2779  auto isuo = std::dynamic_pointer_cast<InternalSideUserObject>(user_object);
2780  auto nuo = std::dynamic_pointer_cast<NodalUserObject>(user_object);
2781  auto guo = std::dynamic_pointer_cast<GeneralUserObject>(user_object);
2782  auto tguo = std::dynamic_pointer_cast<ThreadedGeneralUserObject>(user_object);
2783 
2784  // Account for displaced mesh use
2785  if (_displaced_problem != NULL && parameters.get<bool>("use_displaced_mesh"))
2786  {
2787  if (euo || nuo)
2788  _reinit_displaced_elem = true;
2789  else if (suo)
2790  _reinit_displaced_face = true;
2791  }
2792 
2793  if (guo && !tguo)
2794  break;
2795  }
2796 }
bool _reinit_displaced_elem
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Factory & _factory
The Factory for building objects.
Definition: SubProblem.h:582
void setPrimaryThreadCopy(UserObject *primary)
Definition: UserObject.h:129
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
ExecuteMooseObjectWarehouse< UserObject > _all_user_objects
A user object that runs over all the nodes and does an aggregation step to compute a single value...
TheWarehouse & theWarehouse() const
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
bool _reinit_displaced_face
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:60
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
void add(std::shared_ptr< MooseObject > obj, const std::string &system)
add adds a new object to the warehouse and stores attributes/metadata about it for running queries/fi...
Definition: TheWarehouse.C:94
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::shared_ptr< DisplacedProblem > _displaced_problem
Base class for user-specific data.
Definition: UserObject.h:38
unsigned int THREAD_ID
Definition: MooseTypes.h:126
An instance of this object type has one copy per thread that runs on each thread. ...

◆ addVariable()

void DumpObjectsProblem::addVariable ( const std::string &  var_name,
const FEType &  type,
Real  scale_factor,
const std::set< SubdomainID > *const  active_subdomains = NULL 
)
overridevirtual

Reimplemented from FEProblemBase.

Definition at line 44 of file DumpObjectsProblem.C.

48 {
50  "Variables", var_name, type.family, type.order, scale_factor, active_subdomains);
51  FEProblemBase::addVariable(var_name, type, scale_factor, active_subdomains);
52 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
virtual void addVariable(const std::string &var_name, const FEType &type, Real scale_factor, const std::set< SubdomainID > *const active_subdomains=NULL)
void dumpVariableHelper(const std::string &system, const std::string &var_name, FEFamily family, Order order, Real scale_factor, const std::set< SubdomainID > *const active_subdomains)

◆ addVectorPostprocessor()

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

Definition at line 2725 of file FEProblemBase.C.

2728 {
2729  // Check for name collision
2730  if (hasUserObject(name))
2731  mooseError(std::string("A UserObject with the name \"") + name +
2732  "\" already exists. You may not add a VectorPostprocessor by the same name.");
2733 
2734  addUserObject(pp_name, name, parameters);
2736 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
void initVectorPostprocessorData(const std::string &name)
Initialize the VectorPostprocessor data.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void addUserObject(std::string user_object_name, const std::string &name, InputParameters parameters)

◆ addVectorTag()

TagID SubProblem::addVectorTag ( TagName  tag_name)
virtualinherited

Create a Tag.

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

Note: If the tag is already present then this will simply return the TagID of that Tag

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

Reimplemented in DisplacedProblem.

Definition at line 56 of file SubProblem.C.

Referenced by DisplacedProblem::addVectorTag(), FEProblemBase::createTagVectors(), NonlinearSystemBase::getResidualNonTimeVector(), NonlinearSystemBase::getResidualTimeVector(), NonlinearEigenSystem::NonlinearEigenSystem(), and NonlinearSystemBase::NonlinearSystemBase().

57 {
58  auto tag_name_upper = MooseUtils::toUpper(tag_name);
59  auto existing_tag = _vector_tag_name_to_tag_id.find(tag_name_upper);
60  if (existing_tag == _vector_tag_name_to_tag_id.end())
61  {
62  auto tag_id = _vector_tag_name_to_tag_id.size();
63 
64  _vector_tag_name_to_tag_id[tag_name_upper] = tag_id;
65 
66  _vector_tag_id_to_tag_name[tag_id] = tag_name_upper;
67  }
68 
69  return _vector_tag_name_to_tag_id.at(tag_name_upper);
70 }
std::map< TagName, TagID > _vector_tag_name_to_tag_id
The currently declared tags.
Definition: SubProblem.h:570
std::string toUpper(const std::string &name)
Convert supplied string to upper case.
Definition: MooseUtils.C:697
std::map< TagID, TagName > _vector_tag_id_to_tag_name
Reverse map.
Definition: SubProblem.h:573

◆ advanceMultiApps()

void FEProblemBase::advanceMultiApps ( ExecFlagType  type)
inlineinherited

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

Definition at line 939 of file FEProblemBase.h.

940  {
941  mooseDeprecated("Deprecated method; use finishMultiAppStep and/or incrementMultiAppTStep "
942  "depending on your purpose");
944  }
void finishMultiAppStep(ExecFlagType type)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:158

◆ advanceState()

virtual void DumpObjectsProblem::advanceState ( )
inlineoverridevirtual

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

Reimplemented from FEProblemBase.

Definition at line 91 of file DumpObjectsProblem.h.

91 {}

◆ allowOutput() [1/2]

void FEProblemBase::allowOutput ( bool  state)
inherited

Ability to enable/disable all output calls.

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

Definition at line 4332 of file FEProblemBase.C.

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

4333 {
4335 }
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1049

◆ allowOutput() [2/2]

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

Definition at line 1950 of file FEProblemBase.h.

1951 {
1952  _app.getOutputWarehouse().allowOutput<T>(state);
1953 }
void allowOutput(bool state)
Ability to enable/disable output calls This is private, users should utilize FEProblemBase::allowOutp...
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1049

◆ areCoupled()

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

Definition at line 4051 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

4052 {
4053  return (*_cm)(ivar, jvar);
4054 }
std::unique_ptr< CouplingMatrix > _cm
Coupling matrix for variables.

◆ assembly()

virtual Assembly& FEProblemBase::assembly ( THREAD_ID  tid)
inlineoverridevirtualinherited

◆ backupMultiApps()

void FEProblemBase::backupMultiApps ( ExecFlagType  type)
inherited

Backup the MultiApps associated with the ExecFlagType.

Definition at line 3629 of file FEProblemBase.C.

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

3630 {
3631  const auto & multi_apps = _multi_apps[type].getActiveObjects();
3632 
3633  if (multi_apps.size())
3634  {
3635  TIME_SECTION(_backup_multi_apps_timer);
3636 
3637  _console << COLOR_CYAN << "\nBacking Up MultiApps" << COLOR_DEFAULT << std::endl;
3638 
3639  for (const auto & multi_app : multi_apps)
3640  multi_app->backup();
3641 
3643 
3644  _console << COLOR_CYAN << "Finished Backing Up MultiApps\n" << COLOR_DEFAULT << std::endl;
3645  }
3646 }
const PerfID _backup_multi_apps_timer
bool _parallel_barrier_messaging
Whether or not information about how many transfers have completed is printed.
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
void parallelBarrierNotify(const libMesh::Parallel::Communicator &comm, bool messaging=true)
This function implements a parallel barrier function but writes progress to stdout.
ExecuteMooseObjectWarehouse< MultiApp > _multi_apps
MultiApp Warehouse.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ cacheJacobian()

void FEProblemBase::cacheJacobian ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1247 of file FEProblemBase.C.

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

1248 {
1249  _assembly[tid]->cacheJacobian();
1251  _assembly[tid]->cacheJacobianNonlocal();
1252  if (_displaced_problem)
1253  {
1254  _displaced_problem->cacheJacobian(tid);
1256  _displaced_problem->cacheJacobianNonlocal(tid);
1257  }
1258 }
bool _has_nonlocal_coupling
Indicates if nonlocal coupling is required/exists.
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheJacobianNeighbor()

void FEProblemBase::cacheJacobianNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1261 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintJacobians().

1262 {
1263  _assembly[tid]->cacheJacobianNeighbor();
1264  if (_displaced_problem)
1265  _displaced_problem->cacheJacobianNeighbor(tid);
1266 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheResidual()

void FEProblemBase::cacheResidual ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1162 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals(), and ComputeResidualThread::postElement().

1163 {
1164  _assembly[tid]->cacheResidual();
1165  if (_displaced_problem)
1166  _displaced_problem->cacheResidual(tid);
1167 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ cacheResidualNeighbor()

void FEProblemBase::cacheResidualNeighbor ( THREAD_ID  tid)
overridevirtualinherited

Implements SubProblem.

Definition at line 1170 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::constraintResiduals().

1171 {
1172  _assembly[tid]->cacheResidualNeighbor();
1173  if (_displaced_problem)
1174  _displaced_problem->cacheResidualNeighbor(tid);
1175 }
std::shared_ptr< DisplacedProblem > _displaced_problem
std::vector< std::unique_ptr< Assembly > > _assembly

◆ checkBlockMatProps()

void SubProblem::checkBlockMatProps ( )
virtualinherited

Checks block material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 436 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

437 {
438  // Variable for storing the value for ANY_BLOCK_ID/ANY_BOUNDARY_ID
440 
441  // Variable for storing all available blocks/boundaries from the mesh
442  std::set<SubdomainID> all_ids(mesh().meshSubdomains());
443 
444  // Loop through the properties to check
445  for (const auto & check_it : _map_block_material_props_check)
446  {
447  // The current id for the property being checked (BoundaryID || BlockID)
448  SubdomainID check_id = check_it.first;
449 
450  // In the case when the material being checked has an ID is set to ANY, then loop through all
451  // the possible ids and verify that the material property is defined.
452  std::set<SubdomainID> check_ids = {check_id};
453  if (check_id == any_id)
454  check_ids = all_ids;
455 
456  // Loop through all the block/boundary ids
457  for (const auto & id : check_ids)
458  {
459  // Loop through all the stored properties
460  for (const auto & prop_it : check_it.second)
461  {
462  // Produce an error if the material property is not defined on the current block/boundary
463  // and any block/boundary
464  // and not is not a zero material property.
465  if (_map_block_material_props[id].count(prop_it.second) == 0 &&
466  _map_block_material_props[any_id].count(prop_it.second) == 0 &&
467  _zero_block_material_props[id].count(prop_it.second) == 0 &&
468  _zero_block_material_props[any_id].count(prop_it.second) == 0)
469  {
470  std::string check_name = restrictionSubdomainCheckName(id);
471  if (check_name.empty())
472  check_name = std::to_string(id);
473  mooseError("Material property '",
474  prop_it.second,
475  "', requested by '",
476  prop_it.first,
477  "' is not defined on block ",
478  check_name);
479  }
480  }
481  }
482  }
483 }
virtual MooseMesh & mesh()=0
subdomain_id_type SubdomainID
Definition: MooseTypes.h:124
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
std::string restrictionSubdomainCheckName(SubdomainID check_id)
Helper functions for checking MaterialProperties.
Definition: SubProblem.C:578
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:15
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:598
std::map< SubdomainID, std::multimap< std::string, std::string > > _map_block_material_props_check
Data structures of the requested material properties.
Definition: SubProblem.h:610
std::map< SubdomainID, std::set< std::string > > _map_block_material_props
Map of material properties (block_id -> list of properties)
Definition: SubProblem.h:592

◆ checkBoundaryMatProps()

void SubProblem::checkBoundaryMatProps ( )
virtualinherited

Checks boundary material properties integrity.

See also
FEProblemBase::checkProblemIntegrity

Definition at line 486 of file SubProblem.C.

Referenced by FEProblemBase::checkProblemIntegrity().

487 {
488  // Variable for storing the value for ANY_BLOCK_ID/ANY_BOUNDARY_ID
490 
491  // Variable for storing all available blocks/boundaries from the mesh
492  std::set<BoundaryID> all_ids(mesh().getBoundaryIDs());
493 
494  // Loop through the properties to check
495  for (const auto & check_it : _map_boundary_material_props_check)
496  {
497  // The current id for the property being checked (BoundaryID || BlockID)
498  BoundaryID check_id = check_it.first;
499 
500  // In the case when the material being checked has an ID is set to ANY, then loop through all
501  // the possible ids and verify that the material property is defined.
502  std::set<BoundaryID> check_ids{check_id};
503  if (check_id == any_id)
504  check_ids = all_ids;
505 
506  // Loop through all the block/boundary ids
507  for (const auto & id : check_ids)
508  {
509  // Loop through all the stored properties
510  for (const auto & prop_it : check_it.second)
511  {
512  // Produce an error if the material property is not defined on the current block/boundary
513  // and any block/boundary
514  // and not is not a zero material property.
515  if (_map_boundary_material_props[id].count(prop_it.second) == 0 &&
516  _map_boundary_material_props[any_id].count(prop_it.second) == 0 &&
517  _zero_boundary_material_props[id].count(prop_it.second) == 0 &&
518  _zero_boundary_material_props[any_id].count(prop_it.second) == 0)
519  {
520  std::string check_name = restrictionBoundaryCheckName(id);
521  if (check_name.empty())
522  check_name = std::to_string(id);
523  mooseError("Material property '",
524  prop_it.second,
525  "', requested by '",
526  prop_it.first,
527  "' is not defined on boundary ",
528  check_name);
529  }
530  }
531  }
532  }
533 }
virtual MooseMesh & mesh()=0
std::map< BoundaryID, std::multimap< std::string, std::string > > _map_boundary_material_props_check
Definition: SubProblem.h:611
std::string restrictionBoundaryCheckName(BoundaryID check_id)
Definition: SubProblem.C:589
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
std::map< BoundaryID, std::set< MaterialPropertyName > > _zero_boundary_material_props
Definition: SubProblem.h:599
std::map< BoundaryID, std::set< std::string > > _map_boundary_material_props
Map for boundary material properties (boundary_id -> list of properties)
Definition: SubProblem.h:595
std::vector< libMesh::boundary_id_type > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown)
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:17
boundary_id_type BoundaryID
Definition: MooseTypes.h:122

◆ checkCoordinateSystems()

void FEProblemBase::checkCoordinateSystems ( )
protectedinherited

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

Definition at line 5595 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5596 {
5597  for (const auto & elem : _mesh.getMesh().element_ptr_range())
5598  {
5599  SubdomainID sid = elem->subdomain_id();
5600  if (_coord_sys[sid] == Moose::COORD_RZ && elem->dim() == 3)
5601  mooseError("An RZ coordinate system was requested for subdomain " + Moose::stringify(sid) +
5602  " which contains 3D elements.");
5603  if (_coord_sys[sid] == Moose::COORD_RSPHERICAL && elem->dim() > 1)
5604  mooseError("An RSPHERICAL coordinate system was requested for subdomain " +
5605  Moose::stringify(sid) + " which contains 2D or 3D elements.");
5606  }
5607 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
nonlocal coupling matrix;
Definition: SubProblem.h:587
subdomain_id_type SubdomainID
Definition: MooseTypes.h:124
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2562
MooseMesh & _mesh
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61

◆ checkDependMaterialsHelper()

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

Helper method for checking Material object dependency.

See also
checkProblemIntegrity

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

Definition at line 5470 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5472 {
5473  auto & prop_names = _material_props.statefulPropNames();
5474 
5475  for (const auto & it : materials_map)
5476  {
5478  std::set<std::string> block_depend_props, block_supplied_props;
5479 
5480  for (const auto & mat1 : it.second)
5481  {
5482  const std::set<std::string> & depend_props = mat1->getRequestedItems();
5483  block_depend_props.insert(depend_props.begin(), depend_props.end());
5484 
5485  auto & alldeps = mat1->getMatPropDependencies(); // includes requested stateful props
5486  for (auto & dep : alldeps)
5487  {
5488  if (prop_names.count(dep) > 0)
5489  block_depend_props.insert(prop_names.at(dep));
5490  }
5491 
5492  // See if any of the active materials supply this property
5493  for (const auto & mat2 : it.second)
5494  {
5495  const std::set<std::string> & supplied_props = mat2->Material::getSuppliedItems();
5496  block_supplied_props.insert(supplied_props.begin(), supplied_props.end());
5497  }
5498  }
5499 
5500  // Add zero material properties specific to this block and unrestricted
5501  block_supplied_props.insert(_zero_block_material_props[it.first].begin(),
5502  _zero_block_material_props[it.first].end());
5503  block_supplied_props.insert(_zero_block_material_props[Moose::ANY_BLOCK_ID].begin(),
5505 
5506  // Error check to make sure all properties consumed by materials are supplied on this block
5507  std::set<std::string> difference;
5508  std::set_difference(block_depend_props.begin(),
5509  block_depend_props.end(),
5510  block_supplied_props.begin(),
5511  block_supplied_props.end(),
5512  std::inserter(difference, difference.end()));
5513 
5514  if (!difference.empty())
5515  {
5516  std::ostringstream oss;
5517  oss << "One or more Material Properties were not supplied on block " << it.first << ":\n";
5518  for (const auto & name : difference)
5519  oss << name << "\n";
5520  mooseError(oss.str());
5521  }
5522  }
5523 
5524  // This loop checks that materials are not supplied by multiple Material objects
5525  for (const auto & it : materials_map)
5526  {
5527  const auto & materials = it.second;
5528  std::set<std::string> inner_supplied, outer_supplied;
5529 
5530  for (const auto & outer_mat : materials)
5531  {
5532  // Storage for properties for this material (outer) and all other materials (inner)
5533  outer_supplied = outer_mat->getSuppliedItems();
5534  inner_supplied.clear();
5535 
5536  // Property to material map for error reporting
5537  std::map<std::string, std::set<std::string>> prop_to_mat;
5538  for (const auto & name : outer_supplied)
5539  prop_to_mat[name].insert(outer_mat->name());
5540 
5541  for (const auto & inner_mat : materials)
5542  {
5543  if (outer_mat == inner_mat)
5544  continue;
5545 
5546  // Check whether these materials are an AD pair
5547  auto outer_mat_type = outer_mat->type();
5548  auto inner_mat_type = inner_mat->type();
5549  removeSubstring(outer_mat_type, "<RESIDUAL>");
5550  removeSubstring(outer_mat_type, "<JACOBIAN>");
5551  removeSubstring(inner_mat_type, "<RESIDUAL>");
5552  removeSubstring(inner_mat_type, "<JACOBIAN>");
5553  if (outer_mat_type == inner_mat_type && outer_mat_type != outer_mat->type() &&
5554  inner_mat_type != inner_mat->type())
5555  continue;
5556 
5557  inner_supplied.insert(inner_mat->getSuppliedItems().begin(),
5558  inner_mat->getSuppliedItems().end());
5559 
5560  for (const auto & inner_supplied_name : inner_supplied)
5561  prop_to_mat[inner_supplied_name].insert(inner_mat->name());
5562  }
5563 
5564  // Test that a property isn't supplied on multiple blocks
5565  std::set<std::string> intersection;
5566  std::set_intersection(outer_supplied.begin(),
5567  outer_supplied.end(),
5568  inner_supplied.begin(),
5569  inner_supplied.end(),
5570  std::inserter(intersection, intersection.end()));
5571 
5572  if (!intersection.empty())
5573  {
5574  std::ostringstream oss;
5575  oss << "The following material properties are declared on block " << it.first
5576  << " by multiple materials:\n";
5577  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << "Material Property"
5578  << "Material Objects\n";
5579  for (const auto & outer_name : intersection)
5580  {
5581  oss << ConsoleUtils::indent(2) << std::setw(30) << std::left << outer_name;
5582  for (const auto & inner_name : prop_to_mat[outer_name])
5583  oss << inner_name << " ";
5584  oss << '\n';
5585  }
5586 
5587  mooseError(oss.str());
5588  break;
5589  }
5590  }
5591  }
5592 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:29
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
const std::map< unsigned int, std::string > statefulPropNames() const
void removeSubstring(std::string &main, const std::string &sub)
find, erase, length algorithm for removing a substring from a string
Definition: MooseUtils.C:913
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:15
std::map< SubdomainID, std::set< MaterialPropertyName > > _zero_block_material_props
Set of properties returned as zero properties.
Definition: SubProblem.h:598
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
MaterialPropertyStorage & _material_props

◆ checkDisplacementOrders()

void FEProblemBase::checkDisplacementOrders ( )
protectedinherited

Verify that SECOND order mesh uses SECOND order displacements.

Definition at line 5386 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5387 {
5388  if (_displaced_problem)
5389  {
5390  bool mesh_has_second_order_elements = false;
5391  for (const auto & elem : as_range(_displaced_mesh->activeLocalElementsBegin(),
5393  {
5394  if (elem->default_order() == SECOND)
5395  {
5396  mesh_has_second_order_elements = true;
5397  break;
5398  }
5399  }
5400 
5401  // We checked our local elements, so take the max over all processors.
5402  _displaced_mesh->comm().max(mesh_has_second_order_elements);
5403 
5404  // If the Mesh has second order elements, make sure the
5405  // displacement variables are second-order.
5406  if (mesh_has_second_order_elements)
5407  {
5408  const std::vector<std::string> & displacement_variables =
5409  _displaced_problem->getDisplacementVarNames();
5410 
5411  for (const auto & var_name : displacement_variables)
5412  {
5413  MooseVariableFEBase & mv =
5414  _displaced_problem->getVariable(/*tid=*/0,
5415  var_name,
5418  if (mv.order() != SECOND)
5419  mooseError("Error: mesh has SECOND order elements, so all displacement variables must be "
5420  "SECOND order.");
5421  }
5422  }
5423  }
5424 }
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2212
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
std::shared_ptr< DisplacedProblem > _displaced_problem
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2218
MooseMesh * _displaced_mesh

◆ checkExceptionAndStopSolve()

void FEProblemBase::checkExceptionAndStopSolve ( )
virtualinherited

Check to see if an exception has occurred on any processor and stop the solve.

Note: Collective on MPI! Must be called simultaneously by all processors!

Also: This will throw a MooseException!

Note: DO NOT CALL THIS IN A THREADED REGION! This is meant to be called just after a threaded section.

Definition at line 4184 of file FEProblemBase.C.

Referenced by FEProblemBase::computeBounds().

4185 {
4187 
4188  // See if any processor had an exception. If it did, get back the
4189  // processor that the exception occurred on.
4190  unsigned int processor_id;
4191 
4192  _communicator.maxloc(_has_exception, processor_id);
4193 
4194  if (_has_exception)
4195  {
4196  _communicator.broadcast(_exception_message, processor_id);
4197 
4198  // Print the message
4199  if (_communicator.rank() == 0)
4200  Moose::err << _exception_message << std::endl;
4201 
4202  // Stop the solve -- this entails setting
4203  // SNESSetFunctionDomainError() or directly inserting NaNs in the
4204  // residual vector to let PETSc >= 3.6 return DIVERGED_NANORINF.
4205  _nl->stopSolve();
4206 
4207  // and close Aux system (we MUST do this here; see #11525)
4208  _aux->solution().close();
4209 
4210  // We've handled this exception, so we no longer have one.
4211  _has_exception = false;
4212 
4213  // Force the next linear convergence check to fail.
4215 
4216  // Repropagate the exception, so it can be caught at a higher level, typically
4217  // this is NonlinearSystem::computeResidual().
4219  }
4220 }
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_exception
Whether or not an exception has occurred.
std::shared_ptr< AuxiliarySystem > _aux
std::string _exception_message
The error message to go with an exception.
const PerfID _check_exception_and_stop_solve_timer
Provides a way for users to bail out of the current solve.
bool _fail_next_linear_convergence_check

◆ checkLinearConvergence()

MooseLinearConvergenceReason FEProblemBase::checkLinearConvergence ( std::string &  msg,
const PetscInt  n,
const Real  rnorm,
const Real  rtol,
const Real  atol,
const Real  dtol,
const PetscInt  maxits 
)
virtualinherited

Check for convergence of the linear solution.

Parameters
msgError message that gets sent back to the solver
nIteration counter
rnormNorm of the residual vector
rtolRelative residual convergence tolerance
atolAbsolute residual convergence tolerance
dtolDivergence tolerance
maxitsMaximum number of linear iterations allowed

Definition at line 5723 of file FEProblemBase.C.

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

5730 {
5731  TIME_SECTION(_check_linear_convergence_timer);
5732 
5734  {
5735  // Unset the flag
5738  }
5739 
5740  // We initialize the reason to something that basically means MOOSE
5741  // has not made a decision on convergence yet.
5743 
5744  // Get a reference to our Nonlinear System
5746 
5747  // If it's the beginning of a new set of iterations, reset
5748  // last_rnorm, otherwise record the most recent linear residual norm
5749  // in the NonlinearSystem.
5750  if (n == 0)
5751  system._last_rnorm = 1e99;
5752  else
5753  system._last_rnorm = rnorm;
5754 
5755  // If the linear residual norm is less than the System's linear absolute
5756  // step tolerance, we consider it to be converged and set the reason as
5757  // MooseLinearConvergenceReason::CONVERGED_RTOL.
5758  if (std::abs(rnorm - system._last_rnorm) < system._l_abs_step_tol)
5760 
5761  // If we hit max its, then we consider that converged (rather than
5762  // KSP_DIVERGED_ITS).
5763  if (n >= maxits)
5765 
5766  // If either of our convergence criteria is met, store the number of linear
5767  // iterations in the System.
5770  system._current_l_its.push_back(static_cast<unsigned int>(n));
5771 
5772  return reason;
5773 }
const PerfID _check_linear_convergence_timer
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
NonlinearSystemBase & getNonlinearSystemBase()
Nonlinear system to be solved.
MooseLinearConvergenceReason
nl system()
PetscInt n
bool _fail_next_linear_convergence_check

◆ checkNonlinearConvergence()

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

Check for converence of the nonlinear solution.

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

Definition at line 5642 of file FEProblemBase.C.

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

5655 {
5656  TIME_SECTION(_check_nonlinear_convergence_timer);
5657 
5660 
5661  // This is the first residual before any iterations have been done,
5662  // but after PresetBCs (if any) have been imposed on the solution
5663  // vector. We save it, and use it to detect convergence if
5664  // compute_initial_residual_before_preset_bcs=false.
5665  if (it == 0)
5666  system._initial_residual_after_preset_bcs = fnorm;
5667 
5668  std::ostringstream oss;
5669  if (fnorm != fnorm)
5670  {
5671  oss << "Failed to converge, function norm is NaN\n";
5673  }
5674  else if (fnorm < abstol && (it || !force_iteration))
5675  {
5676  oss << "Converged due to function norm " << fnorm << " < " << abstol << '\n';
5678  }
5679  else if (nfuncs >= max_funcs)
5680  {
5681  oss << "Exceeded maximum number of function evaluations: " << nfuncs << " > " << max_funcs
5682  << '\n';
5684  }
5685  else if (it && fnorm > system._last_nl_rnorm && fnorm >= div_threshold)
5686  {
5687  oss << "Nonlinear solve was blowing up!\n";
5689  }
5690 
5691  if (it && reason == MooseNonlinearConvergenceReason::ITERATING)
5692  {
5693  // If compute_initial_residual_before_preset_bcs==false, then use the
5694  // first residual computed by Petsc to determine convergence.
5695  Real the_residual = system._compute_initial_residual_before_preset_bcs
5696  ? initial_residual_before_preset_bcs
5697  : system._initial_residual_after_preset_bcs;
5698  if (fnorm <= the_residual * rtol)
5699  {
5700  oss << "Converged due to function norm " << fnorm << " < "
5701  << " (relative tolerance)\n";
5703  }
5704  else if (snorm < stol * xnorm)
5705  {
5706  oss << "Converged due to small update length: " << snorm << " < " << stol << " * " << xnorm
5707  << '\n';
5709  }
5710  }
5711 
5712  system._last_nl_rnorm = fnorm;
5713  system._current_nl_its = static_cast<unsigned int>(it);
5714 
5715  msg = oss.str();
5716  if (_app.multiAppLevel() > 0)
5718 
5719  return reason;
5720 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
NonlinearSystemBase & getNonlinearSystemBase()
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN)
Indents the supplied message given the prefix and color.
Definition: MooseUtils.C:477
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:511
Nonlinear system to be solved.
nl system()
const PerfID _check_nonlinear_convergence_timer
MooseNonlinearConvergenceReason
Enumeration for nonlinear convergence reasons.
Definition: FEProblemBase.h:90
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174

◆ checkNonlocalCoupling()

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

Definition at line 949 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

950 {
951  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
952  {
953  const auto & all_kernels = _nl->getKernelWarehouse();
954  const auto & kernels = all_kernels.getObjects(tid);
955  for (const auto & kernel : kernels)
956  {
957  std::shared_ptr<NonlocalKernel> nonlocal_kernel =
959  if (nonlocal_kernel)
960  {
963  _nonlocal_kernels.addObject(kernel, tid);
964  }
965  }
966  const MooseObjectWarehouse<IntegratedBCBase> & all_integrated_bcs =
967  _nl->getIntegratedBCWarehouse();
968  const auto & integrated_bcs = all_integrated_bcs.getObjects(tid);
969  for (const auto & integrated_bc : integrated_bcs)
970  {
971  std::shared_ptr<NonlocalIntegratedBC> nonlocal_integrated_bc =
973  if (nonlocal_integrated_bc)
974  {
977  _nonlocal_integrated_bcs.addObject(integrated_bc, tid);
978  }
979  }
980  }
981 }
bool _requires_nonlocal_coupling
nonlocal coupling requirement flag
Definition: SubProblem.h:633
std::shared_ptr< NonlinearSystemBase > _nl
NonlocalIntegratedBC is used for solving integral terms in integro-differential equations.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
bool _calculate_jacobian_in_uo
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
NonlocalKernel is used for solving integral terms in integro-differential equations.
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
unsigned int THREAD_ID
Definition: MooseTypes.h:126
MooseObjectWarehouse< IntegratedBCBase > _nonlocal_integrated_bcs
nonlocal integrated_bcs
MooseObjectWarehouse< KernelBase > _nonlocal_kernels
nonlocal kernels

◆ checkNonlocalCouplingRequirement()

virtual bool SubProblem::checkNonlocalCouplingRequirement ( )
inlinevirtualinherited

◆ checkProblemIntegrity()

void FEProblemBase::checkProblemIntegrity ( )
virtualinherited

Method called to perform a series of sanity checks before a simulation is run.

This method doesn't return when errors are found, instead it generally calls mooseError() directly.

If a material is specified for any block in the simulation, then all blocks must have a material specified.

unsigned int is necessary to print SubdomainIDs in the statement below

Reimplemented in EigenProblem.

Definition at line 5279 of file FEProblemBase.C.

Referenced by EigenProblem::checkProblemIntegrity().

5280 {
5281  TIME_SECTION(_check_problem_integrity_timer);
5282 
5283  // Check for unsatisfied actions
5284  const std::set<SubdomainID> & mesh_subdomains = _mesh.meshSubdomains();
5285 
5286  // Check kernel coverage of subdomains (blocks) in the mesh
5288  _nl->checkKernelCoverage(mesh_subdomains);
5289 
5290  // Check materials
5291  {
5292 #ifdef LIBMESH_ENABLE_AMR
5293  if (_adaptivity.isOn() &&
5296  {
5297  _console << "Using EXPERIMENTAL Stateful Material Property projection with Adaptivity!\n";
5298 
5299  if (n_processors() > 1)
5300  {
5301  if (_mesh.uniformRefineLevel() > 0 && _mesh.getMesh().skip_partitioning() == false)
5302  mooseError("This simulation is using uniform refinement on the mesh, with stateful "
5303  "properties and adaptivity. "
5304  "You must skip partitioning to run this case:\nMesh/skip_partitioning=true");
5305 
5306  _console << "\nWarning! Mesh re-partitioning is disabled while using stateful material "
5307  "properties! This can lead to large load imbalances and degraded "
5308  "performance!!\n\n";
5309  _mesh.getMesh().skip_partitioning(true);
5310 
5311  _mesh.errorIfDistributedMesh("StatefulMaterials + Adaptivity");
5312 
5313  if (_displaced_problem)
5314  _displaced_problem->mesh().getMesh().skip_partitioning(true);
5315  }
5316  }
5317 #endif
5318 
5319  std::set<SubdomainID> local_mesh_subs(mesh_subdomains);
5320 
5322  {
5327  bool check_material_coverage = false;
5328  std::set<SubdomainID> ids = _all_materials.getActiveBlocks();
5329  for (const auto & id : ids)
5330  {
5331  local_mesh_subs.erase(id);
5332  check_material_coverage = true;
5333  }
5334 
5335  // also exclude mortar spaces from the material check
5336  auto & mortar_ifaces = _mesh.getMortarInterfaces();
5337  for (const auto & mortar_iface : mortar_ifaces)
5338  local_mesh_subs.erase(mortar_iface->_id);
5339 
5340  // Check Material Coverage
5341  if (check_material_coverage && !local_mesh_subs.empty())
5342  {
5343  std::stringstream extra_subdomain_ids;
5345  std::copy(local_mesh_subs.begin(),
5346  local_mesh_subs.end(),
5347  std::ostream_iterator<unsigned int>(extra_subdomain_ids, " "));
5348 
5349  mooseError("The following blocks from your input mesh do not contain an active material: " +
5350  extra_subdomain_ids.str() +
5351  "\nWhen ANY mesh block contains a Material object, "
5352  "all blocks must contain a Material object.\n");
5353  }
5354  }
5355 
5356  // Check material properties on blocks and boundaries
5359 
5360  // Check that material properties exist when requested by other properties on a given block
5361  const auto & materials = _all_materials.getActiveObjects();
5362  for (const auto & material : materials)
5363  material->checkStatefulSanity();
5364 
5365  // auto mats_to_check = _materials.getActiveBlockObjects();
5366  // const auto & discrete_materials = _discrete_materials.getActiveBlockObjects();
5367  // for (const auto & map_it : discrete_materials)
5368  // for (const auto & container_element : map_it.second)
5369  // mats_to_check[map_it.first].push_back(container_element);
5371  }
5372 
5373  // Check UserObjects and Postprocessors
5374  checkUserObjects();
5375 
5376  // Verify that we don't have any Element type/Coordinate Type conflicts
5378 
5379  // If using displacements, verify that the order of the displacement
5380  // variables matches the order of the elements in the displaced
5381  // mesh.
5383 }
MaterialPropertyStorage & _bnd_material_props
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _check_problem_integrity_timer
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool isOn()
Is adaptivity on?
Definition: Adaptivity.h:167
const bool _skip_nl_system_check
virtual void checkBoundaryMatProps()
Checks boundary material properties integrity.
Definition: SubProblem.C:486
std::vector< std::unique_ptr< MooseMesh::MortarInterface > > & getMortarInterfaces()
Definition: MooseMesh.h:815
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2680
const std::vector< std::shared_ptr< T > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread...
std::set< SubdomainID > getActiveBlocks(THREAD_ID tid=0) const
Return a set of active SubdomainsIDs.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2562
void checkUserObjects()
void checkDisplacementOrders()
Verify that SECOND order mesh uses SECOND order displacements.
void checkDependMaterialsHelper(const std::map< SubdomainID, std::vector< std::shared_ptr< Material >>> &materials_map)
Helper method for checking Material object dependency.
MooseMesh & _mesh
virtual void checkBlockMatProps()
Checks block material properties integrity.
Definition: SubProblem.C:436
Adaptivity _adaptivity
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2356
bool _kernel_coverage_check
Determines whether a check to verify an active kernel on every subdomain.
bool _solve
Whether or not to actually solve the nonlinear system.
std::shared_ptr< DisplacedProblem > _displaced_problem
MaterialPropertyStorage & _neighbor_material_props
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
MaterialPropertyStorage & _material_props
bool _material_coverage_check
Determines whether a check to verify an active material on every subdomain.
MaterialWarehouse _all_materials
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2311
void checkCoordinateSystems()
Verify that there are no element type/coordinate type conflicts.

◆ checkUserObjectJacobianRequirement()

void FEProblemBase::checkUserObjectJacobianRequirement ( THREAD_ID  tid)
inherited

Definition at line 984 of file FEProblemBase.C.

Referenced by FEProblemBase::initialSetup().

985 {
986  std::set<MooseVariableFEBase *> uo_jacobian_moose_vars;
987  {
988  std::vector<ShapeElementUserObject *> objs;
989  theWarehouse()
990  .query()
992  .condition<AttribThread>(tid)
993  .queryInto(objs);
994 
995  for (const auto & uo : objs)
996  {
997  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
998  const std::set<MooseVariableFEBase *> & mv_deps = uo->jacobianMooseVariables();
999  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1000  }
1001  }
1002  {
1003  std::vector<ShapeSideUserObject *> objs;
1004  theWarehouse()
1005  .query()
1007  .condition<AttribThread>(tid)
1008  .queryInto(objs);
1009  for (const auto & uo : objs)
1010  {
1011  _calculate_jacobian_in_uo = uo->computeJacobianFlag();
1012  const std::set<MooseVariableFEBase *> & mv_deps = uo->jacobianMooseVariables();
1013  uo_jacobian_moose_vars.insert(mv_deps.begin(), mv_deps.end());
1014  }
1015  }
1016 
1017  _uo_jacobian_moose_vars[tid].assign(uo_jacobian_moose_vars.begin(), uo_jacobian_moose_vars.end());
1018  std::sort(
1019  _uo_jacobian_moose_vars[tid].begin(), _uo_jacobian_moose_vars[tid].end(), sortMooseVariables);
1020 }
Query & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:184
bool _calculate_jacobian_in_uo
TheWarehouse & theWarehouse() const
std::vector< std::vector< MooseVariableFEBase * > > _uo_jacobian_moose_vars
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:266

◆ checkUserObjects()

void FEProblemBase::checkUserObjects ( )
protectedinherited

Definition at line 5427 of file FEProblemBase.C.

Referenced by FEProblemBase::checkProblemIntegrity().

5428 {
5429  // Check user_objects block coverage
5430  std::set<SubdomainID> mesh_subdomains = _mesh.meshSubdomains();
5431  std::set<SubdomainID> user_objects_blocks;
5432 
5433  // gather names of all user_objects that were defined in the input file
5434  // and the blocks that they are defined on
5435  std::set<std::string> names;
5436 
5437  std::vector<UserObject *> objects;
5439 
5440  for (const auto & obj : objects)
5441  names.insert(obj->name());
5442 
5443  // See if all referenced blocks are covered
5444  mesh_subdomains.insert(Moose::ANY_BLOCK_ID);
5445  std::set<SubdomainID> difference;
5446  std::set_difference(user_objects_blocks.begin(),
5447  user_objects_blocks.end(),
5448  mesh_subdomains.begin(),
5449  mesh_subdomains.end(),
5450  std::inserter(difference, difference.end()));
5451 
5452  if (!difference.empty())
5453  {
5454  std::ostringstream oss;
5455  oss << "One or more UserObjects is referencing a nonexistent block:\n";
5456  for (const auto & id : difference)
5457  oss << id << "\n";
5458  mooseError(oss.str());
5459  }
5460 
5461  // check that all requested UserObjects were defined in the input file
5462  for (const auto & it : _pps_data.values())
5463  {
5464  if (names.find(it.first) == names.end())
5465  mooseError("Postprocessor '" + it.first + "' requested but not specified in the input file.");
5466  }
5467 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
Query & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:184
TheWarehouse & theWarehouse() const
PostprocessorData _pps_data
MooseMesh & _mesh
const std::map< std::string, PostprocessorValue * > & values() const
Get the map of names -> Postprocessor values.
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:15
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
Definition: TheWarehouse.h:266
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2311

◆ clearActiveElementalMooseVariables()

void FEProblemBase::clearActiveElementalMooseVariables ( THREAD_ID  tid)
overridevirtualinherited

Clear the active elemental MooseVariableFEBase.

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

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 3869 of file FEProblemBase.C.

Referenced by ComputeMarkerThread::post(), ComputeElemAuxVarsThread::post(), ComputeMaterialsObjectThread::post(), ComputeJacobianThread::post(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeResidualThread::post(), and ComputeUserObjectsThread::post().

3870 {
3872 
3873  if (_displaced_problem)
3874  _displaced_problem->clearActiveElementalMooseVariables(tid);
3875 }
virtual void clearActiveElementalMooseVariables(THREAD_ID tid)
Clear the active elemental MooseVariableFEBase.
Definition: SubProblem.C:249
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveFEVariableCoupleableMatrixTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3878 of file FEProblemBase.C.

Referenced by ComputeElemAuxVarsThread::post(), and ComputeNodalAuxVarsThread::post().

3879 {
3881 
3882  if (_displaced_problem)
3883  _displaced_problem->clearActiveFEVariableCoupleableMatrixTags(tid);
3884 }
virtual void clearActiveFEVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:172
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveFEVariableCoupleableVectorTags()

void FEProblemBase::clearActiveFEVariableCoupleableVectorTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3887 of file FEProblemBase.C.

Referenced by ComputeElemAuxVarsThread::post(), and ComputeNodalAuxVarsThread::post().

3888 {
3890 
3891  if (_displaced_problem)
3892  _displaced_problem->clearActiveFEVariableCoupleableVectorTags(tid);
3893 }
virtual void clearActiveFEVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:166
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearActiveMaterialProperties()

void FEProblemBase::clearActiveMaterialProperties ( THREAD_ID  tid)
overridevirtualinherited

Clear the active material properties.

Should be called at the end of every computing thread

Parameters
tidThe thread id

Reimplemented from SubProblem.

Definition at line 3924 of file FEProblemBase.C.

Referenced by NodalPatchRecovery::compute(), ComputeElemAuxBcsThread::operator()(), ComputeElemAuxVarsThread::post(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeJacobianThread::post(), ComputeResidualThread::post(), and ComputeUserObjectsThread::post().

3925 {
3927 
3928  if (_displaced_problem)
3929  _displaced_problem->clearActiveMaterialProperties(tid);
3930 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void clearActiveMaterialProperties(THREAD_ID tid)
Clear the active material properties.
Definition: SubProblem.C:275

◆ clearActiveScalarVariableCoupleableMatrixTags()

void FEProblemBase::clearActiveScalarVariableCoupleableMatrixTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3896 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

3897 {
3899 
3900  if (_displaced_problem)
3901  _displaced_problem->clearActiveScalarVariableCoupleableMatrixTags(tid);
3902 }
std::shared_ptr< DisplacedProblem > _displaced_problem
virtual void clearActiveScalarVariableCoupleableMatrixTags(THREAD_ID tid)
Definition: SubProblem.C:208

◆ clearActiveScalarVariableCoupleableVectorTags()

void FEProblemBase::clearActiveScalarVariableCoupleableVectorTags ( THREAD_ID  tid)
overridevirtualinherited

Reimplemented from SubProblem.

Definition at line 3905 of file FEProblemBase.C.

Referenced by AuxiliarySystem::clearScalarVariableCoupleableTags().

3906 {
3908 
3909  if (_displaced_problem)
3910  _displaced_problem->clearActiveScalarVariableCoupleableVectorTags(tid);
3911 }
virtual void clearActiveScalarVariableCoupleableVectorTags(THREAD_ID tid)
Definition: SubProblem.C:202
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ clearDiracInfo()

void FEProblemBase::clearDiracInfo ( )
overridevirtualinherited

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

Implements SubProblem.

Definition at line 1635 of file FEProblemBase.C.

Referenced by NonlinearSystemBase::computeDiracContributions().

1636 {
1638 
1639  if (_displaced_problem)
1640  _displaced_problem->clearDiracInfo();
1641 }
void clearPoints()
Remove all of the current points and elements.
std::shared_ptr< DisplacedProblem > _displaced_problem
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:589

◆ computeAuxiliaryKernels()

void FEProblemBase::computeAuxiliaryKernels ( const ExecFlagType type)
virtualinherited

Call compute methods on AuxKernels.

Definition at line 3056 of file FEProblemBase.C.

Referenced by FEProblemBase::execute().

3057 {
3058  _aux->compute(type);
3059 }
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:50
std::shared_ptr< AuxiliarySystem > _aux

◆ computeBounds()

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

Definition at line 4784 of file FEProblemBase.C.

Referenced by Moose::compute_bounds().

4787 {
4788  if (!_nl->hasVector("lower_bound") || !_nl->hasVector("upper_bound"))
4789  return;
4790 
4791  TIME_SECTION(_compute_bounds_timer);
4792 
4793  NumericVector<Number> & _lower = _nl->getVector("lower_bound");
4794  NumericVector<Number> & _upper = _nl->getVector("upper_bound");
4795  _lower.swap(lower);
4796  _upper.swap(upper);
4797  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); tid++)
4799 
4800  _aux->residualSetup();
4801  _aux->compute(EXEC_LINEAR);
4802  _lower.swap(lower);
4803  _upper.swap(upper);
4804 
4806 }
const PerfID _compute_bounds_timer
std::shared_ptr< NonlinearSystemBase > _nl
std::shared_ptr< AuxiliarySystem > _aux
const ExecFlagType EXEC_LINEAR
MaterialWarehouse _all_materials
unsigned int THREAD_ID
Definition: MooseTypes.h:126
virtual void checkExceptionAndStopSolve()
Check to see if an exception has occurred on any processor and stop the solve.
virtual void residualSetup(THREAD_ID tid=0) const

◆ computeDamping()

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

Definition at line 4925 of file FEProblemBase.C.

Referenced by FEProblemBase::computePostCheck().

4927 {
4928  // Default to no damping
4929  Real damping = 1.0;
4930 
4931  if (_has_dampers)
4932  {
4933  TIME_SECTION(_compute_damping_timer);
4934 
4935  // Save pointer to the current solution
4936  const NumericVector<Number> * _saved_current_solution = _nl->currentSolution();
4937 
4938  _nl->setSolution(soln);
4939  // For now, do not re-compute auxiliary variables. Doing so allows a wild solution increment
4940  // to get to the material models, which may not be able to cope with drastically different
4941  // values. Once more complete dependency checking is in place, auxiliary variables (and
4942  // material properties) will be computed as needed by dampers.
4943  // _aux.compute();
4944  damping = _nl->computeDamping(soln, update);
4945 
4946  // restore saved solution
4947  _nl->setSolution(*_saved_current_solution);
4948  }
4949 
4950  return damping;
4951 }
const PerfID _compute_damping_timer
std::shared_ptr< NonlinearSystemBase > _nl
bool _has_dampers
Whether or not this system has any Dampers associated with it.

◆ computeIndicators()

virtual void DumpObjectsProblem::computeIndicators ( )
inlineoverridevirtual

Reimplemented from FEProblemBase.

Definition at line 97 of file DumpObjectsProblem.h.

97 {}

◆ computeIndicatorsAndMarkers()

void FEProblemBase::computeIndicatorsAndMarkers ( )
virtualinherited

Definition at line 2933 of file FEProblemBase.C.

2934 {
2936  computeMarkers();
2937 }
virtual void computeMarkers()
virtual void computeIndicators()

◆ computeJacobian()

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

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

Definition at line 4638 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobianSys(), and FEProblemBase::computeTransientImplicitJacobian().

4639 {
4640  _fe_matrix_tags.clear();
4641 
4642  auto & tags = getMatrixTags();
4643  for (auto & tag : tags)
4644  _fe_matrix_tags.insert(tag.second);
4645 
4646  computeJacobianInternal(soln, jacobian, _fe_matrix_tags);
4647 }
virtual std::map< TagName, TagID > & getMatrixTags()
Return all matrix tags in the sytem, where a tag is represented by a map from name to ID...
Definition: SubProblem.h:157
virtual void computeJacobianInternal(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, const std::set< TagID > &tags)
Form a Jacobian matrix for multiple tags.
std::set< TagID > _fe_matrix_tags

◆ computeJacobianBlock()

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

Really not a good idea to use this.

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

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

Definition at line 4773 of file FEProblemBase.C.

4777 {
4778  JacobianBlock jac_block(precond_system, jacobian, ivar, jvar);
4779  std::vector<JacobianBlock *> blocks = {&jac_block};
4780  computeJacobianBlocks(blocks);
4781 }
Helper class for holding the preconditioning blocks to fill.
virtual void computeJacobianBlocks(std::vector< JacobianBlock *> &blocks)
Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditio...

◆ computeJacobianBlocks()

void FEProblemBase::computeJacobianBlocks ( std::vector< JacobianBlock *> &  blocks)
virtualinherited

Computes several Jacobian blocks simultaneously, summing their contributions into smaller preconditioning matrices.

Used by Physics-based preconditioning

Parameters
blocksThe blocks to fill in (JacobianBlock is defined in ComputeJacobianBlocksThread)

Definition at line 4757 of file FEProblemBase.C.

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

4758 {
4759  TIME_SECTION(_compute_jacobian_blocks_timer);
4760 
4761  if (_displaced_problem != NULL)
4762  {
4763  _aux->compute(EXEC_PRE_DISPLACE);
4764  _displaced_problem->updateMesh();
4765  }
4766 
4767  _aux->compute(EXEC_NONLINEAR);
4768 
4769  _nl->computeJacobianBlocks(blocks);
4770 }
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _compute_jacobian_blocks_timer
std::shared_ptr< AuxiliarySystem > _aux
const ExecFlagType EXEC_PRE_DISPLACE
const ExecFlagType EXEC_NONLINEAR
std::shared_ptr< DisplacedProblem > _displaced_problem

◆ computeJacobianInternal()

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

Form a Jacobian matrix for multiple tags.

It should not be called directly by users.

Definition at line 4650 of file FEProblemBase.C.

Referenced by FEProblemBase::computeJacobian().

4653 {
4654  TIME_SECTION(_compute_jacobian_internal_timer);
4655 
4656  _nl->setSolution(soln);
4657 
4658  _nl->associateMatrixToTag(jacobian, _nl->systemMatrixTag());
4659 
4660  computeJacobianTags(tags);
4661 
4662  _nl->disassociateMatrixFromTag(jacobian, _nl->systemMatrixTag());
4663 }
std::shared_ptr< NonlinearSystemBase > _nl
const PerfID _compute_jacobian_internal_timer
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianSys()

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

Form a Jacobian matrix.

It is called by Libmesh.

Definition at line 4616 of file FEProblemBase.C.

Referenced by Moose::compute_jacobian().

4619 {
4620  computeJacobian(soln, jacobian);
4621 }
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
Form a Jacobian matrix with the default tag (system).

◆ computeJacobianTag()

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

Form a Jacobian matrix for a given tag.

Reimplemented in EigenProblem.

Definition at line 4624 of file FEProblemBase.C.

Referenced by ActuallyExplicitEuler::solve().

4627 {
4628  _nl->setSolution(soln);
4629 
4630  _nl->associateMatrixToTag(jacobian, tag);
4631 
4632  computeJacobianTags({tag});
4633 
4634  _nl->disassociateMatrixFromTag(jacobian, tag);
4635 }
std::shared_ptr< NonlinearSystemBase > _nl
virtual void computeJacobianTags(const std::set< TagID > &tags)
Form multiple matrices, and each is associated with a tag.

◆ computeJacobianTags()

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

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

Definition at line 4666 of file FEProblemBase.C.

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

4667 {
4668  if (!_has_jacobian || !_const_jacobian)
4669  {
4670  TIME_SECTION(_compute_jacobian_tags_timer);
4671 
4672  for (auto tag : tags)
4673  if (_nl->hasMatrix(tag))
4674  _nl->getMatrix(tag).zero();
4675 
4676  _nl->zeroVariablesForJacobian();
4677  _aux->zeroVariablesForJacobian();
4678 
4679  unsigned int n_threads = libMesh::n_threads();
4680 
4681  // Random interface objects
4682  for (const auto & it : _random_data_objects)
4683  it.second->updateSeeds(EXEC_NONLINEAR);
4684 
4687  if (_displaced_problem)
4688  _displaced_problem->setCurrentlyComputingJacobian(true);
4689 
4692 
4693  for (unsigned int tid = 0; tid < n_threads; tid++)
4694  reinitScalars(tid);
4695 
4697 
4698  _aux->jacobianSetup();
4699 
4700  if (_displaced_problem != NULL)
4701  {
4702  _aux->compute(EXEC_PRE_DISPLACE);
4703  _displaced_problem->updateMesh();
4704  }
4705 
4706  for (unsigned int tid = 0; tid < n_threads; tid++)
4707  {
4710  }
4711 
4712  _aux->compute(EXEC_NONLINEAR);
4713 
4715 
4717