11 #include "libmesh/utility.h" 23 params.
addParam<
Real>(
"epsilon", 0.01,
"The interface thickness.");
31 _epsilon(getParam<
Real>(
"epsilon"))
39 const Real distance_from_orgin = -unit_normal *
_point;
40 const Real x = -(unit_normal * p + distance_from_orgin) /
_epsilon;
42 return 1.0 / (1 + std::exp(
x));
49 const Real distance_from_orgin = -unit_normal *
_point;
50 const Real x = -(unit_normal * p + distance_from_orgin) /
_epsilon;
57 x_prime = -unit_normal(i) /
_epsilon;
58 output(i) = -(x_prime * std::exp(
x)) / Utility::pow<2>(std::exp(
x) + 1);
LevelSetOlssonPlane(const InputParameters ¶meters)
Implementation of a level set function to represent a plane.
const Real & _epsilon
The interface thickness.
auto norm() const -> decltype(std::norm(Real()))
virtual Real value(Real, const Point &p) const override
const RealVectorValue & _normal
The normal vector to the plane.
static constexpr std::size_t dim
registerMooseObject("LevelSetApp", LevelSetOlssonPlane)
const RealVectorValue & _point
A point on the plane.
const std::vector< double > x
virtual RealGradient gradient(Real, const Point &p) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
static InputParameters validParams()
static InputParameters validParams()