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

MultiApp Implementation for Transient Apps. More...

#include <TransientMultiApp.h>

Inheritance diagram for TransientMultiApp:
[legend]

Public Member Functions

 TransientMultiApp (const InputParameters &parameters)
 
virtual NumericVector< Number > & appTransferVector (unsigned int app, std::string var_name) override
 Get the vector to transfer to for this MultiApp. More...
 
virtual void initialSetup () override
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void restore () override
 Restore the state of every Sub App. More...
 
virtual bool solveStep (Real dt, Real target_time, bool auto_advance=true) override
 Re-solve all of the Apps. More...
 
virtual void incrementTStep (Real target_time) override
 Advances the multi-apps time step which is important for dt selection. More...
 
virtual void finishStep () override
 Calls multi-apps executioners' endStep and postStep methods which creates output and advances time (not the time step; see incrementTStep()) among other things. More...
 
virtual bool needsRestoration () override
 Whether or not this MultiApp should be restored at the beginning of each Picard iteration. More...
 
virtual void resetApp (unsigned int global_app, Real time) override
 "Reset" the App corresponding to the global App number passed in. More...
 
Real computeDT ()
 Finds the smallest dt from among any of the apps. More...
 
virtual void preExecute ()
 
virtual void finalize ()
 Method called towards the end of the simulation to execute on final. More...
 
virtual void postExecute ()
 Method called at the end of the simulation (after finalize) More...
 
void setupPositions ()
 Called just after construction to allow derived classes to set _positions;. More...
 
virtual void preTransfer (Real dt, Real target_time)
 Gets called just before transfers are done to the MultiApp (Which is just before the MultiApp is solved) More...
 
virtual void backup ()
 Save off the state of every Sub App. More...
 
virtual ExecutionergetExecutioner (unsigned int app)
 
virtual BoundingBox getBoundingBox (unsigned int app, bool displaced_mesh)
 Get the BoundingBox for the mesh associated with app The bounding box will be shifted to be in the correct position within the master domain. More...
 
FEProblemBaseproblemBase ()
 Get the FEProblemBase this MultiApp is part of. More...
 
FEProblemBaseappProblemBase (unsigned int app)
 Get the FEProblemBase for the global app is part of. More...
 
FEProblemappProblem (unsigned int app)
 Get the FEProblem for the global app is part of. More...
 
const UserObjectappUserObjectBase (unsigned int app, const std::string &name)
 Get a UserObject base for a specific global app. More...
 
Real appPostprocessorValue (unsigned int app, const std::string &name)
 Get a Postprocessor value for a specified global app. More...
 
unsigned int numGlobalApps ()
 
unsigned int numLocalApps ()
 
unsigned int firstLocalApp ()
 
bool hasApp ()
 Whether or not this MultiApp has an app on this processor. More...
 
bool hasLocalApp (unsigned int global_app)
 Whether or not the given global app number is on this processor. More...
 
MooseApplocalApp (unsigned int local_app)
 Get the local MooseApp object. More...
 
Point position (unsigned int app)
 The physical position of a global App number. More...
 
virtual void moveApp (unsigned int global_app, Point p)
 Move the global_app to Point p. More...
 
virtual void parentOutputPositionChanged ()
 For apps outputting in position we need to change their output positions if their parent app moves. More...
 
MPI_Comm & comm ()
 Get the MPI communicator this MultiApp is operating on. More...
 
bool isRootProcessor ()
 Whether or not this processor is the "root" processor for the sub communicator. 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
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 

Static Public Member Functions

static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType More...
 

Public Attributes

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

Protected Member Functions

virtual void fillPositions ()
 must fill in _positions with the positions of the sub-aps More...
 
void createApp (unsigned int i, Real start_time)
 Helper function for creating an App instance. More...
 
void buildComm ()
 Create an MPI communicator suitable for each app. More...
 
unsigned int globalAppToLocal (unsigned int global_app)
 Map a global App number to the local number. More...
 
virtual void preRunInputFile ()
 call back executed right before app->runInputFile() More...
 
void init (unsigned int num)
 Initialize the MultiApp by creating the provided number of apps. 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

FEProblemBase_fe_problem
 The FEProblemBase this MultiApp is part of. More...
 
std::string _app_type
 The type of application to build. More...
 
std::vector< Point > _positions
 The positions of all of the apps. More...
 
const bool _use_positions
 Toggle use of "positions". More...
 
std::vector< FileName > _input_files
 The input file for each app's simulation. More...
 
std::string _output_base
 The output file basename for each multiapp. More...
 
unsigned int _total_num_apps
 The total number of apps to simulate. More...
 
unsigned int _my_num_apps
 The number of apps this object is involved in simulating. More...
 
unsigned int _first_local_app
 The number of the first app on this processor. More...
 
const MPI_Comm & _orig_comm
 The original comm handle. More...
 
libMesh::Parallel::Communicator _my_communicator
 The communicator object that holds the MPI_Comm that we're going to use. More...
 
MPI_Comm & _my_comm
 The MPI communicator this object is going to use. More...
 
int _orig_num_procs
 The number of processors in the original comm. More...
 
int _orig_rank
 The mpi "rank" of this processor in the original communicator. More...
 
std::string _node_name
 Node Name. More...
 
int _my_rank
 The mpi "rank" of this processor in the sub communicator. More...
 
std::vector< std::shared_ptr< MooseApp > > _apps
 Pointers to each of the Apps. More...
 
std::vector< bool > _has_bounding_box
 Flag if this multi-app computed its bounding box (valid only for non-displaced meshes) More...
 
std::vector< BoundingBox > _bounding_box
 This multi-app's bounding box. More...
 
Real _inflation
 Relative bounding box inflation. More...
 
Point _bounding_box_padding
 Additional padding added to the bounding box, useful for 1D meshes. More...
 
unsigned int _max_procs_per_app
 Maximum number of processors to give to each app. More...
 
bool _output_in_position
 Whether or not to move the output of the MultiApp into position. More...
 
const Real _global_time_offset
 The offset time so the MultiApp local time relative to the global time. More...
 
Real _reset_time
 The time at which to reset apps. More...
 
std::vector< unsigned int > _reset_apps
 The apps to be reset. More...
 
bool _reset_happened
 Whether or not apps have been reset. More...
 
Real _move_time
 The time at which to move apps. More...
 
std::vector< unsigned int > _move_apps
 The apps to be moved. More...
 
std::vector< Point > _move_positions
 The new positions for the apps to be moved. More...
 
bool _move_happened
 Whether or not the move has happened. More...
 
bool _has_an_app
 Whether or not this processor as an App at all More...
 
SubAppBackups_backups
 Backups for each local App. More...
 
const std::vector< std::string > & _cli_args
 Storage for command line arguments. 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 ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 

Private Member Functions

void setupApp (unsigned int i, Real time=0.0)
 Setup the executioner for the local app. More...
 

Private Attributes

std::vector< Transient * > _transient_executioners
 
bool _sub_cycling
 
bool _interpolate_transfers
 
bool _detect_steady_state
 
Real _steady_state_tol
 
bool _output_sub_cycles
 
unsigned int _max_failures
 
bool _tolerate_failure
 
unsigned int _failures
 
bool _catch_up
 
Real _max_catch_up_steps
 
bool _keep_solution_during_restore
 
bool & _first
 Is it our first time through the execution loop? More...
 
std::vector< std::string > _transferred_vars
 The variables that have been transferred to. Used when doing transfer interpolation. This will be cleared after each solve. More...
 
std::set< dof_id_type > _transferred_dofs
 The DoFs associated with all of the currently transferred variables. More...
 
std::vector< std::map< std::string, unsigned int > > _output_file_numbers
 
bool _auto_advance
 
std::set< unsigned int > _reset
 
bool _print_sub_cycles
 Flag for toggling console output on sub cycles. More...
 
std::vector< std::unique_ptr< NumericVector< Real > > > _end_solutions
 The solution from the end of the previous solve, this is cloned from the Nonlinear solution during restore. More...
 

Detailed Description

MultiApp Implementation for Transient Apps.

In particular, this is important because TransientMultiApps will be taken into account in the time step selection process.

Definition at line 29 of file TransientMultiApp.h.

Constructor & Destructor Documentation

◆ TransientMultiApp()

TransientMultiApp::TransientMultiApp ( const InputParameters parameters)

Definition at line 94 of file TransientMultiApp.C.

96  _sub_cycling(getParam<bool>("sub_cycling")),
97  _interpolate_transfers(getParam<bool>("interpolate_transfers")),
98  _detect_steady_state(getParam<bool>("detect_steady_state")),
99  _steady_state_tol(getParam<Real>("steady_state_tol")),
100  _output_sub_cycles(getParam<bool>("output_sub_cycles")),
101  _max_failures(getParam<unsigned int>("max_failures")),
102  _tolerate_failure(getParam<bool>("tolerate_failure")),
103  _failures(0),
104  _catch_up(getParam<bool>("catch_up")),
105  _max_catch_up_steps(getParam<Real>("max_catch_up_steps")),
106  _keep_solution_during_restore(getParam<bool>("keep_solution_during_restore")),
107  _first(declareRecoverableData<bool>("first", true)),
108  _auto_advance(false),
109  _print_sub_cycles(getParam<bool>("print_sub_cycles"))
110 {
111  // Transfer interpolation only makes sense for sub-cycling solves
113  paramError("interpolate_transfers",
114  "MultiApp ",
115  name(),
116  " is set to interpolate_transfers but is not sub_cycling! That is not valid!");
117 
118  // Subcycling overrides catch up, we don't want to confuse users by allowing them to set both.
119  if (_sub_cycling && _catch_up)
120  paramError("catch_up",
121  "MultiApp ",
122  name(),
123  " \"sub_cycling\" and \"catch_up\" cannot both be set to true simultaneously.");
124 
126  paramError("keep_solution_during_restore",
127  "In MultiApp ",
128  name(),
129  " it doesn't make any sense to keep a solution during restore when doing "
130  "sub_cycling. Consider trying \"catch_up\" steps instead");
131 
133  paramError("keep_solution_during_restore",
134  "In MultiApp ",
135  name(),
136  " \"keep_solution_during_restore\" requires \"catch_up = true\". Either disable "
137  "\"keep_solution_during_restart\" or set \"catch_up = true\"");
138 
140  paramInfo("tolerate_failure",
141  "In MultiApp ",
142  name(),
143  " both \"sub_cycling\" and \"tolerate_failure\" are set to true. \"tolerate_failure\""
144  " will be ignored.");
145 }
MultiApp(const InputParameters &parameters)
Definition: MultiApp.C:171
bool _print_sub_cycles
Flag for toggling console output on sub cycles.
unsigned int _max_failures
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 in...
Definition: MooseObject.h:135
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
bool & _first
Is it our first time through the execution loop?
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 ...
Definition: MooseObject.h:105
unsigned int _failures
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

Member Function Documentation

◆ appPostprocessorValue()

Real MultiApp::appPostprocessorValue ( unsigned int  app,
const std::string &  name 
)
inherited

Get a Postprocessor value for a specified global app.

Parameters
appThe global app number you want to get a Postprocessor from.
nameThe name of the Postprocessor.

Definition at line 520 of file MultiApp.C.

521 {
522  if (!_has_an_app)
523  mooseError("No app for ", MultiApp::name(), " on processor ", _orig_rank);
524 
526 }
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
PostprocessorValue & getPostprocessorValue(const PostprocessorName &name)
Get a reference to the value associated with the postprocessor.

◆ appProblem()

FEProblem & MultiApp::appProblem ( unsigned int  app)
inherited

Get the FEProblem for the global app is part of.

Parameters
appThe global app number

Definition at line 498 of file MultiApp.C.

499 {
501  "MultiApp::appProblem() is deprecated, call MultiApp::appProblemBase() instead.\n");
502  if (!_has_an_app)
503  mooseError("No app for ", name(), " on processor ", _orig_rank);
504 
505  unsigned int local_app = globalAppToLocal(app);
506 
507  return dynamic_cast<FEProblem &>(_apps[local_app]->getExecutioner()->feProblem());
508 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:25
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:158
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796

◆ appProblemBase()

FEProblemBase & MultiApp::appProblemBase ( unsigned int  app)
inherited

Get the FEProblemBase for the global app is part of.

Parameters
appThe global app number

Definition at line 487 of file MultiApp.C.

Referenced by MultiApp::appPostprocessorValue(), appTransferVector(), MultiApp::appTransferVector(), MultiApp::appUserObjectBase(), resetApp(), setupApp(), and solveStep().

