dune-alugrid 3.0.0
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Dune::ALU3dGridFactory< ALUGrid > Class Template Reference

Factory class for ALUGrids. More...

#include <dune/alugrid/3d/gridfactory.hh>

Inheritance diagram for Dune::ALU3dGridFactory< ALUGrid >:
Inheritance graph

Classes

struct  Codim
 
struct  FaceLess
 

Public Types

typedef ALUGrid Grid
 
typedef Grid::ctype ctype
 
typedef Grid::MPICommunicatorType MPICommunicatorType
 
typedef DuneBoundaryProjection< dimensionworldDuneBoundaryProjectionType
 type of boundary projection class
 
typedef unsigned int VertexId
 
typedef unsigned int GlobalIdType
 
typedef ALUGridTransformation< ctype, dimensionworldTransformation
 
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

 ALU3dGridFactory (const MPICommunicatorType &communicator=Grid::defaultCommunicator(), bool removeGeneratedFile=true)
 default constructor
 
 ALU3dGridFactory (const std::string &filename, const MPICommunicatorType &communicator=Grid::defaultCommunicator())
 constructor taking filename for temporary outfile
 
virtual ~ALU3dGridFactory ()
 Destructor.
 
virtual void insertVertex (const VertexInputType &pos)
 insert a vertex into the coarse grid
 
void insertVertex (const VertexInputType &pos, const VertexId globalId)
 insert a vertex into the coarse grid including the vertex's globally unique id
 
virtual void insertElement (const GeometryType &geometry, const std::vector< VertexId > &vertices)
 insert an element into the coarse grid
 
virtual void insertBoundary (const GeometryType &geometry, const std::vector< VertexId > &faceVertices, int boundaryId=1)
 insert a boundary element into the coarse grid
 
virtual void insertBoundary (int element, int face, int boundaryId=1)
 mark a face as boundary (and assign a boundary id)
 
void insertProcessBorder (int element, 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 insertBoundarySegment (const std::vector< VertexId > &vertices)
 insert a boundary segment into the macro grid
 
virtual void insertProcessBorder (const std::vector< VertexId > &vertices)
 
virtual void insertBoundarySegment (const std::vector< VertexId > &vertices, const shared_ptr< BoundarySegment< dimension, dimensionworld > > &boundarySegment)
 insert a shaped boundary segment into the macro grid
 
virtual void insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection)
 insert a boundary projection object, (a copy is made)
 
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
 
virtual unsigned int insertionIndex (const typename Codim< dimension >::Entity &entity) const
 
virtual unsigned int insertionIndex (const typename Grid::LeafIntersection &intersection) const
 
virtual bool wasInserted (const typename Grid::LeafIntersection &intersection) const
 
const std::vector< unsigned int > & ordering () const
 

Static Public Attributes

static const ALU3dGridElementType elementType = Grid::elementType
 
static const unsigned int dimension = Grid::dimension
 
static const unsigned int dimensionworld = Grid::dimensionworld
 

Protected Member Functions

 ALU3dGridFactory (const bool verbose, const MPICommunicatorType &communicator)
 constructor taking verbose flag
 

Detailed Description

template<class ALUGrid>
class Dune::ALU3dGridFactory< ALUGrid >

Factory class for ALUGrids.

Member Typedef Documentation

◆ ctype

template<class ALUGrid >
typedef Grid::ctype Dune::ALU3dGridFactory< ALUGrid >::ctype

◆ DuneBoundaryProjectionType

template<class ALUGrid >
typedef DuneBoundaryProjection< dimensionworld > Dune::ALU3dGridFactory< ALUGrid >::DuneBoundaryProjectionType

type of boundary projection class

◆ GlobalIdType

template<class ALUGrid >
typedef unsigned int Dune::ALU3dGridFactory< ALUGrid >::GlobalIdType

◆ Grid

template<class ALUGrid >
typedef ALUGrid Dune::ALU3dGridFactory< ALUGrid >::Grid

◆ MPICommunicatorType

template<class ALUGrid >
typedef Grid::MPICommunicatorType Dune::ALU3dGridFactory< ALUGrid >::MPICommunicatorType

◆ Transformation

template<class ALUGrid >
typedef ALUGridTransformation< ctype, dimensionworld > Dune::ALU3dGridFactory< ALUGrid >::Transformation

◆ VertexId

template<class ALUGrid >
typedef unsigned int Dune::ALU3dGridFactory< ALUGrid >::VertexId

◆ WorldMatrix

template<class ALUGrid >
typedef Transformation::WorldMatrix Dune::ALU3dGridFactory< ALUGrid >::WorldMatrix

type of matrix from world coordinates to world coordinates

◆ WorldVector

template<class ALUGrid >
typedef Transformation::WorldVector Dune::ALU3dGridFactory< ALUGrid >::WorldVector

type of vector for world coordinates

Constructor & Destructor Documentation

◆ ALU3dGridFactory() [1/3]

template<class ALUGrid >
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory ( const bool  verbose,
const MPICommunicatorType communicator 
)
inlineexplicitprotected

constructor taking verbose flag

