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

#include <TwoDGrid.h>

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

Public Member Functions

MeshClone ()
 
MeshDual ()
 
 NDGrid ()
 ////// NDGrid /////// More...
 
 NDGrid (int nDimensions, int *size, double *spacing, double *min)
 
 NDGrid (std::vector< int > size, std::vector< const double * > gridCoordinates)
 
 NDGrid (std::vector< std::vector< double > > gridCoordinates)
 
 ~NDGrid ()
 
double & coord (const int &index, const int &dimension)
 
const double & coord (const int &index, const int &dimension) const
 
int size (const int &dimension) const
 
std::vector< double > coordVector (const int &dimension) const
 
double * newCoordArray (const int &dimension) const
 
void coordLowerBound (const double &x, const int &dimension, int &xIndex) const
 
void LowerBound (const std::vector< double > &pos, std::vector< int > &xIndex) const
 
double Min (const int &dimension) const
 
double Max (const int &dimension) const
 
void SetCoord (int dimension, int nCoords, double *x)
 
Mesh::Iterator Begin () const
 
Mesh::Iterator End () const
 
void Position (const Mesh::Iterator &it, double *position) const
 
int PositionDimension () const
 
bool GetConstantSpacing () const
 
void SetConstantSpacing (bool spacing)
 
void SetConstantSpacing ()
 
int ToInteger (const Mesh::Iterator &lhs) 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

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

Private Attributes

std::vector< std::vector
< double > > 
_coord
 
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)
 
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 121 of file TwoDGrid.h.

Constructor & Destructor Documentation

NDGrid::NDGrid ( )

////// NDGrid ///////

Definition at line 164 of file TwoDGrid.cpp.

References _coord.

Referenced by Clone().

NDGrid::NDGrid ( int  nDimensions,
int *  size,
double *  spacing,
double *  min 
)

Definition at line 182 of file TwoDGrid.cpp.

References _coord.

NDGrid::NDGrid ( std::vector< int >  size,
std::vector< const double * >  gridCoordinates 
)

Definition at line 171 of file TwoDGrid.cpp.

References _coord, and SetConstantSpacing().

Here is the call graph for this function:

NDGrid::NDGrid ( std::vector< std::vector< double > >  gridCoordinates)

Definition at line 192 of file TwoDGrid.cpp.

References SetConstantSpacing(), and size().

Here is the call graph for this function:

NDGrid::~NDGrid ( )
inline

Definition at line 133 of file TwoDGrid.h.

Member Function Documentation

Mesh::Iterator & NDGrid::AddEquals ( Mesh::Iterator &  lhs,
int  difference 
) const
protectedvirtual

Definition at line 209 of file TwoDGrid.cpp.

References _coord, size(), and SubEquals().

Referenced by AddEquals(), and SubEquals().

Here is the call graph for this function:

Mesh::Iterator & NDGrid::AddEquals ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protectedvirtual

Definition at line 256 of file TwoDGrid.cpp.

References AddEquals().

Here is the call graph for this function:

Mesh::Iterator & NDGrid::AddOne ( Mesh::Iterator &  lhs) const
protectedvirtual

Definition at line 266 of file TwoDGrid.cpp.

References _coord, and size().

Here is the call graph for this function:

Mesh::Iterator NDGrid::Begin ( ) const
inline

Definition at line 157 of file TwoDGrid.h.

References _coord.

Mesh* NDGrid::Clone ( )
inline

Definition at line 126 of file TwoDGrid.h.

References NDGrid().

Here is the call graph for this function:

double& NDGrid::coord ( const int &  index,
const int &  dimension 
)
inline

Definition at line 136 of file TwoDGrid.h.

References _coord.

const double& NDGrid::coord ( const int &  index,
const int &  dimension 
) const
inline

Definition at line 137 of file TwoDGrid.h.

References _coord.

void NDGrid::coordLowerBound ( const double &  x,
const int &  dimension,
int &  xIndex 
) const
inline

Definition at line 144 of file TwoDGrid.h.

References _constantSpacing, _coord, and floor().

Referenced by LowerBound().

Here is the call graph for this function:

std::vector<double> NDGrid::coordVector ( const int &  dimension) const
inline

Definition at line 139 of file TwoDGrid.h.

References _coord.

Mesh* NDGrid::Dual ( )
inline

Definition at line 127 of file TwoDGrid.h.

Mesh::Iterator NDGrid::End ( ) const
inline

Definition at line 158 of file TwoDGrid.h.

References _coord.

bool NDGrid::GetConstantSpacing ( ) const
inline

Definition at line 163 of file TwoDGrid.h.

References _constantSpacing.

bool NDGrid::IsGreater ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protectedvirtual

Definition at line 297 of file TwoDGrid.cpp.

void NDGrid::LowerBound ( const std::vector< double > &  pos,
std::vector< int > &  xIndex 
) const
inline

Definition at line 150 of file TwoDGrid.h.

References coordLowerBound().

Referenced by Nearest().

Here is the call graph for this function:

double NDGrid::Max ( const int &  dimension) const
inline

Definition at line 153 of file TwoDGrid.h.

References _coord.

double NDGrid::Min ( const int &  dimension) const
inline

Definition at line 152 of file TwoDGrid.h.

References _coord.

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

Definition at line 315 of file TwoDGrid.cpp.

References _coord, LowerBound(), and size().

Here is the call graph for this function:

double * NDGrid::newCoordArray ( const int &  dimension) const

Definition at line 200 of file TwoDGrid.cpp.

References _coord.

void NDGrid::Position ( const Mesh::Iterator &  it,
double *  position 
) const
inline

Definition at line 160 of file TwoDGrid.h.

References _coord.

int NDGrid::PositionDimension ( ) const
inline

Definition at line 161 of file TwoDGrid.h.

References _coord.

void NDGrid::SetConstantSpacing ( bool  spacing)
inline

Definition at line 164 of file TwoDGrid.h.

References _constantSpacing.

void NDGrid::SetConstantSpacing ( )

Definition at line 288 of file TwoDGrid.cpp.

References _constantSpacing, _coord, Physics::e, and fabs().

Referenced by NDGrid().

Here is the call graph for this function:

void NDGrid::SetCoord ( int  dimension,
int  nCoords,
double *  x 
)
inline

Definition at line 155 of file TwoDGrid.h.

References _coord.

int NDGrid::size ( const int &  dimension) const
inline

Definition at line 138 of file TwoDGrid.h.

References _coord.

Referenced by AddEquals(), AddOne(), NDGrid(), Nearest(), SubEquals(), and ToInteger().

Mesh::Iterator & NDGrid::SubEquals ( Mesh::Iterator &  lhs,
int  difference 
) const
protectedvirtual

Definition at line 233 of file TwoDGrid.cpp.

References _coord, AddEquals(), and size().

Referenced by AddEquals(), and SubEquals().

Here is the call graph for this function:

Mesh::Iterator & NDGrid::SubEquals ( Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
) const
protectedvirtual

Definition at line 261 of file TwoDGrid.cpp.

References SubEquals().

Here is the call graph for this function:

Mesh::Iterator & NDGrid::SubOne ( Mesh::Iterator &  lhs) const
protectedvirtual

Definition at line 274 of file TwoDGrid.cpp.

References _coord.

int NDGrid::ToInteger ( const Mesh::Iterator &  lhs) const

Definition at line 304 of file TwoDGrid.cpp.

References _coord, and size().

Here is the call graph for this function:

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++ ( 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- ( const Mesh::Iterator &  lhs,
const Mesh::Iterator &  rhs 
)
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
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 NDGrid::_constantSpacing
private

Definition at line 184 of file TwoDGrid.h.

Referenced by coordLowerBound(), GetConstantSpacing(), and SetConstantSpacing().

std::vector< std::vector<double> > NDGrid::_coord
private
std::vector<VectorMap*> NDGrid::_maps
private

Definition at line 183 of file TwoDGrid.h.


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