3 #ifndef DUNE_ALBERTA_ALBERTAREADER_HH
4 #define DUNE_ALBERTA_ALBERTAREADER_HH
18 template<
class Gr
id >
33 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
46 template< GrapeIOFileFormatType type >
49 static_assert(type !=
pgm,
"AlbertaReader: reading pgm format is not supported.");
52 macroData_.
read( fileName, (type ==
xdr) );
56 for(
int i = 0; i < numVertices; ++i )
58 FieldVector< ctype, dimensionworld > v;
66 std::vector< unsigned int > vertices(
dimension+1 );
68 for(
int i = 0; i < numElements; ++i )
72 vertices[ j ] =
id[ j ];
73 typedef typename GenericGeometry::SimplexTopology< dimension >::type Topology;
83 readGrid< ascii >( filename, factory );
89 #endif // #if HAVE_ALBERTA
AlbertaReader()
Definition: albertareader.hh:43
Grid::ctype ctype
Definition: albertareader.hh:26
void read(const std::string &filename, bool binary=false)
Definition: macrodata.hh:410
ElementId & element(int i) const
Definition: macrodata.hh:243
void readGrid(const std::string &fileName, GridFactory &factory)
Definition: albertareader.hh:47
The dimension of the world the grid lives in.
Definition: common/grid.hh:408
Different resources needed by all grid implementations.
Dune::GridFactory< Grid > GridFactory
Definition: albertareader.hh:24
static const int dimWorld
Definition: misc.hh:43
void readGrid(const std::string &filename, GridFactory &factory)
Definition: albertareader.hh:81
provides a wrapper for ALBERTA's macro_data structure
Provide a generic factory class for unstructured grids.
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition: common/gridfactory.hh:290
int elementCount() const
Definition: macrodata.hh:66
ALBERTA REAL_D GlobalVector
Definition: misc.hh:47
ct ctype
Define type used for coordinates in grid module.
Definition: common/grid.hh:548
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
GlobalVector & vertex(int i) const
Definition: macrodata.hh:252
Definition: albertareader.hh:19
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition: common/gridfactory.hh:279
int vertexCount() const
Definition: macrodata.hh:61
int ElementId[numVertices]
Definition: macrodata.hh:46
void release()
release the macro data structure
Definition: macrodata.hh:125
Definition: grapedataioformattypes.hh:16
Definition: grapedataioformattypes.hh:18
The dimension of the grid.
Definition: common/grid.hh:402
static const int dimension
Definition: albertareader.hh:28
static const int dimensionworld
Definition: albertareader.hh:29