Public Member Functions | Static Public Member Functions | List of all members
CamAdaptor::Grid< gridType > Class Template Reference

Creates and accumulates data for a 2D and a 3D grid. More...

#include <Grid.h>

Public Member Functions

 Grid ()
 
 ~Grid ()
 Deletes data used to build the grids. More...
 
void Create ()
 Creates a 2D and a 3D grid. More...
 
void SetMpiRank (int rank)
 
void SetChunkCapacity (int capacity)
 
void SetNCells2d (int ncells)
 
void SetNLon (int nlon)
 
void SetNLat (int nlat)
 
void SetLev (int nlev, double *lev)
 
void AddPointsAndCells (double lonRad, double latRad)
 Adds the points and the cells for a vertical column to the grid. More...
 
void SetAttributeValue (int chunkSize, double *lonRad, double *latRad, double *psScalar, double *tScalar, double *uScalar, double *vScalar)
 Sets attributes for a chunk (a list of vertical columns) to the 2D and 3D grids. More...
 
vtkSmartPointer< vtkUnstructuredGridGetGrid2d () const
 Returns the 2D grid. More...
 
vtkSmartPointer< vtkUnstructuredGridGetGrid3d () const
 Returns the 3D grid. More...
 
void SetLonStep (int step)
 used for the FV dynamic core only More...
 
void SetLatStep (int step)
 
void SetCubeGridPoints (int ne, int np, int lonSize, double *lonRad, int latSize, double *latRad)
 used for the SE dynamic core only More...
 

Static Public Member Functions

static bool SetToCoprocessor (vtkCPDataDescription *coprocessorData, const char *name, vtkSmartPointer< vtkUnstructuredGrid > grid)
 Attach the grid to the coprocessor data. More...
 

Detailed Description

template<GridType gridType>
class CamAdaptor::Grid< gridType >

Creates and accumulates data for a 2D and a 3D grid.

It generates either a parallelepiped or sphere for the Finite Volume (FV) dynamic core or a cube sphere for the Structured Element (SE) dynamic core. Grids are stored as unstructured grids, and are reconstructed from points.

Definition at line 33 of file Grid.h.

Constructor & Destructor Documentation

◆ Grid()

template<GridType gridType>
CamAdaptor::Grid< gridType >::Grid ( )

◆ ~Grid()

template<GridType gridType>
CamAdaptor::Grid< gridType >::~Grid ( )

Deletes data used to build the grids.

Note that the grid memory is managed by the Catalyst Coprocessor.

Member Function Documentation

◆ Create()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::Create ( )

Creates a 2D and a 3D grid.

◆ SetMpiRank()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetMpiRank ( int  rank)
inline

Definition at line 43 of file Grid.h.

◆ SetChunkCapacity()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetChunkCapacity ( int  capacity)
inline

Definition at line 44 of file Grid.h.

◆ SetNCells2d()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetNCells2d ( int  ncells)
inline

Definition at line 45 of file Grid.h.

◆ SetNLon()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetNLon ( int  nlon)
inline

Definition at line 46 of file Grid.h.

◆ SetNLat()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetNLat ( int  nlat)
inline

Definition at line 47 of file Grid.h.

◆ SetLev()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetLev ( int  nlev,
double lev 
)
inline

Definition at line 48 of file Grid.h.

◆ AddPointsAndCells()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::AddPointsAndCells ( double  lonRad,
double  latRad 
)

Adds the points and the cells for a vertical column to the grid.

◆ SetAttributeValue()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetAttributeValue ( int  chunkSize,
double lonRad,
double latRad,
double psScalar,
double tScalar,
double uScalar,
double vScalar 
)

Sets attributes for a chunk (a list of vertical columns) to the 2D and 3D grids.

◆ GetGrid2d()

template<GridType gridType>
vtkSmartPointer<vtkUnstructuredGrid> CamAdaptor::Grid< gridType >::GetGrid2d ( ) const
inline

Returns the 2D grid.

Definition at line 66 of file Grid.h.

◆ GetGrid3d()

template<GridType gridType>
vtkSmartPointer<vtkUnstructuredGrid> CamAdaptor::Grid< gridType >::GetGrid3d ( ) const
inline

Returns the 3D grid.

Definition at line 68 of file Grid.h.

◆ SetToCoprocessor()

template<GridType gridType>
static bool CamAdaptor::Grid< gridType >::SetToCoprocessor ( vtkCPDataDescription coprocessorData,
const char *  name,
vtkSmartPointer< vtkUnstructuredGrid< gridType > >  grid 
)
static

Attach the grid to the coprocessor data.

◆ SetLonStep()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetLonStep ( int  step)
inline

used for the FV dynamic core only

Definition at line 75 of file Grid.h.

◆ SetLatStep()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetLatStep ( int  step)
inline

Definition at line 76 of file Grid.h.

◆ SetCubeGridPoints()

template<GridType gridType>
void CamAdaptor::Grid< gridType >::SetCubeGridPoints ( int  ne,
int  np,
int  lonSize,
double lonRad,
int  latSize,
double latRad 
)

used for the SE dynamic core only


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