19 sizeVector(std::vector<Real>
v, std::size_t size)
22 return std::vector<Real>(size,
v[0]);
32 params.
addClassDescription(
"Specify variable values inside and outside a list of box shaped " 33 "axis-aligned regions defined by pairs of opposing corners");
34 params.
addRequiredParam<std::vector<Point>>(
"corners",
"The corner coordinates boxes");
36 "opposite_corners",
"The coordinates of the opposite corners of the boxes");
38 "The value of the variable inside each box " 39 "(one value per box or a single value for " 41 params.
addParam<
Real>(
"outside", 0.0,
"The value of the variable outside the box");
43 params.
addClassDescription(
"Allows setting the initial condition of a value of a field inside " 44 "and outside multiple bounding boxes.");
50 _c1(getParam<
std::vector<Point>>(
"corners")),
51 _c2(getParam<
std::vector<Point>>(
"opposite_corners")),
53 _dim(_fe_problem.
mesh().dimension()),
54 _inside(sizeVector(getParam<
std::vector<
Real>>(
"inside"), _nbox)),
55 _outside(getParam<
Real>(
"outside"))
59 mooseError(
"vector inputs must all be the same size");
67 for (
unsigned int b = 0;
b <
_nbox; ++
b)
static InputParameters validParams()
static InputParameters validParams()
const unsigned int _dim
dimensionality of the mesh
MultiBoundingBoxIC(const InputParameters ¶meters)
const std::vector< Real > _inside
values inside the boxes
const std::vector< Point > _c2
const unsigned int _nbox
number of boxes
registerMooseObject("PhaseFieldApp", MultiBoundingBoxIC)
virtual Real value(const Point &p) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
const Real _outside
values outside the boxes
const std::vector< Point > _c1
lists of opposite corners
void mooseError(Args &&... args) const
MultiBoundingBoxIC allows setting the initial condition of a value of a field inside and outside mult...