MADNESS 0.10.1
madness::SDFCircle Class Reference

A circle (2 dimensions). More...

#include <sdf_shape_2D.h>

Inheritance diagram for madness::SDFCircle:
Collaboration diagram for madness::SDFCircle:

Public Member Functions

 SDFCircle (const double radius, const coord_2d &center)
 SDF for a sphere.
coord_2d grad_sdf (const coord_2d &pt) const
 Computes the gradient of the SDF.
double sdf (const coord_2d &pt) const
 Computes the normal distance.
Public Member Functions inherited from madness::SignedDFInterface< 2 >
virtual ~SignedDFInterface ()
virtual Vector< double, NDIM > grad_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_2d center
 Center of circle.
const double radius
 Radius of circle.

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

References center, and radius.

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 SDFCircle(), grad_sdf(), and sdf().

◆ radius

const double madness::SDFCircle::radius
protected

Radius of circle.

Referenced by SDFCircle(), and sdf().


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