3 #ifndef DUNE_ALBERTA_ALBERTAREADER_HH 4 #define DUNE_ALBERTA_ALBERTAREADER_HH 6 #include <dune/geometry/type.hh> 18 template<
class Gr
id >
33 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
40 This &operator= (
const This & );
46 void readGrid (
const std::string &fileName, GridFactory &factory )
49 macroData_.
read( fileName,
false );
53 for(
int i = 0; i < numVertices; ++i )
55 FieldVector< ctype, dimensionworld > v;
63 std::vector< unsigned int > vertices( dimension+1 );
65 for(
int i = 0; i < numElements; ++i )
69 vertices[ j ] =
id[ j ];
70 typedef typename Impl::SimplexTopology< dimension >::type Topology;
81 #endif // #if HAVE_ALBERTA Grid::ctype ctype
Definition: albertareader.hh:26
ct ctype
Define type used for coordinates in grid module.
Definition: common/grid.hh:522
static const int dimWorld
Definition: misc.hh:43
int ElementId[numVertices]
Definition: macrodata.hh:46
int vertexCount() const
Definition: macrodata.hh:61
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition: common/gridfactory.hh:290
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
void read(const std::string &filename, bool binary=false)
Definition: macrodata.hh:410
Provide a generic factory class for unstructured grids.
static const int dimension
Definition: albertareader.hh:28
static const int dimensionworld
Definition: albertareader.hh:29
provides a wrapper for ALBERTA's macro_data structure
int elementCount() const
Definition: macrodata.hh:66
void readGrid(const std::string &fileName, GridFactory &factory)
Definition: albertareader.hh:46
Dune::GridFactory< Grid > GridFactory
Definition: albertareader.hh:24
Include standard header files.
Definition: agrid.hh:59
ElementId & element(int i) const
Definition: macrodata.hh:243
GlobalVector & vertex(int i) const
Definition: macrodata.hh:252
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition: common/gridfactory.hh:279
Definition: albertareader.hh:19
The dimension of the grid.
Definition: common/grid.hh:387
AlbertaReader()
Definition: albertareader.hh:43
ALBERTA REAL_D GlobalVector
Definition: misc.hh:47
void release()
release the macro data structure
Definition: macrodata.hh:125
Different resources needed by all grid implementations.
The dimension of the world the grid lives in.
Definition: common/grid.hh:393