Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

Grid Class Reference

base class for grids. More...

#include <Grid.h>

Inheritance diagram for Grid::

HandleId GridWithPts BasisFuncGrid GridFE GridFV GridLattice GridScatPt GridDynFE GridFEAdB GridFEAdT GridLatticeB GridLatticeC List of all members.

Public Methods

virtual ~Grid ()
virtual void print (Os os) const=0
virtual void scan (Is is)=0
virtual int getNoSpaceDim () const=0
virtual void getMinMaxCoord (Ptv(real) &mincoord, Ptv(real) &maxcoord) const=0
int getNoMembers_idList ()
bool getMember_idList (const int refno, String &datasetname, int &gridnumber, int &checknumber)
virtual void isToBeChanged ()
void loadData (Is is, const String &datasetname, const int gridnumber, const int checknumber)
void unloadData (Os os, const String &datasetname, const int gridnumber, const int checknumber)
virtual CLASS_INFO void flipAroundSymmetryPlane (int dir, real plane)

Static Public Methods

int getNewChecknumber ()

Protected Methods

 Grid ()

Detailed Description

base class for grids.

NAME: Grid - base class for grids

DESCRIPTION:

The class serves as base class for all types of grids. It defines a set of virtual functions, mainly used by the tools "FieldReader", "FieldWriter" and "SimResFile" for storing fields and their corresponding grids in a compact format. For example, several fields may use the same grid and this must be reflected in the storage. Necessary data for the book-keeping of grids are included in class "Grid".


Constructor & Destructor Documentation

Grid::Grid ( ) [protected]
 

The constructor takes no arguments. No further initialization is necessary.

Grid::~Grid ( ) [virtual]
 


Member Function Documentation

CLASS_INFO void Grid::flipAroundSymmetryPlane ( int dir,
real plane ) [virtual]
 

Reimplemented in BasisFuncGrid, GridFE, and GridLattice.

bool Grid::getMember_idList ( const int refno,
String & datasetname,
int & gridnumber,
int & checknumber )
 

void Grid::getMinMaxCoord ( Ptv(real) & mincoord,
Ptv(real) & maxcoord ) const [pure virtual]
 

returns the hypercube (with respect to the Cartesian coordinate system where the grid coordinates are defined) that encloses the grid. This function is only meaningful if the grid represents some kind of geometry in the problem.

Reimplemented in BasisFuncGrid, GridFE, GridFV, GridLattice, GridScatPt, and GridWithPts.

int Grid::getNewChecknumber ( ) [inline, static]
 

int Grid::getNoMembers_idList ( ) [inline]
 

int Grid::getNoSpaceDim ( ) const [pure virtual]
 

returns the number of space dimensions associated with the grid.

Reimplemented in BasisFuncGrid, GridFE, GridFV, GridLattice, GridScatPt, and GridWithPts.

void Grid::isToBeChanged ( ) [virtual]
 

indicates that the grid is to be changed and that the grid must be stored on the grid file (see class "SimResFile" or class "FieldWriter") next time a field referencing this grid is dumped to file. The function is typically used when the grid is moved or refined.

Reimplemented in BasisFuncGrid, and GridFE.

void Grid::loadData ( Is is,
const String & datasetname,
const int gridnumber,
const int checknumber )
 

load the grid from a SimRes grid file. This is the standard way of reading a grid in Diffpack. The function is used by the "FieldReader" and "SimResFile" classes. For simple input/output coded by a user, the "scan" function is usually the preferred function for reading the grid ("loadData" may be somewhat specialized for reading a grid associated with a field).

void Grid::print ( Os os ) const [pure virtual]
 

prints the grid (usually in ascii format).

Reimplemented in BasisFuncGrid, GridFE, GridFV, GridLattice, GridScatPt, and GridFEAdB.

void Grid::scan ( Is is ) [pure virtual]
 

reads the grid (usually in ascii format -- seldom used).

Reimplemented in BasisFuncGrid, GridFE, GridFV, GridLattice, and GridScatPt.

void Grid::unloadData ( Os os,
const String & datasetname,
const int gridnumber,
const int checknumber )
 

write the grid to a SimRes grid file. This is the standard way of writing a grid in Diffpack. The function is used by the "FieldWriter" and "SimResFile" classes. For simple input/output coded by a user, the "print" function is usually the preferred function for writing the grid ("unloadData" may be somewhat specialized for writing a grid associated with a field).


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.