40 #ifndef implicitFunction_sphereImplicitFunction_H 41 #define implicitFunction_sphereImplicitFunction_H 50 namespace implicitFunctions
100 return (-
mag(
p - origin_) + radius_)*scale_;
105 return (origin_ -
p)*scale_;
110 return mag(
mag(
p - origin_) - radius_)*scale_;
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual vector grad(const vector &p) const
TypeName("sphere")
Runtime type information.
virtual scalar value(const vector &p) const
virtual ~sphereImplicitFunction()=default
Destructor.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual scalar distanceToSurfaces(const vector &p) const
sphereImplicitFunction(const point &, const scalar radius, const scalar scale)
Construct from components.
Base class for implicit functions.