www.mooseframework.org
MultiAppInterpolationTransfer.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 // MOOSE includes
13 #include "DisplacedProblem.h"
14 #include "FEProblem.h"
15 #include "MooseMesh.h"
16 #include "MooseTypes.h"
17 #include "MooseVariableFE.h"
18 #include "MultiApp.h"
19 
20 #include "libmesh/meshfree_interpolation.h"
21 #include "libmesh/system.h"
22 #include "libmesh/radial_basis_interpolation.h"
23 
25 
27 
30 {
32  params.addClassDescription(
33  "Transfers the value to the target domain from the nearest node in the source domain.");
34  params.addParam<unsigned int>(
35  "num_points", 3, "The number of nearest points to use for interpolation.");
36  params.addParam<Real>(
37  "power", 2, "The polynomial power to use for calculation of the decay in the interpolation.");
38 
39  MooseEnum interp_type("inverse_distance radial_basis", "inverse_distance");
40  params.addParam<MooseEnum>("interp_type", interp_type, "The algorithm to use for interpolation.");
41 
42  params.addParam<Real>("radius",
43  -1,
44  "Radius to use for radial_basis interpolation. If negative "
45  "then the radius is taken as the max distance between "
46  "points.");
47 
48  return params;
49 }
50 
52  : MultiAppConservativeTransfer(parameters),
53  _num_points(getParam<unsigned int>("num_points")),
54  _power(getParam<Real>("power")),
55  _interp_type(getParam<MooseEnum>("interp_type")),
56  _radius(getParam<Real>("radius"))
57 {
58  // This transfer does not work with DistributedMesh
59  _fe_problem.mesh().errorIfDistributedMesh("MultiAppInterpolationTransfer");
60 
61  if (_to_var_names.size() != 1)
62  paramError("variable", " Support single to-variable only ");
63 
64  if (_from_var_names.size() != 1)
65  paramError("source_variable", " Support single from-variable only ");
66 }
67 
68 void
70 {
71  _console << "Beginning InterpolationTransfer " << name() << std::endl;
72 
73  switch (_current_direction)
74  {
75  case TO_MULTIAPP:
76  {
77  FEProblemBase & from_problem = _multi_app->problemBase();
78  MooseVariableFEBase & from_var = from_problem.getVariable(
80 
81  MeshBase * from_mesh = NULL;
82 
83  if (_displaced_source_mesh && from_problem.getDisplacedProblem())
84  from_mesh = &from_problem.getDisplacedProblem()->mesh().getMesh();
85  else
86  from_mesh = &from_problem.mesh().getMesh();
87 
88  SystemBase & from_system_base = from_var.sys();
89  System & from_sys = from_system_base.system();
90 
91  unsigned int from_sys_num = from_sys.number();
92  unsigned int from_var_num = from_sys.variable_number(from_var.name());
93 
94  auto & fe_type = from_sys.variable_type(from_var_num);
95  bool from_is_constant = fe_type.order == CONSTANT;
96  bool from_is_nodal = fe_type.family == LAGRANGE;
97 
98  if (fe_type.order > FIRST && !from_is_nodal)
99  mooseError("We don't currently support second order or higher elemental variable ");
100 
101  // EquationSystems & from_es = from_sys.get_equation_systems();
102 
103  NumericVector<Number> & from_solution = *from_sys.solution;
104 
105  InverseDistanceInterpolation<LIBMESH_DIM> * idi;
106 
107  switch (_interp_type)
108  {
109  case 0:
110  idi = new InverseDistanceInterpolation<LIBMESH_DIM>(from_sys.comm(), _num_points, _power);
111  break;
112  case 1:
113  idi = new RadialBasisInterpolation<LIBMESH_DIM>(from_sys.comm(), _radius);
114  break;
115  default:
116  mooseError("Unknown interpolation type!");
117  }
118 
119  std::vector<Point> & src_pts(idi->get_source_points());
120  std::vector<Number> & src_vals(idi->get_source_vals());
121 
122  std::vector<std::string> field_vars;
123  field_vars.push_back(_to_var_name);
124  idi->set_field_variables(field_vars);
125 
126  std::vector<std::string> vars;
127  vars.push_back(_to_var_name);
128 
129  if (from_is_nodal)
130  {
131  for (const auto & from_node : from_mesh->local_node_ptr_range())
132  {
133  // Assuming LAGRANGE!
134  if (from_node->n_comp(from_sys_num, from_var_num) == 0)
135  continue;
136 
137  dof_id_type from_dof = from_node->dof_number(from_sys_num, from_var_num, 0);
138 
139  src_pts.push_back(*from_node);
140  src_vals.push_back(from_solution(from_dof));
141  }
142  }
143  else
144  {
145  std::vector<Point> points;
146  for (const auto & from_elem :
147  as_range(from_mesh->local_elements_begin(), from_mesh->local_elements_end()))
148  {
149  // Skip this element if the variable has no dofs at it.
150  if (from_elem->n_dofs(from_sys_num, from_var_num) < 1)
151  continue;
152 
153  points.clear();
154  if (from_is_constant)
155  points.push_back(from_elem->centroid());
156  else
157  for (auto & node : from_elem->node_ref_range())
158  points.push_back(node);
159 
160  unsigned int n_comp = from_elem->n_comp(from_sys_num, from_var_num);
161  auto n_points = points.size();
162  // We assume each point corresponds to one component of elemental variable
163  if (n_points != n_comp)
164  mooseError(" Number of points ",
165  n_points,
166  " does not equal to number of variable components ",
167  n_comp);
168 
169  unsigned int offset = 0;
170  for (auto & point : points)
171  {
172  dof_id_type from_dof = from_elem->dof_number(from_sys_num, from_var_num, offset++);
173  src_pts.push_back(point);
174  src_vals.push_back(from_solution(from_dof));
175  }
176  }
177  }
178 
179  // We have only set local values - prepare for use by gathering remote gata
180  idi->prepare_for_use();
181 
182  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
183  {
184  if (_multi_app->hasLocalApp(i))
185  {
186  Moose::ScopedCommSwapper swapper(_multi_app->comm());
187 
188  // Loop over the master nodes and set the value of the variable
189  System * to_sys = find_sys(_multi_app->appProblemBase(i).es(), _to_var_name);
190 
191  unsigned int sys_num = to_sys->number();
192  unsigned int var_num = to_sys->variable_number(_to_var_name);
193  NumericVector<Real> & solution = _multi_app->appTransferVector(i, _to_var_name);
194 
195  MeshBase * mesh = NULL;
196 
197  if (_displaced_target_mesh && _multi_app->appProblemBase(i).getDisplacedProblem())
198  mesh = &_multi_app->appProblemBase(i).getDisplacedProblem()->mesh().getMesh();
199  else
200  mesh = &_multi_app->appProblemBase(i).mesh().getMesh();
201 
202  auto & to_fe_type = to_sys->variable_type(var_num);
203  bool to_is_constant = to_fe_type.order == CONSTANT;
204  bool to_is_nodal = to_fe_type.family == LAGRANGE;
205 
206  if (to_fe_type.order > FIRST && !to_is_nodal)
207  mooseError("We don't currently support second order or higher elemental variable ");
208 
209  if (to_is_nodal)
210  {
211  for (const auto & node : mesh->local_node_ptr_range())
212  {
213  Point actual_position = *node + _multi_app->position(i);
214 
215  if (node->n_dofs(sys_num, var_num) > 0) // If this variable has dofs at this node
216  {
217  std::vector<Point> pts;
218  std::vector<Number> vals;
219 
220  pts.push_back(actual_position);
221  vals.resize(1);
222 
223  idi->interpolate_field_data(vars, pts, vals);
224 
225  Real value = vals.front();
226 
227  // The zero only works for LAGRANGE!
228  if (node->n_comp(from_sys_num, from_var_num) == 0)
229  continue;
230 
231  dof_id_type dof = node->dof_number(sys_num, var_num, 0);
232 
233  solution.set(dof, value);
234  }
235  }
236  }
237  else // Elemental
238  {
239  std::vector<Point> points;
240  for (auto & elem : as_range(mesh->local_elements_begin(), mesh->local_elements_end()))
241  {
242  // Skip this element if the variable has no dofs at it.
243  if (elem->n_dofs(sys_num, var_num) < 1)
244  continue;
245 
246  points.clear();
247  if (to_is_constant)
248  points.push_back(elem->centroid());
249  else
250  for (auto & node : elem->node_ref_range())
251  points.push_back(node);
252 
253  auto n_points = points.size();
254  unsigned int n_comp = elem->n_comp(sys_num, var_num);
255  // We assume each point corresponds to one component of elemental variable
256  if (n_points != n_comp)
257  mooseError(" Number of points ",
258  n_points,
259  " does not equal to number of variable components ",
260  n_comp);
261 
262  unsigned int offset = 0;
263  for (auto & point : points)
264  {
265  Point actual_position = point + _multi_app->position(i);
266 
267  std::vector<Point> pts;
268  std::vector<Number> vals;
269 
270  pts.push_back(actual_position);
271  vals.resize(1);
272 
273  idi->interpolate_field_data(vars, pts, vals);
274 
275  Real value = vals.front();
276 
277  dof_id_type dof = elem->dof_number(sys_num, var_num, offset++);
278 
279  solution.set(dof, value);
280  } // point
281  } // auto elem
282  } // else
283 
284  solution.close();
285  to_sys->update();
286  }
287  }
288 
289  delete idi;
290 
291  break;
292  }
293  case FROM_MULTIAPP:
294  {
295  FEProblemBase & to_problem = _multi_app->problemBase();
296  MooseVariableFEBase & to_var = to_problem.getVariable(
298  SystemBase & to_system_base = to_var.sys();
299 
300  System & to_sys = to_system_base.system();
301 
302  NumericVector<Real> & to_solution = *to_sys.solution;
303 
304  unsigned int to_sys_num = to_sys.number();
305 
306  // Only works with a serialized mesh to transfer to!
307  mooseAssert(to_sys.get_mesh().is_serial(),
308  "MultiAppInterpolationTransfer only works with ReplicatedMesh!");
309 
310  unsigned int to_var_num = to_sys.variable_number(to_var.name());
311 
312  // EquationSystems & to_es = to_sys.get_equation_systems();
313 
314  MeshBase * to_mesh = NULL;
315 
316  if (_displaced_target_mesh && to_problem.getDisplacedProblem())
317  to_mesh = &to_problem.getDisplacedProblem()->mesh().getMesh();
318  else
319  to_mesh = &to_problem.mesh().getMesh();
320 
321  auto & fe_type = to_sys.variable_type(to_var_num);
322  bool is_constant = fe_type.order == CONSTANT;
323  bool is_nodal = fe_type.family == LAGRANGE;
324 
325  if (fe_type.order > FIRST && !is_nodal)
326  mooseError("We don't currently support second order or higher elemental variable ");
327 
328  InverseDistanceInterpolation<LIBMESH_DIM> * idi;
329 
330  switch (_interp_type)
331  {
332  case 0:
333  idi = new InverseDistanceInterpolation<LIBMESH_DIM>(to_sys.comm(), _num_points, _power);
334  break;
335  case 1:
336  idi = new RadialBasisInterpolation<LIBMESH_DIM>(to_sys.comm(), _radius);
337  break;
338  default:
339  mooseError("Unknown interpolation type!");
340  }
341 
342  std::vector<Point> & src_pts(idi->get_source_points());
343  std::vector<Number> & src_vals(idi->get_source_vals());
344 
345  std::vector<std::string> field_vars;
346  field_vars.push_back(_to_var_name);
347  idi->set_field_variables(field_vars);
348 
349  std::vector<std::string> vars;
350  vars.push_back(_to_var_name);
351 
352  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
353  {
354  if (!_multi_app->hasLocalApp(i))
355  continue;
356 
357  Moose::ScopedCommSwapper swapper(_multi_app->comm());
358 
359  FEProblemBase & from_problem = _multi_app->appProblemBase(i);
360  MooseVariableFEBase & from_var =
361  from_problem.getVariable(0,
365  SystemBase & from_system_base = from_var.sys();
366 
367  System & from_sys = from_system_base.system();
368  unsigned int from_sys_num = from_sys.number();
369 
370  unsigned int from_var_num = from_sys.variable_number(from_var.name());
371 
372  auto & from_fe_type = from_sys.variable_type(from_var_num);
373  bool from_is_constant = from_fe_type.order == CONSTANT;
374  bool from_is_nodal = from_fe_type.family == LAGRANGE;
375 
376  if (from_fe_type.order > FIRST && !is_nodal)
377  mooseError("We don't currently support second order or higher elemental variable ");
378  // EquationSystems & from_es = from_sys.get_equation_systems();
379 
380  NumericVector<Number> & from_solution = *from_sys.solution;
381 
382  MeshBase * from_mesh = NULL;
383 
384  if (_displaced_source_mesh && from_problem.getDisplacedProblem())
385  from_mesh = &from_problem.getDisplacedProblem()->mesh().getMesh();
386  else
387  from_mesh = &from_problem.mesh().getMesh();
388 
389  Point app_position = _multi_app->position(i);
390 
391  if (from_is_nodal)
392  {
393  for (const auto & from_node : from_mesh->local_node_ptr_range())
394  {
395  // Assuming LAGRANGE!
396  if (from_node->n_comp(from_sys_num, from_var_num) == 0)
397  continue;
398 
399  dof_id_type from_dof = from_node->dof_number(from_sys_num, from_var_num, 0);
400 
401  src_pts.push_back(*from_node + app_position);
402  src_vals.push_back(from_solution(from_dof));
403  }
404  }
405  else
406  {
407  std::vector<Point> points;
408  for (auto & from_element :
409  as_range(from_mesh->local_elements_begin(), from_mesh->local_elements_end()))
410  {
411  // Assuming LAGRANGE!
412  if (from_element->n_comp(from_sys_num, from_var_num) == 0)
413  continue;
414 
415  points.clear();
416  // grap sample points
417  // for constant shape function, we take the element centroid
418  if (from_is_constant)
419  points.push_back(from_element->centroid());
420  // for higher order method, we take all nodes of element
421  // this works for the first order L2 Lagrange.
422  else
423  for (auto & node : from_element->node_ref_range())
424  points.push_back(node);
425 
426  auto n_points = points.size();
427  unsigned int n_comp = from_element->n_comp(from_sys_num, from_var_num);
428  unsigned int offset = 0;
429  // We assume each point corresponds to one component of elemental variable
430  if (n_points != n_comp)
431  mooseError(" Number of points ",
432  n_points,
433  " does not equal to number of variable components ",
434  n_comp);
435 
436  for (auto & point : points)
437  {
438  dof_id_type from_dof = from_element->dof_number(from_sys_num, from_var_num, offset++);
439  src_pts.push_back(point + app_position);
440  src_vals.push_back(from_solution(from_dof));
441  } // point
442  } // from_element
443  } // else
444  }
445 
446  // We have only set local values - prepare for use by gathering remote gata
447  idi->prepare_for_use();
448 
449  // Now do the interpolation to the target system
450  if (is_nodal)
451  {
452  for (auto & node : as_range(to_mesh->local_nodes_begin(), to_mesh->local_nodes_end()))
453  {
454  if (node->n_dofs(to_sys_num, to_var_num) > 0) // If this variable has dofs at this node
455  {
456  std::vector<Point> pts;
457  std::vector<Number> vals;
458 
459  pts.push_back(*node);
460  vals.resize(1);
461 
462  idi->interpolate_field_data(vars, pts, vals);
463 
464  Real value = vals.front();
465 
466  // The zero only works for LAGRANGE!
467  dof_id_type dof = node->dof_number(to_sys_num, to_var_num, 0);
468 
469  to_solution.set(dof, value);
470  }
471  }
472  }
473  else // Elemental
474  {
475  std::vector<Point> points;
476  for (auto & elem : as_range(to_mesh->local_elements_begin(), to_mesh->local_elements_end()))
477  {
478  // Assuming LAGRANGE!
479  if (elem->n_comp(to_sys_num, to_var_num) == 0)
480  continue;
481 
482  points.clear();
483  // grap sample points
484  // for constant shape function, we take the element centroid
485  if (is_constant)
486  points.push_back(elem->centroid());
487  // for higher order method, we take all nodes of element
488  // this works for the first order L2 Lagrange.
489  else
490  for (auto & node : elem->node_ref_range())
491  points.push_back(node);
492 
493  auto n_points = points.size();
494  unsigned int n_comp = elem->n_comp(to_sys_num, to_var_num);
495  // We assume each point corresponds to one component of elemental variable
496  if (n_points != n_comp)
497  mooseError(" Number of points ",
498  n_points,
499  " does not equal to number of variable components ",
500  n_comp);
501 
502  unsigned int offset = 0;
503  for (auto & point : points)
504  {
505  std::vector<Point> pts;
506  std::vector<Number> vals;
507 
508  pts.push_back(point);
509  vals.resize(1);
510 
511  idi->interpolate_field_data(vars, pts, vals);
512 
513  Real value = vals.front();
514 
515  dof_id_type dof = elem->dof_number(to_sys_num, to_var_num, offset++);
516 
517  to_solution.set(dof, value);
518  }
519  }
520  }
521 
522  to_solution.close();
523  to_sys.update();
524 
525  delete idi;
526 
527  break;
528  }
529  }
530 
531  _console << "Finished InterpolationTransfer " << name() << std::endl;
532 
533  postExecute();
534 }
535 
536 Node *
538  Real & distance,
539  const MeshBase::const_node_iterator & nodes_begin,
540  const MeshBase::const_node_iterator & nodes_end)
541 {
542  distance = std::numeric_limits<Real>::max();
543  Node * nearest = NULL;
544 
545  for (auto & node : as_range(nodes_begin, nodes_end))
546  {
547  Real current_distance = (p - *node).norm();
548 
549  if (current_distance < distance)
550  {
551  distance = current_distance;
552  nearest = node;
553  }
554  }
555 
556  return nearest;
557 }
MultiAppConservativeTransfer::_from_var_names
const std::vector< VariableName > _from_var_names
Name of variables transfering from.
Definition: MultiAppConservativeTransfer.h:44
MooseVariableFEBase
Definition: MooseVariableFEBase.h:27
Transfer::FROM_MULTIAPP
Definition: Transfer.h:72
Moose::ScopedCommSwapper
Definition: Moose.h:216
MultiAppInterpolationTransfer::MultiAppInterpolationTransfer
MultiAppInterpolationTransfer(const InputParameters &parameters)
Definition: MultiAppInterpolationTransfer.C:51
MultiAppConservativeTransfer
Transfers variables on possibly differne meshes while conserving a user defined property of each vari...
Definition: MultiAppConservativeTransfer.h:24
MooseMesh.h
FEProblem.h
MultiAppTransfer::_multi_app
std::shared_ptr< MultiApp > _multi_app
The MultiApp this Transfer is transferring data to or from.
Definition: MultiAppTransfer.h:55
MooseObject::mooseError
void mooseError(Args &&... args) const
Definition: MooseObject.h:141
registerMooseObject
registerMooseObject("MooseApp", MultiAppInterpolationTransfer)
MultiAppInterpolationTransfer::_num_points
unsigned int _num_points
Definition: MultiAppInterpolationTransfer.h:49
MooseEnum
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
MultiAppInterpolationTransfer::execute
virtual void execute() override
Execute the transfer.
Definition: MultiAppInterpolationTransfer.C:69
SystemBase::system
virtual System & system()=0
Get the reference to the libMesh system.
InputParameters::addParam
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object.
Definition: InputParameters.h:1198
MultiAppConservativeTransfer::_from_var_name
VariableName _from_var_name
This values are used if a derived class only supports one variable.
Definition: MultiAppConservativeTransfer.h:49
FEProblemBase::getDisplacedProblem
virtual std::shared_ptr< DisplacedProblem > getDisplacedProblem()
Definition: FEProblemBase.h:1262
MultiAppTransfer::_displaced_source_mesh
bool _displaced_source_mesh
True if displaced mesh is used for the source mesh, otherwise false.
Definition: MultiAppTransfer.h:73
Transfer::find_sys
static System * find_sys(EquationSystems &es, const std::string &var_name)
Small helper function for finding the system containing the variable.
Definition: Transfer.C:86
Transfer::_current_direction
MooseEnum _current_direction
Definition: Transfer.h:106
MooseObject::paramError
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseObject.h:215
ConsoleStreamInterface::_console
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Definition: ConsoleStreamInterface.h:31
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
MultiAppConservativeTransfer::_to_var_names
const std::vector< AuxVariableName > _to_var_names
Name of variables transfering to.
Definition: MultiAppConservativeTransfer.h:46
Moose::VAR_ANY
Definition: MooseTypes.h:610
MultiAppInterpolationTransfer::_interp_type
MooseEnum _interp_type
Definition: MultiAppInterpolationTransfer.h:51
MultiAppConservativeTransfer::_to_var_name
AuxVariableName _to_var_name
Definition: MultiAppConservativeTransfer.h:50
MultiAppConservativeTransfer::validParams
static InputParameters validParams()
Definition: MultiAppConservativeTransfer.C:23
MooseMesh::getMesh
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2599
MultiAppTransfer::_displaced_target_mesh
bool _displaced_target_mesh
True if displaced mesh is used for the target mesh, otherwise false.
Definition: MultiAppTransfer.h:75
MultiAppInterpolationTransfer
Copy the value to the target domain from the nearest node in the source domain.
Definition: MultiAppInterpolationTransfer.h:26
defineLegacyParams
defineLegacyParams(MultiAppInterpolationTransfer)
MultiAppInterpolationTransfer::getNearestNode
Node * getNearestNode(const Point &p, Real &distance, const MeshBase::const_node_iterator &nodes_begin, const MeshBase::const_node_iterator &nodes_end)
Return the nearest node to the point p.
Definition: MultiAppInterpolationTransfer.C:537
Transfer::_fe_problem
FEProblemBase & _fe_problem
Definition: Transfer.h:97
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Definition: InputParameters.C:70
MultiAppInterpolationTransfer::_radius
Real _radius
Definition: MultiAppInterpolationTransfer.h:52
MooseVariableFE.h
MultiApp.h
MultiAppInterpolationTransfer.h
DisplacedProblem.h
Transfer::TO_MULTIAPP
Definition: Transfer.h:71
FEProblemBase::getVariable
virtual MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
Definition: FEProblemBase.C:4207
MooseVariableBase::sys
SystemBase & sys()
Get the system this variable is part of.
Definition: MooseVariableBase.h:58
SystemBase
Base class for a system (of equations)
Definition: SystemBase.h:95
MultiAppConservativeTransfer::postExecute
virtual void postExecute()
Add some extra work if necessary after execute().
Definition: MultiAppConservativeTransfer.C:148
MultiAppInterpolationTransfer::validParams
static InputParameters validParams()
Definition: MultiAppInterpolationTransfer.C:29
MooseTypes.h
MultiAppInterpolationTransfer::_power
Real _power
Definition: MultiAppInterpolationTransfer.h:50
FEProblemBase
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblemBase.h:139
FEProblemBase::mesh
virtual MooseMesh & mesh() override
Definition: FEProblemBase.h:148
Moose::VAR_FIELD_STANDARD
Definition: MooseTypes.h:615
MooseObject::name
virtual const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:70
MooseMesh::errorIfDistributedMesh
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2717
MooseVariableBase::name
const std::string & name() const override
Get the variable name.
Definition: MooseVariableBase.h:63