FEMSuite
Public Member Functions | Protected Attributes | List of all members
Grid Class Referenceabstract

Generic Grid Class More...

#include <Grid.h>

Inheritance diagram for Grid:
Inheritance graph
[legend]

Public Member Functions

template<class S , typename... Args>
std::shared_ptr< S > AddSource (Args...args)
 Creates a new source instance More...
 
GridIndex ToGridIndex (const Address address) const
 
GridIndex ToGridIndex (const Point< Spatial > &point) const
 
Point< Spatial > ToPoint (GridIndex gridIndex) const
 
Address ToAddress (const GridIndex &gridIndex) const
 
virtual DimensionArray< Spatial > GetSpatialSteps () const =0
 Retreives the calculated dimensions of every voxel in the problem space More...
 
virtual DimensionArray< PointExtentsGetSpatialExtents () const =0
 Retreives the calculated dimensions of every voxel in the problem space More...
 
virtual std::shared_ptr< BoundaryGetBoundaryById (const BoundaryId id)
 
Returns
Boundary given a boundary id

 
virtual std::shared_ptr< BoundaryGetBoundaryByAddress (const Address address)
 
Returns
Boundary given an address

 
BoundaryId GetBoundaryId (const Address address)
 
Returns
Boundary Id given an address

 
template<class B >
std::shared_ptr< BoundaryAddBoundary ()
 Creates a new boundary instance More...
 
std::vector< std::shared_ptr< Boundary > > & GetBoundaries ()
 Retrieves all boundaries More...
 
Spatial GetLowestLength (const size_t dimension) const
 
Returns
Lowest length in a specific dimension

 
Spatial GetHighestLength (const size_t dimension) const
 
Returns
Highest length in a specific dimension

 
DimensionArray< Spatial > GetHighestLengths () const
 
Returns
Highest lengths for all dimensions

 
unsigned int GetSize (const size_t dimension) const
 
Returns
Grid size for a given dimension

 
DimensionArray< size_t > GetSizes () const
 
Returns
All grid sizes

 
size_t GetSizeProduct ()
 
Returns
trace/prod GetGridSizes

 
void SetSizes (const GridIndex &sizes)
 Sets all grid sizes More...
 
void SetSizes (const DimensionArray< Spatial > &)
 Sets all grid sizes from a spatial array. More...
 
virtual PMLWidth GetPMLWidth (const size_t dimension) const =0
 

Protected Attributes

std::vector< std::shared_ptr< Source > > m_Sources
 Stores all sources More...
 
std::vector< std::shared_ptr< Boundary > > m_Boundaries
 Stores all boundaries More...
 
std::vector< BoundaryId > m_BoundaryAddressMap
 Associates boundaries with addresses More...
 
DimensionArray< size_t > m_Sizes
 Holds all sizes More...
 

Detailed Description

Generic Grid Class

Member Function Documentation

template<class B >
std::shared_ptr<Boundary> Grid::AddBoundary ( )
inline

Creates a new boundary instance

template<class S , typename... Args>
std::shared_ptr<S> Grid::AddSource ( Args...  args)
inline

Creates a new source instance

std::vector<std::shared_ptr<Boundary> >& Grid::GetBoundaries ( )
inline

Retrieves all boundaries

virtual DimensionArray< PointExtents > Grid::GetSpatialExtents ( ) const
pure virtual

Retreives the calculated dimensions of every voxel in the problem space

Implemented in Yee.

virtual DimensionArray< Spatial > Grid::GetSpatialSteps ( ) const
pure virtual

Retreives the calculated dimensions of every voxel in the problem space

Implemented in Yee.

void Grid::SetSizes ( const GridIndex sizes)

Sets all grid sizes

void Grid::SetSizes ( const DimensionArray< Spatial > &  sizes)

Sets all grid sizes from a spatial array.

Point Grid::ToPoint ( GridIndex  gridIndex) const

This doesn't take a const GridIndex& on purpose.

Member Data Documentation

std::vector<std::shared_ptr<Boundary> > Grid::m_Boundaries
protected

Stores all boundaries

std::vector<BoundaryId> Grid::m_BoundaryAddressMap
protected

Associates boundaries with addresses

<TODO>If a CoversAddres is feasible, that should be used instead</TODO> <TODO>Upon creation, each boindary should be given access to this member to identify itself as the "coverer" of those addresses as required</TODO>

DimensionArray< size_t > Grid::m_Sizes
protected

Holds all sizes

std::vector<std::shared_ptr<Source> > Grid::m_Sources
protected

Stores all sources


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