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

Samples a variable's value in the Master domain at the point where the MultiApp is. More...

#include <MultiAppUserObjectTransfer.h>

Inheritance diagram for MultiAppUserObjectTransfer:
[legend]

Public Types

enum  DIRECTION { TO_MULTIAPP, FROM_MULTIAPP }
 

Public Member Functions

 MultiAppUserObjectTransfer (const InputParameters &parameters)
 
virtual void initialSetup () override
 Method called at the beginning of the simulation for checking integrity or doing one-time setup. More...
 
virtual void execute () override
 Execute the transfer. More...
 
int direction ()
 The direction this Transfer is going in. More...
 
void variableIntegrityCheck (const AuxVariableName &var_name) const
 Utility to verify that the vEariable in the destination system exists. More...
 
const std::shared_ptr< MultiAppgetMultiApp () const
 Return the MultiApp that this transfer belongs to. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 Return the execution flags, handling "same_as_multiapp". 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...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp ()
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled ()
 Return the enabled status of the object. 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...
 
ExecFlagType execBitFlags () const
 Build and return the execution flags as a bitfield. More...
 

Static Public Member Functions

static MooseEnum directions ()
 Used to construct InputParameters. More...
 
static System * find_sys (EquationSystems &es, const std::string &var_name)
 Small helper function for finding the system containing the variable. More...
 
static MultiMooseEnum getExecuteOptions ()
 Returns the available options for the 'execute_on' input parameters. More...
 

Public Attributes

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

Static Public Attributes

static const Number OutOfMeshValue = -999999
 

Protected Member Functions

void getAppInfo ()
 This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.) More...
 
std::vector< BoundingBox > getFromBoundingBoxes ()
 Return the bounding boxes of all the "from" domains, including all the domains not local to this processor. More...
 
std::vector< unsigned int > getFromsPerProc ()
 Return the number of "from" domains that each processor owns. More...
 
NumericVector< Real > & getTransferVector (unsigned int i_local, std::string var_name)
 If we are transferring to a multiapp, return the appropriate solution vector. 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...
 

Protected Attributes

AuxVariableName _to_var_name
 
std::string _user_object_name
 
bool _displaced_target_mesh
 
std::shared_ptr< MultiApp_multi_app
 The MultiApp this Transfer is transferring data to or from. More...
 
MooseEnum _direction
 Whether we're transferring to or from the MultiApp. More...
 
std::vector< FEProblemBase * > _to_problems
 
std::vector< FEProblemBase * > _from_problems
 
std::vector< EquationSystems * > _to_es
 
std::vector< EquationSystems * > _from_es
 
std::vector< MooseMesh * > _to_meshes
 
std::vector< MooseMesh * > _from_meshes
 
std::vector< Point > _to_positions
 
std::vector< Point > _from_positions
 
bool _displaced_source_mesh
 
std::vector< unsigned int > _local2global_map
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
THREAD_ID _tid
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. 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...
 
std::vector< ExecFlagType_exec_flags
 execution flag (when is the object executed/evaluated) More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 

Detailed Description

Samples a variable's value in the Master domain at the point where the MultiApp is.

Copies that value into a postprocessor in the MultiApp.

Definition at line 32 of file MultiAppUserObjectTransfer.h.

Member Enumeration Documentation

Enumerator
TO_MULTIAPP 
FROM_MULTIAPP 

Definition at line 46 of file MultiAppTransfer.h.

Constructor & Destructor Documentation

MultiAppUserObjectTransfer::MultiAppUserObjectTransfer ( const InputParameters parameters)

Definition at line 51 of file MultiAppUserObjectTransfer.C.

52  : MultiAppTransfer(parameters),
53  _to_var_name(getParam<AuxVariableName>("variable")),
54  _user_object_name(getParam<UserObjectName>("user_object")),
55  _displaced_target_mesh(getParam<bool>("displaced_target_mesh"))
56 {
57  // This transfer does not work with DistributedMesh
58  _fe_problem.mesh().errorIfDistributedMesh("MultiAppUserObjectTransfer");
59 }
MultiAppTransfer(const InputParameters &parameters)
Here we need to remove the special option that indicates to the user that this object will follow it&#39;...
FEProblemBase & _fe_problem
Definition: Transfer.h:75
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2526
virtual MooseMesh & mesh() override

Member Function Documentation

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 224 of file Restartable.h.

225 {
226  return declareRestartableDataWithContext<T>(data_name, NULL);
227 }
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 231 of file Restartable.h.

232 {
233  return declareRestartableDataWithContext<T>(data_name, init_value, NULL);
234 }
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 238 of file Restartable.h.

239 {
241  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
242 
243  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
244  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
245 
247 
248  return data_ptr->get();
249 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
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 253 of file Restartable.h.

256 {
258  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
259 
260  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
261  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
262 
263  data_ptr->set() = init_value;
264 
266 
267  return data_ptr->get();
268 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
int MultiAppTransfer::direction ( )
inlineinherited

The direction this Transfer is going in.

Definition at line 56 of file MultiAppTransfer.h.

56 { return _direction; }
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
static MooseEnum MultiAppTransfer::directions ( )
inlinestaticinherited

Used to construct InputParameters.

Definition at line 53 of file MultiAppTransfer.h.

Referenced by validParams< MultiAppTransfer >().

53 { return MooseEnum("to_multiapp from_multiapp"); }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
virtual bool MooseObject::enabled ( )
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 77 of file MooseObject.h.

Referenced by EigenKernel::enabled().

77 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:117
ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

Build and return the execution flags as a bitfield.

Definition at line 100 of file SetupInterface.C.

Referenced by EigenExecutionerBase::init().

101 {
102  unsigned int exec_bit_field = EXEC_NONE;
103  for (unsigned int i = 0; i < _exec_flags.size(); ++i)
104  exec_bit_field |= _exec_flags[i];
105 
106  return static_cast<ExecFlagType>(exec_bit_field);
107 }
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
const std::vector< ExecFlagType > & MultiAppTransfer::execFlags ( ) const
virtualinherited

Return the execution flags, handling "same_as_multiapp".

Reimplemented from SetupInterface.

Definition at line 97 of file MultiAppTransfer.C.

Referenced by MultiAppTransfer::getMultiApp(), and MultiAppTransfer::MultiAppTransfer().

98 {
99  if (Transfer::execFlags().empty())
100  return _multi_app->execFlags();
101  else
102  return Transfer::execFlags();
103 }
virtual const std::vector< ExecFlagType > & execFlags() const
Get the execution flag for the object.
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
void MultiAppUserObjectTransfer::execute ( )
overridevirtual

Execute the transfer.

Implements Transfer.

Definition at line 69 of file MultiAppUserObjectTransfer.C.

70 {
71  _console << "Beginning MultiAppUserObjectTransfer " << name() << std::endl;
72 
73  switch (_direction)
74  {
75  case TO_MULTIAPP:
76  {
77  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
78  {
79  if (_multi_app->hasLocalApp(i))
80  {
81  Moose::ScopedCommSwapper swapper(_multi_app->comm());
82 
83  // Loop over the master nodes and set the value of the variable
84  System * to_sys = find_sys(_multi_app->appProblemBase(i).es(), _to_var_name);
85 
86  unsigned int sys_num = to_sys->number();
87  unsigned int var_num = to_sys->variable_number(_to_var_name);
88 
89  NumericVector<Real> & solution = _multi_app->appTransferVector(i, _to_var_name);
90 
91  MeshBase * mesh = NULL;
92 
93  if (_displaced_target_mesh && _multi_app->appProblemBase(i).getDisplacedProblem())
94  {
95  mesh = &_multi_app->appProblemBase(i).getDisplacedProblem()->mesh().getMesh();
96  }
97  else
98  mesh = &_multi_app->appProblemBase(i).mesh().getMesh();
99 
100  bool is_nodal = to_sys->variable_type(var_num).family == LAGRANGE;
101 
102  const UserObject & user_object =
103  _multi_app->problemBase().getUserObjectBase(_user_object_name);
104 
105  if (is_nodal)
106  {
107  MeshBase::const_node_iterator node_it = mesh->local_nodes_begin();
108  MeshBase::const_node_iterator node_end = mesh->local_nodes_end();
109 
110  for (; node_it != node_end; ++node_it)
111  {
112  Node * node = *node_it;
113 
114  if (node->n_dofs(sys_num, var_num) > 0) // If this variable has dofs at this node
115  {
116  // The zero only works for LAGRANGE!
117  dof_id_type dof = node->dof_number(sys_num, var_num, 0);
118 
119  swapper.forceSwap();
120  Real from_value = user_object.spatialValue(*node + _multi_app->position(i));
121  swapper.forceSwap();
122 
123  solution.set(dof, from_value);
124  }
125  }
126  }
127  else // Elemental
128  {
129  MeshBase::const_element_iterator elem_it = mesh->local_elements_begin();
130  MeshBase::const_element_iterator elem_end = mesh->local_elements_end();
131 
132  for (; elem_it != elem_end; ++elem_it)
133  {
134  Elem * elem = *elem_it;
135 
136  Point centroid = elem->centroid();
137 
138  if (elem->n_dofs(sys_num, var_num) > 0) // If this variable has dofs at this elem
139  {
140  // The zero only works for LAGRANGE!
141  dof_id_type dof = elem->dof_number(sys_num, var_num, 0);
142 
143  swapper.forceSwap();
144  Real from_value = user_object.spatialValue(centroid + _multi_app->position(i));
145  swapper.forceSwap();
146 
147  solution.set(dof, from_value);
148  }
149  }
150  }
151 
152  solution.close();
153  to_sys->update();
154  }
155  }
156 
157  break;
158  }
159  case FROM_MULTIAPP:
160  {
161  FEProblemBase & to_problem = _multi_app->problemBase();
162  MooseVariable & to_var = to_problem.getVariable(0, _to_var_name);
163  SystemBase & to_system_base = to_var.sys();
164 
165  System & to_sys = to_system_base.system();
166 
167  unsigned int to_sys_num = to_sys.number();
168 
169  // Only works with a serialized mesh to transfer to!
170  mooseAssert(to_sys.get_mesh().is_serial(),
171  "MultiAppUserObjectTransfer only works with ReplicatedMesh!");
172 
173  unsigned int to_var_num = to_sys.variable_number(to_var.name());
174 
175  _console << "Transferring to: " << to_var.name() << std::endl;
176 
177  // EquationSystems & to_es = to_sys.get_equation_systems();
178 
179  // Create a serialized version of the solution vector
180  NumericVector<Number> * to_solution = to_sys.solution.get();
181 
182  MeshBase * to_mesh = NULL;
183 
184  if (_displaced_target_mesh && to_problem.getDisplacedProblem())
185  to_mesh = &to_problem.getDisplacedProblem()->mesh().getMesh();
186  else
187  to_mesh = &to_problem.mesh().getMesh();
188 
189  bool is_nodal = to_sys.variable_type(to_var_num).family == LAGRANGE;
190 
191  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
192  {
193  if (!_multi_app->hasLocalApp(i))
194  continue;
195 
196  Point app_position = _multi_app->position(i);
197  BoundingBox app_box = _multi_app->getBoundingBox(i);
198  const UserObject & user_object = _multi_app->appUserObjectBase(i, _user_object_name);
199 
200  if (is_nodal)
201  {
202  MeshBase::const_node_iterator node_it = to_mesh->nodes_begin();
203  MeshBase::const_node_iterator node_end = to_mesh->nodes_end();
204 
205  for (; node_it != node_end; ++node_it)
206  {
207  Node * node = *node_it;
208 
209  if (node->n_dofs(to_sys_num, to_var_num) > 0) // If this variable has dofs at this node
210  {
211  // See if this node falls in this bounding box
212  if (app_box.contains_point(*node))
213  {
214  dof_id_type dof = node->dof_number(to_sys_num, to_var_num, 0);
215 
216  Real from_value = 0;
217  {
218  Moose::ScopedCommSwapper swapper(_multi_app->comm());
219  from_value = user_object.spatialValue(*node - app_position);
220  }
221 
222  to_solution->set(dof, from_value);
223  }
224  }
225  }
226  }
227  else // Elemental
228  {
229  MeshBase::const_element_iterator elem_it = to_mesh->elements_begin();
230  MeshBase::const_element_iterator elem_end = to_mesh->elements_end();
231 
232  for (; elem_it != elem_end; ++elem_it)
233  {
234  Elem * elem = *elem_it;
235 
236  if (elem->n_dofs(to_sys_num, to_var_num) > 0) // If this variable has dofs at this elem
237  {
238  Point centroid = elem->centroid();
239 
240  // See if this elem falls in this bounding box
241  if (app_box.contains_point(centroid))
242  {
243  dof_id_type dof = elem->dof_number(to_sys_num, to_var_num, 0);
244 
245  Real from_value = 0;
246  {
247  Moose::ScopedCommSwapper swapper(_multi_app->comm());
248  from_value = user_object.spatialValue(centroid - app_position);
249  }
250 
251  to_solution->set(dof, from_value);
252  }
253  }
254  }
255  }
256  }
257 
258  to_solution->close();
259  to_sys.update();
260 
261  break;
262  }
263  }
264 
265  _console << "Finished MultiAppUserObjectTransfer " << name() << std::endl;
266 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
Class for stuff related to variables.
Definition: MooseVariable.h:43
Base class for a system (of equations)
Definition: SystemBase.h:91
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string & name() const
Get the variable name.
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem()
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
virtual System & system()=0
Get the reference to the libMesh system.
virtual MooseMesh & mesh() override
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
static System * find_sys(EquationSystems &es, const std::string &var_name)
Small helper function for finding the system containing the variable.
Definition: Transfer.C:70
SystemBase & sys()
Get the system this variable is part of.
virtual MooseVariable & getVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested variable which may be in any system. ...
Base class for user-specific data.
Definition: UserObject.h:42
virtual Real spatialValue(const Point &) const
Optional interface function for "evaluating" a UserObject at a spatial position.
Definition: UserObject.h:99
System * Transfer::find_sys ( EquationSystems &  es,
const std::string &  var_name 
)
staticinherited

Small helper function for finding the system containing the variable.

Note that this implies that variable names are unique across all systems!

Parameters
esThe EquationSystems object to be searched.
var_nameThe name of the variable you are looking for.

Note that this implies that variable names are unique across all systems!

Definition at line 70 of file Transfer.C.

Referenced by MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), execute(), MultiAppDTKInterpolationTransfer::execute(), DTKInterpolationAdapter::get_values_to_fill(), DTKInterpolationAdapter::get_variable_evaluator(), MultiAppMeshFunctionTransfer::transferVariable(), DTKInterpolationAdapter::update_variable_values(), and MultiAppTransfer::variableIntegrityCheck().

71 {
72  // Find the system this variable is from
73  for (unsigned int i = 0; i < es.n_systems(); i++)
74  if (es.get_system(i).has_variable(var_name))
75  return &es.get_system(i);
76 
77  ::mooseError("Unable to find variable " + var_name + " in any system.");
78 
79  // Unreachable
80  return &es.get_system(0);
81 }
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
void MultiAppTransfer::getAppInfo ( )
protectedinherited

This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.)

Definition at line 106 of file MultiAppTransfer.C.

Referenced by MultiAppNearestNodeTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppProjectionTransfer::execute(), and MultiAppProjectionTransfer::initialSetup().

107 {
108  // I would like to do all of this in initialSetup, but it will fail with
109  // multiapps that reset. A reset deletes and rebuilds the FEProblems so all
110  // of the pointers will be broken.
111 
112  // Clear the vectors since we've probably built them up from a previous call
113  _from_problems.clear();
114  _to_problems.clear();
115  _from_es.clear();
116  _to_es.clear();
117  _from_meshes.clear();
118  _to_meshes.clear();
119  _to_positions.clear();
120  _from_positions.clear();
121 
122  // Build the vectors for to problems, from problems, and subapps positions.
123  switch (_direction)
124  {
125  case TO_MULTIAPP:
126  _from_problems.push_back(&_multi_app->problemBase());
127  _from_positions.push_back(Point(0., 0., 0.));
128  for (unsigned int i_app = 0; i_app < _multi_app->numGlobalApps(); i_app++)
129  {
130  if (!_multi_app->hasLocalApp(i_app))
131  continue;
132  _local2global_map.push_back(i_app);
133  _to_problems.push_back(&_multi_app->appProblemBase(i_app));
134  _to_positions.push_back(_multi_app->position(i_app));
135  }
136  break;
137 
138  case FROM_MULTIAPP:
139  _to_problems.push_back(&_multi_app->problemBase());
140  _to_positions.push_back(Point(0., 0., 0.));
141  for (unsigned int i_app = 0; i_app < _multi_app->numGlobalApps(); i_app++)
142  {
143  if (!_multi_app->hasLocalApp(i_app))
144  continue;
145  _local2global_map.push_back(i_app);
146  _from_problems.push_back(&_multi_app->appProblemBase(i_app));
147  _from_positions.push_back(_multi_app->position(i_app));
148  }
149  break;
150  }
151 
152  // Build the from and to equation systems and mesh vectors.
153  for (unsigned int i = 0; i < _to_problems.size(); i++)
154  {
155  // TODO: Do I actually want es or displaced es?
156  _to_es.push_back(&_to_problems[i]->es());
157  if (_displaced_target_mesh && _to_problems[i]->getDisplacedProblem())
158  _to_meshes.push_back(&_to_problems[i]->getDisplacedProblem()->mesh());
159  else
160  _to_meshes.push_back(&_to_problems[i]->mesh());
161  }
162  for (unsigned int i = 0; i < _from_problems.size(); i++)
163  {
164  _from_es.push_back(&_from_problems[i]->es());
165  if (_displaced_source_mesh && _from_problems[i]->getDisplacedProblem())
166  _from_meshes.push_back(&_from_problems[i]->getDisplacedProblem()->mesh());
167  else
168  _from_meshes.push_back(&_from_problems[i]->mesh());
169  }
170 }
std::vector< EquationSystems * > _to_es
std::vector< FEProblemBase * > _to_problems
std::vector< Point > _from_positions
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
std::vector< MooseMesh * > _from_meshes
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
std::vector< unsigned int > _local2global_map
std::vector< Point > _to_positions
std::vector< EquationSystems * > _from_es
std::vector< FEProblemBase * > _from_problems
std::vector< MooseMesh * > _to_meshes
MultiMooseEnum SetupInterface::getExecuteOptions ( )
staticinherited

Returns the available options for the 'execute_on' input parameters.

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

Definition at line 110 of file SetupInterface.C.

Referenced by AddNodalNormalsAction::act(), AdvancedOutput::addValidParams(), AdvancedOutput::initExecutionTypes(), OutputOnWarehouse::OutputOnWarehouse(), validParams< CommonOutputAction >(), validParams< Output >(), and validParams< SetupInterface >().

111 {
112  return MultiMooseEnum("none=0x00 initial=0x01 linear=0x02 nonlinear=0x04 timestep_end=0x08 "
113  "timestep_begin=0x10 final=0x20 custom=0x100",
114  "linear");
115 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
std::vector< BoundingBox > MultiAppTransfer::getFromBoundingBoxes ( )
protectedinherited

Return the bounding boxes of all the "from" domains, including all the domains not local to this processor.

Definition at line 173 of file MultiAppTransfer.C.

Referenced by MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), and MultiAppMeshFunctionTransfer::transferVariable().

174 {
175  std::vector<std::pair<Point, Point>> bb_points(_from_meshes.size());
176  for (unsigned int i = 0; i < _from_meshes.size(); i++)
177  {
178  // Get a bounding box around the mesh elements that are local to the current
179  // processor.
180  BoundingBox bbox = MeshTools::create_local_bounding_box(*_from_meshes[i]);
181 
182  // Translate the bounding box to the from domain's position.
183  bbox.first += _from_positions[i];
184  bbox.second += _from_positions[i];
185 
186  // Cast the bounding box into a pair of points (so it can be put through
187  // MPI communication).
188  bb_points[i] = static_cast<std::pair<Point, Point>>(bbox);
189  }
190 
191  // Serialize the bounding box points.
192  _communicator.allgather(bb_points);
193 
194  // Recast the points back into bounding boxes and return.
195  std::vector<BoundingBox> bboxes(bb_points.size());
196  for (unsigned int i = 0; i < bb_points.size(); i++)
197  bboxes[i] = static_cast<BoundingBox>(bb_points[i]);
198 
199  return bboxes;
200 }
std::vector< Point > _from_positions
std::vector< MooseMesh * > _from_meshes
std::vector< unsigned int > MultiAppTransfer::getFromsPerProc ( )
protectedinherited

Return the number of "from" domains that each processor owns.

Definition at line 203 of file MultiAppTransfer.C.

Referenced by MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), and MultiAppMeshFunctionTransfer::transferVariable().

204 {
205  std::vector<unsigned int> froms_per_proc;
206  switch (_direction)
207  {
208  case TO_MULTIAPP:
209  froms_per_proc.resize(n_processors(), 1);
210  break;
211  case FROM_MULTIAPP:
212  froms_per_proc.resize(n_processors());
213  _communicator.allgather(_multi_app->numLocalApps(), froms_per_proc);
214  break;
215  }
216  return froms_per_proc;
217 }
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
MooseApp& MooseObject::getMooseApp ( )
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 72 of file MooseObject.h.

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

72 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
const std::shared_ptr<MultiApp> MultiAppTransfer::getMultiApp ( ) const
inlineinherited

Return the MultiApp that this transfer belongs to.

Definition at line 64 of file MultiAppTransfer.h.

64 { return _multi_app; }
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
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 122 of file MooseObject.h.

Referenced by FEProblemBase::addMaterial(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), EigenKernel::EigenKernel(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), MeshExtruder::modify(), AddExtraNodeset::modify(), SideSetsAroundSubdomain::modify(), RenameBlock::modify(), MooseObject::parameters(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

123 {
124  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
125 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
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:111
NumericVector< Real > & MultiAppTransfer::getTransferVector ( unsigned int  i_local,
std::string  var_name 
)
protectedinherited

If we are transferring to a multiapp, return the appropriate solution vector.

Definition at line 220 of file MultiAppTransfer.C.

Referenced by MultiAppNearestNodeTransfer::execute(), and MultiAppMeshFunctionTransfer::transferVariable().

221 {
222  mooseAssert(_direction == TO_MULTIAPP, "getTransferVector only works for transfers to multiapps");
223 
224  return _multi_app->appTransferVector(_local2global_map[i_local], var_name);
225 }
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
std::vector< unsigned int > _local2global_map
void MultiAppUserObjectTransfer::initialSetup ( )
overridevirtual

Method called at the beginning of the simulation for checking integrity or doing one-time setup.

Reimplemented from Transfer.

Definition at line 62 of file MultiAppUserObjectTransfer.C.

63 {
64  if (_direction == TO_MULTIAPP)
66 }
void variableIntegrityCheck(const AuxVariableName &var_name) const
Utility to verify that the vEariable in the destination system exists.
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
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 67 of file MooseObject.h.

Referenced by BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), MultiAppNearestNodeTransfer::getLocalNodes(), 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(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), EigenExecutionerBase::normalizeSolution(), Output::Output(), Exodus::outputSetup(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), Piecewise::setData(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

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

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

Definition at line 79 of file SetupInterface.C.

80 {
81 }
template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited
template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 80 of file MooseObject.h.

Referenced by FEProblemBase::addInitialCondition(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AnnularMesh::AnnularMesh(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), EigenExecutionerBase::chebyshev(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), SubProblem::checkMatProps(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), FEProblemBase::computeResidual(), Material::computeSubdomainProperties(), PenetrationAux::computeValue(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DGKernel::DGKernel(), SolutionUserObject::discontinuousPointValue(), SolutionUserObject::discontinuousPointValueGradient(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), NodalValueSampler::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), FindValueOnLine::execute(), MultiAppInterpolationTransfer::execute(), TimeExtremeValue::execute(), LeastSquaresFit::execute(), FEProblemBase::executeControls(), FileOutput::FileOutput(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), GeneratedMesh::GeneratedMesh(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), GeneratedMesh::getMaxInDimension(), AnnularMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObjectBase(), NumVars::getValue(), PerformanceData::getValue(), Residual::getValue(), FindValueOnLine::getValueAtPoint(), DisplacedProblem::getVariable(), FEProblemBase::getVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), KernelBase::KernelBase(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< T >::LineMaterialSamplerBase(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), SideSetsFromPoints::modify(), SideSetsFromNormals::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), AssignElementSubdomainID::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), XDA::output(), VTKOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMultilinear::PiecewiseMultilinear(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postStep(), LStableDirk3::postStep(), ImplicitMidpoint::postStep(), ExplicitTVDRK2::postStep(), AStableDirk4::postStep(), LStableDirk4::postStep(), ExplicitRK2::postStep(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), Piecewise::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromPoints::SideSetsFromPoints(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), and VolumeHistogram::VolumeHistogram().

81  {
82  std::ostringstream oss;
83  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
84  std::string msg = oss.str();
85  callMooseErrorRaw(msg, &_app);
86  }
void mooseStreamAll(std::ostringstream &ss)
Definition: MooseError.C:78
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:45
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 101 of file MooseObject.h.

102  {
103  moose::internal::mooseInfoStream(_console, std::forward<Args>(args)...);
104  }
void mooseInfoStream(S &oss, Args &&...args)
Definition: MooseError.h:145
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited
const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 47 of file MooseObject.h.

Referenced by FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), Output::advancedExecuteOn(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), AStableDirk4::AStableDirk4(), Function::average(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), DGKernel::DGKernel(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), GeneralUserObject::GeneralUserObject(), MultiApp::getBoundingBox(), Control::getControllableParameterHelper(), Control::getControllableValue(), AuxKernel::getDependObjects(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), OutputWarehouse::getOutput(), Transient::getTimeStepperName(), InitialCondition::getUserObject(), AuxKernel::getUserObject(), InitialCondition::getUserObjectByName(), AuxKernel::getUserObjectByName(), AdvancedOutput::hasOutputHelper(), FEProblemBase::init(), CSVReader::initialize(), MultiAppProjectionTransfer::initialSetup(), InitialCondition::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), KernelBase::KernelBase(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MaterialDerivativeTestKernelBase< T >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), ElementDeleterBase::modify(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::parameters(), Executioner::parentOutputPositionChanged(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), OutputWarehouse::setFileNumbers(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), Function::timeDerivative(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), and AdvancedOutput::wantOutput().

47 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:114
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
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 84 of file SetupInterface.C.

85 {
86 }
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, and NodalUserObject.

Definition at line 89 of file SetupInterface.C.

90 {
91 }
void SetupInterface::timestepSetup ( )
virtualinherited

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

Reimplemented in SolutionUserObject, NumNonlinearIterations, and MemoryUsage.

Definition at line 74 of file SetupInterface.C.

75 {
76 }
void MultiAppTransfer::variableIntegrityCheck ( const AuxVariableName &  var_name) const
inherited

Utility to verify that the vEariable in the destination system exists.

Definition at line 89 of file MultiAppTransfer.C.

Referenced by MultiAppTransfer::direction(), MultiAppNearestNodeTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), MultiAppMeshFunctionTransfer::initialSetup(), MultiAppInterpolationTransfer::initialSetup(), initialSetup(), and MultiAppCopyTransfer::initialSetup().

90 {
91  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
92  if (_multi_app->hasLocalApp(i) && !find_sys(_multi_app->appProblemBase(i).es(), var_name))
93  mooseError("Cannot find variable ", var_name, " for ", name(), " Transfer");
94 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
static System * find_sys(EquationSystems &es, const std::string &var_name)
Small helper function for finding the system containing the variable.
Definition: Transfer.C:70

Member Data Documentation

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterial(), FEProblemBase::addMultiApp(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobian(), FEProblemBase::computeResidualType(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), InversePowerMethod::execute(), NonlinearEigen::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MooseObject::getMooseApp(), 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(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), MooseMesh::MooseMesh(), NonlinearEigen::NonlinearEigen(), 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(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and Console::write().

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 37 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), CreateProblemAction::act(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), FEProblemBase::advanceMultiApps(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualType(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), 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(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), FEProblemBase::useFECache(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

const ExecFlagType& SetupInterface::_current_execute_flag
protectedinherited

Reference to FEProblemBase.

Definition at line 85 of file SetupInterface.h.

MooseEnum MultiAppTransfer::_direction
protectedinherited
bool MultiAppTransfer::_displaced_source_mesh
protectedinherited
bool MultiAppUserObjectTransfer::_displaced_target_mesh
protected

Definition at line 45 of file MultiAppUserObjectTransfer.h.

Referenced by execute().

const bool& MooseObject::_enabled
protectedinherited

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

Definition at line 117 of file MooseObject.h.

Referenced by MooseObject::enabled().

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

execution flag (when is the object executed/evaluated)

Definition at line 82 of file SetupInterface.h.

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

FEProblemBase& Transfer::_fe_problem
protectedinherited
std::vector<EquationSystems *> MultiAppTransfer::_from_es
protectedinherited

Definition at line 85 of file MultiAppTransfer.h.

Referenced by MultiAppTransfer::getAppInfo().

std::vector<MooseMesh *> MultiAppTransfer::_from_meshes
protectedinherited
std::vector<Point> MultiAppTransfer::_from_positions
protectedinherited
std::vector<FEProblemBase *> MultiAppTransfer::_from_problems
protectedinherited
std::vector<unsigned int> MultiAppTransfer::_local2global_map
protectedinherited
std::shared_ptr<MultiApp> MultiAppTransfer::_multi_app
protectedinherited
const std::string& MooseObject::_name
protectedinherited
const InputParameters& MooseObject::_pars
protectedinherited
SubProblem& Transfer::_subproblem
protectedinherited

Definition at line 74 of file Transfer.h.

SystemBase& Transfer::_sys
protectedinherited

Definition at line 76 of file Transfer.h.

THREAD_ID Transfer::_tid
protectedinherited
std::vector<EquationSystems *> MultiAppTransfer::_to_es
protectedinherited
std::vector<MooseMesh *> MultiAppTransfer::_to_meshes
protectedinherited
std::vector<Point> MultiAppTransfer::_to_positions
protectedinherited
std::vector<FEProblemBase *> MultiAppTransfer::_to_problems
protectedinherited
AuxVariableName MultiAppUserObjectTransfer::_to_var_name
protected

Definition at line 42 of file MultiAppUserObjectTransfer.h.

Referenced by execute(), and initialSetup().

std::string MultiAppUserObjectTransfer::_user_object_name
protected

Definition at line 43 of file MultiAppUserObjectTransfer.h.

Referenced by execute().

const Number Transfer::OutOfMeshValue = -999999
staticinherited

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