488 {
489  if (!_has_an_app)
490  mooseError("No app for ", name(), " on processor ", _orig_rank);
491 
492  unsigned int local_app = globalAppToLocal(app);
493 
494  return _apps[local_app]->getExecutioner()->feProblem();
495 }
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796

◆ appTransferVector()

NumericVector< Number > & TransientMultiApp::appTransferVector ( unsigned int  app,
std::string  var_name 
)
overridevirtual

Get the vector to transfer to for this MultiApp.

In general this is the Auxiliary system solution vector.

Parameters
appThe global app number you want the transfer vector for.
var_nameThe name of the variable you are going to be transferring to.
Returns
The vector to fill.

Reimplemented from MultiApp.

Definition at line 148 of file TransientMultiApp.C.

149 {
150  if (std::find(_transferred_vars.begin(), _transferred_vars.end(), var_name) ==
151  _transferred_vars.end())
152  _transferred_vars.push_back(var_name);
153 
155  return appProblemBase(app).getAuxiliarySystem().system().get_vector("transfer");
156 
158 }
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
std::vector< std::string > _transferred_vars
The variables that have been transferred to. Used when doing transfer interpolation. This will be cleared after each solve.
AuxiliarySystem & getAuxiliarySystem()
virtual NumericVector< Number > & solution() override
virtual System & system() override
Get the reference to the libMesh system.

◆ appUserObjectBase()

const UserObject & MultiApp::appUserObjectBase ( unsigned int  app,
const std::string &  name 
)
inherited

Get a UserObject base for a specific global app.

Parameters
appThe global app number you want to get a UserObject from.
nameThe name of the UserObject.

Definition at line 511 of file MultiApp.C.

Referenced by MultiAppDTKUserObjectEvaluator::evaluate().

512 {
513  if (!_has_an_app)
514  mooseError("No app for ", MultiApp::name(), " on processor ", _orig_rank);
515 
517 }
const UserObject & getUserObjectBase(const std::string &name) const
Get the user object by its name.
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ backup()

void MultiApp::backup ( )
virtualinherited

Save off the state of every Sub App.

This allows us to "Restore" this state later

Reimplemented in FullSolveMultiApp.

Definition at line 400 of file MultiApp.C.

Referenced by FullSolveMultiApp::backup(), and dataStore().

401 {
402  _console << "Begining backing up MultiApp " << name() << std::endl;
403  for (unsigned int i = 0; i < _my_num_apps; i++)
404  _backups[i] = _apps[i]->backup();
405  _console << "Finished backing up MultiApp " << name() << std::endl;
406 }
virtual void backup()
Save off the state of every Sub App.
Definition: MultiApp.C:400
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
SubAppBackups & _backups
Backups for each local App.
Definition: MultiApp.h:415
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ buildComm()

void MultiApp::buildComm ( )
protectedinherited

Create an MPI communicator suitable for each app.

Also find out which communicator we are using and what our first local app is.

Definition at line 700 of file MultiApp.C.

Referenced by MultiApp::init().

701 {
702  int ierr;
703 
704  ierr = MPI_Comm_size(_communicator.get(), &_orig_num_procs);
705  mooseCheckMPIErr(ierr);
706  ierr = MPI_Comm_rank(_communicator.get(), &_orig_rank);
707  mooseCheckMPIErr(ierr);
708 
709  struct utsname sysInfo;
710  uname(&sysInfo);
711 
712  _node_name = sysInfo.nodename;
713 
714  // If we have more apps than processors then we're just going to divide up the work
715  if (_total_num_apps >= (unsigned)_orig_num_procs)
716  {
717  _my_comm = MPI_COMM_SELF;
718  _my_rank = 0;
719 
721  unsigned int jobs_left = _total_num_apps - (_my_num_apps * _orig_num_procs);
722 
723  if (jobs_left != 0)
724  {
725  // Spread the remaining jobs out over the first set of processors
726  if ((unsigned)_orig_rank < jobs_left) // (these are the "jobs_left_pids" ie the pids that are
727  // snatching up extra jobs)
728  {
729  _my_num_apps += 1;
731  }
732  else
733  {
734  unsigned int num_apps_in_jobs_left_pids = (_my_num_apps + 1) * jobs_left;
735  unsigned int distance_to_jobs_left_pids = _orig_rank - jobs_left;
736 
737  _first_local_app = num_apps_in_jobs_left_pids + (_my_num_apps * distance_to_jobs_left_pids);
738  }
739  }
740  else
742 
743  return;
744  }
745 
746  // In this case we need to divide up the processors that are going to work on each app
747  int rank;
748  ierr = MPI_Comm_rank(_communicator.get(), &rank);
749  mooseCheckMPIErr(ierr);
750 
751  unsigned int procs_per_app = _orig_num_procs / _total_num_apps;
752 
753  if (_max_procs_per_app < procs_per_app)
754  procs_per_app = _max_procs_per_app;
755 
756  int my_app = rank / procs_per_app;
757  unsigned int procs_for_my_app = procs_per_app;
758 
759  if ((unsigned int)my_app > _total_num_apps - 1 && procs_for_my_app == _max_procs_per_app)
760  {
761  // If we've already hit the max number of procs per app then this processor
762  // won't have an app at all
763  _my_num_apps = 0;
764  _has_an_app = false;
765  }
766  else if ((unsigned int)my_app >=
767  _total_num_apps - 1) // The last app will gain any left-over procs
768  {
769  my_app = _total_num_apps - 1;
770  // procs_for_my_app += _orig_num_procs % _total_num_apps;
771  _first_local_app = my_app;
772  _my_num_apps = 1;
773  }
774  else
775  {
776  _first_local_app = my_app;
777  _my_num_apps = 1;
778  }
779 
780  if (_has_an_app)
781  {
782  _communicator.split(_first_local_app, rank, _my_communicator);
783 
784  ierr = MPI_Comm_rank(_my_comm, &_my_rank);
785  mooseCheckMPIErr(ierr);
786  }
787  else
788  {
789  _communicator.split(MPI_UNDEFINED, rank, _my_communicator);
790 
791  _my_rank = 0;
792  }
793 }
unsigned int _max_procs_per_app
Maximum number of processors to give to each app.
Definition: MultiApp.h:382
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
int _orig_num_procs
The number of processors in the original comm.
Definition: MultiApp.h:355
unsigned int _total_num_apps
The total number of apps to simulate.
Definition: MultiApp.h:337
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
std::string _node_name
Node Name.
Definition: MultiApp.h:361
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
libMesh::Parallel::Communicator _my_communicator
The communicator object that holds the MPI_Comm that we&#39;re going to use.
Definition: MultiApp.h:349
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
int _my_rank
The mpi "rank" of this processor in the sub communicator.
Definition: MultiApp.h:364
ierr
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352

◆ comm()

MPI_Comm& MultiApp::comm ( )
inlineinherited

Get the MPI communicator this MultiApp is operating on.

Returns
The MPI comm for this MultiApp

Definition at line 270 of file MultiApp.h.

Referenced by MultiAppDTKUserObjectEvaluator::evaluate().

270 { return _my_comm; }
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352

◆ computeDT()

Real TransientMultiApp::computeDT ( )

Finds the smallest dt from among any of the apps.

Definition at line 575 of file TransientMultiApp.C.

576 {
577  if (_sub_cycling) // Bow out of the timestep selection dance
578  return std::numeric_limits<Real>::max();
579 
580  Real smallest_dt = std::numeric_limits<Real>::max();
581 
582  if (_has_an_app)
583  {
585 
586  for (unsigned int i = 0; i < _my_num_apps; i++)
587  {
589  ex->computeDT();
590  Real dt = ex->getDT();
591 
592  smallest_dt = std::min(dt, smallest_dt);
593  }
594  }
595 
596  if (_tolerate_failure) // Bow out of the timestep selection dance, we do this down here because we
597  // need to call computeConstrainedDT at least once for these
598  // executioners...
599  return std::numeric_limits<Real>::max();
600 
601  _communicator.min(smallest_dt);
602  return smallest_dt;
603 }
virtual Real getDT()
Definition: Transient.C:552
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:31
virtual void computeDT()
Definition: Transient.C:343
std::vector< Transient * > _transient_executioners
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352

◆ createApp()

void MultiApp::createApp ( unsigned int  i,
Real  start_time 
)
protectedinherited

Helper function for creating an App instance.

Parameters
iThe local app number to create.
start_timeThe initial time for the App

Definition at line 596 of file MultiApp.C.

Referenced by MultiApp::initialSetup(), and MultiApp::resetApp().

597 {
598  // Define the app name
599  std::ostringstream multiapp_name;
600  std::string full_name;
601  multiapp_name << name() << std::setw(std::ceil(std::log10(_total_num_apps)))
602  << std::setprecision(0) << std::setfill('0') << std::right << _first_local_app + i;
603 
604  // Only add parent name if it the parent is not the main app
605  if (_app.multiAppLevel() > 0)
606  full_name = _app.name() + "_" + multiapp_name.str();
607  else
608  full_name = multiapp_name.str();
609 
611  app_params.set<FEProblemBase *>("_parent_fep") = &_fe_problem;
612  app_params.set<std::shared_ptr<CommandLine>>("_command_line") = _app.commandLine();
613 
614  // Single set of "cli_args" to be applied to all sub apps
615  if (_cli_args.size() == 1)
616  {
617  for (const std::string & str : MooseUtils::split(_cli_args[0], ";"))
618  {
619  std::ostringstream oss;
620  oss << full_name << ":" << str;
621  app_params.get<std::shared_ptr<CommandLine>>("_command_line")->addArgument(oss.str());
622  }
623  }
624 
625  // Unique set of "cli_args" to be applied to each sub apps
626  else if (_cli_args.size() > 1)
627  {
628  for (const std::string & str : MooseUtils::split(_cli_args[i + _first_local_app], ";"))
629  {
630  std::ostringstream oss;
631  oss << full_name << ":" << str;
632  app_params.get<std::shared_ptr<CommandLine>>("_command_line")->addArgument(oss.str());
633  }
634  }
635 
636  _console << COLOR_CYAN << "Creating MultiApp " << name() << " of type " << _app_type
637  << " of level " << _app.multiAppLevel() + 1 << " and number " << _first_local_app + i
638  << ":" << COLOR_DEFAULT << std::endl;
639  app_params.set<unsigned int>("_multiapp_level") = _app.multiAppLevel() + 1;
640  app_params.set<unsigned int>("_multiapp_number") = _first_local_app + i;
641  _apps[i] = AppFactory::instance().createShared(_app_type, full_name, app_params, _my_comm);
642  auto & app = _apps[i];
643 
644  std::string input_file = "";
645  if (_input_files.size() == 1) // If only one input file was provided, use it for all the solves
646  input_file = _input_files[0];
647  else
648  input_file = _input_files[_first_local_app + i];
649 
650  std::ostringstream output_base;
651 
652  // Create an output base by taking the output base of the master problem and appending
653  // the name of the multiapp + a number to it
654  if (!_app.getOutputFileBase().empty())
655  output_base << _app.getOutputFileBase() + "_";
656  else
657  {
658  std::string base = _app.getFileName();
659  size_t pos = base.find_last_of('.');
660  output_base << base.substr(0, pos) + "_out_";
661  }
662 
663  // Append the sub app name to the output file base
664  output_base << multiapp_name.str();
665  app->setGlobalTimeOffset(start_time);
666  app->setInputFileName(input_file);
667  app->setOutputFileBase(output_base.str());
668  app->setOutputFileNumbers(_app.getOutputWarehouse().getFileNumbers());
669  app->setRestart(_app.isRestarting());
670  app->setRecover(_app.isRecovering());
671 
672  // This means we have a backup of this app that we need to give to it
673  // Note: This won't do the restoration immediately. The Backup
674  // will be cached by the MooseApp object so that it can be used
675  // during FEProblemBase::initialSetup() during runInputFile()
676  if (_app.isRestarting() || _app.isRecovering())
677  app->setBackupObject(_backups[i]);
678 
679  if (_use_positions && getParam<bool>("output_in_position"))
680  app->setOutputPosition(_app.getOutputPosition() + _positions[_first_local_app + i]);
681 
682  // Update the MultiApp level for the app that was just created
683  app->setupOptions();
684  preRunInputFile();
685  app->runInputFile();
686 
687  auto & picard_solve = _apps[i]->getExecutioner()->picardSolve();
688  picard_solve.setMultiAppRelaxationFactor(getParam<Real>("relaxation_factor"));
689  picard_solve.setMultiAppRelaxationVariables(
690  getParam<std::vector<std::string>>("relaxed_variables"));
691  if (getParam<Real>("relaxation_factor") != 1.0)
692  {
693  // Store a copy of the previous solution here
694  FEProblemBase & fe_problem_base = _apps[i]->getExecutioner()->feProblem();
695  fe_problem_base.getNonlinearSystemBase().addVector("self_relax_previous", false, PARALLEL);
696  }
697 }
std::string getFileName(bool stripLeadingPath=true) const
Return the filename that was parsed.
Definition: MooseApp.C:1048
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
NonlinearSystemBase & getNonlinearSystemBase()
const bool _use_positions
Toggle use of "positions".
Definition: MultiApp.h:328
virtual NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const ParallelType type)
Adds a solution length vector to the system.
Definition: SystemBase.C:526
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:294
MooseAppPtr createShared(const std::string &app_type, const std::string &name, InputParameters parameters, MPI_Comm COMM_WORLD_IN)
Build an application object (must be registered)
Definition: AppFactory.C:51
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:511
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string getOutputFileBase() const
Override the selection of the output file base name.
Definition: MooseApp.C:789
FEProblemBase & _fe_problem
The FEProblemBase this MultiApp is part of.
Definition: MultiApp.h:319
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:864
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:188
std::vector< std::string > split(const std::string &str, const std::string &delimiter)
Python like split function for strings.
Definition: MooseUtils.C:784
std::map< std::string, unsigned int > getFileNumbers()
Extracts the file numbers from the output objects.
std::string _app_type
The type of application to build.
Definition: MultiApp.h:322
unsigned int _total_num_apps
The total number of apps to simulate.
Definition: MultiApp.h:337
Point getOutputPosition() const
Get the output position.
Definition: MooseApp.h:193
static AppFactory & instance()
Get the instance of the AppFactory.
Definition: AppFactory.C:17
SubAppBackups & _backups
Backups for each local App.
Definition: MultiApp.h:415
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
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::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325
std::vector< FileName > _input_files
The input file for each app&#39;s simulation.
Definition: MultiApp.h:331
virtual void preRunInputFile()
call back executed right before app->runInputFile()
Definition: MultiApp.C:806
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: AppFactory.C:25
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:858
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352
const std::vector< std::string > & _cli_args
Storage for command line arguments.
Definition: MultiApp.h:418
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1054

◆ declareRecoverableData() [1/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "recoverable".

This means that in the event of a recovery this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

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

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

Definition at line 271 of file Restartable.h.

272 {
273  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
274 
275  registerRecoverableDataOnApp(full_name);
276 
277  return declareRestartableDataWithContext<T>(data_name, nullptr);
278 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:196
std::string _restartable_name
The name of the object.
Definition: Restartable.h:193
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRecoverableData() [2/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

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

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

Definition at line 282 of file Restartable.h.

283 {
284  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
285 
286  registerRecoverableDataOnApp(full_name);
287 
288  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
289 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:196
std::string _restartable_name
The name of the object.
Definition: Restartable.h:193
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRestartableData() [1/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

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

Definition at line 204 of file Restartable.h.

205 {
206  return declareRestartableDataWithContext<T>(data_name, nullptr);
207 }

◆ declareRestartableData() [2/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

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

Definition at line 211 of file Restartable.h.

212 {
213  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
214 }

◆ declareRestartableDataWithContext() [1/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions

Definition at line 218 of file Restartable.h.

219 {
220  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
221  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
222  T & restartable_data_ref = data_ptr->get();
223 
224  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
225 
226  return restartable_data_ref;
227 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:196
std::string _restartable_name
The name of the object.
Definition: Restartable.h:193
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:199
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithContext() [2/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
const T &  init_value,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data
contextContext pointer that will be passed to the load and store functions

Definition at line 231 of file Restartable.h.

234 {
235  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
236  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
237  data_ptr->set() = init_value;
238 
239  T & restartable_data_ref = data_ptr->get();
240  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
241 
242  return restartable_data_ref;
243 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:196
std::string _restartable_name
The name of the object.
Definition: Restartable.h:193
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:199
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithObjectName()

template<typename T >
T & Restartable::declareRestartableDataWithObjectName ( std::string  data_name,
std::string  object_name 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.

Definition at line 247 of file Restartable.h.

248 {
249  return declareRestartableDataWithObjectNameWithContext<T>(data_name, object_name, nullptr);
250 }

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T >
T & Restartable::declareRestartableDataWithObjectNameWithContext ( std::string  data_name,
std::string  object_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions

Definition at line 254 of file Restartable.h.

257 {
258  std::string old_name = _restartable_name;
259 
260  _restartable_name = object_name;
261 
262  T & value = declareRestartableDataWithContext<T>(data_name, context);
263 
264  _restartable_name = old_name;
265 
266  return value;
267 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:193

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 96 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ execBitFlags()

ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

(DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType

Definition at line 85 of file SetupInterface.C.

86 {
87  // TODO: ExecFlagType
88  mooseDeprecated("The execBitFlags method is being removed because MOOSE was updated to use a "
89  "ExecFlagEnum for execute flags. This method maintains the behavior of the "
90  "original method but the use of this method should be removed from your "
91  "application. The ExecFlagEnum should be inspected directly via the "
92  "getExecuteOnEnum() method.");
93 
94  unsigned int exec_bit_field = EXEC_NONE;
95  for (const auto & flag : _exec_flags)
96  exec_bit_field |= flag.id();
97  return ExecFlagType("deprecated", exec_bit_field);
98 }
MooseEnumItem ExecFlagType
Definition: Moose.h:85
const ExecFlagType EXEC_NONE
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const int & id() const
Return the numeric, name, or raw name.
Definition: MooseEnumItem.h:37
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ execFlags()

const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtualinherited

(DEPRECATED) Get the execution flag for the object TODO: ExecFlagType

Reimplemented in MultiAppTransfer.

Definition at line 73 of file SetupInterface.C.

74 {
75  // TODO: ExecFlagType
76  mooseDeprecated("The execFlags() method is being removed because MOOSE has been updated to use a "
77  "ExecFlagEnum for execute flags. The current flags should be retrieved from "
78  "the \"exeucte_on\" parameters of your object or by using the \"_execute_enum\" "
79  "reference to the parameter or the getExecuteOnEnum() method.");
80 
81  return _exec_flags;
82 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ fillPositions()

void MultiApp::fillPositions ( )
protectedvirtualinherited

must fill in _positions with the positions of the sub-aps

Reimplemented in CentroidMultiApp.

Definition at line 252 of file MultiApp.C.

Referenced by MultiApp::setupPositions().

253 {
254  if (_move_apps.size() != _move_positions.size())
255  mooseError("The number of apps to move and the positions to move them to must be the same for "
256  "MultiApp ",
257  _name);
258 
259  if (isParamValid("positions") && isParamValid("positions_file"))
260  mooseError(
261  "Both 'positions' and 'positions_file' cannot be specified simultaneously in MultiApp ",
262  name());
263 
264  if (isParamValid("positions"))
265  {
266  _positions = getParam<std::vector<Point>>("positions");
267 
268  if (_positions.size() < _input_files.size())
269  mooseError("Not enough positions for the number of input files provided in MultiApp ",
270  name());
271  }
272  else if (isParamValid("positions_file"))
273  {
274  std::vector<FileName> positions_files = getParam<std::vector<FileName>>("positions_file");
275  std::vector<FileName> input_files = getParam<std::vector<FileName>>("input_files");
276 
277  if (input_files.size() != 1 && positions_files.size() != input_files.size())
278  mooseError("Number of input_files for MultiApp ",
279  name(),
280  " must either be only one or match the number of positions_file files");
281 
282  // Clear out the _input_files because we're going to rebuild it
283  if (input_files.size() != 1)
284  _input_files.clear();
285 
286  for (unsigned int p_file_it = 0; p_file_it < positions_files.size(); p_file_it++)
287  {
288  std::string positions_file = positions_files[p_file_it];
289 
290  std::vector<Real> positions_vec;
291 
292  // Read the file on the root processor then broadcast it
293  if (processor_id() == 0)
294  {
295  MooseUtils::checkFileReadable(positions_file);
296 
297  std::ifstream is(positions_file.c_str());
298  std::istream_iterator<Real> begin(is), end;
299  positions_vec.insert(positions_vec.begin(), begin, end);
300 
301  if (positions_vec.size() % LIBMESH_DIM != 0)
302  mooseError("Number of entries in 'positions_file' ",
303  positions_file,
304  " must be divisible by ",
305  LIBMESH_DIM,
306  " in MultiApp ",
307  name());
308  }
309 
310  // Bradcast the vector to all processors
311  std::size_t num_positions = positions_vec.size();
312  _communicator.broadcast(num_positions);
313  positions_vec.resize(num_positions);
314  _communicator.broadcast(positions_vec);
315 
316  for (unsigned int i = 0; i < positions_vec.size(); i += LIBMESH_DIM)
317  {
318  if (input_files.size() != 1)
319  _input_files.push_back(input_files[p_file_it]);
320 
321  Point position;
322 
323  // This is here so it will theoretically work with LIBMESH_DIM=1 or 2. That is completely
324  // untested!
325  for (unsigned int j = 0; j < LIBMESH_DIM; j++)
326  position(j) = positions_vec[i + j];
327 
328  _positions.push_back(position);
329  }
330  }
331  }
332  else
333  {
334  _positions = {Point()};
335 
336  if (_positions.size() < _input_files.size())
337  mooseError("Not enough positions for the number of input files provided in MultiApp ",
338  name());
339  }
340 
341  mooseAssert(_input_files.size() == 1 || _positions.size() == _input_files.size(),
342  "Number of positions and input files are not the same!");
343 }
Point position(unsigned int app)
The physical position of a global App number.
Definition: MultiApp.h:236
std::vector< Point > _move_positions
The new positions for the apps to be moved.
Definition: MultiApp.h:406
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:146
std::vector< unsigned int > _move_apps
The apps to be moved.
Definition: MultiApp.h:403
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:180
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
std::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325
std::vector< FileName > _input_files
The input file for each app&#39;s simulation.
Definition: MultiApp.h:331
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:86

◆ finalize()

void MultiApp::finalize ( )
virtualinherited

Method called towards the end of the simulation to execute on final.

Definition at line 375 of file MultiApp.C.

376 {
377  for (const auto & app_ptr : _apps)
378  {
379  auto * executioner = app_ptr->getExecutioner();
380  mooseAssert(executioner, "Executioner is nullptr");
381 
382  executioner->feProblem().execute(EXEC_FINAL);
383  executioner->feProblem().outputStep(EXEC_FINAL);
384  }
385 }
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
const ExecFlagType EXEC_FINAL

◆ finishStep()

void TransientMultiApp::finishStep ( )
overridevirtual

Calls multi-apps executioners' endStep and postStep methods which creates output and advances time (not the time step; see incrementTStep()) among other things.

This method is only called for Picard calculations because for loosely coupled calculations the executioners' endStep and postStep methods are called from solveStep().

Reimplemented from MultiApp.

Definition at line 555 of file TransientMultiApp.C.

556 {
557  if (!_sub_cycling)
558  {
559  for (unsigned int i = 0; i < _my_num_apps; i++)
560  {
562  ex->endStep();
563  ex->postStep();
564  }
565  }
566 }
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:31
virtual void endStep(Real input_time=-1.0)
Definition: Transient.C:441
std::vector< Transient * > _transient_executioners
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
virtual void postStep()
Definition: Transient.C:295

◆ firstLocalApp()

unsigned int MultiApp::firstLocalApp ( )
inlineinherited
Returns
The global number of the first app on the local processor.

Definition at line 211 of file MultiApp.h.

Referenced by MultiAppDTKUserObjectEvaluator::createSourceGeometry().

211 { return _first_local_app; }
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343

◆ getBoundingBox()

BoundingBox MultiApp::getBoundingBox ( unsigned int  app,
bool  displaced_mesh 
)
virtualinherited

Get the BoundingBox for the mesh associated with app The bounding box will be shifted to be in the correct position within the master domain.

If the MultiApp is in an RZ coordinate system the box will be the size it would be if the geometry were 3D (ie if you were to revolve the geometry around the axis to create the 3D geometry).

Parameters
appThe global app number you want to get the bounding box for
displaced_meshTrue if the bounding box is retrieved for the displaced mesh, other false

Definition at line 424 of file MultiApp.C.

Referenced by MultiAppDTKUserObjectEvaluator::createSourceGeometry().

425 {
426  if (!_has_an_app)
427  mooseError("No app for ", name(), " on processor ", _orig_rank);
428 
429  unsigned int local_app = globalAppToLocal(app);
430  FEProblemBase & fe_problem_base = _apps[local_app]->getExecutioner()->feProblem();
431  MooseMesh & mesh = (displaced_mesh && fe_problem_base.getDisplacedProblem().get() != NULL)
432  ? fe_problem_base.getDisplacedProblem()->mesh()
433  : fe_problem_base.mesh();
434 
435  {
437  if (displaced_mesh)
438  _bounding_box[local_app] = MeshTools::create_bounding_box(mesh);
439  else
440  {
441  if (!_has_bounding_box[local_app])
442  {
443  _bounding_box[local_app] = MeshTools::create_bounding_box(mesh);
444  _has_bounding_box[local_app] = true;
445  }
446  }
447  }
448  BoundingBox bbox = _bounding_box[local_app];
449 
450  Point min = bbox.min();
451  min -= _bounding_box_padding;
452  Point max = bbox.max();
453  max += _bounding_box_padding;
454 
455  Point inflation_amount = (max - min) * _inflation;
456 
457  Point inflated_min = min - inflation_amount;
458  Point inflated_max = max + inflation_amount;
459 
460  // This is where the app is located. We need to shift by this amount.
461  Point p = position(app);
462 
463  Point shifted_min = inflated_min;
464  Point shifted_max = inflated_max;
465 
466  // If the problem is RZ then we're going to invent a box that would cover the whole "3D" app
467  // FIXME: Assuming all subdomains are the same coordinate system type!
468  if (fe_problem_base.getCoordSystem(*(mesh.meshSubdomains().begin())) == Moose::COORD_RZ)
469  {
470  shifted_min(0) = -inflated_max(0);
471  shifted_min(1) = inflated_min(1);
472  shifted_min(2) = -inflated_max(0);
473 
474  shifted_max(0) = inflated_max(0);
475  shifted_max(1) = inflated_max(1);
476  shifted_max(2) = inflated_max(0);
477  }
478 
479  // Shift them to the position they're supposed to be
480  shifted_min += p;
481  shifted_max += p;
482 
483  return BoundingBox(shifted_min, shifted_max);
484 }
Point position(unsigned int app)
The physical position of a global App number.
Definition: MultiApp.h:236
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
Real _inflation
Relative bounding box inflation.
Definition: MultiApp.h:376
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem()
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:75
std::vector< BoundingBox > _bounding_box
This multi-app&#39;s bounding box.
Definition: MultiApp.h:373
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
virtual Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) override
virtual MooseMesh & mesh() override
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
Point _bounding_box_padding
Additional padding added to the bounding box, useful for 1D meshes.
Definition: MultiApp.h:379
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2318
std::vector< bool > _has_bounding_box
Flag if this multi-app computed its bounding box (valid only for non-displaced meshes) ...
Definition: MultiApp.h:370

◆ getCheckedPointerParam()

template<typename T >
T MooseObject::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inlineinherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 77 of file MooseObject.h.

78  {
79  return parameters().getCheckedPointerParam<T>(name, error_string);
80  }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const
inherited

Return the execute on MultiMooseEnum for this object.

Definition at line 67 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< Transfer >::addObjectMask(), EigenExecutionerBase::init(), AttribExecOns::initFrom(), and MultiAppTransfer::MultiAppTransfer().

68 {
69  return _execute_enum;
70 }
const ExecFlagEnum & _execute_enum
Execute settings for this oejct.

◆ getExecuteOptions()

ExecFlagEnum SetupInterface::getExecuteOptions ( )
staticinherited

(DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType

Returns
A MooseEnum with the available 'execute_on' options, the default is 'residual'

Definition at line 101 of file SetupInterface.C.

102 {
103  // TODO: ExecFlagType
104  ::mooseDeprecated("The 'getExecuteOptions' was replaced by the ExecFlagEnum class because MOOSE "
105  "was updated to use this for the execute flags and the new function provides "
106  "additional arguments for modification of the enum.");
108 }
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:715
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ getExecutioner()

Executioner * MultiApp::getExecutioner ( unsigned int  app)
virtualinherited
Parameters
appThe global app number to get the Executioner for
Returns
The Executioner associated with that App.

Definition at line 366 of file MultiApp.C.

Referenced by restore().

367 {
368  if (!_has_an_app)
369  mooseError("No app for ", name(), " on processor ", _orig_rank);
370 
371  return _apps[globalAppToLocal(app)]->getExecutioner();
372 }
int _orig_rank
The mpi "rank" of this processor in the original communicator.
Definition: MultiApp.h:358
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 91 of file MooseObject.h.

Referenced by RestartableDataIO::createBackup(), RestartableDataIO::deserializeRestartableData(), ConsoleUtils::outputMeshInformation(), Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

91 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174

◆ getParam()

template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 188 of file MooseObject.h.

Referenced by FEProblemBase::addMaterialHelper(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), MultiApp::createApp(), DerivativeParsedMaterial::DerivativeParsedMaterial(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), SideSetsBetweenSubdomainsGenerator::generate(), ExtraNodesetGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsAroundSubdomainGenerator::generate(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), GhostingUserObject::GhostingUserObject(), TimeSequenceStepper::init(), AttribThread::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterial::ParsedMaterial(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

189 {
190  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
191 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:171
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56

◆ globalAppToLocal()

unsigned int MultiApp::globalAppToLocal ( unsigned int  global_app)
protectedinherited

Map a global App number to the local number.

Note: This will error if given a global number that doesn't map to a local number.

Parameters
global_appThe global app number.
Returns
The local app number.

Definition at line 796 of file MultiApp.C.

Referenced by MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::getBoundingBox(), MultiApp::getExecutioner(), MultiApp::moveApp(), resetApp(), and MultiApp::resetApp().

797 {
798  if (global_app >= _first_local_app && global_app <= _first_local_app + (_my_num_apps - 1))
799  return global_app - _first_local_app;
800 
801  _console << _first_local_app << " " << global_app << '\n';
802  mooseError("Invalid global_app!");
803 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ hasApp()

bool MultiApp::hasApp ( )
inlineinherited

Whether or not this MultiApp has an app on this processor.

Definition at line 216 of file MultiApp.h.

216 { return _has_an_app; }
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412

◆ hasLocalApp()

bool MultiApp::hasLocalApp ( unsigned int  global_app)
inherited

Whether or not the given global app number is on this processor.

Parameters
global_appThe global app number in question
Returns
True if the global app is on this processor

Definition at line 535 of file MultiApp.C.

Referenced by MultiApp::moveApp(), resetApp(), and MultiApp::resetApp().

536 {
537  if (_has_an_app && global_app >= _first_local_app &&
538  global_app <= _first_local_app + (_my_num_apps - 1))
539  return true;
540 
541  return false;
542 }
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343

◆ incrementTStep()

void TransientMultiApp::incrementTStep ( Real  )
overridevirtual

Advances the multi-apps time step which is important for dt selection.

(Note this does not advance the time. That is done in Transient::endStep, which is called either directly from solveStep() for loose coupling cases or through finishStep() for Picard coupling cases)

Reimplemented from MultiApp.

Definition at line 535 of file TransientMultiApp.C.

536 {
537  if (!_sub_cycling)
538  {
539  for (unsigned int i = 0; i < _my_num_apps; i++)
540  {
542 
543  // The App might have a different local time from the rest of the problem
544  Real app_time_offset = _apps[i]->getGlobalTimeOffset();
545 
546  // Only increment the step if we are after (target_time) the
547  // start_time (app_time_offset) of this sub_app.
548  if (app_time_offset < target_time)
549  ex->incrementStepOrReject();
550  }
551  }
552 }
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:31
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
virtual void incrementStepOrReject()
This is where the solve step is actually incremented.
Definition: Transient.C:349
std::vector< Transient * > _transient_executioners
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340

◆ init()

void MultiApp::init ( unsigned int  num)
protectedinherited

Initialize the MultiApp by creating the provided number of apps.

This is called in the constructor, by default it utilizes the 'positions' input parameters.

Definition at line 206 of file MultiApp.C.

Referenced by MultiApp::setupPositions().

207 {
208  _total_num_apps = num;
209  buildComm();
210  _backups.reserve(_my_num_apps);
211  for (unsigned int i = 0; i < _my_num_apps; i++)
212  _backups.emplace_back(std::make_shared<Backup>());
213 
214  _has_bounding_box.resize(_my_num_apps, false);
215  _bounding_box.resize(_my_num_apps);
216 
217  if ((_cli_args.size() > 1) && (_total_num_apps != _cli_args.size()))
218  paramError("cli_args",
219  "The number of items supplied must be 1 or equal to the number of sub apps.");
220 }
void buildComm()
Create an MPI communicator suitable for each app.
Definition: MultiApp.C:700
unsigned int _total_num_apps
The total number of apps to simulate.
Definition: MultiApp.h:337
std::vector< BoundingBox > _bounding_box
This multi-app&#39;s bounding box.
Definition: MultiApp.h:373
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
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 ...
Definition: MooseObject.h:105
SubAppBackups & _backups
Backups for each local App.
Definition: MultiApp.h:415
const std::vector< std::string > & _cli_args
Storage for command line arguments.
Definition: MultiApp.h:418
std::vector< bool > _has_bounding_box
Flag if this multi-app computed its bounding box (valid only for non-displaced meshes) ...
Definition: MultiApp.h:370

◆ initialSetup()

void TransientMultiApp::initialSetup ( )
overridevirtual

Gets called at the beginning of the simulation before this object is asked to do its job.

Reimplemented from MultiApp.

Definition at line 161 of file TransientMultiApp.C.

162 {
164 
165  if (!_has_an_app)
166  return;
167 
169 
170  if (_has_an_app)
171  {
173  // Grab Transient Executioners from each app
174  for (unsigned int i = 0; i < _my_num_apps; i++)
175  setupApp(i);
176  }
177 }
void setupApp(unsigned int i, Real time=0.0)
Setup the executioner for the local app.
std::vector< Transient * > _transient_executioners
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
Definition: MultiApp.C:233
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352

◆ isParamValid()

bool MooseObject::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 86 of file MooseObject.h.

Referenced by AdvancedOutput::AdvancedOutput(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), CartesianMeshGenerator::CartesianMeshGenerator(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), RenameBoundaryGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementSubdomainIDGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshSideSetGenerator::generate(), RenameBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), MeshExtruderGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntities(), MeshGenerator::getMesh(), MultiAppNearestNodeTransfer::getNearestNode(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), MooseParsedVectorFunction::initialSetup(), Console::initialSetup(), Receiver::initialSetup(), SolutionFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), AdvancedOutput::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), BreakBoundaryOnSubdomain::modify(), MeshExtruder::modify(), MeshSideSet::modify(), LowerDBlockFromSideset::modify(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), EigenExecutionerBase::normalizeSolution(), Output::Output(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

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

◆ isRootProcessor()

bool MultiApp::isRootProcessor ( )
inlineinherited

Whether or not this processor is the "root" processor for the sub communicator.

The "root" processor has rank 0 in the sub communicator

Definition at line 276 of file MultiApp.h.

276 { return _my_rank == 0; }
int _my_rank
The mpi "rank" of this processor in the sub communicator.
Definition: MultiApp.h:364

◆ jacobianSetup()

void SetupInterface::jacobianSetup ( )
virtualinherited

Gets called just before the Jacobian is computed and before this object is asked to do its job.

Reimplemented in EqualValueEmbeddedConstraint.

Definition at line 52 of file SetupInterface.C.

53 {
54 }

◆ localApp()

MooseApp * MultiApp::localApp ( unsigned int  local_app)
inherited

Get the local MooseApp object.

Parameters
local_appThe local app number

Definition at line 545 of file MultiApp.C.

546 {
547  mooseAssert(local_app < _apps.size(), "Index out of range: " + Moose::stringify(local_app));
548  return _apps[local_app].get();
549 }
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61

◆ mooseDeprecated()

template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited

◆ mooseError()

template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 144 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), FEProblemBase::addConstraint(), FEProblemBase::addInitialCondition(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), FEProblemBase::addOutput(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial< compute_stage >::ADPiecewiseLinearInterpolationMaterial(), Output::advancedExecuteOn(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), FileMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildMeshBaseObject(), MooseMesh::buildRefinementMap(), MooseMesh::buildSideList(), CartesianMeshGenerator::CartesianMeshGenerator(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), BreakMeshByBlockBase::checkInputParameter(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), ActuallyExplicitEuler::checkLinearConvergence(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), MooseMesh::clone(), ComparisonPostprocessor::comparisonIsTrue(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), KernelBase::computeADOffDiagJacobian(), InterfaceKernel::computeElemNeighJacobian(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), HistogramVectorPostprocessor::computeHistogram(), EqualValueEmbeddedConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), KernelValue::computeQpResidual(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualType(), StatisticsVectorPostprocessor::computeStatValue(), Material::computeSubdomainProperties(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ActuallyExplicitEuler::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), TimeStepper::constrainStep(), CoupledForce::CoupledForce(), DebugResidualAux::DebugResidualAux(), FunctorRelationshipManager::delete_remote_elements(), BicubicSplineFunction::derivative(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernelBase::DGKernelBase(), FunctorRelationshipManager::dofmap_reinit(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementQualityAux::ElementQualityAux(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementQualityChecker::execute(), NodalValueSampler::execute(), InterfaceQpValueUserObject::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), TimeExtremeValue::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFit::execute(), LeastSquaresFitHistory::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), FileOutput::FileOutput(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), BreakMeshByBlockBase::findFreeBoundaryId(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase::FunctionMaterialBase(), ParsedMaterialHelper::functionParse(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), ElementSubdomainIDGenerator::generate(), ExtraNodesetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), GeneratedMeshGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), SpiralAnnularMeshGenerator::generate(), PatternedMeshGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), RandomICBase::generateRandom(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), Control::getControllableParameterByName(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), GhostingUserObject::getElementalValue(), ElementGenerator::getElemType(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), DistributedGeneratedMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), AnnularMesh::getMinInDimension(), DistributedGeneratedMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), InterfaceQpValueUserObject::getQpValue(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), PerformanceData::getValue(), Residual::getValue(), PerfGraphData::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), GhostingAux::GhostingAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), Transient::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), FullSolveMultiApp::initialSetup(), PiecewiseBase::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), InterfaceKernel::InterfaceKernel(), InterfaceTimeKernel::InterfaceTimeKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), LayeredSideIntegral::LayeredSideIntegral(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshSideSetGenerator::MeshSideSetGenerator(), SideSetsFromPoints::modify(), SideSetsFromNormals::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), BreakMeshByBlockBase::modify(), AssignElementSubdomainID::modify(), SmoothMesh::modify(), ElementDeleterBase::modify(), AddAllSideSetsByNormals::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), OrientedSubdomainBoundingBox::modify(), BoundingBoxNodeSet::modify(), SubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), MooseGhostPointNeighbors::MooseGhostPointNeighbors(), MooseMesh::MooseMesh(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), RenameBlockGenerator::newBlockID(), RenameBlock::newBlockID(), RenameBlockGenerator::newBlockName(), RenameBlock::newBlockName(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), NodalScalarKernel::NodalScalarKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), Exodus::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::paramError(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), AStableDirk4::postResidual(), LStableDirk4::postResidual(), ExplicitRK2::postResidual(), Predictor::Predictor(), Transient::preExecute(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), FunctorRelationshipManager::redistribute(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), PiecewiseBase::setData(), EigenProblem::setEigenproblemType(), FEProblemSolve::setInnerSolve(), Sampler::setNumberOfRequiedRandomSeeds(), Exodus::setOutputDimensionInExodusWriter(), Split::setup(), setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPoints::SideSetsFromPoints(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), PicardSolve::solve(), ActuallyExplicitEuler::solve(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), FEProblemBase::uDotDotOldRequested(), FEProblemBase::uDotOldRequested(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorNodalBC::VectorNodalBC(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), VectorVariableComponentAux::VectorVariableComponentAux(), VolumeHistogram::VolumeHistogram(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

144  {
145  std::ostringstream oss;
146  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
147  std::string msg = oss.str();
148  callMooseErrorRaw(msg, &_app);
149  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:87
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:57
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174

◆ mooseInfo()

template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

◆ mooseWarning()

template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited

◆ moveApp()

void MultiApp::moveApp ( unsigned int  global_app,
Point  p 
)
virtualinherited

Move the global_app to Point p.

Parameters
global_appThe global app number in question
pThe new position of the App.

Definition at line 571 of file MultiApp.C.

Referenced by MultiApp::preTransfer().

572 {
573  if (_use_positions)
574  {
575  _positions[global_app] = p;
576 
577  if (hasLocalApp(global_app))
578  {
579  unsigned int local_app = globalAppToLocal(global_app);
580 
582  _apps[local_app]->setOutputPosition(p);
583  }
584  }
585 }
bool hasLocalApp(unsigned int global_app)
Whether or not the given global app number is on this processor.
Definition: MultiApp.C:535
const bool _use_positions
Toggle use of "positions".
Definition: MultiApp.h:328
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
bool _output_in_position
Whether or not to move the output of the MultiApp into position.
Definition: MultiApp.h:385
std::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796

◆ name()

const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 56 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), Executioner::addAttributeReporter(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyAlgebraicRelationshipManagers(), CreateDisplacedProblemAction::addProxyGeometricRelationshipManagers(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), AStableDirk4::AStableDirk4(), Function::average(), MultiApp::backup(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), VectorPostprocessorVisualizationAux::computeValue(), MultiApp::createApp(), FEProblemBase::declareVectorPostprocessorVector(), DOFMapOutput::demangle(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernelBase::DGKernelBase(), DumpObjectsProblem::dumpObjectHelper(), ElementValueSampler::ElementValueSampler(), MooseMesh::errorIfDistributedMesh(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), StatisticsVectorPostprocessor::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), PointValue::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), HistogramVectorPostprocessor::execute(), MultiAppCopyTransfer::execute(), Exodus::Exodus(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), DerivativeParsedMaterialHelper::findMatPropDerivative(), FunctionDT::FunctionDT(), GeneralUserObject::GeneralUserObject(), LowerDBlockFromSidesetGenerator::generate(), StitchedMeshGenerator::generate(), Material::getADMaterialProperty(), MultiApp::getBoundingBox(), MooseObject::getCheckedPointerParam(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), Marker::getMarkerValue(), FEProblemBase::getMaterial(), NodalPatchRecovery::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< ComputeValueType >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MeshGenerator::getMesh(), MooseMesh::getMortarInterfaceByName(), OutputWarehouse::getOutput(), MooseObject::getParam(), GeneralUserObject::getPostprocessorValue(), FEProblemBase::getPostprocessorValue(), GeneralUserObject::getPostprocessorValueByName(), FEProblemBase::getPostprocessorValueOld(), FEProblemBase::getPostprocessorValueOlder(), FEProblemBase::getSampler(), FEProblemBase::getScatterVectorPostprocessorValue(), FEProblemBase::getScatterVectorPostprocessorValueOld(), Transient::getTimeStepperName(), InitialConditionBase::getUserObject(), FEProblemBase::getUserObject(), InitialConditionBase::getUserObjectBase(), FEProblemBase::getUserObjectBase(), InitialConditionBase::getUserObjectByName(), GeneralUserObject::getVectorPostprocessorValue(), FEProblemBase::getVectorPostprocessorValue(), GeneralUserObject::getVectorPostprocessorValueByName(), FEProblemBase::getVectorPostprocessorValueOld(), FEProblemBase::hasFunction(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasUserObject(), FEProblemBase::hasVectorPostprocessor(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), CSVReader::initialize(), StatisticsVectorPostprocessor::initialize(), HistogramVectorPostprocessor::initialize(), MultiAppProjectionTransfer::initialSetup(), DerivativeFunctionMaterialBase::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPostprocessorData(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), FEProblemBase::initVectorPostprocessorData(), Function::integral(), InterfaceKernel::InterfaceKernel(), Registry::isADObj(), MooseObject::isParamValid(), Registry::isRegisteredObj(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshSideSetGenerator::MeshSideSetGenerator(), ElementDeleterBase::modify(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), Registry::objData(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), Material::resetQpProperties(), MultiApp::restore(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), MooseMesh::setSubdomainName(), Split::setup(), setupApp(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SideValueSampler::SideValueSampler(), solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialValue(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), TaggingInterface::TaggingInterface(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), Function::timeDerivative(), VectorPostprocessorVisualizationAux::timestepSetup(), TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), and AdvancedOutput::wantOutput().

56 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:180

◆ needsRestoration()

bool TransientMultiApp::needsRestoration ( )
overridevirtual

Whether or not this MultiApp should be restored at the beginning of each Picard iteration.

Reimplemented from MultiApp.

Definition at line 569 of file TransientMultiApp.C.

◆ numGlobalApps()

unsigned int MultiApp::numGlobalApps ( )
inlineinherited
Returns
Number of Global Apps in this MultiApp

Definition at line 201 of file MultiApp.h.

201 { return _total_num_apps; }
unsigned int _total_num_apps
The total number of apps to simulate.
Definition: MultiApp.h:337

◆ numLocalApps()

unsigned int MultiApp::numLocalApps ( )
inlineinherited
Returns
Number of Apps on local processor.

Definition at line 206 of file MultiApp.h.

Referenced by MultiAppDTKUserObjectEvaluator::createSourceGeometry().

206 { return _apps.size(); }
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367

◆ paramError()

template<typename... Args>
void MooseObject::paramError ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 105 of file MooseObject.h.

Referenced by ADIntegratedBCTempl< T, compute_stage >::ADIntegratedBCTempl(), ADKernelTempl< T, compute_stage >::ADKernelTempl(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), DGKernelBase::DGKernelBase(), ElementValueSampler::ElementValueSampler(), StitchedMeshGenerator::generate(), MeshCollectionGenerator::generate(), StackGenerator::generate(), MultiApp::init(), IntegratedBC::IntegratedBC(), Kernel::Kernel(), MeshCollectionGenerator::MeshCollectionGenerator(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), RandomIC::RandomIC(), MultiAppCopyTransfer::transfer(), and TransientMultiApp().

105  {
106  auto prefix = param + ": ";
107  if (!_pars.inputLocation(param).empty())
108  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
109  mooseError(prefix, args...);
110  }
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:171
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters()

const InputParameters& MooseObject::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 62 of file MooseObject.h.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial< compute_stage >::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), assemble_l2(), Moose::assemble_matrix(), AuxKernelTempl< ComputeValueType >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsAux::BoundsAux(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), Console::Console(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Exodus::Exodus(), FEProblem::FEProblem(), GapValueAux::GapValueAux(), MooseObject::getCheckedPointerParam(), GhostingUserObject::GhostingUserObject(), MooseMesh::init(), BlockRestrictable::initializeBlockRestrictable(), FEProblemBase::initNullSpaceVectors(), InterfaceKernel::InterfaceKernel(), isValid(), LayeredSideIntegral::LayeredSideIntegral(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodeFaceConstraint::NodeFaceConstraint(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), MultiAppProjectionTransfer::projectSolution(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), DumpObjectsProblem::stringifyParameters(), and Transient::Transient().

62 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:171

◆ paramInfo()

template<typename... Args>
void MooseObject::paramInfo ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 135 of file MooseObject.h.

Referenced by TransientMultiApp().

136  {
137  auto prefix = param + ": ";
138  if (!_pars.inputLocation(param).empty())
139  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
140  mooseInfo(prefix, args...);
141  }
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:171
void mooseInfo(Args &&... args) const
Definition: MooseObject.h:164
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

template<typename... Args>
void MooseObject::paramWarning ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 119 of file MooseObject.h.

120  {
121  auto prefix = param + ": ";
122  if (!_pars.inputLocation(param).empty())
123  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
124  mooseWarning(prefix, args...);
125  }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:152
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:171
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parentOutputPositionChanged()

void MultiApp::parentOutputPositionChanged ( )
virtualinherited

For apps outputting in position we need to change their output positions if their parent app moves.

Definition at line 588 of file MultiApp.C.

589 {
591  for (unsigned int i = 0; i < _apps.size(); i++)
592  _apps[i]->setOutputPosition(_app.getOutputPosition() + _positions[_first_local_app + i]);
593 }
const bool _use_positions
Toggle use of "positions".
Definition: MultiApp.h:328
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
Point getOutputPosition() const
Get the output position.
Definition: MooseApp.h:193
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
bool _output_in_position
Whether or not to move the output of the MultiApp into position.
Definition: MultiApp.h:385
std::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325

◆ position()

Point MultiApp::position ( unsigned int  app)
inlineinherited

The physical position of a global App number.

Parameters
appThe global app number you want the position for.
Returns
the position

Definition at line 236 of file MultiApp.h.

Referenced by MultiAppDTKUserObjectEvaluator::evaluate(), MultiApp::fillPositions(), and MultiApp::getBoundingBox().

236 { return _positions[app]; }
std::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325

◆ postExecute()

void MultiApp::postExecute ( )
virtualinherited

Method called at the end of the simulation (after finalize)

Reimplemented in FullSolveMultiApp.

Definition at line 388 of file MultiApp.C.

389 {
390  for (const auto & app_ptr : _apps)
391  {
392  auto * executioner = app_ptr->getExecutioner();
393  mooseAssert(executioner, "Executioner is nullptr");
394 
395  executioner->postExecute();
396  }
397 }
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367

◆ preExecute()

virtual void MultiApp::preExecute ( )
inlinevirtualinherited

Definition at line 63 of file MultiApp.h.

63 {}

◆ preRunInputFile()

void MultiApp::preRunInputFile ( )
protectedvirtualinherited

call back executed right before app->runInputFile()

Definition at line 806 of file MultiApp.C.

Referenced by MultiApp::createApp().

807 {
808 }

◆ preTransfer()

void MultiApp::preTransfer ( Real  dt,
Real  target_time 
)
virtualinherited

Gets called just before transfers are done to the MultiApp (Which is just before the MultiApp is solved)

Definition at line 346 of file MultiApp.C.

347 {
348  // First, see if any Apps need to be Reset
349  if (!_reset_happened && target_time + 1e-14 >= _reset_time)
350  {
351  _reset_happened = true;
352  for (auto & app : _reset_apps)
353  resetApp(app);
354  }
355 
356  // Now move any apps that should be moved
357  if (_use_positions && !_move_happened && target_time + 1e-14 >= _move_time)
358  {
359  _move_happened = true;
360  for (unsigned int i = 0; i < _move_apps.size(); i++)
362  }
363 }
std::vector< unsigned int > _reset_apps
The apps to be reset.
Definition: MultiApp.h:394
const bool _use_positions
Toggle use of "positions".
Definition: MultiApp.h:328
Real _move_time
The time at which to move apps.
Definition: MultiApp.h:400
std::vector< Point > _move_positions
The new positions for the apps to be moved.
Definition: MultiApp.h:406
bool _reset_happened
Whether or not apps have been reset.
Definition: MultiApp.h:397
bool _move_happened
Whether or not the move has happened.
Definition: MultiApp.h:409
Real _reset_time
The time at which to reset apps.
Definition: MultiApp.h:391
std::vector< unsigned int > _move_apps
The apps to be moved.
Definition: MultiApp.h:403
virtual void resetApp(unsigned int global_app, Real time=0.0)
"Reset" the App corresponding to the global App number passed in.
Definition: MultiApp.C:552
virtual void moveApp(unsigned int global_app, Point p)
Move the global_app to Point p.
Definition: MultiApp.C:571

◆ problemBase()

FEProblemBase& MultiApp::problemBase ( )
inlineinherited

Get the FEProblemBase this MultiApp is part of.

Definition at line 160 of file MultiApp.h.

160 { return _fe_problem; }
FEProblemBase & _fe_problem
The FEProblemBase this MultiApp is part of.
Definition: MultiApp.h:319

◆ resetApp()

void TransientMultiApp::resetApp ( unsigned int  global_app,
Real  time 
)
overridevirtual

"Reset" the App corresponding to the global App number passed in.

"Reset" means that the App will be deleted and recreated. The time for the new App will be set to the current simulation time. This might be handy if some sub-app in your simulation needs to get replaced by a "new" piece of material.

Parameters
global_appThe global app number to reset.
timeThe time to set as the the time for the new app, this should really be the time the old app was at.

Reimplemented from MultiApp.

Definition at line 605 of file TransientMultiApp.C.

608 {
609  if (hasLocalApp(global_app))
610  {
611  unsigned int local_app = globalAppToLocal(global_app);
612 
613  // Grab the current time the App is at so we can start the new one at the same place
614  Real time =
615  _transient_executioners[local_app]->getTime() + _apps[local_app]->getGlobalTimeOffset();
616 
617  // Reset the Multiapp
618  MultiApp::resetApp(global_app, time);
619 
621 
622  // Setup the app, disable the output so that the initial condition does not output
623  // When an app is reset the initial condition was effectively already output before reset
624  FEProblemBase & problem = appProblemBase(local_app);
625  problem.allowOutput(false);
626  setupApp(local_app, time);
627  problem.allowOutput(true);
628  }
629 }
bool hasLocalApp(unsigned int global_app)
Whether or not the given global app number is on this processor.
Definition: MultiApp.C:535
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
void setupApp(unsigned int i, Real time=0.0)
Setup the executioner for the local app.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
virtual void resetApp(unsigned int global_app, Real time=0.0)
"Reset" the App corresponding to the global App number passed in.
Definition: MultiApp.C:552
std::vector< Transient * > _transient_executioners
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352
void allowOutput(bool state)
Ability to enable/disable all output calls.
unsigned int globalAppToLocal(unsigned int global_app)
Map a global App number to the local number.
Definition: MultiApp.C:796

◆ residualSetup()

void SetupInterface::residualSetup ( )
virtualinherited

Gets called just before the residual is computed and before this object is asked to do its job.

Definition at line 57 of file SetupInterface.C.

58 {
59 }

◆ restore()

void TransientMultiApp::restore ( )
overridevirtual

Restore the state of every Sub App.

This allows us to "Restore" this state later

Reimplemented from MultiApp.

Definition at line 180 of file TransientMultiApp.C.

181 {
182  // Must be restarting / recovering so hold off on restoring
183  // Instead - the restore will happen in createApp()
184  // Note that _backups was already populated by dataLoad()
185  if (_apps.empty())
186  return;
187 
189  {
191 
192  for (unsigned int i = 0; i < _my_num_apps; i++)
193  _end_solutions[i] =
195  }
196 
198 
200  {
201  for (unsigned int i = 0; i < _my_num_apps; i++)
203 
204  _end_solutions.clear();
205  }
206 }
virtual void restore()
Restore the state of every Sub App.
Definition: MultiApp.C:409
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
FEProblemBase & feProblem()
Return a reference to this Executioner&#39;s FEProblemBase instance.
Definition: Executioner.C:68
std::vector< std::unique_ptr< NumericVector< Real > > > _end_solutions
The solution from the end of the previous solve, this is cloned from the Nonlinear solution during re...
virtual NumericVector< Number > & solution() override
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
virtual NonlinearSystem & getNonlinearSystem()
virtual Executioner * getExecutioner(unsigned int app)
Definition: MultiApp.C:366

◆ setupApp()

void TransientMultiApp::setupApp ( unsigned int  i,
Real  time = 0.0 
)
private

Setup the executioner for the local app.

Parameters
iThe local app number for the app that needs to be setup.
timeThe time to set as the current time for the App

Definition at line 631 of file TransientMultiApp.C.

Referenced by initialSetup(), and resetApp().

632 {
633  auto & app = _apps[i];
634  Transient * ex = dynamic_cast<Transient *>(app->getExecutioner());
635  if (!ex)
636  mooseError("MultiApp ", name(), " is not using a Transient Executioner!");
637 
638  // Get the FEProblemBase for the current MultiApp
640 
641  // Update the file numbers for the outputs from the parent application
642  app->getOutputWarehouse().setFileNumbers(_app.getOutputFileNumbers());
643 
644  // Call initialization method of Executioner (Note, this preforms the output of the initial time
645  // step, if desired)
646  ex->init();
647 
649  {
650  AuxiliarySystem & aux_system = problem.getAuxiliarySystem();
651  System & libmesh_aux_system = aux_system.system();
652 
653  // We'll store a copy of the auxiliary system's solution at the old time in here
654  libmesh_aux_system.add_vector("transfer_old", false);
655 
656  // This will be where we'll transfer the value to for the "target" time
657  libmesh_aux_system.add_vector("transfer", false);
658  }
659 
660  ex->preExecute();
661  if (!_app.isRecovering())
662  {
663  problem.timeStep()++;
664  problem.advanceState();
665  }
666  _transient_executioners[i] = ex;
667 }
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:31
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
virtual void init() override
Initialize the executioner.
Definition: Transient.C:205
void mooseError(Args &&... args) const
Definition: MooseObject.h:144
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
AuxiliarySystem & getAuxiliarySystem()
std::vector< Transient * > _transient_executioners
virtual int & timeStep() const
virtual void preExecute() override
Override this for actions that should take place before execution.
Definition: Transient.C:262
std::map< std::string, unsigned int > & getOutputFileNumbers()
Store a map of outputter names and file numbers The MultiApp system requires this to get the file num...
Definition: MooseApp.h:406
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
virtual System & system() override
Get the reference to the libMesh system.
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
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:858
A system that holds auxiliary variables.

◆ setupPositions()

void MultiApp::setupPositions ( )
inherited

Called just after construction to allow derived classes to set _positions;.

Definition at line 223 of file MultiApp.C.

Referenced by FEProblemBase::addMultiApp().

224 {
225  if (_use_positions)
226  {
227  fillPositions();
228  init(_positions.size());
229  }
230 }
const bool _use_positions
Toggle use of "positions".
Definition: MultiApp.h:328
virtual void fillPositions()
must fill in _positions with the positions of the sub-aps
Definition: MultiApp.C:252
void init(unsigned int num)
Initialize the MultiApp by creating the provided number of apps.
Definition: MultiApp.C:206
std::vector< Point > _positions
The positions of all of the apps.
Definition: MultiApp.h:325

◆ solveStep()

bool TransientMultiApp::solveStep ( Real  dt,
Real  target_time,
bool  auto_advance = true 
)
overridevirtual

Re-solve all of the Apps.

Can be called multiple times to resolve the same timestep if auto_advance=false. Time is not actually advanced until advanceStep() is called.

Note that auto_advance=false might not be compatible with the options for the MultiApp

Returns
Whether or not all of the solves were successful (i.e. all solves made it to the target_time)

Implements MultiApp.

Definition at line 209 of file TransientMultiApp.C.

210 {
211  if (!_has_an_app)
212  return true;
213 
214  _auto_advance = auto_advance;
215 
216  _console << COLOR_CYAN << "Solving MultiApp '" << name() << "' with target time " << target_time
217  << " and dt " << dt << " with auto-advance " << (auto_advance ? "on" : "off")
218  << COLOR_DEFAULT << std::endl;
219 
220  // "target_time" must always be in global time
221  target_time += _app.getGlobalTimeOffset();
222 
224  bool return_value = true;
225 
226  // Make sure we swap back the communicator regardless of how this routine is exited
227  try
228  {
229  int rank;
230  int ierr;
231  ierr = MPI_Comm_rank(_communicator.get(), &rank);
232  mooseCheckMPIErr(ierr);
233 
234  for (unsigned int i = 0; i < _my_num_apps; i++)
235  {
237 
239 
240  // The App might have a different local time from the rest of the problem
241  Real app_time_offset = _apps[i]->getGlobalTimeOffset();
242 
243  // Maybe this MultiApp was already solved
244  if ((ex->getTime() + app_time_offset + 2e-14 >= target_time) ||
245  (ex->getTime() >= ex->endTime()))
246  continue;
247 
248  if (_sub_cycling)
249  {
250  Real time_old = ex->getTime() + app_time_offset;
251 
253  {
254  AuxiliarySystem & aux_system = problem.getAuxiliarySystem();
255  System & libmesh_aux_system = aux_system.system();
256 
257  NumericVector<Number> & solution = *libmesh_aux_system.solution;
258  NumericVector<Number> & transfer_old = libmesh_aux_system.get_vector("transfer_old");
259 
260  solution.close();
261 
262  // Save off the current auxiliary solution
263  transfer_old = solution;
264 
265  transfer_old.close();
266 
267  // Snag all of the local dof indices for all of these variables
268  AllLocalDofIndicesThread aldit(libmesh_aux_system, _transferred_vars);
269  ConstElemRange & elem_range = *problem.mesh().getActiveLocalElementRange();
270  Threads::parallel_reduce(elem_range, aldit);
271 
272  _transferred_dofs = aldit._all_dof_indices;
273  }
274 
275  // Disable/enable output for sub cycling
276  problem.allowOutput(_output_sub_cycles); // disables all outputs, including console
277  problem.allowOutput<Console>(_print_sub_cycles); // re-enables Console to print, if desired
278 
279  ex->setTargetTime(target_time - app_time_offset);
280 
281  // unsigned int failures = 0;
282 
283  bool at_steady = false;
284 
285  if (_first && !_app.isRecovering())
286  problem.advanceState();
287 
288  bool local_first = _first;
289 
290  // Now do all of the solves we need
291  while ((!at_steady && ex->getTime() + app_time_offset + 2e-14 < target_time) ||
292  !ex->lastSolveConverged())
293  {
294  if (local_first != true)
295  ex->incrementStepOrReject();
296 
297  local_first = false;
298 
299  ex->preStep();
300  ex->computeDT();
301 
303  {
304  // See what time this executioner is going to go to.
305  Real future_time = ex->getTime() + app_time_offset + ex->getDT();
306 
307  // How far along we are towards the target time:
308  Real step_percent = (future_time - time_old) / (target_time - time_old);
309 
310  Real one_minus_step_percent = 1.0 - step_percent;
311 
312  // Do the interpolation for each variable that was transferred to
314  AuxiliarySystem & aux_system = problem.getAuxiliarySystem();
315  System & libmesh_aux_system = aux_system.system();
316 
317  NumericVector<Number> & solution = *libmesh_aux_system.solution;
318  NumericVector<Number> & transfer = libmesh_aux_system.get_vector("transfer");
319  NumericVector<Number> & transfer_old = libmesh_aux_system.get_vector("transfer_old");
320 
321  solution.close(); // Just to be sure
322  transfer.close();
323  transfer_old.close();
324 
325  for (const auto & dof : _transferred_dofs)
326  {
327  solution.set(dof,
328  (transfer_old(dof) * one_minus_step_percent) +
329  (transfer(dof) * step_percent));
330  // solution.set(dof, transfer_old(dof));
331  // solution.set(dof, transfer(dof));
332  // solution.set(dof, 1);
333  }
334 
335  solution.close();
336  }
337 
338  ex->takeStep();
339 
340  bool converged = ex->lastSolveConverged();
341 
342  if (!converged)
343  {
344  mooseWarning(
345  "While sub_cycling ", name(), _first_local_app + i, " failed to converge!\n");
346 
347  _failures++;
348 
349  if (_failures > _max_failures)
350  {
351  std::stringstream oss;
352  oss << "While sub_cycling " << name() << _first_local_app << i << " REALLY failed!";
353  throw MultiAppSolveFailure(oss.str());
354  }
355  }
356 
357  Real solution_change_norm = ex->getSolutionChangeNorm();
358 
360  _console << "Solution change norm: " << solution_change_norm << std::endl;
361 
362  if (converged && _detect_steady_state && solution_change_norm < _steady_state_tol)
363  {
364  _console << "Detected Steady State! Fast-forwarding to " << target_time << std::endl;
365 
366  at_steady = true;
367 
368  // Indicate that the next output call (occurs in ex->endStep()) should output,
369  // regardless of intervals etc...
370  problem.forceOutput();
371 
372  // Clean up the end
373  ex->endStep(target_time - app_time_offset);
374  ex->postStep();
375  }
376  else
377  {
378  ex->endStep();
379  ex->postStep();
380  }
381  }
382 
383  // If we were looking for a steady state, but didn't reach one, we still need to output one
384  // more time, regardless of interval
385  if (!at_steady)
386  problem.outputStep(EXEC_FORCED);
387 
388  } // sub_cycling
389  else if (_tolerate_failure)
390  {
391  ex->takeStep(dt);
392  ex->endStep(target_time - app_time_offset);
393  ex->postStep();
394  }
395  else
396  {
397  if (_first && !_app.isRecovering())
398  problem.advanceState();
399 
400  if (auto_advance)
401  problem.allowOutput(true);
402 
403  ex->takeStep(dt);
404 
405  if (auto_advance)
406  {
407  ex->endStep();
408  ex->postStep();
409 
410  if (!ex->lastSolveConverged())
411  {
412  mooseWarning(name(), _first_local_app + i, " failed to converge!\n");
413 
414  if (_catch_up)
415  {
416  _console << "Starting Catch Up!" << std::endl;
417 
418  bool caught_up = false;
419 
420  unsigned int catch_up_step = 0;
421 
422  Real catch_up_dt = dt / 2;
423 
424  while (!caught_up && catch_up_step < _max_catch_up_steps)
425  {
426  _console << "Solving " << name() << " catch up step " << catch_up_step << std::endl;
427  ex->incrementStepOrReject();
428 
429  ex->computeDT();
430  ex->takeStep(catch_up_dt); // Cut the timestep in half to try two half-step solves
431  ex->endStep();
432 
433  if (ex->lastSolveConverged())
434  {
435  if (ex->getTime() + app_time_offset +
436  (ex->timestepTol() * std::abs(ex->getTime())) >=
437  target_time)
438  {
439  problem.outputStep(EXEC_FORCED);
440  caught_up = true;
441  }
442  }
443  else
444  catch_up_dt /= 2.0;
445 
446  ex->postStep();
447 
448  catch_up_step++;
449  }
450 
451  if (!caught_up)
452  throw MultiAppSolveFailure(name() + " Failed to catch up!\n");
453  }
454  }
455  }
456  else // auto_advance == false
457  {
458  if (!ex->lastSolveConverged())
459  {
460  // Even if we don't allow auto_advance - we can still catch up to the current time if
461  // possible
462  if (_catch_up)
463  {
464  _console << "Starting Catch Up!" << std::endl;
465 
466  bool caught_up = false;
467 
468  unsigned int catch_up_step = 0;
469 
470  Real catch_up_dt = dt / 2;
471 
472  // Note: this loop will _break_ if target_time is satisfied
473  while (catch_up_step < _max_catch_up_steps)
474  {
475  _console << "Solving " << name() << " catch up step " << catch_up_step << std::endl;
476  ex->incrementStepOrReject();
477 
478  ex->computeDT();
479  ex->takeStep(catch_up_dt); // Cut the timestep in half to try two half-step solves
480 
481  // This is required because we can't call endStep() yet
482  // (which normally increments time)
483  Real current_time = ex->getTime() + ex->getDT();
484 
485  if (ex->lastSolveConverged())
486  {
487  if (current_time + app_time_offset +
488  (ex->timestepTol() * std::abs(current_time)) >=
489  target_time)
490  {
491  caught_up = true;
492  break; // break here so that we don't run endStep() or postStep() since this
493  // MultiApp should NOT be auto_advanced
494  }
495  }
496  else
497  catch_up_dt /= 2.0;
498 
499  ex->endStep();
500  ex->postStep();
501 
502  catch_up_step++;
503  }
504 
505  if (!caught_up)
506  throw MultiAppSolveFailure(name() + " Failed to catch up!\n");
507  }
508  else
509  throw MultiAppSolveFailure(name() + " failed to converge");
510  }
511  }
512  }
513 
514  // Re-enable all output (it may of been disabled by sub-cycling)
515  problem.allowOutput(true);
516  }
517 
518  _first = false;
519 
520  _console << "Successfully Solved MultiApp " << name() << "." << std::endl;
521  }
522  catch (MultiAppSolveFailure & e)
523  {
524  mooseWarning(e.what());
525  _console << "Failed to Solve MultiApp " << name() << ", attempting to recover." << std::endl;
526  return_value = false;
527  }
528 
529  _transferred_vars.clear();
530 
531  return return_value;
532 }
Utility class for catching solve failure errors so that MOOSE can recover state before continuing...
virtual Real getDT()
Definition: Transient.C:552
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:739
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:31
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
bool _print_sub_cycles
Flag for toggling console output on sub cycles.
const ExecFlagType EXEC_FORCED
virtual void setTargetTime(Real target_time)
Can be used to set the next "target time" which is a time to nail perfectly.
Definition: Transient.C:620
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:152
virtual void computeDT()
Definition: Transient.C:343
An output object for writing to the console (screen)
Definition: Console.h:25
unsigned int _max_failures
std::vector< std::shared_ptr< MooseApp > > _apps
Pointers to each of the Apps.
Definition: MultiApp.h:367
virtual void endStep(Real input_time=-1.0)
Definition: Transient.C:441
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual Real getTime()
Get the current time.
Definition: Transient.h:98
Grab all the local dof indices for the variables passed in, in the system passed in.
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
virtual void takeStep(Real input_dt=-1.0)
Do whatever is necessary to advance one step.
Definition: Transient.C:399
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
Definition: Transient.C:608
std::set< dof_id_type > _transferred_dofs
The DoFs associated with all of the currently transferred variables.
FEProblemBase & appProblemBase(unsigned int app)
Get the FEProblemBase for the global app is part of.
Definition: MultiApp.C:487
void forceOutput()
Indicates that the next call to outputStep should be forced.
bool & _first
Is it our first time through the execution loop?
virtual void incrementStepOrReject()
This is where the solve step is actually incremented.
Definition: Transient.C:349
std::vector< std::string > _transferred_vars
The variables that have been transferred to. Used when doing transfer interpolation. This will be cleared after each solve.
AuxiliarySystem & getAuxiliarySystem()
std::vector< Transient * > _transient_executioners
unsigned int _my_num_apps
The number of apps this object is involved in simulating.
Definition: MultiApp.h:340
bool _has_an_app
Whether or not this processor as an App at all
Definition: MultiApp.h:412
unsigned int _first_local_app
The number of the first app on this processor.
Definition: MultiApp.h:343
Real & endTime()
Get the end time.
Definition: Transient.h:167
Real & timestepTol()
Get the timestep tolerance.
Definition: Transient.h:173
unsigned int _failures
virtual System & system() override
Get the reference to the libMesh system.
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
virtual MooseMesh & mesh() override
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
virtual void preStep()
Definition: Transient.C:289
ierr
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual void postStep()
Definition: Transient.C:295
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:858
Real getGlobalTimeOffset() const
Each App has it&#39;s own local time.
Definition: MooseApp.h:223
MPI_Comm & _my_comm
The MPI communicator this object is going to use.
Definition: MultiApp.h:352
A system that holds auxiliary variables.
void allowOutput(bool state)
Ability to enable/disable all output calls.
virtual void outputStep(ExecFlagType type)
Output the current step.
Real getSolutionChangeNorm()
Get the Relative L2 norm of the change in the solution.
Definition: Transient.C:626

◆ subdomainSetup()

void SetupInterface::subdomainSetup ( )
virtualinherited

Gets called when the subdomain changes (i.e.

in a Jacobian or residual loop) and before this object is asked to do its job

Reimplemented in Material, Constraint, GeneralUserObject, NodalUserObject, and ThreadedGeneralUserObject.

Definition at line 62 of file SetupInterface.C.

63 {
64 }

◆ timestepSetup()

void SetupInterface::timestepSetup ( )
virtualinherited

Gets called at the beginning of the timestep before this object is asked to do its job.

Reimplemented in SolutionUserObject, Console, VectorPostprocessorVisualizationAux, NumNonlinearIterations, EqualValueEmbeddedConstraint, VectorMemoryUsage, and MemoryUsage.

Definition at line 47 of file SetupInterface.C.

48 {
49 }

◆ type()

const std::string& MooseObject::type ( ) const
inlineinherited

Get the type of this object.

Returns
the name of the type of this object

Definition at line 50 of file MooseObject.h.

Referenced by DumpObjectsProblem::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), DumpObjectsProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), FEProblemBase::addAuxVariable(), DumpObjectsProblem::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), DumpObjectsProblem::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), DumpObjectsProblem::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), DumpObjectsProblem::addKernel(), DumpObjectsProblem::addMaterial(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarVariable(), PhysicsBasedPreconditioner::addSystem(), FEProblemBase::addTimeIntegrator(), DumpObjectsProblem::addVariable(), DisplacedProblem::addVariable(), FEProblemBase::addVariable(), FEProblemBase::advanceMultiApps(), FEProblemBase::backupMultiApps(), MooseMesh::buildRefinementAndCoarseningMaps(), FEProblemBase::computeAuxiliaryKernels(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighJacobian(), InterfaceKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighResidual(), ElemElemConstraint::computeElemNeighResidual(), InterfaceKernel::computeElemNeighResidual(), FEProblemBase::computeMultiAppsDT(), DGKernel::computeOffDiagElemNeighJacobian(), InterfaceKernel::computeOffDiagElemNeighJacobian(), DGConvection::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), DGConvection::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeUserObjects(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), FEProblemBase::finishMultiAppStep(), ElementSubdomainIDGenerator::generate(), ElementGenerator::getElemType(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), FEProblemBase::getTransfers(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), SolutionUserObject::initialSetup(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), AssignElementSubdomainID::modify(), ControlOutput::output(), Gnuplot::output(), CSV::output(), Exodus::output(), Console::output(), Nemesis::output(), AdvancedOutput::output(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), FEProblemBase::restoreMultiApps(), FEProblemBase::setCoupling(), PerfGraphOutput::shouldOutput(), FileOutput::shouldOutput(), Output::shouldOutput(), AdvancedOutput::shouldOutput(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), and AdvancedOutput::wantOutput().

50 { return _type; }
const std::string & _type
The type of this object (the Class name)
Definition: MooseObject.h:177

Member Data Documentation

◆ _app

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 174 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), AB2PredictorCorrector::AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addOutput(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), MooseMesh::buildMeshBaseObject(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualTags(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::dumpVariableHelper(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), NonlinearEigen::execute(), InversePowerMethod::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MeshGenerator::getMesh(), MeshGenerator::getMeshByName(), MooseObject::getMooseApp(), GhostingUserObject::GhostingUserObject(), InversePowerMethod::init(), NonlinearEigen::init(), Transient::init(), Steady::init(), MooseMesh::init(), NumPicardIterations::initialize(), TimePeriod::initialSetup(), Console::initialSetup(), MultiApp::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutput(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), ElementSideNeighborLayers::internalInit(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), NonlinearEigen::NonlinearEigen(), EigenExecutionerBase::normalizeSolution(), PerfGraphOutput::output(), Tecplot::output(), Exodus::output(), Nemesis::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), Console::outputSystemInformation(), MultiApp::parentOutputPositionChanged(), PerformanceData::PerformanceData(), PetscOutput::petscLinearOutput(), PetscOutput::petscNonlinearOutput(), Transient::preExecute(), FEProblemBase::projectSolution(), FEProblemBase::setRestartFile(), setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), solveStep(), FEProblemBase::subdomainSetup(), FEProblemBase::theWarehouse(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and Console::write().

◆ _app_type

std::string MultiApp::_app_type
protectedinherited

The type of application to build.

Definition at line 322 of file MultiApp.h.

Referenced by MultiApp::createApp(), and MultiApp::initialSetup().

◆ _apps

std::vector<std::shared_ptr<MooseApp> > MultiApp::_apps
protectedinherited

◆ _auto_advance

bool TransientMultiApp::_auto_advance
private

Definition at line 94 of file TransientMultiApp.h.

Referenced by needsRestoration(), and solveStep().

◆ _backups

SubAppBackups& MultiApp::_backups
protectedinherited

Backups for each local App.

Definition at line 415 of file MultiApp.h.

Referenced by MultiApp::backup(), MultiApp::createApp(), MultiApp::init(), and MultiApp::restore().

◆ _bounding_box

std::vector<BoundingBox> MultiApp::_bounding_box
protectedinherited

This multi-app's bounding box.

Definition at line 373 of file MultiApp.h.

Referenced by MultiApp::getBoundingBox(), and MultiApp::init().

◆ _bounding_box_padding

Point MultiApp::_bounding_box_padding
protectedinherited

Additional padding added to the bounding box, useful for 1D meshes.

Definition at line 379 of file MultiApp.h.

Referenced by MultiApp::getBoundingBox().

◆ _catch_up

bool TransientMultiApp::_catch_up
private

Definition at line 78 of file TransientMultiApp.h.

Referenced by needsRestoration(), solveStep(), and TransientMultiApp().

◆ _cli_args

const std::vector<std::string>& MultiApp::_cli_args
protectedinherited

Storage for command line arguments.

Definition at line 418 of file MultiApp.h.

Referenced by MultiApp::createApp(), and MultiApp::init().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 32 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), SimplePredictor::apply(), MultiApp::backup(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), FEProblemBase::FEProblemBase(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), PerfGraphOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), PicardSolve::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), solveStep(), PicardSolve::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_execute_flag

const ExecFlagType& SetupInterface::_current_execute_flag
protectedinherited

Reference to FEProblemBase.

Definition at line 98 of file SetupInterface.h.

◆ _detect_steady_state

bool TransientMultiApp::_detect_steady_state
private

Definition at line 69 of file TransientMultiApp.h.

Referenced by needsRestoration(), and solveStep().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.

Definition at line 183 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _end_solutions

std::vector<std::unique_ptr<NumericVector<Real> > > TransientMultiApp::_end_solutions
private

The solution from the end of the previous solve, this is cloned from the Nonlinear solution during restore.

Definition at line 102 of file TransientMultiApp.h.

Referenced by restore().

◆ _exec_flags

const std::vector<ExecFlagType> SetupInterface::_exec_flags
protectedinherited

(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType

Definition at line 95 of file SetupInterface.h.

Referenced by SetupInterface::execBitFlags(), MultiAppTransfer::execFlags(), and SetupInterface::execFlags().

◆ _execute_enum

const ExecFlagEnum& SetupInterface::_execute_enum
protectedinherited

Execute settings for this oejct.

Definition at line 92 of file SetupInterface.h.

Referenced by ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), and SetupInterface::getExecuteOnEnum().

◆ _failures

unsigned int TransientMultiApp::_failures
private

Definition at line 76 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _fe_problem

FEProblemBase& MultiApp::_fe_problem
protectedinherited

The FEProblemBase this MultiApp is part of.

Definition at line 319 of file MultiApp.h.

Referenced by MultiApp::createApp(), CentroidMultiApp::fillPositions(), and MultiApp::problemBase().

◆ _first

bool& TransientMultiApp::_first
private

Is it our first time through the execution loop?

Definition at line 84 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _first_local_app

unsigned int MultiApp::_first_local_app
protectedinherited

◆ _global_time_offset

const Real MultiApp::_global_time_offset
protectedinherited

The offset time so the MultiApp local time relative to the global time.

Definition at line 388 of file MultiApp.h.

Referenced by MultiApp::initialSetup().

◆ _has_an_app

bool MultiApp::_has_an_app
protectedinherited

◆ _has_bounding_box

std::vector<bool> MultiApp::_has_bounding_box
protectedinherited

Flag if this multi-app computed its bounding box (valid only for non-displaced meshes)

Definition at line 370 of file MultiApp.h.

Referenced by MultiApp::getBoundingBox(), and MultiApp::init().

◆ _inflation

Real MultiApp::_inflation
protectedinherited

Relative bounding box inflation.

Definition at line 376 of file MultiApp.h.

Referenced by MultiApp::getBoundingBox().

◆ _input_files

std::vector<FileName> MultiApp::_input_files
protectedinherited

The input file for each app's simulation.

Definition at line 331 of file MultiApp.h.

Referenced by MultiApp::createApp(), and MultiApp::fillPositions().

◆ _interpolate_transfers

bool TransientMultiApp::_interpolate_transfers
private

Definition at line 68 of file TransientMultiApp.h.

Referenced by appTransferVector(), setupApp(), solveStep(), and TransientMultiApp().

◆ _keep_solution_during_restore

bool TransientMultiApp::_keep_solution_during_restore
private

Definition at line 81 of file TransientMultiApp.h.

Referenced by restore(), and TransientMultiApp().

◆ _max_catch_up_steps

Real TransientMultiApp::_max_catch_up_steps
private

Definition at line 79 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _max_failures

unsigned int TransientMultiApp::_max_failures
private

Definition at line 73 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _max_procs_per_app

unsigned int MultiApp::_max_procs_per_app
protectedinherited

Maximum number of processors to give to each app.

Definition at line 382 of file MultiApp.h.

Referenced by MultiApp::buildComm().

◆ _move_apps

std::vector<unsigned int> MultiApp::_move_apps
protectedinherited

The apps to be moved.

Definition at line 403 of file MultiApp.h.

Referenced by MultiApp::fillPositions(), and MultiApp::preTransfer().

◆ _move_happened

bool MultiApp::_move_happened
protectedinherited

Whether or not the move has happened.

Definition at line 409 of file MultiApp.h.

Referenced by MultiApp::preTransfer().

◆ _move_positions

std::vector<Point> MultiApp::_move_positions
protectedinherited

The new positions for the apps to be moved.

Definition at line 406 of file MultiApp.h.

Referenced by MultiApp::fillPositions(), and MultiApp::preTransfer().

◆ _move_time

Real MultiApp::_move_time
protectedinherited

The time at which to move apps.

Definition at line 400 of file MultiApp.h.

Referenced by MultiApp::preTransfer().

◆ _my_comm

MPI_Comm& MultiApp::_my_comm
protectedinherited

◆ _my_communicator

libMesh::Parallel::Communicator MultiApp::_my_communicator
protectedinherited

The communicator object that holds the MPI_Comm that we're going to use.

Definition at line 349 of file MultiApp.h.

Referenced by MultiApp::buildComm().

◆ _my_num_apps

unsigned int MultiApp::_my_num_apps
protectedinherited

◆ _my_rank

int MultiApp::_my_rank
protectedinherited

The mpi "rank" of this processor in the sub communicator.

Definition at line 364 of file MultiApp.h.

Referenced by MultiApp::buildComm(), and MultiApp::isRootProcessor().

◆ _name

const std::string& MooseObject::_name
protectedinherited

◆ _node_name

std::string MultiApp::_node_name
protectedinherited

Node Name.

Definition at line 361 of file MultiApp.h.

Referenced by MultiApp::buildComm().

◆ _orig_comm

const MPI_Comm& MultiApp::_orig_comm
protectedinherited

The original comm handle.

Definition at line 346 of file MultiApp.h.

◆ _orig_num_procs

int MultiApp::_orig_num_procs
protectedinherited

The number of processors in the original comm.

Definition at line 355 of file MultiApp.h.

Referenced by MultiApp::buildComm().

◆ _orig_rank

int MultiApp::_orig_rank
protectedinherited

◆ _output_base

std::string MultiApp::_output_base
protectedinherited

The output file basename for each multiapp.

Definition at line 334 of file MultiApp.h.

◆ _output_file_numbers

std::vector<std::map<std::string, unsigned int> > TransientMultiApp::_output_file_numbers
private

Definition at line 92 of file TransientMultiApp.h.

◆ _output_in_position

bool MultiApp::_output_in_position
protectedinherited

Whether or not to move the output of the MultiApp into position.

Definition at line 385 of file MultiApp.h.

Referenced by MultiApp::moveApp(), and MultiApp::parentOutputPositionChanged().

◆ _output_sub_cycles

bool TransientMultiApp::_output_sub_cycles
private

Definition at line 71 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _pars

const InputParameters& MooseObject::_pars
protectedinherited

◆ _positions

std::vector<Point> MultiApp::_positions
protectedinherited

◆ _print_sub_cycles

bool TransientMultiApp::_print_sub_cycles
private

Flag for toggling console output on sub cycles.

Definition at line 99 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _reset

std::set<unsigned int> TransientMultiApp::_reset
private

Definition at line 96 of file TransientMultiApp.h.

◆ _reset_apps

std::vector<unsigned int> MultiApp::_reset_apps
protectedinherited

The apps to be reset.

Definition at line 394 of file MultiApp.h.

Referenced by MultiApp::preTransfer().

◆ _reset_happened

bool MultiApp::_reset_happened
protectedinherited

Whether or not apps have been reset.

Definition at line 397 of file MultiApp.h.

Referenced by MultiApp::preTransfer().

◆ _reset_time

Real MultiApp::_reset_time
protectedinherited

The time at which to reset apps.

Definition at line 391 of file MultiApp.h.

Referenced by MultiApp::preTransfer().

◆ _steady_state_tol

Real TransientMultiApp::_steady_state_tol
private

Definition at line 70 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _sub_cycling

bool TransientMultiApp::_sub_cycling
private

◆ _tolerate_failure

bool TransientMultiApp::_tolerate_failure
private

Definition at line 74 of file TransientMultiApp.h.

Referenced by computeDT(), needsRestoration(), solveStep(), and TransientMultiApp().

◆ _total_num_apps

unsigned int MultiApp::_total_num_apps
protectedinherited

The total number of apps to simulate.

Definition at line 337 of file MultiApp.h.

Referenced by MultiApp::buildComm(), MultiApp::createApp(), MultiApp::init(), and MultiApp::numGlobalApps().

◆ _transferred_dofs

std::set<dof_id_type> TransientMultiApp::_transferred_dofs
private

The DoFs associated with all of the currently transferred variables.

Definition at line 90 of file TransientMultiApp.h.

Referenced by solveStep().

◆ _transferred_vars

std::vector<std::string> TransientMultiApp::_transferred_vars
private

The variables that have been transferred to. Used when doing transfer interpolation. This will be cleared after each solve.

Definition at line 87 of file TransientMultiApp.h.

Referenced by appTransferVector(), and solveStep().

◆ _transient_executioners

std::vector<Transient *> TransientMultiApp::_transient_executioners
private

◆ _type

const std::string& MooseObject::_type
protectedinherited

The type of this object (the Class name)

Definition at line 177 of file MooseObject.h.

Referenced by FEProblemBase::init(), and MooseObject::type().

◆ _use_positions

const bool MultiApp::_use_positions
protectedinherited

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