dune-grid  2.2.0
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Friends
Dune::GridFactory< ALUCubeGrid< 3, 3 > > Class Template Reference

Specialization of the generic GridFactory for ALUCubeGrid<3,3>

. More...

#include <dune/grid/alugrid/3d/alu3dgridfactory.hh>

Inheritance diagram for Dune::GridFactory< ALUCubeGrid< 3, 3 > >:
Inheritance graph

List of all members.

Public Types

typedef BaseType::Grid Grid
typedef
BaseType::MPICommunicatorType 
MPICommunicatorType
typedef Grid::ctype ctype
 Type used by the grid for coordinates.
typedef DuneBoundaryProjection< 3 > DuneBoundaryProjectionType
 type of boundary projection class
typedef unsigned int VertexId
typedef ALUGridTransformation
< ctype, dimensionworld
Transformation
typedef Transformation::WorldVector WorldVector
 type of vector for world coordinates
typedef Transformation::WorldMatrix WorldMatrix
 type of matrix from world coordinates to world coordinates

Public Member Functions

 GridFactory (const MPICommunicatorType &communicator=Grid::defaultCommunicator())
 Default constructor.
 GridFactory (const std::string &filename, const MPICommunicatorType &communicator=Grid::defaultCommunicator())
 constructor taking filename
virtual void insertVertex (const VertexType &pos)
 insert a vertex into the coarse grid
VertexId insertVertex (const VertexType &pos, const size_t globalId)
virtual void insertVertex (const FieldVector< ctype, dimworld > &pos)=0
 Insert a vertex into the coarse grid.
virtual void insertElement (const GeometryType &geometry, const std::vector< VertexId > &vertices)
 insert an element into the coarse grid
virtual void insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, const shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > &elementParametrization)
 Insert a parametrized element into the coarse grid.
virtual void insertBoundary (const GeometryType &geometry, const std::vector< VertexId > &faceVertices, const int id)
 insert a boundary element into the coarse grid
virtual void insertBoundary (const int element, const int face, const int id)
 mark a face as boundary (and assign a boundary id)
void insertProcessBorder (const int element, const int face)
virtual void insertBoundaryProjection (const GeometryType &type, const std::vector< VertexId > &vertices, const DuneBoundaryProjectionType *projection)
 insert a boundary projection into the macro grid
virtual void insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection)
 insert a boundary projection object, (a copy is made)
virtual void insertBoundarySegment (const std::vector< VertexId > &vertices)
 insert a boundary segment into the macro grid
virtual void insertBoundarySegment (const std::vector< VertexId > &vertices, const shared_ptr< BoundarySegment< 3, 3 > > &boundarySegment)
 insert a shaped boundary segment into the macro grid
virtual void insertBoundarySegment (const std::vector< unsigned int > &vertices, const shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment)
 insert an arbitrarily shaped boundary segment
void insertFaceTransformation (const WorldMatrix &matrix, const WorldVector &shift)
 add a face transformation (for periodic identification)
GridcreateGrid ()
 finalize the grid creation and hand over the grid
GridcreateGrid (const bool addMissingBoundaries, const std::string dgfName="")
GridcreateGrid (const bool addMissingBoundaries, bool temporary, const std::string dgfName="")
virtual unsigned int insertionIndex (const typename Codim< 0 >::Entity &entity) const
 obtain an element's insertion index
virtual unsigned int insertionIndex (const typename Codim< dimension >::Entity &entity) const
 obtain a vertex' insertion index
virtual unsigned int insertionIndex (const typename Grid::LeafIntersection &intersection) const
virtual unsigned int insertionIndex (const typename ALUCubeGrid< 3, 3 >::LeafIntersection &intersection) const
 obtain a boundary's insertion index
virtual bool wasInserted (const typename Grid::LeafIntersection &intersection) const
virtual bool wasInserted (const typename ALUCubeGrid< 3, 3 >::LeafIntersection &intersection) const
 determine whether an intersection was inserted

Static Public Attributes

static const ALU3dGridElementType elementType
static const unsigned int dimension
 dimension of the grid
static const unsigned int dimensionworld

Protected Types

enum  
 The grid world dimension. More...

Protected Member Functions

 GridFactory (const bool realGrid, const MPICommunicatorType &communicator=Grid::defaultCommunicator())
 constructor taking verbosity flag

Friends

class ALULocalGeometryStorage

Detailed Description

template<>
class Dune::GridFactory< ALUCubeGrid< 3, 3 > >

Specialization of the generic GridFactory for ALUCubeGrid<3,3>

.


Member Typedef Documentation

typedef Grid::ctype Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::ctype
inherited

Type used by the grid for coordinates.

Reimplemented from Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >.

typedef DuneBoundaryProjection< 3 > Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::DuneBoundaryProjectionType
inherited

type of boundary projection class

typedef BaseType::Grid Dune::GridFactory< ALUCubeGrid< 3, 3 > >::Grid
typedef ALUGridTransformation< ctype, dimensionworld > Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::Transformation
inherited
typedef unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::VertexId
inherited
typedef Transformation::WorldMatrix Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::WorldMatrix
inherited

type of matrix from world coordinates to world coordinates

typedef Transformation::WorldVector Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::WorldVector
inherited

type of vector for world coordinates


Member Enumeration Documentation

anonymous enum
protectedinherited

The grid world dimension.


Constructor & Destructor Documentation

Dune::GridFactory< ALUCubeGrid< 3, 3 > >::GridFactory ( const MPICommunicatorType communicator = Grid::defaultCommunicator())
inlineexplicit

Default constructor.

Dune::GridFactory< ALUCubeGrid< 3, 3 > >::GridFactory ( const std::string &  filename,
const MPICommunicatorType communicator = Grid::defaultCommunicator() 
)
inline

constructor taking filename

Dune::GridFactory< ALUCubeGrid< 3, 3 > >::GridFactory ( const bool  realGrid,
const MPICommunicatorType communicator = Grid::defaultCommunicator() 
)
inlineprotected

constructor taking verbosity flag


Member Function Documentation

Grid* Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::createGrid ( )
virtualinherited

finalize the grid creation and hand over the grid

The caller takes responsibility for deleing the grid.

Implements Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >.

Grid* Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::createGrid ( const bool  addMissingBoundaries,
const std::string  dgfName = "" 
)
inherited
Grid* Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::createGrid ( const bool  addMissingBoundaries,
bool  temporary,
const std::string  dgfName = "" 
)
inherited
virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundary ( const GeometryType &  geometry,
const std::vector< VertexId > &  faceVertices,
const int  id 
)
virtualinherited

insert a boundary element into the coarse grid

Note:
The order of the vertices must coincide with the vertex order in the corresponding DUNE reference element.
Parameters:
[in]geometryGeometryType of the boundary element
[in]faceVerticesvertices of the boundary element
[in]idboundary identifier of the boundary element, the default value is 0 (invalid boundary id)
virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundary ( const int  element,
const int  face,
const int  id 
)
virtualinherited

mark a face as boundary (and assign a boundary id)

Parameters:
[in]elementindex of the element, the face belongs to
[in]facelocal number of the face within the element
[in]idboundary id to assign to the face
virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundaryProjection ( const GeometryType &  type,
const std::vector< VertexId > &  vertices,
const DuneBoundaryProjectionType projection 
)
virtualinherited

insert a boundary projection into the macro grid

Parameters:
[in]typegeometry type of boundary face
[in]verticesvertices of the boundary face
[in]projectionboundary projection
Note:
The grid takes control of the projection object.
virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundaryProjection ( const DuneBoundaryProjectionType bndProjection)
virtualinherited

insert a boundary projection object, (a copy is made)

Parameters:
[in]bndProjectioninstance of an ALUGridBoundaryProjection projecting vertices to a curved
virtual void Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices,
const shared_ptr< BoundarySegment< dimension, dimworld > > &  boundarySegment 
)
inlinevirtualinherited

insert an arbitrarily shaped boundary segment

This method inserts a boundary segment into the coarse grid.

Parameters:
[in]verticesthe indices of the vertices of the segment
[in]boundarySegmentuser defined implementation of the boundary segment's geometry
virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundarySegment ( const std::vector< VertexId > &  vertices)
virtualinherited

insert a boundary segment into the macro grid

Parameters:
[in]verticesvertex indices of boundary face

Implements Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >.

virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertBoundarySegment ( const std::vector< VertexId > &  vertices,
const shared_ptr< BoundarySegment< 3, 3 > > &  boundarySegment 
)
virtualinherited

insert a shaped boundary segment into the macro grid

Parameters:
[in]verticesvertex indices of boundary face
[in]boundarySegmentgeometric realization of shaped boundary
virtual void Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  vertices,
const shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > &  elementParametrization 
)
inlinevirtualinherited

Insert a parametrized element into the coarse grid.

Parameters:
typeThe GeometryType of the new element
verticesThe vertices of the new element, using the DUNE numbering
elementParametrizationA function prescribing the shape of this element

Make sure the inserted element is not inverted (this holds even for simplices). There are grids that can't handle inverted elements.

virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertElement ( const GeometryType &  geometry,
const std::vector< VertexId > &  vertices 
)
virtualinherited

insert an element into the coarse grid

Note:
The order of the vertices must coincide with the vertex order in the corresponding DUNE reference element.
Parameters:
[in]geometryGeometryType of the new element
[in]verticesvertices of the new element

Implements Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >.

void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertFaceTransformation ( const WorldMatrix matrix,
const WorldVector shift 
)
inherited

add a face transformation (for periodic identification)

A face transformation is an affine mapping T from world coordinates to world coordinates. The grid factory then glues two faces f and g if T( f ) = g or T( g ) = f.

Parameters:
[in]matrixmatrix describing the linear part of T
[in]shiftvector describing T( 0 )
virtual unsigned int Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >::insertionIndex ( const typename ALUCubeGrid< 3, 3 > ::LeafIntersection &  intersection) const
inlinevirtualinherited

obtain a boundary's insertion index

Data can be associated to the created macro grid using the insertion index of each entity that has been inserted during the grid creation process.

Between grid construction (createGrid) and the first grid modification, this method allows to obtain this insertion index from the grid factory. This way, data can be stored using the index maps provided by the grid.

Parameters:
[in]intersectionintersection whose insertion index is requested
Returns:
insertion index of the intersection
Note:
The insertion index can only be obtained for boundary intersections that were actually inserted (see also wasInserted).
virtual unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertionIndex ( const typename Codim< 0 >::Entity entity) const
inlinevirtualinherited
virtual unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertionIndex ( const typename Codim< dimension >::Entity entity) const
inlinevirtualinherited
virtual unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertionIndex ( const typename Grid::LeafIntersection intersection) const
inlinevirtualinherited
void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertProcessBorder ( const int  element,
const int  face 
)
inlineinherited
virtual void Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >::insertVertex ( const FieldVector< ctype, dimworld > &  pos)
pure virtualinherited

Insert a vertex into the coarse grid.

virtual void Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertVertex ( const VertexType &  pos)
virtualinherited

insert a vertex into the coarse grid

Parameters:
[in]posposition of the vertex
VertexId Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::insertVertex ( const VertexType &  pos,
const size_t  globalId 
)
inherited
virtual bool Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >::wasInserted ( const typename ALUCubeGrid< 3, 3 > ::LeafIntersection &  intersection) const
inlinevirtualinherited

determine whether an intersection was inserted

This method allows checking wheter an intersection was actually inserted into the grid factory.

Note:
Not all boundary segments need to be inserted into the grid factory.
This method returns false for all interior intersections
Parameters:
[in]intersectionintersection in question
Returns:
true, if the intersection was inserted
virtual bool Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::wasInserted ( const typename Grid::LeafIntersection intersection) const
inlinevirtualinherited

Friends And Related Function Documentation

friend class ALULocalGeometryStorage
friend

Member Data Documentation

const unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::dimension
staticinherited

dimension of the grid

Reimplemented from Dune::GridFactoryInterface< ALUCubeGrid< 3, 3 > >.

const unsigned int Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::dimensionworld
staticinherited
const ALU3dGridElementType Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::elementType
staticinherited

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