Schnek
schnek::Field< T, rank, CheckingPolicy, StoragePolicy > Class Template Reference
Inheritance diagram for schnek::Field< T, rank, CheckingPolicy, StoragePolicy >:
Collaboration diagram for schnek::Field< T, rank, CheckingPolicy, StoragePolicy >:

Public Types

typedef T value_type
 
typedef Range< double, rank > RangeType
 
typedef Range< double, rank >::LimitType RangeLimit
 
typedef Array< bool, rank > Stagger
 
typedef Grid< T, rank, CheckingPolicy, StoragePolicy >::IndexType IndexType
 
typedef Field< T, rank, CheckingPolicy, StoragePolicy > FieldType
 
typedef GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > BaseType
 
- Public Types inherited from schnek::Grid< T, rank, CheckingPolicy, StoragePolicy >
enum  { Rank = rank }
 
typedef T value_type
 
typedef Array< int, rank > IndexType
 
typedef Range< int, rank > RangeType
 
typedef Grid< T, rank, CheckingPolicy, StoragePolicy > GridType
 
typedef GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > BaseType
 
- Public Types inherited from schnek::GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > >
enum  
 
typedef T value_type
 
typedef CheckingPolicy< rank > CheckingPolicyType
 
typedef StoragePolicy< T, rank > StoragePolicyType
 
typedef CheckingPolicy< rank > ::IndexType IndexType
 
typedef GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > GridBaseType
 

Public Member Functions

 Field ()
 
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
 Field (const Array< int, rank, ArrayCheckingPolicy > &size, const Range< double, rank, RangeCheckingPolicy > &range_, const Array< bool, rank, StaggerCheckingPolicy > &stagger_, int ghostCells_)
 
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
 Field (const Array< int, rank, ArrayCheckingPolicy > &low_, const Array< int, rank, ArrayCheckingPolicy > &high_, const Range< double, rank, RangeCheckingPolicy > &range_, const Array< bool, rank, StaggerCheckingPolicy > &stagger_, int ghostCells_)
 
 Field (const FieldType &)
 
IndexType getInnerLo ()
 
IndexType getInnerHi ()
 
void positionToIndex (int dim, double pos, int &index, double &offset)
 
int positionToIndex (int dim, double pos)
 
double indexToPosition (int dim, int index)
 Calculates the position of a grid point.
 
StaggergetStagger ()
 Get all three components of the grid stagger.
 
bool getStagger (int i)
 Get a single component of the grid stagger.
 
FieldTypeoperator= (const T &val)
 
FieldTypeoperator= (const FieldType &grid)
 
template<typename T2 , template< int > class CheckingPolicy2, template< typename, int > class StoragePolicy2>
FieldTypeoperator= (const Field< T2, rank, CheckingPolicy2, StoragePolicy2 > &grid)
 
template<typename T2 , class CheckingPolicy2 , class StoragePolicy2 >
FieldTypeoperator= (const GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &grid)
 
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
void resize (const Array< int, rank, ArrayCheckingPolicy > &size, const Range< double, rank, RangeCheckingPolicy > &range_, const Array< bool, rank, StaggerCheckingPolicy > &stagger_, int ghostCells_)
 
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
void resize (const Array< int, rank, ArrayCheckingPolicy > &low_, const Array< int, rank, ArrayCheckingPolicy > &high_, const Range< double, rank, RangeCheckingPolicy > &range_, const Array< bool, rank, StaggerCheckingPolicy > &stagger_, int ghostCells_)
 
- Public Member Functions inherited from schnek::Grid< T, rank, CheckingPolicy, StoragePolicy >
 Grid ()
 
 Grid (const IndexType &size)
 
 Grid (const IndexType &low, const IndexType &high)
 
 Grid (const RangeType &range)
 
 Grid (const Grid< T, rank, CheckingPolicy, StoragePolicy > &)
 
GridTypeoperator= (const T &val)
 
GridTypeoperator= (const GridType &grid)
 
template<typename T2 , class CheckingPolicy2 , class StoragePolicy2 >
GridTypeoperator= (const GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &grid)
 
- Public Member Functions inherited from schnek::GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > >
 GridBase (const Array< int, rank, ArrayCheckingPolicy > &size)
 
 GridBase (const Array< int, rank, ArrayCheckingPolicy > &low, const Array< int, rank, ArrayCheckingPolicy > &high)
 
T & operator[] (const Array< int, rank, ArrayCheckingPolicy > &pos)
 
operator[] (const Array< int, rank, ArrayCheckingPolicy > &pos) const
 
T & operator[] (const ArrayExpression< Operator, Length > &pos)
 
operator[] (const ArrayExpression< Operator, Length > &pos) const
 
T & operator[] (int i)
 
operator[] (int i) const
 
T & operator() (int i)
 
operator() (int i) const
 
T & operator() (int i, int j)
 
operator() (int i, int j) const
 
T & operator() (int i, int j, int k)
 
operator() (int i, int j, int k) const
 
T & operator() (int i, int j, int k, int l)
 
operator() (int i, int j, int k, int l) const
 
T & operator() (int i, int j, int k, int l, int m)
 
operator() (int i, int j, int k, int l, int m) const
 
T & operator() (int i, int j, int k, int l, int m, int o)
 
operator() (int i, int j, int k, int l, int m, int o) const
 
T & operator() (int i, int j, int k, int l, int m, int o, int p)
 
operator() (int i, int j, int k, int l, int m, int o, int p) const
 
T & operator() (int i, int j, int k, int l, int m, int o, int p, int q)
 
operator() (int i, int j, int k, int l, int m, int o, int p, int q) const
 
T & operator() (int i, int j, int k, int l, int m, int o, int p, int q, int r)
 
operator() (int i, int j, int k, int l, int m, int o, int p, int q, int r) const
 
T & operator() (int i, int j, int k, int l, int m, int o, int p, int q, int r, int s)
 
operator() (int i, int j, int k, int l, int m, int o, int p, int q, int r, int s) const
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator= (const GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > &)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator= (const GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator= (const T &val)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator-= (GridBase< T2, rank, CheckingPolicy2, StoragePolicy< T, rank > > &)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator-= (GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator+= (GridBase< T2, rank, CheckingPolicy2, StoragePolicy< T, rank > > &)
 
GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > > & operator+= (GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &)
 
void resize (const IndexType &size)
 
void resize (const IndexType &low, const IndexType &high)
 
void resize (const GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &grid)
 

Additional Inherited Members

- Protected Member Functions inherited from schnek::GridBase< T, rank, CheckingPolicy< rank >, StoragePolicy< T, rank > >
void copyFromGrid (const GridBase< T2, rank, CheckingPolicy2, StoragePolicy< T, rank > > &grid)
 

Constructor & Destructor Documentation

◆ Field() [1/3]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::Field ( )

default constructor creates an empty grid

◆ Field() [2/3]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::Field ( const Array< int, rank, ArrayCheckingPolicy > &  size,
const Range< double, rank, RangeCheckingPolicy > &  range_,
const Array< bool, rank, StaggerCheckingPolicy > &  stagger_,
int  ghostCells_ 
)

Constructs a grid with a given number of cells in each direction

◆ Field() [3/3]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::Field ( const FieldType )

copy constructor

Member Function Documentation

◆ getInnerHi()

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
IndexType schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::getInnerHi ( )
inline

Get the hi if the inner domain

◆ getInnerLo()

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
IndexType schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::getInnerLo ( )
inline

Get the lo if the inner domain

◆ operator=() [1/4]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
FieldType& schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::operator= ( const T &  val)
inline

assign a value to the field

◆ operator=() [2/4]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
FieldType& schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::operator= ( const FieldType grid)
inline

assign another grid

◆ operator=() [3/4]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
template<typename T2 , template< int > class CheckingPolicy2, template< typename, int > class StoragePolicy2>
FieldType& schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::operator= ( const Field< T2, rank, CheckingPolicy2, StoragePolicy2 > &  grid)
inline

assign another grid

◆ operator=() [4/4]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
template<typename T2 , class CheckingPolicy2 , class StoragePolicy2 >
FieldType& schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::operator= ( const GridBase< T2, rank, CheckingPolicy2, StoragePolicy2 > &  grid)
inline

assign another grid

◆ positionToIndex() [1/2]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
void schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::positionToIndex ( int  dim,
double  pos,
int &  index,
double &  offset 
)

Calculates index and offset from a position on the field

The index returned is the index of the grid point left of the position.

◆ positionToIndex() [2/2]

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
int schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::positionToIndex ( int  dim,
double  pos 
)

Calculates index from a position on the field

The index returned is the index of the grid point left of the position.

◆ resize()

template<typename T, int rank, template< int > class CheckingPolicy = GridNoArgCheck, template< typename, int > class StoragePolicy = SingleArrayGridStorage>
template<template< int > class ArrayCheckingPolicy, template< int > class RangeCheckingPolicy, template< int > class StaggerCheckingPolicy>
void schnek::Field< T, rank, CheckingPolicy, StoragePolicy >::resize ( const Array< int, rank, ArrayCheckingPolicy > &  size,
const Range< double, rank, RangeCheckingPolicy > &  range_,
const Array< bool, rank, StaggerCheckingPolicy > &  stagger_,
int  ghostCells_ 
)

Constructs a grid with a given number of cells in each direction


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