SpatialOps
SpatialOps::Grid Class Reference

Provides a simple interface to set coordinate fields. More...

#include <Grid.h>

Public Member Functions

 Grid (const IntVec &npts, const DoubleVec length, const DoubleVec origin=DoubleVec(0, 0, 0))
 
template<typename CoordT >
double spacing () const
 obtain the grid spacing in the requested direction
 
template<typename CoordT , typename FieldT >
void set_coord (FieldT &f) const
 set the coordinates on the given field. More...
 

Detailed Description

Provides a simple interface to set coordinate fields.

Author
James C. Sutherland

Definition at line 36 of file Grid.h.

Constructor & Destructor Documentation

◆ Grid()

SpatialOps::Grid::Grid ( const IntVec npts,
const DoubleVec  length,
const DoubleVec  origin = DoubleVec(0,0,0) 
)
Parameters
nptsthe number of scalar volume cells in each direction
lengththe domain length in each direction
originthe origin of the domain (defaults to 0,0,0)

Definition at line 36 of file Grid.cpp.

Member Function Documentation

◆ set_coord()

template<typename CoordT , typename FieldT >
template void SpatialOps::Grid::set_coord< ZDIR, VertexField > ( FieldT &  f) const

set the coordinates on the given field.

Examples:

SVolField xsvol, ysvol;
grid.set_coord<XDIR>( xsvol );
grid.set_coord<YDIR>( ysvol );
XSurfYField xxsy, zxsy;
grid.set_coord<XDIR>( xxsy );
grid.set_coord<ZDIR>( zxsy );

Definition at line 61 of file Grid.cpp.


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