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

Generates a mesh based on concentric circles, given all the parameters. More...

#include <ConcentricCircleMeshGenerator.h>

Inheritance diagram for ConcentricCircleMeshGenerator:
[legend]

Public Member Functions

 ConcentricCircleMeshGenerator (const InputParameters &parameters)
 
std::unique_ptr< MeshBase > generate () override
 Generate / modify the mesh. More...
 
std::vector< std::string > & getDependencies ()
 Return the MeshGenerators that must run before this MeshGenerator. More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 

Public Attributes

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

Protected Member Functions

std::unique_ptr< MeshBase > & getMesh (const std::string &input_mesh_generator_parameter_name)
 Takes the name of a MeshGeneratorName parameter and then gets a pointer to the Mesh that MeshGenerator is going to create. More...
 
std::unique_ptr< MeshBase > & getMeshByName (const MeshGeneratorName &input_mesh_generator_parameter_name)
 Takes the name of another MeshGenerator directly. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 

Protected Attributes

unsigned int _num_sectors
 Number of sectors in one quadrant. More...
 
std::vector< Real > _radii
 Radii of concentric circles. More...
 
std::vector< unsigned int > _rings
 Number of rings in each circle or in the enclosing square. More...
 
Real _inner_mesh_fraction
 Size of inner square in relation to radius of the innermost concentric circle. More...
 
bool _has_outer_square
 Adding the enclosing square is optional. More...
 
Real _pitch
 
bool _preserve_volumes
 Volume preserving function is optional. More...
 
unsigned int _smoothing_max_it
 Iteration number for Laplace smoothing. More...
 
MooseEnum _portion
 Control of which portion of mesh will be developed. More...
 
std::shared_ptr< MooseMesh > & _mesh
 References to the mesh and displaced mesh (currently in the ActionWarehouse) More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 

Detailed Description

Generates a mesh based on concentric circles, given all the parameters.

Definition at line 24 of file ConcentricCircleMeshGenerator.h.

Constructor & Destructor Documentation

◆ ConcentricCircleMeshGenerator()

ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator ( const InputParameters parameters)

Definition at line 62 of file ConcentricCircleMeshGenerator.C.

64  _num_sectors(getParam<unsigned int>("num_sectors")),
65  _radii(getParam<std::vector<Real>>("radii")),
66  _rings(getParam<std::vector<unsigned int>>("rings")),
67  _inner_mesh_fraction(getParam<Real>("inner_mesh_fraction")),
68  _has_outer_square(getParam<bool>("has_outer_square")),
69  _pitch(getParam<Real>("pitch")),
70  _preserve_volumes(getParam<bool>("preserve_volumes")),
71  _smoothing_max_it(getParam<unsigned int>("smoothing_max_it")),
72  _portion(getParam<MooseEnum>("portion"))
73 {
74 
75  if (_num_sectors % 2 != 0)
76  paramError("num_sectors", "must be an even number.");
77 
78  // radii data check
79  for (unsigned i = 0; i < _radii.size() - 1; ++i)
80  {
81  if (_radii[i] == 0.0)
82  paramError("radii", "must be positive numbers.");
83  if (_radii[i] > _radii[i + 1])
84  paramError("radii",
85  "must be provided in order by starting with the smallest radius providing the "
86  "following gradual radii.");
87  }
88  // condition for setting the size of inner squares.
89  if (_inner_mesh_fraction > std::cos(M_PI / 4))
90  paramError("inner_mesh_fraction", "The aspect ratio can not be larger than cos(PI/4).");
91 
92  // size of 'rings' check
94  {
95  if (_rings.size() != _radii.size() + 1)
96  paramError("rings", "The size of 'rings' must be equal to the size of 'radii' plus 1.");
97  }
98  else
99  {
100  if (_rings.size() != _radii.size())
101  paramError("rings", "The size of 'rings' must be equal to the size of 'radii'.");
102  }
103  // pitch / 2 must be bigger than any raddi.
104  if (_has_outer_square)
105  for (unsigned i = 0; i < _radii.size(); ++i)
106  if (_pitch / 2 < _radii[i])
107  paramError("pitch", "The pitch / 2 must be larger than any radii.");
108 }
unsigned int _smoothing_max_it
Iteration number for Laplace smoothing.
bool _preserve_volumes
Volume preserving function is optional.
MeshGenerator(const InputParameters &parameters)
Constructor.
Definition: MeshGenerator.C:24
std::vector< Real > _radii
Radii of concentric circles.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:188
std::vector< unsigned int > _rings
Number of rings in each circle or in the enclosing square.
bool _has_outer_square
Adding the enclosing square is optional.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:62
MooseEnum _portion
Control of which portion of mesh will be developed.
void paramError(const std::string &param, Args... args)
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseObject.h:105
unsigned int _num_sectors
Number of sectors in one quadrant.
Real _inner_mesh_fraction
Size of inner square in relation to radius of the innermost concentric circle.

Member Function Documentation

◆ declareRecoverableData() [1/2]

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

Declare a piece of data as "recoverable".

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 271 of file Restartable.h.

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

◆ declareRecoverableData() [2/2]

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

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

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 282 of file Restartable.h.

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

◆ declareRestartableData() [1/2]

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 204 of file Restartable.h.

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

◆ declareRestartableData() [2/2]

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

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

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

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

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

Definition at line 211 of file Restartable.h.

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

◆ declareRestartableDataWithContext() [1/2]

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 218 of file Restartable.h.

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

◆ declareRestartableDataWithContext() [2/2]

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

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

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

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

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

Definition at line 231 of file Restartable.h.

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

◆ declareRestartableDataWithObjectName()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 247 of file Restartable.h.

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

◆ declareRestartableDataWithObjectNameWithContext()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 254 of file Restartable.h.

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

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 96 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ generate()

std::unique_ptr< MeshBase > ConcentricCircleMeshGenerator::generate ( )
overridevirtual

Generate / modify the mesh.

Implements MeshGenerator.

Definition at line 111 of file ConcentricCircleMeshGenerator.C.

