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