19 InputParameters params = validParams<Function>();
20 params.addClassDescription(
"Implementation of 'bubble' ranging from 0 to 1.");
21 params.addParam<RealVectorValue>(
22 "center", RealVectorValue(0.5, 0.5, 0),
"The center of the bubble.");
23 params.addParam<Real>(
"radius", 0.15,
"The radius of the bubble.");
24 params.addParam<Real>(
"epsilon", 0.01,
"The interface thickness.");
29 : Function(parameters),
30 _center(getParam<RealVectorValue>(
"center")),
31 _radius(getParam<Real>(
"radius")),
32 _epsilon(getParam<Real>(
"epsilon"))
40 return 1.0 / (1 + std::exp(x));
46 Real norm = (p -
_center).norm();
51 for (
unsigned int i = 0; i < LIBMESH_DIM; ++i)
54 output(i) = (g_prime * std::exp(g)) / ((std::exp(g) + 1) * (std::exp(g) + 1));