ATSuite C++  v1.0
Scientific C++ routines originally developed by Alexis Tantet
Public Member Functions | Public Attributes | List of all members
Grid Class Reference

Grid class. More...

#include <transferOperator.hpp>

Public Member Functions

 Grid ()
 Default constructor.
 
 Grid (gsl_vector_uint *nx_)
 Constructor allocating an empty grid.
 
 Grid (gsl_vector_uint *, const gsl_vector *, const gsl_vector *)
 Construct a uniform rectangular grid with different dimensions. More...
 
 Grid (size_t, size_t, double, double)
 Construct a uniform rectangular grid with same dimensions. More...
 
 ~Grid ()
 Destructor. More...
 
int printGrid (const char *, const char *, bool)
 Print the grid to file. More...
 

Public Attributes

size_t dim
 
size_t N
 
gsl_vector_uint * nx
 
std::vector< gsl_vector * > * gridBounds
 

Detailed Description

Grid class used for the Galerin approximation of transfer operators by a transition matrix on a grid.

Definition at line 54 of file transferOperator.hpp.

Constructor & Destructor Documentation

Grid::Grid ( gsl_vector_uint *  nx_,
const gsl_vector *  xmin,
const gsl_vector *  xmax 
)

Construct a uniform rectangular grid with specific bounds for each dimension.

Parameters
[in]nx_GSL vector giving the number of boxes for each dimension.
[in]xminGSL vector giving the minimum box limit for each dimension.
[in]xmaxGSL vector giving the maximum box limit for each dimension.

Definition at line 257 of file transferOperator.hpp.

Grid::Grid ( size_t  dim_,
size_t  inx,
double  dxmin,
double  dxmax 
)

Construct a uniform rectangular grid with same bounds for each dimension.

Parameters
[in]dim_Number of dimensions.
[in]inxNumber of boxes, identically for each dimension.
[in]dxminMinimum box limit, identically for each dimension.
[in]dxmaxMaximum box limit, identically for each dimension.

Definition at line 270 of file transferOperator.hpp.

Grid::~Grid ( )

Destructor desallocates memory used by the grid.

Definition at line 290 of file transferOperator.hpp.

References dim, getColSum(), getRowSum(), getTransitionCountTriplet(), gridBounds, N, normalizeVector(), nx, and toLeftStochastic().

Referenced by Grid().

Member Function Documentation

int Grid::printGrid ( const char *  path,
const char *  dataFormat = "%lf",
bool  verbose = false 
)

Print the grid to file.

Parameters
[in]pathPath to the file in which to print.
[in]dataFormatFormat in which to print each element.
[in]verboseIf true, also print to the standard output.
Returns
Status.

Definition at line 513 of file transferOperator.hpp.

References dim, and gridBounds.

Referenced by Grid().

Member Data Documentation

size_t Grid::dim
std::vector<gsl_vector *>* Grid::gridBounds

Grid box bounds for each dimension

Definition at line 68 of file transferOperator.hpp.

Referenced by getBoxMembership(), transferOperator::printFinalDist(), printGrid(), and ~Grid().

size_t Grid::N
gsl_vector_uint* Grid::nx

Number of grid boxes per dimension

Definition at line 66 of file transferOperator.hpp.

Referenced by transferOperator::printFinalDist(), and ~Grid().


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