112 {
113  auto mesh = libmesh_make_unique<ReplicatedMesh>(comm(), 2);
114 
115  // Set dimension of mesh
116  mesh->set_mesh_dimension(2);
117  mesh->set_spatial_dimension(2);
118  BoundaryInfo & boundary_info = mesh->get_boundary_info();
119 
120  // Creating real mesh concentric circles
121  // i: index for _rings, j: index for _radii
122  std::vector<Real> total_concentric_circles;
123  unsigned int j = 0;
124  while (j < _radii.size())
125  {
126  unsigned int i = 0;
127  if (j == 0)
128  while (i < _rings[j])
129  {
130  total_concentric_circles.push_back(_inner_mesh_fraction * _radii[j] +
131  (_radii[j] - _inner_mesh_fraction * _radii[j]) /
132  _rings[j] * (i + 1));
133  ++i;
134  }
135  else
136  while (i < _rings[j])
137  {
138  total_concentric_circles.push_back(_radii[j - 1] +
139  (_radii[j] - _radii[j - 1]) / _rings[j] * (i + 1));
140  ++i;
141  }
142  ++j;
143  }
144 
145  // volume preserving function is used to conserve volume.
146  const Real d_angle = M_PI / 2 / _num_sectors;
147 
148  if (_preserve_volumes)
149  {
150  Real original_radius = 0.0;
151  for (unsigned i = 0; i < total_concentric_circles.size(); ++i)
152  {
153  // volume preserving function for the center circle
154  if (i == 0)
155  {
156  const Real target_area = M_PI * Utility::pow<2>(total_concentric_circles[i]);
157  Real modified_radius = std::sqrt(2 * target_area / std::sin(d_angle) / _num_sectors / 4);
158  original_radius = total_concentric_circles[i];
159  total_concentric_circles[i] = modified_radius;
160  }
161  else
162  {
163  // volume preserving functions for outer circles
164  const Real target_area = M_PI * (Utility::pow<2>(total_concentric_circles[i]) -
165  Utility::pow<2>(original_radius));
166  Real modified_radius = std::sqrt(target_area / std::sin(d_angle) / _num_sectors / 2 +
167  Utility::pow<2>(total_concentric_circles[i - 1]));
168  original_radius = total_concentric_circles[i];
169  total_concentric_circles[i] = modified_radius;
170  }
171  }
172  }
173 
174  // number of total nodes
175  unsigned num_total_nodes = 0;
176 
177  if (_has_outer_square)
178  num_total_nodes = Utility::pow<2>(_num_sectors / 2 + 1) +
179  (_num_sectors + 1) * total_concentric_circles.size() +
180  Utility::pow<2>(_rings.back() + 2) + _num_sectors * (_rings.back() + 1) - 1;
181  else
182  num_total_nodes = Utility::pow<2>(_num_sectors / 2 + 1) +
183  (_num_sectors + 1) * total_concentric_circles.size();
184 
185  std::vector<Node *> nodes(num_total_nodes);
186 
187  unsigned node_id = 0;
188 
189  // for adding nodes for the square at the center of the circle
190  for (unsigned i = 0; i <= _num_sectors / 2; ++i)
191  {
192  const Real x = i * _inner_mesh_fraction * total_concentric_circles[0] / (_num_sectors / 2);
193  for (unsigned j = 0; j <= _num_sectors / 2; ++j)
194  {
195  const Real y = j * _inner_mesh_fraction * total_concentric_circles[0] / (_num_sectors / 2);
196  nodes[node_id] = mesh->add_point(Point(x, y, 0.0), node_id);
197  ++node_id;
198  }
199  }
200 
201  // for adding the outer layers of the square
202  Real current_radius = total_concentric_circles[0];
203 
204  // for adding the outer circles of the square.
205  for (unsigned layers = 0; layers < total_concentric_circles.size(); ++layers)
206  {
207  current_radius = total_concentric_circles[layers];
208  for (unsigned num_outer_nodes = 0; num_outer_nodes <= _num_sectors; ++num_outer_nodes)
209  {
210  const Real x = current_radius * std::cos(num_outer_nodes * d_angle);
211  const Real y = current_radius * std::sin(num_outer_nodes * d_angle);
212  nodes[node_id] = mesh->add_point(Point(x, y, 0.0), node_id);
213  ++node_id;
214  }
215  }
216 
217  // adding nodes for the enclosing square.
218  // adding nodes for the left edge of the square.
219  // applying the method for partitioning the line segments.
220 
221  if (_has_outer_square)
222  {
223  // putting nodes for the left side of the enclosing square.
224  for (unsigned i = 0; i <= _num_sectors / 2; ++i)
225  {
226  const Real a1 = (_pitch / 4) * i / (_num_sectors / 2);
227  const Real b1 = _pitch / 2;
228 
229  const Real a2 = total_concentric_circles.back() * std::cos(M_PI / 2 - i * d_angle);
230  const Real b2 = total_concentric_circles.back() * std::sin(M_PI / 2 - i * d_angle);
231 
232  for (unsigned j = 0; j <= _rings.back(); ++j)
233  {
234  Real x = ((_rings.back() + 1 - j) * a1 + j * a2) / (_rings.back() + 1);
235  Real y = ((_rings.back() + 1 - j) * b1 + j * b2) / (_rings.back() + 1);
236  nodes[node_id] = mesh->add_point(Point(x, y, 0.0), node_id);
237  ++node_id;
238  }
239  }
240  // putting nodes for the center part of the enclosing square.
241  unsigned k = 1;
242  for (unsigned i = 1; i <= _rings.back() + 1; ++i)
243  {
244  const Real a1 = (_pitch / 4) + (_pitch / 4) * i / (_rings.back() + 1);
245  const Real b1 = _pitch / 2;
246 
247  const Real a2 = _pitch / 2;
248  const Real b2 = _pitch / 4;
249 
250  const Real a3 = total_concentric_circles.back() * std::cos(M_PI / 4);
251  const Real b3 = total_concentric_circles.back() * std::sin(M_PI / 4);
252 
253  const Real a4 = ((_rings.back() + 1 - k) * a3 + k * a2) / (_rings.back() + 1);
254  const Real b4 = ((_rings.back() + 1 - k) * b3 + k * b2) / (_rings.back() + 1);
255 
256  for (unsigned j = 0; j <= _rings.back() + 1; ++j)
257  {
258  Real x = ((_rings.back() + 1 - j) * a1 + j * a4) / (_rings.back() + 1);
259  Real y = ((_rings.back() + 1 - j) * b1 + j * b4) / (_rings.back() + 1);
260  nodes[node_id] = mesh->add_point(Point(x, y, 0.0), node_id);
261  ++node_id;
262  }
263  ++k;
264  }
265 
266  // putting nodes for the right part of the enclosing square.
267  for (unsigned i = 1; i <= _num_sectors / 2; ++i)
268  {
269  const Real a1 = _pitch / 2;
270  const Real b1 = _pitch / 4 - (_pitch / 4) * i / (_num_sectors / 2);
271 
272  const Real a2 = total_concentric_circles.back() * std::cos(M_PI / 4 - i * d_angle);
273  const Real b2 = total_concentric_circles.back() * std::sin(M_PI / 4 - i * d_angle);
274 
275  for (unsigned j = 0; j <= _rings.back(); ++j)
276  {
277  Real x = ((_rings.back() + 1 - j) * a1 + j * a2) / (_rings.back() + 1);
278  Real y = ((_rings.back() + 1 - j) * b1 + j * b2) / (_rings.back() + 1);
279  nodes[node_id] = mesh->add_point(Point(x, y, 0.0), node_id);
280  ++node_id;
281  }
282  }
283  }
284 
285  // Currently, index, limit, counter variables use the int type because of the 'modulo' function.
286  // adding elements
287  int index = 0;
288  int limit = 0;
289  int standard = static_cast<int>(_num_sectors);
290 
291  // This is to set the limit for the index
292  if (standard > 4)
293  {
294  int additional_term = 0;
295  int counter = standard;
296  while (counter > 4)
297  {
298  counter = counter - 2;
299  additional_term = additional_term + counter;
300  }
301  limit = standard + additional_term;
302  }
303  else if (standard == 4)
304  limit = standard;
305 
306  // SubdomainIDs set up
307  std::vector<unsigned int> subdomainIDs;
308 
309  if (_has_outer_square)
310  for (unsigned int i = 0; i < _rings.size() - 1; ++i)
311  for (unsigned int j = 0; j < _rings[i]; ++j)
312  subdomainIDs.push_back(i + 1);
313  else
314  for (unsigned int i = 0; i < _rings.size(); ++i)
315  for (unsigned int j = 0; j < _rings[i]; ++j)
316  subdomainIDs.push_back(i + 1);
317 
318  // adding elements in the square
319  while (index <= limit)
320  {
321  Elem * elem = mesh->add_elem(new Quad4);
322  elem->set_node(0) = nodes[index];
323  elem->set_node(1) = nodes[index + _num_sectors / 2 + 1];
324  elem->set_node(2) = nodes[index + _num_sectors / 2 + 2];
325  elem->set_node(3) = nodes[index + 1];
326  elem->subdomain_id() = subdomainIDs[0];
327 
328  if (index < standard / 2)
329  boundary_info.add_side(elem, 3, 1);
330  if (index % (standard / 2 + 1) == 0)
331  boundary_info.add_side(elem, 0, 2);
332 
333  ++index;
334 
335  // increment by 2 indices is necessary depending on where the index points to.
336  if ((index - standard / 2) % (standard / 2 + 1) == 0)
337  ++index;
338  }
339 
340  index = (_num_sectors / 2 + 1) * (_num_sectors / 2);
341  limit = (_num_sectors / 2) * (_num_sectors / 2 + 2);
342 
343  // adding elements in one outer layer of the square (right side)
344  while (index < limit)
345  {
346  Elem * elem = mesh->add_elem(new Quad4);
347  elem->set_node(0) = nodes[index];
348  elem->set_node(1) = nodes[index + _num_sectors / 2 + 1];
349  elem->set_node(2) = nodes[index + _num_sectors / 2 + 2];
350  elem->set_node(3) = nodes[index + 1];
351  elem->subdomain_id() = subdomainIDs[0];
352 
353  if (index == (standard / 2 + 1) * (standard / 2))
354  boundary_info.add_side(elem, 0, 2);
355 
356  ++index;
357  }
358 
359  // adding elements in one outer layer of the square (left side)
360  int counter = 0;
361  while (index != standard / 2)
362  {
363  Elem * elem = mesh->add_elem(new Quad4);
364  elem->set_node(0) = nodes[index];
365  elem->set_node(1) = nodes[index + (_num_sectors / 2 + 1) + counter * (_num_sectors / 2 + 2)];
366  elem->set_node(2) =
367  nodes[index + (_num_sectors / 2 + 1) + counter * (_num_sectors / 2 + 2) + 1];
368  elem->set_node(3) = nodes[index - _num_sectors / 2 - 1];
369  elem->subdomain_id() = subdomainIDs[0];
370 
371  if (index == standard + 1)
372  boundary_info.add_side(elem, 2, 1);
373 
374  index = index - _num_sectors / 2 - 1;
375  ++counter;
376  }
377 
378  counter = 0;
379  // adding elements for other concentric circles
380  index = Utility::pow<2>(standard / 2 + 1);
381  limit = Utility::pow<2>(standard / 2 + 1) +
382  (_num_sectors + 1) * (total_concentric_circles.size() - 1);
383 
384  int num_nodes_boundary = Utility::pow<2>(standard / 2 + 1) + standard + 1;
385 
386  while (index < limit)
387  {
388  Elem * elem = mesh->add_elem(new Quad4);
389  elem->set_node(0) = nodes[index];
390  elem->set_node(1) = nodes[index + standard + 1];
391  elem->set_node(2) = nodes[index + standard + 2];
392  elem->set_node(3) = nodes[index + 1];
393 
394  for (int i = 0; i < static_cast<int>(subdomainIDs.size() - 1); ++i)
395  if (index < limit - (standard + 1) * i && index >= limit - (standard + 1) * (i + 1))
396  elem->subdomain_id() = subdomainIDs[subdomainIDs.size() - 1 - i];
397 
398  const int initial = Utility::pow<2>(standard / 2 + 1);
399  const int final = Utility::pow<2>(standard / 2 + 1) + standard - 1;
400 
401  if ((index - initial) % (standard + 1) == 0)
402  boundary_info.add_side(elem, 0, 2);
403  if ((index - final) % (standard + 1) == 0)
404  boundary_info.add_side(elem, 2, 1);
405  if (!_has_outer_square)
406  if (index >= limit - (standard + 1))
407  boundary_info.add_side(elem, 1, 3);
408 
409  // index increment is for adding nodes for a next element.
410  ++index;
411 
412  // increment by 2 indices may be necessary depending on where the index points to.
413  // this varies based on the algorithms provided for the specific element and node placement.
414  if (index == (num_nodes_boundary + counter * (standard + 1)) - 1)
415  {
416  ++index;
417  ++counter;
418  }
419  }
420 
421  // adding elements for the enclosing square. (top left)
422  int initial =
423  Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size();
424 
425  int initial2 =
426  Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size();
427 
428  if (_has_outer_square)
429  {
430  if (_rings.back() != 0) // this must be condition up front.
431  {
432  index = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size();
433  limit = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
434  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 3 -
435  _rings.back() * (_rings.back() + 2) - (_rings.back() + 1);
436  while (index <= limit)
437  {
438  Elem * elem = mesh->add_elem(new Quad4);
439  elem->set_node(0) = nodes[index];
440  elem->set_node(1) = nodes[index + 1];
441  elem->set_node(2) = nodes[index + 1 + _rings.back() + 1];
442  elem->set_node(3) = nodes[index + 1 + _rings.back()];
443  elem->subdomain_id() = subdomainIDs.back() + 1;
444 
445  if (index < (initial2 + static_cast<int>(_rings.back())))
446  boundary_info.add_side(elem, 0, 1);
447 
448  if (index == initial)
449  boundary_info.add_side(elem, 3, 4);
450 
451  ++index;
452 
453  // As mentioned before, increment by 2 indices may be required depending on where the index
454  // points to.
455  if ((index - initial) % static_cast<int>(_rings.back()) == 0)
456  {
457  ++index;
458  initial = initial + (static_cast<int>(_rings.back()) + 1);
459  }
460  }
461 
462  // adding elements for the enclosing square. (top right)
463  initial = Utility::pow<2>(standard / 2 + 1) +
464  (standard + 1) * total_concentric_circles.size() +
465  (_rings.back() + 1) * (standard / 2 + 1);
466 
467  limit = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
468  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 3 -
469  (_rings.back() + 2);
470 
471  while (index <= limit)
472  {
473  Elem * elem = mesh->add_elem(new Quad4);
474  elem->set_node(0) = nodes[index];
475  elem->set_node(1) = nodes[index + _rings.back() + 2];
476  elem->set_node(2) = nodes[index + _rings.back() + 3];
477  elem->set_node(3) = nodes[index + 1];
478  elem->subdomain_id() = subdomainIDs.back() + 1;
479 
480  if (index >= static_cast<int>(limit - (_rings.back() + 1)))
481  boundary_info.add_side(elem, 1, 3);
482 
483  if ((index - initial) % static_cast<int>(_rings.back() + 2) == 0)
484  boundary_info.add_side(elem, 0, 4);
485 
486  ++index;
487 
488  if ((index - initial) % static_cast<int>(_rings.back() + 1) == 0)
489  {
490  ++index;
491  initial = initial + (static_cast<int>(_rings.back()) + 2);
492  }
493  }
494 
495  // adding elements for the enclosing square. (one center quad)
496  int index1 = Utility::pow<2>(standard / 2 + 1) +
497  (standard + 1) * (total_concentric_circles.size() - 1) + standard / 2;
498 
499  int index2 = Utility::pow<2>(standard / 2 + 1) +
500  (standard + 1) * total_concentric_circles.size() +
501  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 3 -
502  _rings.back() * (_rings.back() + 2) - (_rings.back() + 1);
503 
504  Elem * elem = mesh->add_elem(new Quad4);
505  elem->set_node(0) = nodes[index1];
506  elem->set_node(1) = nodes[index2];
507  elem->set_node(2) = nodes[index2 + _rings.back() + 1];
508  elem->set_node(3) = nodes[index2 + _rings.back() + 2];
509  elem->subdomain_id() = subdomainIDs.back() + 1;
510 
511  // adding elements for the left mid part.
512  index = Utility::pow<2>(standard / 2 + 1) + standard / 2 +
513  (standard + 1) * (total_concentric_circles.size() - 1);
514  limit = index + standard / 2 - 1;
515 
516  while (index <= limit)
517  {
518  Elem * elem = mesh->add_elem(new Quad4);
519  elem->set_node(0) = nodes[index];
520  elem->set_node(1) = nodes[index + 1];
521  elem->set_node(2) = nodes[index2 - _rings.back() - 1];
522  elem->set_node(3) = nodes[index2];
523  elem->subdomain_id() = subdomainIDs.back() + 1;
524 
525  if (index == limit)
526  boundary_info.add_side(elem, 1, 1);
527 
528  ++index;
529 
530  // two different indices are used to add nodes for an element.
531  index2 = index2 - _rings.back() - 1;
532  }
533 
534  // adding elements for the right mid part.
535  index1 = Utility::pow<2>(standard / 2 + 1) + standard / 2 +
536  (standard + 1) * (total_concentric_circles.size() - 1);
537  index2 = Utility::pow<2>(standard / 2 + 1) +
538  (standard + 1) * total_concentric_circles.size() +
539  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 2 +
540  (_rings.back() + 1);
541  int index3 =
542  Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
543  (_rings.back() + 1) * (standard / 2) - 1 + (_rings.back() + 1) + (_rings.back() + 2);
544 
545  if (standard == 2)
546  {
547  Elem * elem = mesh->add_elem(new Quad4);
548  elem->set_node(0) = nodes[index1];
549  elem->set_node(1) = nodes[index1 - 1];
550  elem->set_node(2) = nodes[index2];
551  elem->set_node(3) = nodes[index3];
552  elem->subdomain_id() = subdomainIDs.back() + 1;
553 
554  boundary_info.add_side(elem, 1, 2);
555  }
556  else
557  {
558  Elem * elem = mesh->add_elem(new Quad4);
559  elem->set_node(0) = nodes[index1];
560  elem->set_node(1) = nodes[index1 - 1];
561  elem->set_node(2) = nodes[index2];
562  elem->set_node(3) = nodes[index3];
563  elem->subdomain_id() = subdomainIDs.back() + 1;
564  }
565 
566  // adding elements for the right mid bottom part.
567 
568  index = Utility::pow<2>(standard / 2 + 1) + standard / 2 +
569  (standard + 1) * (total_concentric_circles.size() - 1) - 2;
570  index1 = Utility::pow<2>(standard / 2 + 1) +
571  (standard + 1) * total_concentric_circles.size() +
572  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 2 +
573  (_rings.back() + 1) * 2;
574 
575  limit = Utility::pow<2>(standard / 2 + 1) + standard / 2 +
576  (standard + 1) * (total_concentric_circles.size() - 1) - standard / 2;
577 
578  if (standard != 2)
579  {
580  while (index >= limit)
581  {
582  Elem * elem = mesh->add_elem(new Quad4);
583  elem->set_node(0) = nodes[index];
584  elem->set_node(1) = nodes[index1];
585  elem->set_node(2) = nodes[index1 - (_rings.back() + 1)];
586  elem->set_node(3) = nodes[index + 1];
587  elem->subdomain_id() = subdomainIDs.back() + 1;
588 
589  if (index == limit)
590  boundary_info.add_side(elem, 0, 2);
591  --index;
592  index1 = index1 + (_rings.back() + 1);
593  }
594  }
595 
596  // adding elements for the right low part.
597  index = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
598  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 2;
599 
600  index1 = index - (_rings.back() + 2);
601  // dummy condition for elem definition
602  if (standard >= 2)
603  {
604  Elem * elem = mesh->add_elem(new Quad4);
605  elem->set_node(0) = nodes[index];
606  elem->set_node(1) = nodes[index + 1];
607  elem->set_node(2) = nodes[index + 2];
608  elem->set_node(3) = nodes[index1];
609  elem->subdomain_id() = subdomainIDs.back() + 1;
610 
611  boundary_info.add_side(elem, 0, 3);
612 
613  if (standard == 2)
614  boundary_info.add_side(elem, 1, 2);
615  }
616 
617  index = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
618  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 2 -
619  (_rings.back() + 2);
620 
621  limit = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
622  (_rings.back() + 1) * (standard / 2) + (_rings.back() + 2) * 2 - 2;
623 
624  int k = 1;
625  while (index > limit)
626  {
627  Elem * elem = mesh->add_elem(new Quad4);
628  elem->set_node(0) = nodes[index];
629  elem->set_node(1) = nodes[index + (_rings.back() + 2) * k + k + 1];
630  elem->set_node(2) = nodes[index + (_rings.back() + 2) * k + k + 2];
631  elem->set_node(3) = nodes[index - _rings.back() - 2];
632  elem->subdomain_id() = subdomainIDs.back() + 1;
633  index = index - (_rings.back() + 2);
634  ++k;
635 
636  if (standard == 2)
637  boundary_info.add_side(elem, 1, 2);
638  }
639 
640  index = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
641  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 1;
642  initial = Utility::pow<2>(standard / 2 + 1) +
643  (standard + 1) * total_concentric_circles.size() +
644  (_rings.back() + 1) * (standard / 2) + Utility::pow<2>(_rings.back() + 2) - 1;
645  limit = Utility::pow<2>(standard / 2 + 1) + (standard + 1) * total_concentric_circles.size() +
646  (_rings.back() + 1) * (standard / 2) * 2 + Utility::pow<2>(_rings.back() + 2) - 2 -
647  _rings.back() - 1;
648 
649  initial2 = Utility::pow<2>(standard / 2 + 1) +
650  (standard + 1) * total_concentric_circles.size() +
651  (_rings.back() + 1) * (standard / 2) * 2 + Utility::pow<2>(_rings.back() + 2) - 2 -
652  (_rings.back() + 1) * 2;
653 
654  if (standard > 2)
655  {
656  while (index < limit)
657  {
658  Elem * elem = mesh->add_elem(new Quad4);
659  elem->set_node(0) = nodes[index];
660  elem->set_node(1) = nodes[index + 1];
661  elem->set_node(2) = nodes[index + 1 + _rings.back() + 1];
662  elem->set_node(3) = nodes[index + 1 + _rings.back()];
663  elem->subdomain_id() = subdomainIDs.back() + 1;
664 
665  if (index > initial2)
666  boundary_info.add_side(elem, 2, 2);
667 
668  if ((index - initial) == 0)
669  boundary_info.add_side(elem, 3, 3);
670 
671  ++index;
672 
673  if ((index - initial) % static_cast<int>(_rings.back()) == 0)
674  {
675  ++index;
676  initial = initial + (static_cast<int>(_rings.back()) + 1);
677  }
678  }
679  }
680  }
681  }
682 
683  // This is to set boundary names.
684  boundary_info.sideset_name(1) = "left";
685  boundary_info.sideset_name(2) = "bottom";
686 
687  if (!_has_outer_square)
688  boundary_info.sideset_name(3) = "outer";
689  else
690  {
691  boundary_info.sideset_name(3) = "right";
692  boundary_info.sideset_name(4) = "top";
693  }
694 
695  if (_portion == "top_left")
696  {
697  MeshTools::Modification::rotate(*mesh, 90, 0, 0);
698  boundary_info.sideset_name(1) = "bottom";
699  boundary_info.sideset_name(2) = "right";
700 
701  if (!_has_outer_square)
702  boundary_info.sideset_name(3) = "outer";
703  else
704  {
705  boundary_info.sideset_name(3) = "top";
706  boundary_info.sideset_name(4) = "left";
707  }
708  }
709  else if (_portion == "bottom_left")
710  {
711  MeshTools::Modification::rotate(*mesh, 180, 0, 0);
712  boundary_info.sideset_name(1) = "right";
713  boundary_info.sideset_name(2) = "top";
714 
715  if (!_has_outer_square)
716  boundary_info.sideset_name(3) = "outer";
717  else
718  {
719  boundary_info.sideset_name(3) = "left";
720  boundary_info.sideset_name(4) = "bottom";
721  }
722  }
723  else if (_portion == "bottom_right")
724  {
725  MeshTools::Modification::rotate(*mesh, 270, 0, 0);
726  boundary_info.sideset_name(1) = "top";
727  boundary_info.sideset_name(2) = "left";
728 
729  if (!_has_outer_square)
730  boundary_info.sideset_name(3) = "outer";
731  else
732  {
733  boundary_info.sideset_name(3) = "bottom";
734  boundary_info.sideset_name(4) = "right";
735  }
736  }
737 
738  else if (_portion == "top_half")
739  {
740  ReplicatedMesh other_mesh(*mesh);
741  // This is to rotate the mesh and also to reset boundary IDs.
742  MeshTools::Modification::rotate(other_mesh, 90, 0, 0);
743  if (_has_outer_square)
744  {
745  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
746  MeshTools::Modification::change_boundary_id(other_mesh, 2, 6);
747  MeshTools::Modification::change_boundary_id(other_mesh, 3, 7);
748  MeshTools::Modification::change_boundary_id(other_mesh, 4, 1);
749  MeshTools::Modification::change_boundary_id(other_mesh, 5, 2);
750  MeshTools::Modification::change_boundary_id(other_mesh, 6, 3);
751  MeshTools::Modification::change_boundary_id(other_mesh, 7, 4);
752  mesh->prepare_for_use(false);
753  other_mesh.prepare_for_use(false);
754  mesh->stitch_meshes(other_mesh, 1, 3, TOLERANCE, true);
755  mesh->get_boundary_info().sideset_name(1) = "left";
756  mesh->get_boundary_info().sideset_name(2) = "bottom";
757  mesh->get_boundary_info().sideset_name(3) = "right";
758  mesh->get_boundary_info().sideset_name(4) = "top";
759  }
760  else
761  {
762  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
763  MeshTools::Modification::change_boundary_id(other_mesh, 2, 1);
764  MeshTools::Modification::change_boundary_id(other_mesh, 5, 2);
765  mesh->prepare_for_use(false);
766  other_mesh.prepare_for_use(false);
767  mesh->stitch_meshes(other_mesh, 1, 1, TOLERANCE, true);
768 
769  MeshTools::Modification::change_boundary_id(*mesh, 2, 1);
770  MeshTools::Modification::change_boundary_id(*mesh, 3, 2);
771  mesh->get_boundary_info().sideset_name(1) = "bottom";
772  mesh->get_boundary_info().sideset_name(2) = "outer";
773  }
774  other_mesh.clear();
775  }
776 
777  else if (_portion == "right_half")
778  {
779  ReplicatedMesh other_mesh(*mesh);
780  // This is to rotate the mesh and also to reset boundary IDs.
781  MeshTools::Modification::rotate(other_mesh, 270, 0, 0);
782  if (_has_outer_square)
783  {
784  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
785  MeshTools::Modification::change_boundary_id(other_mesh, 2, 6);
786  MeshTools::Modification::change_boundary_id(other_mesh, 3, 7);
787  MeshTools::Modification::change_boundary_id(other_mesh, 4, 3);
788  MeshTools::Modification::change_boundary_id(other_mesh, 5, 4);
789  MeshTools::Modification::change_boundary_id(other_mesh, 6, 1);
790  MeshTools::Modification::change_boundary_id(other_mesh, 7, 2);
791  mesh->prepare_for_use(false);
792  other_mesh.prepare_for_use(false);
793  mesh->stitch_meshes(other_mesh, 2, 4, TOLERANCE, true);
794  mesh->get_boundary_info().sideset_name(1) = "left";
795  mesh->get_boundary_info().sideset_name(2) = "bottom";
796  mesh->get_boundary_info().sideset_name(3) = "right";
797  mesh->get_boundary_info().sideset_name(4) = "top";
798  }
799  else
800  {
801  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
802  MeshTools::Modification::change_boundary_id(other_mesh, 2, 1);
803  MeshTools::Modification::change_boundary_id(other_mesh, 5, 2);
804  mesh->prepare_for_use(false);
805  other_mesh.prepare_for_use(false);
806  mesh->stitch_meshes(other_mesh, 2, 2, TOLERANCE, true);
807 
808  MeshTools::Modification::change_boundary_id(*mesh, 3, 2);
809  mesh->get_boundary_info().sideset_name(1) = "left";
810  mesh->get_boundary_info().sideset_name(2) = "outer";
811  }
812  other_mesh.clear();
813  }
814  else if (_portion == "left_half")
815  {
816  ReplicatedMesh other_mesh(*mesh);
817 
818  // This is to rotate the mesh and to reset boundary IDs.
819  MeshTools::Modification::rotate(other_mesh, 90, 0, 0);
820  MeshTools::Modification::rotate(*mesh, 180, 0, 0);
821  if (_has_outer_square)
822  {
823  // The other mesh is created by rotating the original mesh about 90 degrees.
824  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
825  MeshTools::Modification::change_boundary_id(other_mesh, 2, 6);
826  MeshTools::Modification::change_boundary_id(other_mesh, 3, 7);
827  MeshTools::Modification::change_boundary_id(other_mesh, 4, 1);
828  MeshTools::Modification::change_boundary_id(other_mesh, 5, 2);
829  MeshTools::Modification::change_boundary_id(other_mesh, 6, 3);
830  MeshTools::Modification::change_boundary_id(other_mesh, 7, 4);
831  // The original mesh is then rotated about 180 degrees.
832  MeshTools::Modification::change_boundary_id(*mesh, 1, 5);
833  MeshTools::Modification::change_boundary_id(*mesh, 2, 6);
834  MeshTools::Modification::change_boundary_id(*mesh, 3, 7);
835  MeshTools::Modification::change_boundary_id(*mesh, 4, 2);
836  MeshTools::Modification::change_boundary_id(*mesh, 5, 3);
837  MeshTools::Modification::change_boundary_id(*mesh, 6, 4);
838  MeshTools::Modification::change_boundary_id(*mesh, 7, 1);
839  mesh->prepare_for_use(false);
840  other_mesh.prepare_for_use(false);
841  mesh->stitch_meshes(other_mesh, 4, 2, TOLERANCE, true);
842  mesh->get_boundary_info().sideset_name(1) = "left";
843  mesh->get_boundary_info().sideset_name(2) = "bottom";
844  mesh->get_boundary_info().sideset_name(3) = "right";
845  mesh->get_boundary_info().sideset_name(4) = "top";
846  }
847  else
848  {
849  MeshTools::Modification::change_boundary_id(*mesh, 1, 5);
850  MeshTools::Modification::change_boundary_id(*mesh, 2, 1);
851  MeshTools::Modification::change_boundary_id(*mesh, 5, 2);
852  mesh->prepare_for_use(false);
853  other_mesh.prepare_for_use(false);
854  mesh->stitch_meshes(other_mesh, 1, 1, TOLERANCE, true);
855 
856  MeshTools::Modification::change_boundary_id(*mesh, 2, 1);
857  MeshTools::Modification::change_boundary_id(*mesh, 3, 2);
858  mesh->get_boundary_info().sideset_name(1) = "right";
859  mesh->get_boundary_info().sideset_name(2) = "outer";
860  }
861  other_mesh.clear();
862  }
863  else if (_portion == "bottom_half")
864  {
865  ReplicatedMesh other_mesh(*mesh);
866  // This is to rotate the mesh and also to reset boundary IDs.
867  MeshTools::Modification::rotate(other_mesh, 180, 0, 0);
868  MeshTools::Modification::rotate(*mesh, 270, 0, 0);
869  if (_has_outer_square)
870  {
871  // The other mesh is created by rotating the original mesh about 180 degrees.
872  MeshTools::Modification::change_boundary_id(other_mesh, 1, 5);
873  MeshTools::Modification::change_boundary_id(other_mesh, 2, 6);
874  MeshTools::Modification::change_boundary_id(other_mesh, 3, 7);
875  MeshTools::Modification::change_boundary_id(other_mesh, 4, 2);
876  MeshTools::Modification::change_boundary_id(other_mesh, 5, 3);
877  MeshTools::Modification::change_boundary_id(other_mesh, 6, 4);
878  MeshTools::Modification::change_boundary_id(other_mesh, 7, 1);
879  // The original mesh is rotated about 270 degrees.
880  MeshTools::Modification::change_boundary_id(*mesh, 1, 5);
881  MeshTools::Modification::change_boundary_id(*mesh, 2, 6);
882  MeshTools::Modification::change_boundary_id(*mesh, 3, 7);
883  MeshTools::Modification::change_boundary_id(*mesh, 4, 3);
884  MeshTools::Modification::change_boundary_id(*mesh, 5, 4);
885  MeshTools::Modification::change_boundary_id(*mesh, 6, 1);
886  MeshTools::Modification::change_boundary_id(*mesh, 7, 2);
887  mesh->prepare_for_use(false);
888  other_mesh.prepare_for_use(false);
889  mesh->stitch_meshes(other_mesh, 1, 3, TOLERANCE, true);
890  mesh->get_boundary_info().sideset_name(1) = "left";
891  mesh->get_boundary_info().sideset_name(2) = "bottom";
892  mesh->get_boundary_info().sideset_name(3) = "right";
893  mesh->get_boundary_info().sideset_name(4) = "top";
894  }
895  else
896  {
897  MeshTools::Modification::change_boundary_id(*mesh, 1, 5);
898  MeshTools::Modification::change_boundary_id(*mesh, 2, 1);
899  MeshTools::Modification::change_boundary_id(*mesh, 5, 2);
900  mesh->prepare_for_use(false);
901  other_mesh.prepare_for_use(false);
902  mesh->stitch_meshes(other_mesh, 1, 1, TOLERANCE, true);
903 
904  MeshTools::Modification::change_boundary_id(*mesh, 2, 1);
905  MeshTools::Modification::change_boundary_id(*mesh, 3, 2);
906  mesh->get_boundary_info().sideset_name(1) = "top";
907  mesh->get_boundary_info().sideset_name(2) = "outer";
908  }
909  other_mesh.clear();
910  }
911  else if (_portion == "full")
912  {
913  ReplicatedMesh portion_two(*mesh);
914 
915  // This is to rotate the mesh and also to reset boundary IDs.
916  MeshTools::Modification::rotate(portion_two, 90, 0, 0);
917 
918  if (_has_outer_square)
919  {
920  // Portion 2: 2nd quadrant
921  MeshTools::Modification::change_boundary_id(portion_two, 1, 5);
922  MeshTools::Modification::change_boundary_id(portion_two, 2, 6);
923  MeshTools::Modification::change_boundary_id(portion_two, 3, 7);
924  MeshTools::Modification::change_boundary_id(portion_two, 4, 1);
925  MeshTools::Modification::change_boundary_id(portion_two, 5, 2);
926  MeshTools::Modification::change_boundary_id(portion_two, 6, 3);
927  MeshTools::Modification::change_boundary_id(portion_two, 7, 4);
928  mesh->prepare_for_use(false);
929  portion_two.prepare_for_use(false);
930  // 'top_half'
931  mesh->stitch_meshes(portion_two, 1, 3, TOLERANCE, true);
932 
933  // 'bottom_half'
934  ReplicatedMesh portion_bottom(*mesh);
935  MeshTools::Modification::rotate(portion_bottom, 180, 0, 0);
936  MeshTools::Modification::change_boundary_id(portion_bottom, 1, 5);
937  MeshTools::Modification::change_boundary_id(portion_bottom, 2, 6);
938  MeshTools::Modification::change_boundary_id(portion_bottom, 3, 7);
939  MeshTools::Modification::change_boundary_id(portion_bottom, 4, 2);
940  MeshTools::Modification::change_boundary_id(portion_bottom, 5, 3);
941  MeshTools::Modification::change_boundary_id(portion_bottom, 6, 4);
942  MeshTools::Modification::change_boundary_id(portion_bottom, 7, 1);
943  mesh->prepare_for_use(false);
944  portion_bottom.prepare_for_use(false);
945  // 'full'
946  mesh->stitch_meshes(portion_bottom, 2, 4, TOLERANCE, true);
947 
948  mesh->get_boundary_info().sideset_name(1) = "left";
949  mesh->get_boundary_info().sideset_name(2) = "bottom";
950  mesh->get_boundary_info().sideset_name(3) = "right";
951  mesh->get_boundary_info().sideset_name(4) = "top";
952  portion_bottom.clear();
953  }
954  else
955  {
956  MeshTools::Modification::change_boundary_id(portion_two, 1, 5);
957  MeshTools::Modification::change_boundary_id(portion_two, 2, 1);
958  MeshTools::Modification::change_boundary_id(portion_two, 5, 2);
959  // 'top half'
960  mesh->prepare_for_use(false);
961  portion_two.prepare_for_use(false);
962  mesh->stitch_meshes(portion_two, 1, 1, TOLERANCE, true);
963  // 'bottom half'
964  ReplicatedMesh portion_bottom(*mesh);
965  MeshTools::Modification::rotate(portion_bottom, 180, 0, 0);
966  // 'full'
967  mesh->prepare_for_use(false);
968  portion_bottom.prepare_for_use(false);
969  mesh->stitch_meshes(portion_bottom, 2, 2, TOLERANCE, true);
970  MeshTools::Modification::change_boundary_id(*mesh, 3, 1);
971  mesh->get_boundary_info().sideset_name(1) = "outer";
972  portion_bottom.clear();
973  }
974  portion_two.clear();
975  }
976 
977  if (_portion != "top_half" && _portion != "right_half" && _portion != "left_half" &&
978  _portion != "bottom_half" && _portion != "full")
979  mesh->prepare_for_use(false);
980 
981  // Laplace smoothing
982  LaplaceMeshSmoother lms(*mesh);
983  lms.smooth(_smoothing_max_it);
984 
985  return dynamic_pointer_cast<MeshBase>(mesh);
986 }
unsigned int _smoothing_max_it
Iteration number for Laplace smoothing.
bool _preserve_volumes
Volume preserving function is optional.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
static PetscErrorCode Vec x
std::vector< Real > _radii
Radii of concentric circles.
std::vector< unsigned int > _rings
Number of rings in each circle or in the enclosing square.
bool _has_outer_square
Adding the enclosing square is optional.
MooseEnum _portion
Control of which portion of mesh will be developed.
MPI_Comm comm
unsigned int _num_sectors
Number of sectors in one quadrant.
Real _inner_mesh_fraction
Size of inner square in relation to radius of the innermost concentric circle.

