OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
interpolation::Mesh Class Referenceabstract

Base class for meshing routines. More...

#include <Mesh.h>

Inheritance diagram for interpolation::Mesh:
Inheritance graph
Collaboration diagram for interpolation::Mesh:
Collaboration graph

Classes

class  Iterator
 Used to loop over some, or all, points in the mesh, as in stl Enables e.g. More...
 

Public Member Functions

 Mesh ()
 Constructor (does nothing) More...
 
virtual Mesh::Iterator begin () const =0
 Return the first point on the mesh. More...
 
virtual Mesh::Iterator end () const =0
 Return the last+1 point on the mesh. More...
 
virtual Meshclone ()=0
 Return a copy of child object. More...
 
virtual Meshdual () const =0
 Return the "Dual" of the mesh or nullptr if not implemented. More...
 
virtual ~Mesh ()
 Destructor - does nothing. More...
 
virtual void getPosition (const Mesh::Iterator &it, double *position) const =0
 Return the position of a point in the mesh. More...
 
virtual int getPositionDimension () const =0
 Return the dimension of the mesh. More...
 
virtual int toInteger (const Mesh::Iterator &lhs) const =0
 Map from iterator to an integer used to index the iterator. More...
 
virtual Mesh::Iterator getNearest (const double *position) const =0
 Find the point on the mesh nearest to given point. More...
 

Protected Member Functions

virtual Mesh::IteratoraddEquals (Mesh::Iterator &lhs, int difference) const =0
 Add difference to lhs and then return lhs. More...
 
virtual Mesh::IteratorsubEquals (Mesh::Iterator &lhs, int difference) const =0
 Subtract difference from lhs and then return lhs. More...
 
virtual Mesh::IteratoraddEquals (Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const =0
 Add difference to lhs and then return lhs. More...
 
virtual Mesh::IteratorsubEquals (Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const =0
 Subtract difference from lhs and then return lhs. More...
 
virtual Mesh::IteratoraddOne (Mesh::Iterator &lhs) const =0
 Increment position of lhs by one and then return lhs. More...
 
virtual Mesh::IteratorsubOne (Mesh::Iterator &lhs) const =0
 Decrement position of lhs by one and then return lhs. More...
 
virtual bool isGreater (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const =0
 Return true if rhs is greater than lhs. More...
 

Friends

Mesh::Iterator operator++ (Mesh::Iterator &lhs, int)
 Postfix increment operator it++ advances iterator by one. More...
 
Mesh::Iterator operator-- (Mesh::Iterator &lhs, int)
 Postfix decrement operator it– retreats iterator by one. More...
 
Mesh::Iteratoroperator++ (Mesh::Iterator &lhs)
 Prefix increment operator ++it. More...
 
Mesh::Iteratoroperator-- (Mesh::Iterator &lhs)
 Prefix decrement operator –it retreats iterator by one
More...
 
Mesh::Iterator operator- (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Subtraction operator - subtracts offset of rhs relative to Begin() from lhs. More...
 
Mesh::Iterator operator+ (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Addition operator - adds offset of rhs of rhs relative to Begin() to lhs. More...
 
Mesh::Iteratoroperator-= (Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Subtraction operator - subtracts offset of rhs relative to Begin() from lhs and returns lhs. More...
 
Mesh::Iteratoroperator+= (Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Addition operator - adds offset of rhs of rhs relative to Begin() to lhs and returns lhs. More...
 
Mesh::Iterator operator- (const Mesh::Iterator &lhs, const int &rhs)
 Subtraction operator - subtracts from lhs and returns copy of lhs. More...
 
Mesh::Iterator operator+ (const Mesh::Iterator &lhs, const int &rhs)
 Addition operator - adds rhs to lhs and returns copy of lhs. More...
 
Mesh::Iteratoroperator-= (Mesh::Iterator &lhs, const int &rhs)
 Subtraction operator - subtracts rhs from lhs and returns lhs. More...
 
Mesh::Iteratoroperator+= (Mesh::Iterator &lhs, const int &rhs)
 Addition operator - subtracts rhs from lhs and returns lhs. More...
 
bool operator== (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs indexes the same position as rhs. More...
 
bool operator!= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs does not index the same position as rhs. More...
 
bool operator>= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs indexes a position greater than or equal to rhs i.e. More...
 
bool operator<= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs indexes a position less than or equal to rhs i.e. More...
 
bool operator< (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs indexes a position less than rhs i.e. More...
 
bool operator> (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 Return true if lhs indexes a position greater than rhs i.e. More...
 

Detailed Description

Base class for meshing routines.

Aim is to describe a set of points in various dimensions etc for use in interpolation routines. Concrete classes are TwoDGrid, ThreeDGrid, NDGrid and TriangularMesh (two dimensional delaunay mesh).

Iterator is defined for easy access to all member data (e.g. for IO) but no const_iterator type.

Definition at line 49 of file opalx/src/Fields/Interpolation/Mesh.h.

Constructor & Destructor Documentation

◆ Mesh()

interpolation::Mesh::Mesh ( )
inline

Constructor (does nothing)

◆ ~Mesh()

virtual interpolation::Mesh::~Mesh ( )
inlinevirtual

Destructor - does nothing.

Member Function Documentation

◆ addEquals() [1/2]

virtual Mesh::Iterator & interpolation::Mesh::addEquals ( Mesh::Iterator lhs,
const Mesh::Iterator rhs 
) const
protectedpure virtual

Add difference to lhs and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ addEquals() [2/2]

virtual Mesh::Iterator & interpolation::Mesh::addEquals ( Mesh::Iterator lhs,
int  difference 
) const
protectedpure virtual

Add difference to lhs and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ addOne()

virtual Mesh::Iterator & interpolation::Mesh::addOne ( Mesh::Iterator lhs) const
protectedpure virtual

Increment position of lhs by one and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ begin()

virtual Mesh::Iterator interpolation::Mesh::begin ( ) const
pure virtual

◆ clone()

virtual Mesh * interpolation::Mesh::clone ( )
pure virtual

Return a copy of child object.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

Referenced by interpolation::PolynomialPatch::clone().

◆ dual()

virtual Mesh * interpolation::Mesh::dual ( ) const
pure virtual

Return the "Dual" of the mesh or nullptr if not implemented.

Dual is a polyhedron that has centre of each face as a point on the mesh

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

Referenced by interpolation::PPSolveFactory::PPSolveFactory().

◆ end()

◆ getNearest()

virtual Mesh::Iterator interpolation::Mesh::getNearest ( const double *  position) const
pure virtual

Find the point on the mesh nearest to given point.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

Referenced by interpolation::PolynomialPatch::function(), and interpolation::PolynomialPatch::getPolynomialVector().

◆ getPosition()

virtual void interpolation::Mesh::getPosition ( const Mesh::Iterator it,
double *  position 
) const
pure virtual

Return the position of a point in the mesh.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ getPositionDimension()

◆ isGreater()

virtual bool interpolation::Mesh::isGreater ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
) const
protectedpure virtual

Return true if rhs is greater than lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ subEquals() [1/2]

virtual Mesh::Iterator & interpolation::Mesh::subEquals ( Mesh::Iterator lhs,
const Mesh::Iterator rhs 
) const
protectedpure virtual

Subtract difference from lhs and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ subEquals() [2/2]

virtual Mesh::Iterator & interpolation::Mesh::subEquals ( Mesh::Iterator lhs,
int  difference 
) const
protectedpure virtual

Subtract difference from lhs and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ subOne()

virtual Mesh::Iterator & interpolation::Mesh::subOne ( Mesh::Iterator lhs) const
protectedpure virtual

Decrement position of lhs by one and then return lhs.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

◆ toInteger()

virtual int interpolation::Mesh::toInteger ( const Mesh::Iterator lhs) const
pure virtual

Map from iterator to an integer used to index the iterator.

Implemented in interpolation::NDGrid, and interpolation::ThreeDGrid.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs does not index the same position as rhs.

◆ operator+ [1/2]

Mesh::Iterator operator+ ( const Mesh::Iterator lhs,
const int &  rhs 
)
friend

Addition operator - adds rhs to lhs and returns copy of lhs.

◆ operator+ [2/2]

Mesh::Iterator operator+ ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Addition operator - adds offset of rhs of rhs relative to Begin() to lhs.

◆ operator++ [1/2]

Mesh::Iterator & operator++ ( Mesh::Iterator lhs)
friend

Prefix increment operator ++it.

◆ operator++ [2/2]

Mesh::Iterator operator++ ( Mesh::Iterator lhs,
int   
)
friend

Postfix increment operator it++ advances iterator by one.

◆ operator+= [1/2]

Mesh::Iterator & operator+= ( Mesh::Iterator lhs,
const int &  rhs 
)
friend

Addition operator - subtracts rhs from lhs and returns lhs.

◆ operator+= [2/2]

Mesh::Iterator & operator+= ( Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Addition operator - adds offset of rhs of rhs relative to Begin() to lhs and returns lhs.

◆ operator- [1/2]

Mesh::Iterator operator- ( const Mesh::Iterator lhs,
const int &  rhs 
)
friend

Subtraction operator - subtracts from lhs and returns copy of lhs.

◆ operator- [2/2]

Mesh::Iterator operator- ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Subtraction operator - subtracts offset of rhs relative to Begin() from lhs.

◆ operator-- [1/2]

Mesh::Iterator & operator-- ( Mesh::Iterator lhs)
friend

Prefix decrement operator –it retreats iterator by one

◆ operator-- [2/2]

Mesh::Iterator operator-- ( Mesh::Iterator lhs,
int   
)
friend

Postfix decrement operator it– retreats iterator by one.

◆ operator-= [1/2]

Mesh::Iterator & operator-= ( Mesh::Iterator lhs,
const int &  rhs 
)
friend

Subtraction operator - subtracts rhs from lhs and returns lhs.

◆ operator-= [2/2]

Mesh::Iterator & operator-= ( Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Subtraction operator - subtracts offset of rhs relative to Begin() from lhs and returns lhs.

◆ operator<

bool operator< ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs indexes a position less than rhs i.e.

successive operation of decrement operator would eventually reach lhs

◆ operator<=

bool operator<= ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs indexes a position less than or equal to rhs i.e.

successive operation of decrement operator would eventually reach lhs

◆ operator==

bool operator== ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs indexes the same position as rhs.

◆ operator>

bool operator> ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs indexes a position greater than rhs i.e.

successive operation of increment operator would eventually reach lhs

◆ operator>=

bool operator>= ( const Mesh::Iterator lhs,
const Mesh::Iterator rhs 
)
friend

Return true if lhs indexes a position greater than or equal to rhs i.e.

successive operation of increment operator would eventually reach lhs


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