◆ ALU3dGridFactory() [2/3]

template<class ALUGrid >
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory ( const MPICommunicatorType communicator = Grid::defaultCommunicator(),
bool  removeGeneratedFile = true 
)
inlineexplicit

default constructor

◆ ALU3dGridFactory() [3/3]

template<class ALUGrid >
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory ( const std::string &  filename,
const MPICommunicatorType communicator = Grid::defaultCommunicator() 
)
inlineexplicit

constructor taking filename for temporary outfile

◆ ~ALU3dGridFactory()

Destructor.

Member Function Documentation

◆ createGrid() [1/3]

template<class ALUGrid >
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid ( )

finalize the grid creation and hand over the grid

The caller takes responsibility for deleing the grid.

◆ createGrid() [2/3]

template<class ALUGrid >
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid ( const bool  addMissingBoundaries,
bool  temporary,
const std::string  dgfName = "" 
)

◆ createGrid() [3/3]

template<class ALUGrid >
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid ( const bool  addMissingBoundaries,
const std::string  dgfName = "" 
)

◆ insertBoundary() [1/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundary ( const GeometryType &  geometry,
const std::vector< VertexId > &  faceVertices,
int  boundaryId = 1 
)
virtual

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]boundaryIdboundary identifier of the boundary element, the default value is 1

◆ insertBoundary() [2/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundary ( int  element,
int  face,
int  boundaryId = 1 
)
virtual

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]boundaryIdboundary id to assign to the face, the default value is 1

◆ insertBoundaryProjection() [1/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundaryProjection ( const DuneBoundaryProjectionType bndProjection)
virtual

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

Parameters
[in]bndProjectioninstance of an ALUGridBoundaryProjection projecting vertices to a curved

◆ insertBoundaryProjection() [2/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundaryProjection ( const GeometryType &  type,
const std::vector< VertexId > &  vertices,
const DuneBoundaryProjectionType projection 
)
virtual

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.

◆ insertBoundarySegment() [1/2]

template<class ALUGrid >
void Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment ( const std::vector< VertexId > &  vertices)
inlinevirtual

insert a boundary segment into the macro grid

Parameters
[in]verticesvertex indices of boundary face

◆ insertBoundarySegment() [2/2]

template<class ALUGrid >
void Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment ( const std::vector< VertexId > &  vertices,
const shared_ptr< BoundarySegment< dimension, dimensionworld > > &  boundarySegment 
)
inlinevirtual

insert a shaped boundary segment into the macro grid

Parameters
[in]verticesvertex indices of boundary face
[in]boundarySegmentgeometric realization of shaped boundary

◆ insertElement()

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertElement ( const GeometryType &  geometry,
const std::vector< VertexId > &  vertices 
)
virtual

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

◆ insertFaceTransformation()

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertFaceTransformation ( const WorldMatrix matrix,
const WorldVector shift 
)

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 )

◆ insertionIndex() [1/3]

template<class ALUGrid >
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex ( const typename Codim< 0 >::Entity &  entity) const
inlinevirtual

◆ insertionIndex() [2/3]

template<class ALUGrid >
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex ( const typename Codim< dimension >::Entity &  entity) const
inlinevirtual

◆ insertionIndex() [3/3]

template<class ALUGrid >
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex ( const typename Grid::LeafIntersection &  intersection) const
inlinevirtual

◆ insertProcessBorder() [1/2]

template<class ALUGrid >
void Dune::ALU3dGridFactory< ALUGrid >::insertProcessBorder ( const std::vector< VertexId > &  vertices)
inlinevirtual

◆ insertProcessBorder() [2/2]

template<class ALUGrid >
void Dune::ALU3dGridFactory< ALUGrid >::insertProcessBorder ( int  element,
int  face 
)
inline

◆ insertVertex() [1/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertVertex ( const VertexInputType &  pos)
virtual

insert a vertex into the coarse grid

Parameters
[in]posposition of the vertex

◆ insertVertex() [2/2]

template<class ALUGrid >
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertVertex ( const VertexInputType &  pos,
const VertexId  globalId 
)

insert a vertex into the coarse grid including the vertex's globally unique id

Parameters
[in]posposition of the vertex
[in]globalIdglobally unique id for vertex

◆ ordering()

template<class ALUGrid >
const std::vector< unsigned int > & Dune::ALU3dGridFactory< ALUGrid >::ordering ( ) const
inline

◆ wasInserted()

template<class ALUGrid >
virtual bool Dune::ALU3dGridFactory< ALUGrid >::wasInserted ( const typename Grid::LeafIntersection &  intersection) const
inlinevirtual

Member Data Documentation

◆ dimension

template<class ALUGrid >
const unsigned int Dune::ALU3dGridFactory< ALUGrid >::dimension = Grid::dimension
static

◆ dimensionworld

template<class ALUGrid >
const unsigned int Dune::ALU3dGridFactory< ALUGrid >::dimensionworld = Grid::dimensionworld
static

◆ elementType

template<class ALUGrid >
const ALU3dGridElementType Dune::ALU3dGridFactory< ALUGrid >::elementType = Grid::elementType
static

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