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

A circle (2 dimensions) More...

#include <sdf_shape_2D.h>

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

Public Member Functions

 SDFCircle (const double radius, const coord_2d &center)
 SDF for a sphere. More...
 
coord_2d grad_sdf (const coord_2d &pt) const
 Computes the gradient of the SDF. More...
 
double sdf (const coord_2d &pt) const
 Computes the normal distance. More...
 
- Public Member Functions inherited from madness::SignedDFInterface< 2 >
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] ) More...
 
virtual double sdf (const Vector< double, NDIM > &x) const=0
 Returns the signed distance from the surface,. More...
 

Protected Attributes

const coord_2d center
 Center of circle. More...
 
const double radius
 Radius of circle. More...
 

Detailed Description

A circle (2 dimensions)

Constructor & Destructor Documentation

◆ SDFCircle()

madness::SDFCircle::SDFCircle ( const double  radius,
const coord_2d center 
)
inline

SDF for a sphere.

Parameters
radiusThe radius of the sphere
centerThe center of the sphere

Member Function Documentation

◆ grad_sdf()

coord_2d madness::SDFCircle::grad_sdf ( const coord_2d 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::SDFCircle::sdf ( const coord_2d 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_2d madness::SDFCircle::center
protected

Center of circle.

Referenced by grad_sdf(), and sdf().

◆ radius

const double madness::SDFCircle::radius
protected

Radius of circle.

Referenced by sdf().


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