◆ getCheckedPointerParam()

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

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

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

Definition at line 77 of file MooseObject.h.

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

◆ getDependencies()

std::vector<std::string>& MeshGenerator::getDependencies ( )
inlineinherited

Return the MeshGenerators that must run before this MeshGenerator.

Definition at line 49 of file MeshGenerator.h.

49 { return _depends_on; }
std::vector< std::string > _depends_on
A list of generators that are required to run before this generator may run.
Definition: MeshGenerator.h:77

◆ getMesh()

std::unique_ptr< MeshBase > & MeshGenerator::getMesh ( const std::string &  input_mesh_generator_parameter_name)
protectedinherited

Takes the name of a MeshGeneratorName parameter and then gets a pointer to the Mesh that MeshGenerator is going to create.

NOTE: You MUST catch this by reference!

Returns
The Mesh generated by that MeshGenerator

Definition at line 32 of file MeshGenerator.C.

33 {
34  if (isParamValid(input_mesh_generator_parameter_name))
35  {
36  auto name = getParam<MeshGeneratorName>(input_mesh_generator_parameter_name);
37 
38  _depends_on.push_back(name);
39 
41  }
42  else
43  return _null_mesh;
44 }
std::unique_ptr< MeshBase > & getMeshGeneratorOutput(const std::string &name)
Get a refernce to a pointer that will be the output of the MeshGenerator named name.
Definition: MooseApp.C:1449
std::unique_ptr< MeshBase > _null_mesh
A nullptr to use for when inputs aren&#39;t specified.
Definition: MeshGenerator.h:80
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:56
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:86
std::vector< std::string > _depends_on
A list of generators that are required to run before this generator may run.
Definition: MeshGenerator.h:77

◆ getMeshByName()

std::unique_ptr< MeshBase > & MeshGenerator::getMeshByName ( const MeshGeneratorName &  input_mesh_generator_parameter_name)
protectedinherited

Takes the name of another MeshGenerator directly.

NOTE: You MUST catch this by reference!

Returns
The Mesh generated by that MeshGenerator

Definition at line 47 of file MeshGenerator.C.

Referenced by MeshCollectionGenerator::MeshCollectionGenerator(), PatternedMeshGenerator::PatternedMeshGenerator(), StackGenerator::StackGenerator(), and StitchedMeshGenerator::StitchedMeshGenerator().

48 {
49  _depends_on.push_back(input_mesh_generator);
50  return _app.getMeshGeneratorOutput(input_mesh_generator);
51 }
std::unique_ptr< MeshBase > & getMeshGeneratorOutput(const std::string &name)
Get a refernce to a pointer that will be the output of the MeshGenerator named name.
Definition: MooseApp.C:1449
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:174
std::vector< std::string > _depends_on
A list of generators that are required to run before this generator may run.
Definition: MeshGenerator.h:77

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 91 of file MooseObject.h.

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

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

◆ getParam()

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

Retrieve a parameter for the object.

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

Definition at line 188 of file MooseObject.h.

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

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

◆ isParamValid()

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

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 86 of file MooseObject.h.

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

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

◆ mooseDeprecated()

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

◆ mooseError()

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

Definition at line 144 of file MooseObject.h.

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

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

◆ mooseInfo()

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

◆ mooseWarning()

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

◆ name()

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

Get the name of the object.

Returns
The name of the object

Definition at line 56 of file MooseObject.h.

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

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

◆ paramError()

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

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

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

Definition at line 105 of file MooseObject.h.

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

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

◆ parameters()

const InputParameters& MooseObject::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 62 of file MooseObject.h.

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

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

◆ paramInfo()

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

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

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

Definition at line 135 of file MooseObject.h.

Referenced by TransientMultiApp::TransientMultiApp().

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

◆ paramWarning()

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

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

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

Definition at line 119 of file MooseObject.h.

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

◆ type()

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

Get the type of this object.

Returns
the name of the type of this object

Definition at line 50 of file MooseObject.h.

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

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

Member Data Documentation

◆ _app

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 174 of file MooseObject.h.

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

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 32 of file ConsoleStreamInterface.h.

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

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

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

Definition at line 183 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _has_outer_square

bool ConcentricCircleMeshGenerator::_has_outer_square
protected

Adding the enclosing square is optional.

Definition at line 45 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _inner_mesh_fraction

