Public Types | Public Member Functions

Grid Class Reference
[The Grid Entity]

A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object. More...

#include <Grid.hpp>

List of all members.

Public Types

Public Member Functions


Detailed Description

A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.

The Grid class that describes a geometrical entity at a certain point within a parameter space. It is the host of geometrical and topological information together with fields on each set describing these components. The geometrical shape as well as any fields is available in multiple coordinate systems. Topological information includes relationships among edges, vertices, polygons etc. as well as multi-level refinement information originating from adaptive mesh refinements (AMR) and also relationships relative to other grids on the same parameter space point.

Examples:

EvolutionSurface.cpp, HelicalLines.cpp, Sphere.cpp, trimesh.cpp, and uniform_scalar.cpp.


Constructor & Destructor Documentation

Grid::Grid ( const WeakPtr< GridContainer > &  GC,
const RefPtr< GlobalCharts > &  GAtlas 
)

The constructor.

Give it an object that may hold Grid objects, which is weakly stored as backlink - i.e. when the GridContainer is be destroyed by external means this backlink pointer will automatically become invalid. The Grid object also requires an Atlas of global charts.


Member Function Documentation

RefPtr<Field> Grid::getCartesianPositions (  )  const [inline]

Shortcut function: get the coordinates of the vertices in the default cartesian chart.

Same as CartesianPositions().

int Grid::getMemoryUsage ( memsize_t UsedMemory,
memsize_t WantedMemory 
) const

Get the memory occupied by this Grid (and all of its fields).

Not that if a field is shared on another location then it will be counted twice here. Use the MemCache::Cache function to determine the actual memory usage.

Returns:
The number of fragments that actually have data stored.
Representation & Grid::makeCartesianRepresentation ( int  Dims  ) 

Provide a representation in an n-dimensional skeleton of the vertices.

Creates one if not existent yet.

References findChart(), makeChart(), and makeVertices().

Referenced by Fiber::PointSearch::PointSearch().

Skeleton & Grid::makeVertices ( int  dims  ) 

Create a Skeleton describing the vertices of a Grid.

Parameters:
dims The dimensionality of the Grid.
Examples:
Sphere.cpp, and uniform_scalar.cpp.

Referenced by makeCartesianRepresentation(), operator[](), Fiber::FragmentIsoSurfacer::setFields(), and GridConv::GridConvolver::update().

double Grid::NumberOfHoles (  )  const

Implements the Euler-Poincare formula to determine the topological number of holes within some surface.

It is given by

\[ \frac{E-V-F+2}{2} \]

where E is the number of edges, V the number of vertices and F the number of faces. All this information is retrieved from the respective skeletons as defined on this Grid.

References getEdgeInfo(), getFaceInfo(), and getVerticesInfo().

RefPtr< Field > Grid::operator() ( const string &  fieldname  )  const

Retrieve a field on the vertices.

Shortcut function for convenience, it queries the vertices Skeleton and employs its default chart.

References getCartesianRepresentation().

Skeleton & Grid::operator[] ( const SkeletonID Sid  ) 
Todo:
Add thread mutex
Representation& Grid::operator[] ( int  Dims  )  [inline]

Shortcut operator function: Create a vertex representation of this Grid with the given dimensionality.

This function is provided for convenience.