OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
TwoDGrid Class Reference

#include <TwoDGrid.h>

Inheritance diagram for TwoDGrid:
Inheritance graph
[legend]
Collaboration diagram for TwoDGrid:
Collaboration graph
[legend]

Public Member Functions

MeshClone ()
 
MeshDual ()
 
 TwoDGrid ()
 
 TwoDGrid (double dX, double dY, double minX, double minY, int numberOfXCoords, int numberOfYCoords)
 
 TwoDGrid (int xSize, const double *x, int ySize, const double *y)
 
 TwoDGrid (std::vector< double > x, std::vector< double > y)
 
 ~TwoDGrid ()
 
double & x (const int &i)
 
double & y (const int &j)
 
const double & x (const int &i) const
 
const double & y (const int &j) const
 
int xSize () const
 
int ySize () const
 
std::vector< double > xVector ()
 
std::vector< double > yVector ()
 
double * newXArray ()
 
double * newYArray ()
 
void xLowerBound (const double &x, int &xIndex) const
 
void yLowerBound (const double &y, int &yIndex) const
 
void LowerBound (const double &x, int &xIndex, const double &y, int &yIndex) const
 
double MinX () const
 
double MaxX () const
 
double MinY () const
 
double MaxY () const
 
void Add (VectorMap *map)
 
void Remove (VectorMap *map)
 
void SetX (int nXCoords, double *x)
 
void SetY (int nYCoords, double *y)
 
Mesh::Iterator Begin () const
 
Mesh::Iterator End () const
 
virtual void Position (const Mesh::Iterator &it, double *position) const
 
virtual void CentrePosition (const Mesh::Iterator &it, double *position) const
 
int PositionDimension () const
 
int ToInteger (const Mesh::Iterator &lhs) const
 
void SetConstantSpacing (bool spacing)
 
void SetConstantSpacing ()
 
bool GetConstantSpacing () const
 
Mesh::Iterator Nearest (const double *position) const
 
- Public Member Functions inherited from Mesh< Dim >
 Mesh ()
 
virtual ~Mesh ()
 
ID_t get_Id () const
 
void checkin (FieldLayoutUser &f)
 
void checkout (FieldLayoutUser &f)
 
size_type_if size_if () const
 
iterator_if begin_if ()
 
iterator_if end_if ()
 
void notifyOfChange ()
 

Protected Member Functions

Mesh::Iterator & AddEquals (Mesh::Iterator &lhs, int difference) const
 
Mesh::Iterator & SubEquals (Mesh::Iterator &lhs, int difference) const
 
Mesh::Iterator & AddEquals (Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const
 
Mesh::Iterator & SubEquals (Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const
 
Mesh::Iterator & AddOne (Mesh::Iterator &lhs) const
 
Mesh::Iterator & SubOne (Mesh::Iterator &lhs) const
 
bool IsGreater (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const
 

Private Attributes

std::vector< double > _x
 
std::vector< double > _y
 
int _xSize
 
int _ySize
 
std::vector< VectorMap * > _maps
 
bool _constantSpacing
 

Friends

Mesh::Iterator operator++ (Mesh::Iterator &lhs, int)
 
Mesh::Iterator operator-- (Mesh::Iterator &lhs, int)
 
Mesh::Iterator & operator++ (Mesh::Iterator &lhs)
 
Mesh::Iterator & operator-- (Mesh::Iterator &lhs)
 
Mesh::Iterator operator- (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
Mesh::Iterator operator+ (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
Mesh::Iterator & operator-= (Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
Mesh::Iterator & operator+= (Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
Mesh::Iterator operator- (const Mesh::Iterator &, const int &)
 
Mesh::Iterator operator+ (const Mesh::Iterator &, const int &)
 
Mesh::Iterator & operator-= (Mesh::Iterator &, const int &)
 
Mesh::Iterator & operator+= (Mesh::Iterator &, const int &)
 
bool operator== (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
bool operator!= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
bool operator>= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
bool operator<= (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
bool operator< (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 
bool operator> (const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
 

Additional Inherited Members

- Public Types inherited from Mesh< Dim >
enum  { Dimension = Dim }
 
typedef UserList::ID_t ID_t
 
typedef iterator_user iterator_if
 
typedef size_type_user size_type_if
 
- Static Public Attributes inherited from Mesh< Dim >
static std::string MeshBC_E_Names [3] = {"Reflective","Periodic ","No BC "}
 

Detailed Description

Definition at line 15 of file TwoDGrid.h.

Constructor & Destructor Documentation

TwoDGrid::TwoDGrid ( )

Definition at line 8 of file TwoDGrid.cpp.

References _x, and _y.

Referenced by Clone().

TwoDGrid::TwoDGrid ( double  dX,
double  dY,
double  minX,
double  minY,
int  numberOfXCoords,
int  numberOfYCoords 
)

Definition at line 13 of file TwoDGrid.cpp.

References _x, _y, and SetConstantSpacing().

Here is the call graph for this function:

TwoDGrid::TwoDGrid ( int  xSize,
const double *  x,
int  ySize,
const double *  y 
)

Definition at line 22 of file TwoDGrid.cpp.

References SetConstantSpacing(), x(), and y().

Here is the call graph for this function:

TwoDGrid::TwoDGrid ( std::vector< double >  x,
std::vector< double >  y 
)

Definition at line 30 of file TwoDGrid.cpp.

References _xSize, _ySize, and SetConstantSpacing().

Here is the call graph for this function:

TwoDGrid::~TwoDGrid ( )

Definition at line 36 of file TwoDGrid.cpp.

Member Function Documentation

void TwoDGrid::Add ( VectorMap *  map)

Definition at line 123 of file TwoDGrid.cpp.

References _maps, and Expressions::find().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::AddEquals ( Mesh::Iterator &  lhs,
int  difference 
) const
protected

Definition at line 67 of file TwoDGrid.cpp.

References _ySize, and SubEquals().

Referenced by AddEquals(), and SubEquals().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::AddEquals ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protected

Definition at line 85 of file TwoDGrid.cpp.

References AddEquals().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::AddOne ( Mesh::Iterator &  lhs) const
protected

Definition at line 95 of file TwoDGrid.cpp.

Mesh::Iterator TwoDGrid::Begin ( ) const

Definition at line 40 of file TwoDGrid.cpp.

void TwoDGrid::CentrePosition ( const Mesh::Iterator &  it,
double *  position 
) const
virtual

Definition at line 56 of file TwoDGrid.cpp.

References MaxX(), MaxY(), MinX(), MinY(), x(), xSize(), y(), and ySize().

Here is the call graph for this function:

Mesh* TwoDGrid::Clone ( )
inline

Definition at line 20 of file TwoDGrid.h.

References TwoDGrid().

Here is the call graph for this function:

Mesh* TwoDGrid::Dual ( )
inline

Definition at line 21 of file TwoDGrid.h.

Mesh::Iterator TwoDGrid::End ( ) const

Definition at line 45 of file TwoDGrid.cpp.

References _xSize.

bool TwoDGrid::GetConstantSpacing ( ) const
inline

Definition at line 73 of file TwoDGrid.h.

References _constantSpacing.

bool TwoDGrid::IsGreater ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protected

Definition at line 109 of file TwoDGrid.cpp.

void TwoDGrid::LowerBound ( const double &  x,
int &  xIndex,
const double &  y,
int &  yIndex 
) const
inline

Definition at line 48 of file TwoDGrid.h.

References xLowerBound(), and yLowerBound().

Referenced by Nearest().

Here is the call graph for this function:

double TwoDGrid::MaxX ( ) const
inline

Definition at line 52 of file TwoDGrid.h.

References _x, and _xSize.

Referenced by CentrePosition().

double TwoDGrid::MaxY ( ) const
inline

Definition at line 54 of file TwoDGrid.h.

References _y, and _ySize.

Referenced by CentrePosition().

double TwoDGrid::MinX ( ) const
inline

Definition at line 51 of file TwoDGrid.h.

References _x.

Referenced by CentrePosition().

double TwoDGrid::MinY ( ) const
inline

Definition at line 53 of file TwoDGrid.h.

References _y.

Referenced by CentrePosition().

Mesh::Iterator TwoDGrid::Nearest ( const double *  position) const

Definition at line 140 of file TwoDGrid.cpp.

References _x, _xSize, _y, _ySize, and LowerBound().

Here is the call graph for this function:

double* TwoDGrid::newXArray ( )
inline

Definition at line 39 of file TwoDGrid.h.

References _x, and x().

Here is the call graph for this function:

double* TwoDGrid::newYArray ( )
inline

Definition at line 40 of file TwoDGrid.h.

References _y, and y().

Here is the call graph for this function:

void TwoDGrid::Position ( const Mesh::Iterator &  it,
double *  position 
) const
virtual

Definition at line 50 of file TwoDGrid.cpp.

References x(), and y().

Here is the call graph for this function:

int TwoDGrid::PositionDimension ( ) const
inline

Definition at line 68 of file TwoDGrid.h.

void TwoDGrid::Remove ( VectorMap *  map)

Definition at line 116 of file TwoDGrid.cpp.

References _maps, and Expressions::find().

Here is the call graph for this function:

void TwoDGrid::SetConstantSpacing ( bool  spacing)
inline

Definition at line 71 of file TwoDGrid.h.

References _constantSpacing.

void TwoDGrid::SetConstantSpacing ( )

Definition at line 129 of file TwoDGrid.cpp.

References _constantSpacing, _x, _y, Physics::e, and fabs().

Referenced by TwoDGrid().

Here is the call graph for this function:

void TwoDGrid::SetX ( int  nXCoords,
double *  x 
)
inline

Definition at line 59 of file TwoDGrid.h.

References _x, and x().

Here is the call graph for this function:

void TwoDGrid::SetY ( int  nYCoords,
double *  y 
)
inline

Definition at line 60 of file TwoDGrid.h.

References _y, and y().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::SubEquals ( Mesh::Iterator &  lhs,
int  difference 
) const
protected

Definition at line 76 of file TwoDGrid.cpp.

References _ySize, and AddEquals().

Referenced by AddEquals(), and SubEquals().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::SubEquals ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protected

Definition at line 90 of file TwoDGrid.cpp.

References SubEquals().

Here is the call graph for this function:

Mesh::Iterator & TwoDGrid::SubOne ( Mesh::Iterator &  lhs) const
protected

Definition at line 102 of file TwoDGrid.cpp.

References ySize().

Here is the call graph for this function:

int TwoDGrid::ToInteger ( const Mesh::Iterator &  lhs) const
inline

Definition at line 69 of file TwoDGrid.h.

References _ySize.

double& TwoDGrid::x ( const int &  i)
inline

Definition at line 29 of file TwoDGrid.h.

References _x.

Referenced by CentrePosition(), newXArray(), Position(), SetX(), TwoDGrid(), and xLowerBound().

const double& TwoDGrid::x ( const int &  i) const
inline

Definition at line 31 of file TwoDGrid.h.

References _x.

void TwoDGrid::xLowerBound ( const double &  x,
int &  xIndex 
) const
inline

Definition at line 44 of file TwoDGrid.h.

References _constantSpacing, _x, floor(), and x().

Referenced by LowerBound().

Here is the call graph for this function:

int TwoDGrid::xSize ( ) const
inline

Definition at line 33 of file TwoDGrid.h.

References _x.

Referenced by CentrePosition().

std::vector<double> TwoDGrid::xVector ( )
inline

Definition at line 36 of file TwoDGrid.h.

References _x.

double& TwoDGrid::y ( const int &  j)
inline

Definition at line 30 of file TwoDGrid.h.

References _y.

Referenced by CentrePosition(), newYArray(), Position(), SetY(), TwoDGrid(), and yLowerBound().

const double& TwoDGrid::y ( const int &  j) const
inline

Definition at line 32 of file TwoDGrid.h.

References _y.

void TwoDGrid::yLowerBound ( const double &  y,
int &  yIndex 
) const
inline

Definition at line 46 of file TwoDGrid.h.

References _constantSpacing, _y, floor(), and y().

Referenced by LowerBound().

Here is the call graph for this function:

int TwoDGrid::ySize ( ) const
inline

Definition at line 34 of file TwoDGrid.h.

References _y.

Referenced by CentrePosition(), and SubOne().

std::vector<double> TwoDGrid::yVector ( )
inline

Definition at line 37 of file TwoDGrid.h.

References _y.

Friends And Related Function Documentation

bool operator!= ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
Mesh::Iterator operator+ ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
Mesh::Iterator operator+ ( const Mesh::Iterator &  ,
const int &   
)
friend
Mesh::Iterator operator++ ( Mesh::Iterator &  lhs,
int   
)
friend
Mesh::Iterator& operator++ ( Mesh::Iterator &  lhs)
friend
Mesh::Iterator& operator+= ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
Mesh::Iterator& operator+= ( Mesh::Iterator &  ,
const int &   
)
friend
Mesh::Iterator operator- ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
Mesh::Iterator operator- ( const Mesh::Iterator &  ,
const int &   
)
friend
Mesh::Iterator operator-- ( Mesh::Iterator &  lhs,
int   
)
friend
Mesh::Iterator& operator-- ( Mesh::Iterator &  lhs)
friend
Mesh::Iterator& operator-= ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
Mesh::Iterator& operator-= ( Mesh::Iterator &  ,
const int &   
)
friend
bool operator< ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
bool operator<= ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
bool operator== ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
bool operator> ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend
bool operator>= ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
friend

Member Data Documentation

bool TwoDGrid::_constantSpacing
private

Definition at line 95 of file TwoDGrid.h.

Referenced by GetConstantSpacing(), SetConstantSpacing(), xLowerBound(), and yLowerBound().

std::vector<VectorMap*> TwoDGrid::_maps
private

Definition at line 94 of file TwoDGrid.h.

Referenced by Add(), and Remove().

std::vector<double> TwoDGrid::_x
private
int TwoDGrid::_xSize
private

Definition at line 92 of file TwoDGrid.h.

Referenced by End(), MaxX(), Nearest(), and TwoDGrid().

std::vector<double> TwoDGrid::_y
private
int TwoDGrid::_ySize
private

Definition at line 93 of file TwoDGrid.h.

Referenced by AddEquals(), MaxY(), Nearest(), SubEquals(), ToInteger(), and TwoDGrid().


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