Go to the documentation of this file.
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_;
virtual vector grad(const vector &p) const
Base class for implicit functions.
virtual scalar value(const vector &p) const
virtual scalar distanceToSurfaces(const vector &p) const
sphereImplicitFunction(const point &, const scalar radius, const scalar scale)
Construct from components.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
TypeName("sphere")
Runtime type information.
virtual ~sphereImplicitFunction()=default
Destructor.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)