Real ConcentricCircleMeshGenerator::_inner_mesh_fraction
protected

Size of inner square in relation to radius of the innermost concentric circle.

Definition at line 42 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _mesh

std::shared_ptr<MooseMesh>& MeshGenerator::_mesh
protectedinherited

◆ _name

const std::string& MooseObject::_name
protectedinherited

◆ _num_sectors

unsigned int ConcentricCircleMeshGenerator::_num_sectors
protected

Number of sectors in one quadrant.

Definition at line 33 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _pars

const InputParameters& MooseObject::_pars
protectedinherited

◆ _pitch

Real ConcentricCircleMeshGenerator::_pitch
protected

Definition at line 46 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _portion

MooseEnum ConcentricCircleMeshGenerator::_portion
protected

Control of which portion of mesh will be developed.

Definition at line 55 of file ConcentricCircleMeshGenerator.h.

Referenced by generate().

◆ _preserve_volumes

bool ConcentricCircleMeshGenerator::_preserve_volumes
protected

Volume preserving function is optional.

Definition at line 49 of file ConcentricCircleMeshGenerator.h.

Referenced by generate().

◆ _radii

std::vector<Real> ConcentricCircleMeshGenerator::_radii
protected

Radii of concentric circles.

Definition at line 36 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _rings

std::vector<unsigned int> ConcentricCircleMeshGenerator::_rings
protected

Number of rings in each circle or in the enclosing square.

Definition at line 39 of file ConcentricCircleMeshGenerator.h.

Referenced by ConcentricCircleMeshGenerator(), and generate().

◆ _smoothing_max_it

unsigned int ConcentricCircleMeshGenerator::_smoothing_max_it
protected

Iteration number for Laplace smoothing.

Definition at line 52 of file ConcentricCircleMeshGenerator.h.

Referenced by generate().

◆ _type

const std::string& MooseObject::_type
protectedinherited

The type of this object (the Class name)

Definition at line 177 of file MooseObject.h.

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


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