dune-alugrid 2.8.0
Loading...
Searching...
No Matches
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 unsigned int VertexId
 
typedef unsigned int GlobalIdType
 
typedef ALUGridTransformation< ctype, dimensionworldTransformation
 
typedef Transformation::WorldVector WorldVector
 type of vector for world coordinates More...
 
typedef Transformation::WorldMatrix WorldMatrix
 type of matrix from world coordinates to world coordinates More...
 
typedef Grid::CollectiveCommunication Communication
 
typedef decltype(std::declval< Dune::GridFactoryInterface< Grid > * >() ->createGrid() GridPtrType)
 

Public Member Functions

 ALU3dGridFactory (const MPICommunicatorType &communicator=Grid::defaultCommunicator(), bool removeGeneratedFile=true)
 default constructor More...
 
 ALU3dGridFactory (const std::string &filename, const MPICommunicatorType &communicator=Grid::defaultCommunicator())
 constructor taking filename for temporary outfile More...
 
virtual ~ALU3dGridFactory ()
 Destructor. More...
 
virtual void insertVertex (const VertexInputType &pos)
 insert a vertex into the coarse grid More...
 
void insertVertex (const VertexInputType &pos, const VertexId globalId)
 insert a vertex into the coarse grid including the vertex's globally unique id More...
 
virtual void insertElement (const GeometryType &geometry, const std::vector< VertexId > &vertices)
 insert an element into the coarse grid More...
 
virtual void insertBoundary (const GeometryType &geometry, const std::vector< VertexId > &faceVertices, int boundaryId=1)
 insert a boundary element into the coarse grid More...
 
virtual void insertBoundary (int element, int face, int boundaryId=1)
 mark a face as boundary (and assign a boundary id) More...
 
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 More...
 
virtual void insertBoundarySegment (const std::vector< VertexId > &vertices)
 insert a boundary segment into the macro grid More...
 
virtual void insertProcessBorder (const std::vector< VertexId > &vertices)
 
virtual void insertBoundarySegment (const std::vector< VertexId > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimensionworld > > &boundarySegment)
 insert a shaped boundary segment into the macro grid More...
 
virtual void insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection, const bool isSurfaceProjection=(dimension !=dimensionworld))
 insert a boundary projection object, (a copy is made) More...
 
void insertFaceTransformation (const WorldMatrix &matrix, const WorldVector &shift)
 add a face transformation (for periodic identification) More...
 
GridPtrType createGrid ()
 finalize the grid creation and hand over the grid More...
 
GridPtrType createGrid (const bool addMissingBoundaries, const std::string dgfName="")
 
GridPtrType createGrid (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::LevelIntersection &intersection) const
 
virtual unsigned int insertionIndex (const typename Grid::LeafIntersection &intersection) const
 
virtual bool wasInserted (const typename Grid::LevelIntersection &intersection) const
 
virtual bool wasInserted (const typename Grid::LeafIntersection &intersection) const
 
const std::vector< unsigned int > & ordering () const
 
void setLongestEdgeFlag (bool flag=true)
 set longest edge marking for biscetion grids (default is off) More...
 
Communication comm () const
 Return the Communication used by the grid factory. More...
 

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 More...
 

Detailed Description

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

Factory class for ALUGrids.

Member Typedef Documentation

◆ Communication

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

◆ ctype

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

◆ GlobalIdType

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

◆ Grid

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

◆ GridPtrType

template<class ALUGrid >
typedef decltype(std::declval< Dune::GridFactoryInterface< Grid >* >()->createGrid() Dune::ALU3dGridFactory< ALUGrid >::GridPtrType)

◆ 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

◆ comm()

template<class ALUGrid >
Communication Dune::ALU3dGridFactory< ALUGrid >::comm ( ) const
inline

Return the Communication used by the grid factory.

Use the Communication available from the grid.

◆ createGrid() [1/3]

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 ALU3dGridFactory< ALUGrid >::GridPtrType Dune::ALU3dGridFactory< ALUGrid >::createGrid ( const bool  addMissingBoundaries,
bool  temporary,
const std::string  dgfName = "" 
)

◆ createGrid() [3/3]

template<class ALUGrid >
alu_inline ALU3dGridFactory< ALUGrid >::GridPtrType 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,
const bool  isSurfaceProjection = (dimension != dimensionworld) 
)
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 std::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/4]

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

◆ insertionIndex() [2/4]

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

◆ insertionIndex() [3/4]

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

◆ insertionIndex() [4/4]

template<class ALUGrid >
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex ( const typename Grid::LevelIntersection &  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

◆ setLongestEdgeFlag()

template<class ALUGrid >
void Dune::ALU3dGridFactory< ALUGrid >::setLongestEdgeFlag ( bool  flag = true)
inline

set longest edge marking for biscetion grids (default is off)

◆ wasInserted() [1/2]

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

◆ wasInserted() [2/2]

template<class ALUGrid >
virtual bool Dune::ALU3dGridFactory< ALUGrid >::wasInserted ( const typename Grid::LevelIntersection &  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: