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

Project values from one domain to another. More...

#include <MultiAppProjectionTransfer.h>

Inheritance diagram for MultiAppProjectionTransfer:
[legend]

Public Types

enum  DIRECTION { TO_MULTIAPP, FROM_MULTIAPP }
 

Public Member Functions

 MultiAppProjectionTransfer (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 toMultiApp ()
 
void fromMultiApp ()
 
void assembleL2 (EquationSystems &es, const std::string &system_name)
 
void projectSolution (unsigned int to_problem)
 
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
 
VariableName _from_var_name
 
MooseEnum _proj_type
 
bool _compute_matrix
 True, if we need to recompute the projection matrix. More...
 
std::vector< LinearImplicitSystem * > _proj_sys
 
unsigned int _proj_var_num
 Having one projection variable number seems weird, but there is always one variable in every system being used for projection, thus is always going to be 0 unless something changes in libMesh or we change the way we project variables. More...
 
bool _fixed_meshes
 
bool _qps_cached
 
std::vector< std::vector< Point > > _cached_qps
 
std::vector< std::map< std::pair< unsigned int, unsigned int >, unsigned int > > _cached_index_map
 
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
 
bool _displaced_target_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...
 

Friends

void assemble_l2 (EquationSystems &es, const std::string &system_name)
 

Detailed Description

Project values from one domain to another.

Definition at line 33 of file MultiAppProjectionTransfer.h.

Member Enumeration Documentation

Enumerator
TO_MULTIAPP 
FROM_MULTIAPP 

Definition at line 46 of file MultiAppTransfer.h.

Constructor & Destructor Documentation

MultiAppProjectionTransfer::MultiAppProjectionTransfer ( const InputParameters parameters)

Definition at line 63 of file MultiAppProjectionTransfer.C.

64  : MultiAppTransfer(parameters),
65  _to_var_name(getParam<AuxVariableName>("variable")),
66  _from_var_name(getParam<VariableName>("source_variable")),
67  _proj_type(getParam<MooseEnum>("proj_type")),
68  _compute_matrix(true),
69  _fixed_meshes(getParam<bool>("fixed_meshes")),
70  _qps_cached(false)
71 {
72 }
MultiAppTransfer(const InputParameters &parameters)
Here we need to remove the special option that indicates to the user that this object will follow it&#39;...
bool _compute_matrix
True, if we need to recompute the projection matrix.

Member Function Documentation

void MultiAppProjectionTransfer::assembleL2 ( EquationSystems &  es,
const std::string &  system_name 
)
protected

Definition at line 115 of file MultiAppProjectionTransfer.C.

Referenced by assemble_l2().

116 {
117  // Get the system and mesh from the input arguments.
118  LinearImplicitSystem & system = es.get_system<LinearImplicitSystem>(system_name);
119  MeshBase & to_mesh = es.get_mesh();
120 
121  // Get the meshfunction evaluations and the map that was stashed in the es.
122  std::vector<Real> & final_evals = *es.parameters.get<std::vector<Real> *>("final_evals");
123  std::map<dof_id_type, unsigned int> & element_map =
124  *es.parameters.get<std::map<dof_id_type, unsigned int> *>("element_map");
125 
126  // Setup system vectors and matrices.
127  FEType fe_type = system.variable_type(0);
128  std::unique_ptr<FEBase> fe(FEBase::build(to_mesh.mesh_dimension(), fe_type));
129  QGauss qrule(to_mesh.mesh_dimension(), fe_type.default_quadrature_order());
130  fe->attach_quadrature_rule(&qrule);
131  const DofMap & dof_map = system.get_dof_map();
132  DenseMatrix<Number> Ke;
133  DenseVector<Number> Fe;
134  std::vector<dof_id_type> dof_indices;
135  const std::vector<Real> & JxW = fe->get_JxW();
136  const std::vector<std::vector<Real>> & phi = fe->get_phi();
137 
138  for (const auto & elem : to_mesh.active_local_element_ptr_range())
139  {
140  fe->reinit(elem);
141 
142  dof_map.dof_indices(elem, dof_indices);
143  Ke.resize(dof_indices.size(), dof_indices.size());
144  Fe.resize(dof_indices.size());
145 
146  for (unsigned int qp = 0; qp < qrule.n_points(); qp++)
147  {
148  Real meshfun_eval = 0.;
149  if (element_map.find(elem->id()) != element_map.end())
150  {
151  // We have evaluations for this element.
152  meshfun_eval = final_evals[element_map[elem->id()] + qp];
153  }
154 
155  // Now compute the element matrix and RHS contributions.
156  for (unsigned int i = 0; i < phi.size(); i++)
157  {
158  // RHS
159  Fe(i) += JxW[qp] * (meshfun_eval * phi[i][qp]);
160 
161  if (_compute_matrix)
162  for (unsigned int j = 0; j < phi.size(); j++)
163  {
164  // The matrix contribution
165  Ke(i, j) += JxW[qp] * (phi[i][qp] * phi[j][qp]);
166  }
167  }
168  dof_map.constrain_element_matrix_and_vector(Ke, Fe, dof_indices);
169 
170  if (_compute_matrix)
171  system.matrix->add_matrix(Ke, dof_indices);
172  system.rhs->add_vector(Fe, dof_indices);
173  }
174  }
175 }
nl system()
bool _compute_matrix
True, if we need to recompute the projection matrix.
DofMap & dof_map
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 MultiAppProjectionTransfer::execute ( )
overridevirtual

Execute the transfer.

Implements Transfer.

Definition at line 178 of file MultiAppProjectionTransfer.C.

179 {
180  _console << "Beginning projection transfer " << name() << std::endl;
181 
182  getAppInfo();
183 
185  // We are going to project the solutions by solving some linear systems. In
186  // order to assemble the systems, we need to evaluate the "from" domain
187  // solutions at quadrature points in the "to" domain. Some parallel
188  // communication is necessary because each processor doesn't necessarily have
189  // all the "from" information it needs to set its "to" values. We don't want
190  // to use a bunch of big all-to-all broadcasts, so we'll use bounding boxes to
191  // figure out which processors have the information we need and only
192  // communicate with those processors.
193  //
194  // Each processor will
195  // 1. Check its local quadrature points in the "to" domains to see which
196  // "from" domains they might be in.
197  // 2. Send quadrature points to the processors with "from" domains that might
198  // contain those points.
199  // 3. Recieve quadrature points from other processors, evaluate its mesh
200  // functions at those points, and send the values back to the proper
201  // processor
202  // 4. Recieve mesh function evaluations from all relevant processors and
203  // decide which one to use at every quadrature point (the lowest global app
204  // index always wins)
205  // 5. And use the mesh function evaluations to assemble and solve an L2
206  // projection system on its local elements.
208 
210  // For every combination of global "from" problem and local "to" problem, find
211  // which "from" bounding boxes overlap with which "to" elements. Keep track
212  // of which processors own bounding boxes that overlap with which elements.
213  // Build vectors of quadrature points to send to other processors for mesh
214  // function evaluations.
216 
217  // Get the bounding boxes for the "from" domains.
218  std::vector<BoundingBox> bboxes = getFromBoundingBoxes();
219 
220  // Figure out how many "from" domains each processor owns.
221  std::vector<unsigned int> froms_per_proc = getFromsPerProc();
222 
223  std::vector<std::vector<Point>> outgoing_qps(n_processors());
224  std::vector<std::map<std::pair<unsigned int, unsigned int>, unsigned int>> element_index_map(
225  n_processors());
226  // element_index_map[i_to, element_id] = index
227  // outgoing_qps[index] is the first quadrature point in element
228 
229  if (!_qps_cached)
230  {
231  for (unsigned int i_to = 0; i_to < _to_problems.size(); i_to++)
232  {
233  MeshBase & to_mesh = _to_meshes[i_to]->getMesh();
234 
235  LinearImplicitSystem & system = *_proj_sys[i_to];
236 
237  FEType fe_type = system.variable_type(0);
238  std::unique_ptr<FEBase> fe(FEBase::build(to_mesh.mesh_dimension(), fe_type));
239  QGauss qrule(to_mesh.mesh_dimension(), fe_type.default_quadrature_order());
240  fe->attach_quadrature_rule(&qrule);
241  const std::vector<Point> & xyz = fe->get_xyz();
242 
243  MeshBase::const_element_iterator el = to_mesh.local_elements_begin();
244  const MeshBase::const_element_iterator end_el = to_mesh.local_elements_end();
245 
246  unsigned int from0 = 0;
247  for (processor_id_type i_proc = 0; i_proc < n_processors();
248  from0 += froms_per_proc[i_proc], i_proc++)
249  {
250  for (el = to_mesh.local_elements_begin(); el != end_el; el++)
251  {
252  const Elem * elem = *el;
253  fe->reinit(elem);
254 
255  bool qp_hit = false;
256  for (unsigned int i_from = 0; i_from < froms_per_proc[i_proc] && !qp_hit; i_from++)
257  {
258  for (unsigned int qp = 0; qp < qrule.n_points() && !qp_hit; qp++)
259  {
260  Point qpt = xyz[qp];
261  if (bboxes[from0 + i_from].contains_point(qpt + _to_positions[i_to]))
262  qp_hit = true;
263  }
264  }
265 
266  if (qp_hit)
267  {
268  // The selected processor's bounding box contains at least one
269  // quadrature point from this element. Send all qps from this element
270  // and remember where they are in the array using the map.
271  std::pair<unsigned int, unsigned int> key(i_to, elem->id());
272  element_index_map[i_proc][key] = outgoing_qps[i_proc].size();
273  for (unsigned int qp = 0; qp < qrule.n_points(); qp++)
274  {
275  Point qpt = xyz[qp];
276  outgoing_qps[i_proc].push_back(qpt + _to_positions[i_to]);
277  }
278  }
279  }
280  }
281  }
282 
283  if (_fixed_meshes)
284  _cached_index_map = element_index_map;
285  }
286  else
287  {
288  element_index_map = _cached_index_map;
289  }
290 
292  // Request quadrature point evaluations from other processors and handle
293  // requests sent to this processor.
295 
296  // Non-blocking send quadrature points to other processors.
297  std::vector<Parallel::Request> send_qps(n_processors());
298  if (!_qps_cached)
299  for (processor_id_type i_proc = 0; i_proc < n_processors(); i_proc++)
300  if (i_proc != processor_id())
301  _communicator.send(i_proc, outgoing_qps[i_proc], send_qps[i_proc]);
302 
303  // Get the local bounding boxes.
304  std::vector<BoundingBox> local_bboxes(froms_per_proc[processor_id()]);
305  {
306  // Find the index to the first of this processor's local bounding boxes.
307  unsigned int local_start = 0;
308  for (processor_id_type i_proc = 0; i_proc < n_processors() && i_proc != processor_id();
309  i_proc++)
310  local_start += froms_per_proc[i_proc];
311 
312  // Extract the local bounding boxes.
313  for (unsigned int i_from = 0; i_from < froms_per_proc[processor_id()]; i_from++)
314  local_bboxes[i_from] = bboxes[local_start + i_from];
315  }
316 
317  // Setup the local mesh functions.
318  std::vector<MeshFunction *> local_meshfuns(froms_per_proc[processor_id()], NULL);
319  for (unsigned int i_from = 0; i_from < _from_problems.size(); i_from++)
320  {
321  FEProblemBase & from_problem = *_from_problems[i_from];
322  MooseVariable & from_var = from_problem.getVariable(0, _from_var_name);
323  System & from_sys = from_var.sys().system();
324  unsigned int from_var_num = from_sys.variable_number(from_var.name());
325 
326  MeshFunction * from_func = new MeshFunction(
327  from_problem.es(), *from_sys.current_local_solution, from_sys.get_dof_map(), from_var_num);
328  from_func->init(Trees::ELEMENTS);
329  from_func->enable_out_of_mesh_mode(OutOfMeshValue);
330  local_meshfuns[i_from] = from_func;
331  }
332 
333  // Recieve quadrature points from other processors, evaluate mesh frunctions
334  // at those points, and send the values back.
335  std::vector<Parallel::Request> send_evals(n_processors());
336  std::vector<Parallel::Request> send_ids(n_processors());
337  std::vector<std::vector<Real>> outgoing_evals(n_processors());
338  std::vector<std::vector<unsigned int>> outgoing_ids(n_processors());
339  std::vector<std::vector<Real>> incoming_evals(n_processors());
340  std::vector<std::vector<unsigned int>> incoming_app_ids(n_processors());
341  for (processor_id_type i_proc = 0; i_proc < n_processors(); i_proc++)
342  {
343  // Use the cached qps if they're available.
344  std::vector<Point> incoming_qps;
345  if (!_qps_cached)
346  {
347  if (i_proc == processor_id())
348  incoming_qps = outgoing_qps[i_proc];
349  else
350  _communicator.receive(i_proc, incoming_qps);
351  // Cache these qps for later if _fixed_meshes
352  if (_fixed_meshes)
353  _cached_qps[i_proc] = incoming_qps;
354  }
355  else
356  {
357  incoming_qps = _cached_qps[i_proc];
358  }
359 
360  outgoing_evals[i_proc].resize(incoming_qps.size(), OutOfMeshValue);
361  if (_direction == FROM_MULTIAPP)
362  outgoing_ids[i_proc].resize(incoming_qps.size(), libMesh::invalid_uint);
363  for (unsigned int qp = 0; qp < incoming_qps.size(); qp++)
364  {
365  Point qpt = incoming_qps[qp];
366 
367  // Loop until we've found the lowest-ranked app that actually contains
368  // the quadrature point.
369  for (unsigned int i_from = 0; i_from < _from_problems.size(); i_from++)
370  {
371  if (local_bboxes[i_from].contains_point(qpt))
372  {
373  outgoing_evals[i_proc][qp] = (*local_meshfuns[i_from])(qpt - _from_positions[i_from]);
374  if (_direction == FROM_MULTIAPP)
375  outgoing_ids[i_proc][qp] = _local2global_map[i_from];
376  }
377  }
378  }
379 
380  if (i_proc == processor_id())
381  {
382  incoming_evals[i_proc] = outgoing_evals[i_proc];
383  if (_direction == FROM_MULTIAPP)
384  incoming_app_ids[i_proc] = outgoing_ids[i_proc];
385  }
386  else
387  {
388  _communicator.send(i_proc, outgoing_evals[i_proc], send_evals[i_proc]);
389  if (_direction == FROM_MULTIAPP)
390  _communicator.send(i_proc, outgoing_ids[i_proc], send_ids[i_proc]);
391  }
392  }
393 
395  // Gather all of the qp evaluations and pick out the best ones for each qp.
397  for (processor_id_type i_proc = 0; i_proc < n_processors(); i_proc++)
398  {
399  if (i_proc == processor_id())
400  continue;
401  _communicator.receive(i_proc, incoming_evals[i_proc]);
402  if (_direction == FROM_MULTIAPP)
403  _communicator.receive(i_proc, incoming_app_ids[i_proc]);
404  }
405 
406  std::vector<std::vector<Real>> final_evals(_to_problems.size());
407  std::vector<std::map<dof_id_type, unsigned int>> trimmed_element_maps(_to_problems.size());
408 
409  for (unsigned int i_to = 0; i_to < _to_problems.size(); i_to++)
410  {
411  MeshBase & to_mesh = _to_meshes[i_to]->getMesh();
412  LinearImplicitSystem & system = *_proj_sys[i_to];
413 
414  FEType fe_type = system.variable_type(0);
415  std::unique_ptr<FEBase> fe(FEBase::build(to_mesh.mesh_dimension(), fe_type));
416  QGauss qrule(to_mesh.mesh_dimension(), fe_type.default_quadrature_order());
417  fe->attach_quadrature_rule(&qrule);
418  const std::vector<Point> & xyz = fe->get_xyz();
419 
420  for (const auto & elem : to_mesh.active_local_element_ptr_range())
421  {
422  fe->reinit(elem);
423 
424  bool element_is_evaled = false;
425  std::vector<Real> evals(qrule.n_points(), 0.);
426 
427  for (unsigned int qp = 0; qp < qrule.n_points(); qp++)
428  {
429  Point qpt = xyz[qp];
430 
431  unsigned int lowest_app_rank = libMesh::invalid_uint;
432  for (unsigned int i_proc = 0; i_proc < n_processors(); i_proc++)
433  {
434  // Ignore the selected processor if the element wasn't found in it's
435  // bounding box.
436  std::map<std::pair<unsigned int, unsigned int>, unsigned int> & map =
437  element_index_map[i_proc];
438  std::pair<unsigned int, unsigned int> key(i_to, elem->id());
439  if (map.find(key) == map.end())
440  continue;
441  unsigned int qp0 = map[key];
442 
443  // Ignore the selected processor if it's app has a higher rank than the
444  // previously found lowest app rank.
445  if (_direction == FROM_MULTIAPP)
446  if (incoming_app_ids[i_proc][qp0 + qp] >= lowest_app_rank)
447  continue;
448 
449  // Ignore the selected processor if the qp was actually outside the
450  // processor's subapp's mesh.
451  if (incoming_evals[i_proc][qp0 + qp] == OutOfMeshValue)
452  continue;
453 
454  // This is the best meshfunction evaluation so far, save it.
455  element_is_evaled = true;
456  evals[qp] = incoming_evals[i_proc][qp0 + qp];
457  }
458  }
459 
460  // If we found good evaluations for any of the qps in this element, save
461  // those evaluations for later.
462  if (element_is_evaled)
463  {
464  trimmed_element_maps[i_to][elem->id()] = final_evals[i_to].size();
465  for (unsigned int qp = 0; qp < qrule.n_points(); qp++)
466  final_evals[i_to].push_back(evals[qp]);
467  }
468  }
469  }
470 
472  // We now have just one or zero mesh function values at all of our local
473  // quadrature points. Stash those values (and a map linking them to element
474  // ids) in the equation systems parameters and project the solution.
476 
477  for (unsigned int i_to = 0; i_to < _to_problems.size(); i_to++)
478  {
479  _to_es[i_to]->parameters.set<std::vector<Real> *>("final_evals") = &final_evals[i_to];
480  _to_es[i_to]->parameters.set<std::map<dof_id_type, unsigned int> *>("element_map") =
481  &trimmed_element_maps[i_to];
482  projectSolution(i_to);
483  _to_es[i_to]->parameters.set<std::vector<Real> *>("final_evals") = NULL;
484  _to_es[i_to]->parameters.set<std::map<dof_id_type, unsigned int> *>("element_map") = NULL;
485  }
486 
487  for (unsigned int i = 0; i < _from_problems.size(); i++)
488  delete local_meshfuns[i];
489 
490  // Make sure all our sends succeeded.
491  for (processor_id_type i_proc = 0; i_proc < n_processors(); i_proc++)
492  {
493  if (i_proc == processor_id())
494  continue;
495  if (!_qps_cached)
496  send_qps[i_proc].wait();
497  send_evals[i_proc].wait();
498  if (_direction == FROM_MULTIAPP)
499  send_ids[i_proc].wait();
500  }
501 
502  if (_fixed_meshes)
503  _qps_cached = true;
504 
505  _console << "Finished projection transfer " << name() << std::endl;
506 }
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
std::vector< std::map< std::pair< unsigned int, unsigned int >, unsigned int > > _cached_index_map
std::vector< EquationSystems * > _to_es
std::vector< BoundingBox > getFromBoundingBoxes()
Return the bounding boxes of all the "from" domains, including all the domains not local to this proc...
std::vector< FEProblemBase * > _to_problems
std::vector< Point > _from_positions
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string & name() const
Get the variable name.
virtual EquationSystems & es() override
nl system()
MooseEnum _direction
Whether we&#39;re transferring to or from the MultiApp.
std::vector< unsigned int > getFromsPerProc()
Return the number of "from" domains that each processor owns.
virtual System & system()=0
Get the reference to the libMesh system.
std::vector< unsigned int > _local2global_map
static const Number OutOfMeshValue
Definition: Transfer.h:81
std::vector< Point > _to_positions
void projectSolution(unsigned int to_problem)
std::vector< LinearImplicitSystem * > _proj_sys
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void getAppInfo()
This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.)
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. ...
std::vector< FEProblemBase * > _from_problems
std::vector< std::vector< Point > > _cached_qps
std::vector< MooseMesh * > _to_meshes
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(), MultiAppUserObjectTransfer::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 MultiAppProjectionTransfer::fromMultiApp ( )
protected
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(), execute(), and 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(), 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(), 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(), AddExtraNodeset::modify(), MeshExtruder::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 MultiAppProjectionTransfer::initialSetup ( )
overridevirtual

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

Reimplemented from Transfer.

Definition at line 75 of file MultiAppProjectionTransfer.C.

76 {
77  getAppInfo();
78 
79  _proj_sys.resize(_to_problems.size(), NULL);
80 
81  for (unsigned int i_to = 0; i_to < _to_problems.size(); i_to++)
82  {
83  FEProblemBase & to_problem = *_to_problems[i_to];
84  EquationSystems & to_es = to_problem.es();
85 
86  // Add the projection system.
87  FEType fe_type = to_problem.getVariable(0, _to_var_name).feType();
88  LinearImplicitSystem & proj_sys = to_es.add_system<LinearImplicitSystem>("proj-sys-" + name());
89  _proj_var_num = proj_sys.add_variable("var", fe_type);
90  proj_sys.attach_assemble_function(assemble_l2);
91  _proj_sys[i_to] = &proj_sys;
92 
93  // Prevent the projection system from being written to checkpoint
94  // files. In the event of a recover or restart, we'll read the checkpoint
95  // before this initialSetup method is called. As a result, we'll find
96  // systems in the checkpoint (the projection systems) that we don't know
97  // what to do with, and there will be a crash. We could fix this by making
98  // the systems in the constructor, except we don't know how many sub apps
99  // there are at the time of construction. So instead, we'll just nuke the
100  // projection system and rebuild it from scratch every recover/restart.
101  proj_sys.hide_output() = true;
102 
103  // Reinitialize EquationSystems since we added a system.
104  to_es.reinit();
105  }
106 
107  if (_fixed_meshes)
108  {
109  _cached_qps.resize(n_processors());
110  _cached_index_map.resize(n_processors());
111  }
112 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
const FEType & feType() const
Get the type of finite element object.
std::vector< std::map< std::pair< unsigned int, unsigned int >, unsigned int > > _cached_index_map
std::vector< FEProblemBase * > _to_problems
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual EquationSystems & es() override
std::vector< LinearImplicitSystem * > _proj_sys
unsigned int _proj_var_num
Having one projection variable number seems weird, but there is always one variable in every system b...
void getAppInfo()
This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.)
friend void assemble_l2(EquationSystems &es, const std::string &system_name)
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. ...
std::vector< std::vector< Point > > _cached_qps
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(), RenameBlock::modify(), ParsedSubdomainMeshModifier::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(), SideSetsFromNormals::modify(), SideSetsFromPoints::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(), VTKOutput::output(), XDA::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(), MultiAppUserObjectTransfer::execute(), 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(), 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 MultiAppProjectionTransfer::projectSolution ( unsigned int  to_problem)
protected

Definition at line 509 of file MultiAppProjectionTransfer.C.

Referenced by execute().

510 {
511  FEProblemBase & to_problem = *_to_problems[i_to];
512  EquationSystems & proj_es = to_problem.es();
513  LinearImplicitSystem & ls = *_proj_sys[i_to];
514  // activate the current transfer
515  proj_es.parameters.set<MultiAppProjectionTransfer *>("transfer") = this;
516 
517  // TODO: specify solver params in an input file
518  // solver tolerance
519  Real tol = proj_es.parameters.get<Real>("linear solver tolerance");
520  proj_es.parameters.set<Real>("linear solver tolerance") = 1e-10; // set our tolerance
521  // solve it
522  ls.solve();
523  proj_es.parameters.set<Real>("linear solver tolerance") = tol; // restore the original tolerance
524 
525  // copy projected solution into target es
526  MeshBase & to_mesh = proj_es.get_mesh();
527 
528  MooseVariable & to_var = to_problem.getVariable(0, _to_var_name);
529  System & to_sys = to_var.sys().system();
530  NumericVector<Number> * to_solution = to_sys.solution.get();
531 
532  {
533  MeshBase::const_node_iterator it = to_mesh.local_nodes_begin();
534  const MeshBase::const_node_iterator end_it = to_mesh.local_nodes_end();
535  for (; it != end_it; ++it)
536  {
537  const Node * node = *it;
538  for (unsigned int comp = 0; comp < node->n_comp(to_sys.number(), to_var.number()); comp++)
539  {
540  const dof_id_type proj_index = node->dof_number(ls.number(), _proj_var_num, comp);
541  const dof_id_type to_index = node->dof_number(to_sys.number(), to_var.number(), comp);
542  to_solution->set(to_index, (*ls.solution)(proj_index));
543  }
544  }
545  }
546  for (const auto & elem : to_mesh.active_local_element_ptr_range())
547  for (unsigned int comp = 0; comp < elem->n_comp(to_sys.number(), to_var.number()); comp++)
548  {
549  const dof_id_type proj_index = elem->dof_number(ls.number(), _proj_var_num, comp);
550  const dof_id_type to_index = elem->dof_number(to_sys.number(), to_var.number(), comp);
551  to_solution->set(to_index, (*ls.solution)(proj_index));
552  }
553 
554  to_solution->close();
555  to_sys.update();
556 }
Class for stuff related to variables.
Definition: MooseVariable.h:43
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::vector< FEProblemBase * > _to_problems
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual EquationSystems & es() override
Project values from one domain to another.
virtual System & system()=0
Get the reference to the libMesh system.
unsigned int number() const
Get variable number coming from libMesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
std::vector< LinearImplicitSystem * > _proj_sys
unsigned int _proj_var_num
Having one projection variable number seems weird, but there is always one variable in every system b...
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. ...
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 MultiAppProjectionTransfer::toMultiApp ( )
protected
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(), MultiAppInterpolationTransfer::initialSetup(), MultiAppMeshFunctionTransfer::initialSetup(), MultiAppUserObjectTransfer::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

Friends And Related Function Documentation

void assemble_l2 ( EquationSystems &  es,
const std::string &  system_name 
)
friend

Definition at line 35 of file MultiAppProjectionTransfer.C.

Referenced by initialSetup().

36 {
37  MultiAppProjectionTransfer * transfer =
38  es.parameters.get<MultiAppProjectionTransfer *>("transfer");
39  transfer->assembleL2(es, system_name);
40 }
void assembleL2(EquationSystems &es, const std::string &system_name)
Project values from one domain to another.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53

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().

std::vector<std::map<std::pair<unsigned int, unsigned int>, unsigned int> > MultiAppProjectionTransfer::_cached_index_map
protected

Definition at line 68 of file MultiAppProjectionTransfer.h.

Referenced by execute(), and initialSetup().

std::vector<std::vector<Point> > MultiAppProjectionTransfer::_cached_qps
protected

Definition at line 67 of file MultiAppProjectionTransfer.h.

Referenced by execute(), and initialSetup().

bool MultiAppProjectionTransfer::_compute_matrix
protected

True, if we need to recompute the projection matrix.

Definition at line 56 of file MultiAppProjectionTransfer.h.

Referenced by assembleL2().

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(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), 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 MultiAppTransfer::_displaced_target_mesh
protectedinherited
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
bool MultiAppProjectionTransfer::_fixed_meshes
protected

Definition at line 65 of file MultiAppProjectionTransfer.h.

Referenced by execute(), and initialSetup().

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
VariableName MultiAppProjectionTransfer::_from_var_name
protected

Definition at line 51 of file MultiAppProjectionTransfer.h.

Referenced by execute().

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
std::vector<LinearImplicitSystem *> MultiAppProjectionTransfer::_proj_sys
protected

Definition at line 57 of file MultiAppProjectionTransfer.h.

Referenced by execute(), initialSetup(), and projectSolution().

MooseEnum MultiAppProjectionTransfer::_proj_type
protected

Definition at line 53 of file MultiAppProjectionTransfer.h.

unsigned int MultiAppProjectionTransfer::_proj_var_num
protected

Having one projection variable number seems weird, but there is always one variable in every system being used for projection, thus is always going to be 0 unless something changes in libMesh or we change the way we project variables.

Definition at line 60 of file MultiAppProjectionTransfer.h.

Referenced by initialSetup(), and projectSolution().

bool MultiAppProjectionTransfer::_qps_cached
protected

Definition at line 66 of file MultiAppProjectionTransfer.h.

Referenced by execute().

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 MultiAppProjectionTransfer::_to_var_name
protected

Definition at line 50 of file MultiAppProjectionTransfer.h.

Referenced by initialSetup(), and projectSolution().

const Number Transfer::OutOfMeshValue = -999999
staticinherited

Definition at line 81 of file Transfer.h.

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


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