Go to the documentation of this file.
11 #include "MooseMesh.h"
20 params.addClassDescription(
21 "Specify variable values inside and outside a list of isolated boxes shaped "
22 "axis-aligned regions defined by pairs of opposing corners");
23 params.addParam<Real>(
"outside", 0.0,
"The value of the variable outside the boxes");
39 for (
unsigned int b = 0; b <
_nbox; ++b)
41 for (
unsigned int i = 0; i <
_dim; ++i)
48 for (
unsigned int n = b + 1; n <
_nbox; ++n)
50 for (
unsigned int j = 0; j <
_dim; ++j)
53 mooseError(
"Partially overlapping boxes are not allowed. Note that this "
54 "includes the overlapping diffused interfaces. For nested boxes, "
55 "use NestedBoundingBoxIC.C.");
59 for (
unsigned int j = 0; j <
_dim; ++j)
60 f_in *= 0.5 * (std::tanh(2.0 * libMesh::pi * (p(j) -
_c1[b](j)) /
_int_width) -
61 std::tanh(2.0 * libMesh::pi * (p(j) -
_c2[b](j)) /
_int_width));
64 else if (
_c1[b](i) >=
_c2[b](i))
65 mooseError(
"The coordinates of the smaller_coordinate_corners are equal to or larger "
67 "the larger_coordinate_corners.");
Real value(const Point &p)
Real value(const Point &p)
const std::vector< Point > _c1
lists of opposite corners
InputParameters validParams< SmoothMultiBoundingBoxBaseIC >()
const unsigned int _dim
dimensionality of the mesh
registerMooseObject("PhaseFieldApp", IsolatedBoundingBoxIC)
InputParameters validParams< IsolatedBoundingBoxIC >()
const Real _outside
values outside all the boxes
std::vector< Real > _inside
values inside the boxes
const Real _int_width
value of interfacial width
const unsigned int _nbox
number of boxes
IsolatedBoundingBoxIC(const InputParameters ¶meters)
SmoothMultiBoundingBoxBaseIC is the base class for IsolatedBoundingBoxIC and NestedBoundingBoxIC.
const std::vector< Point > _c2
IsolatedBoundingBoxIC creates several isolated boxes defined by their coordinates in the domain.