MADNESS 0.10.1
Public Member Functions | Protected Attributes | List of all members
madness::SDFSphere Class Reference

A spherical surface (3 dimensions) More...

#include <sdf_shape_3D.h>

Inheritance diagram for madness::SDFSphere:
Inheritance graph
[legend]
Collaboration diagram for madness::SDFSphere:
Collaboration graph
[legend]

Public Member Functions

 SDFSphere (const double radius, const coord_3d &center)
 SDF for a sphere.
 
coord_3d grad_sdf (const coord_3d &pt) const
 Computes the gradient of the SDF.
 
double sdf (const coord_3d &pt) const
 Computes the normal distance.
 
- Public Member Functions inherited from madness::SignedDFInterface< 3 >
virtual ~SignedDFInterface ()
 
virtual Vector< double, NDIMgrad_sdf (const Vector< double, NDIM > &x) const=0
 Returns the gradient of the signed distance from the surface (i.e., dsdf(x)/dx[i] )
 
virtual double sdf (const Vector< double, NDIM > &x) const=0
 Returns the signed distance from the surface,.
 

Protected Attributes

const coord_3d center
 Center of sphere.
 
const double radius
 Radius of sphere.
 

Detailed Description

A spherical surface (3 dimensions)

Constructor & Destructor Documentation

◆ SDFSphere()

madness::SDFSphere::SDFSphere ( const double  radius,
const coord_3d center 
)
inline

SDF for a sphere.

Parameters
radiusThe radius of the sphere
centerThe center of the sphere

Member Function Documentation

◆ grad_sdf()

coord_3d madness::SDFSphere::grad_sdf ( const coord_3d pt) const
inline

Computes the gradient of the SDF.

Parameters
ptPoint at which to compute the gradient
Returns
the gradient

References center, and madness::g.

◆ sdf()

double madness::SDFSphere::sdf ( const coord_3d pt) const
inline

Computes the normal distance.

This SDF is exact, and easy to show.

Parameters
ptPoint at which to compute the distance from the surface
Returns
The signed distance from the surface

References center, and radius.

Member Data Documentation

◆ center

const coord_3d madness::SDFSphere::center
protected

Center of sphere.

Referenced by grad_sdf(), and sdf().

◆ radius

const double madness::SDFSphere::radius
protected

Radius of sphere.

Referenced by sdf().


The documentation for this class was generated from the following file: