OFELI's Logo

An Object Oriented Finite Element Library

To store and treat an ellipsoidal figure. More...

#include <Figure.h>

+ Inheritance diagram for Ellipse:

Public Member Functions

 Ellipse ()
 Default constructor. More...
 
 Ellipse (Point< real_t > c, real_t a, real_t b, int code=1)
 Constructor with given ellipse data. More...
 
real_t getSignedDistance (const Point< real_t > &p) const
 Return signed distance of a given point from the current ellipse. More...
 
Ellipseoperator+= (Point< real_t > a)
 Operator += More...
 
Ellipseoperator+= (real_t a)
 Operator *= More...
 
virtual real_t getSignedDistance (const Point< real_t > &p) const
 Return signed distance from a given point to current figure. More...
 
void getSignedDistance (const Grid &g, Vect< real_t > &d) const
 Calculate signed distance to current figure with respect to grid points. More...
 
- Public Member Functions inherited from Figure
 Figure ()
 Default constructor.
 
 Figure (const Figure &f)
 Copy constructor.
 
virtual ~Figure ()
 Destructor.
 
void setCode (int code)
 Choose a code for the domain defined by the figure.
 
virtual real_t getSignedDistance (const Point< real_t > &p) const
 Return signed distance from a given point to current figure. More...
 
Figureoperator= (const Figure &f)
 Operator =.
 
void getSignedDistance (const Grid &g, Vect< real_t > &d) const
 Calculate signed distance to current figure with respect to grid points. More...
 
real_t dLine (const Point< real_t > &p, const Point< real_t > &a, const Point< real_t > &b) const
 Compute signed distance from a line. More...
 

Detailed Description

To store and treat an ellipsoidal figure.

Constructor & Destructor Documentation

◆ Ellipse() [1/2]

Ellipse ( )

Default constructor.

Constructs an ellipse with semimajor axis = 1, and semiminor axis = 1

◆ Ellipse() [2/2]

Ellipse ( Point< real_t c,
real_t  a,
real_t  b,
int  code = 1 
)

Constructor with given ellipse data.

Parameters
[in]cCoordinates of center
[in]aSemimajor axis
[in]bSemiminor axis
[in]codeCode to assign to the generated figure [Default: 1]

Member Function Documentation

◆ getSignedDistance() [1/3]

void getSignedDistance ( const Grid g,
Vect< real_t > &  d 
) const

Calculate signed distance to current figure with respect to grid points.

Parameters
[in]gGrid instance
[in]dVect instance containing calculated distance from each grid index to Figure
Remarks
Vector d doesn't need to be sized before invoking this function

◆ getSignedDistance() [2/3]

virtual real_t getSignedDistance ( const Point< real_t > &  p) const
virtual

Return signed distance from a given point to current figure.

Parameters
[in]pPoint instance from which distance is computed

Reimplemented from Figure.

◆ getSignedDistance() [3/3]

real_t getSignedDistance ( const Point< real_t > &  p) const
virtual

Return signed distance of a given point from the current ellipse.

The computed distance is negative if p lies in the ellipse, positive if it is outside, and 0 on its boundary

Parameters
[in]pPoint<double> instance

Reimplemented from Figure.

◆ operator+=() [1/2]

Ellipse & operator+= ( Point< real_t a)

Operator +=

Translate ellipse by a vector a

Parameters
[in]aVector defining the translation

◆ operator+=() [2/2]

Ellipse & operator+= ( real_t  a)

Operator *=

Scale ellipse by a factor a

Parameters
[in]aScaling value





Copyright © 1998-2022 Rachid Touzani