- Home
- About DUNE
- Download
- Documentation
- Community
- Development
Factory class for 3d ALUGrids. More...
#include <dune/grid/alugrid/3d/alu3dgridfactory.hh>
Classes | |
struct | Codim |
struct | FaceLess |
Public Types | |
typedef ALUGrid | Grid |
typedef Grid::ctype | ctype |
Type used by the grid for coordinates. | |
typedef Grid::MPICommunicatorType | MPICommunicatorType |
typedef DuneBoundaryProjection< 3 > | DuneBoundaryProjectionType |
type of boundary projection class | |
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 | |
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 | |
ALU3dGridFactory (const bool verbose, const MPICommunicatorType &communicator) | |
constructor taking verbose flag | |
virtual | ~ALU3dGridFactory () |
Destructor. | |
virtual void | insertVertex (const VertexType &pos) |
insert a vertex into the coarse grid | |
virtual void | insertElement (const GeometryType &geometry, const std::vector< unsigned int > &vertices) |
insert an element into the coarse grid | |
virtual void | insertBoundary (const GeometryType &geometry, const std::vector< unsigned int > &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) | |
virtual void | insertBoundaryProjection (const GeometryType &type, const std::vector< unsigned int > &vertices, const DuneBoundaryProjectionType *projection) |
insert a boundary projection into the macro grid | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices) |
insert a boundary segment into the macro grid | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const shared_ptr< BoundarySegment< 3, 3 > > &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) | |
Grid * | createGrid () |
finalize the grid creation and hand over the grid | |
Grid * | createGrid (const bool addMissingBoundaries, const std::string dgfName="") |
Grid * | 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::LeafIntersection &intersection) const |
virtual bool | wasInserted (const typename Grid::LeafIntersection &intersection) const |
virtual void | insertVertex (const FieldVector< ctype, dimworld > &pos)=0 |
Insert a vertex 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 | insertBoundarySegment (const std::vector< unsigned int > &vertices, const shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
insert an arbitrarily shaped boundary segment | |
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 ALUGrid::LeafIntersection &intersection) const |
obtain a boundary's insertion index | |
virtual bool | wasInserted (const typename ALUGrid::LeafIntersection &intersection) const |
determine whether an intersection was inserted | |
Static Public Attributes | |
static const ALU3dGridElementType | elementType = Grid::elementType |
static const unsigned int | dimension = Grid::dimension |
dimension of the grid | |
static const unsigned int | dimensionworld = Grid::dimensionworld |
Protected Types | |
enum | |
The grid world dimension. More... |
Factory class for 3d ALUGrids.
typedef Grid::ctype Dune::ALU3dGridFactory< ALUGrid >::ctype |
Type used by the grid for coordinates.
Reimplemented from Dune::GridFactoryInterface< ALUGrid >.
typedef DuneBoundaryProjection< 3 > Dune::ALU3dGridFactory< ALUGrid >::DuneBoundaryProjectionType |
type of boundary projection class
typedef ALUGrid Dune::ALU3dGridFactory< ALUGrid >::Grid |
Reimplemented in Dune::GridFactory< ALUSimplexGrid< 3, 3 > >, and Dune::GridFactory< ALUCubeGrid< 3, 3 > >.
typedef Grid::MPICommunicatorType Dune::ALU3dGridFactory< ALUGrid >::MPICommunicatorType |
Reimplemented in Dune::GridFactory< ALUSimplexGrid< 3, 3 > >, and Dune::GridFactory< ALUCubeGrid< 3, 3 > >.
typedef ALUGridTransformation< ctype, dimensionworld > Dune::ALU3dGridFactory< ALUGrid >::Transformation |
typedef Transformation::WorldMatrix Dune::ALU3dGridFactory< ALUGrid >::WorldMatrix |
type of matrix from world coordinates to world coordinates
typedef Transformation::WorldVector Dune::ALU3dGridFactory< ALUGrid >::WorldVector |
type of vector for world coordinates
anonymous enum [protected, inherited] |
The grid world dimension.
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory | ( | const MPICommunicatorType & | communicator = Grid::defaultCommunicator() , |
|
bool | removeGeneratedFile = true | |||
) | [inline, explicit] |
default constructor
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory | ( | const std::string & | filename, | |
const MPICommunicatorType & | communicator = Grid::defaultCommunicator() | |||
) | [inline, explicit] |
constructor taking filename for temporary outfile
Dune::ALU3dGridFactory< ALUGrid >::ALU3dGridFactory | ( | const bool | verbose, | |
const MPICommunicatorType & | communicator | |||
) | [inline, explicit] |
constructor taking verbose flag
alu_inline Dune::ALU3dGridFactory< ALUGrid >::~ALU3dGridFactory | ( | ) | [virtual] |
Destructor.
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid | ( | ) | [virtual] |
finalize the grid creation and hand over the grid
The called takes responsibility for deleing the grid.
Implements Dune::GridFactoryInterface< ALUGrid >.
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid | ( | const bool | addMissingBoundaries, | |
const std::string | dgfName = "" | |||
) |
References Dune::ALU3dGridFactory< ALUGrid >::createGrid().
Referenced by Dune::ALU3dGridFactory< ALUGrid >::createGrid().
alu_inline ALUGrid * Dune::ALU3dGridFactory< ALUGrid >::createGrid | ( | const bool | addMissingBoundaries, | |
bool | temporary, | |||
const std::string | dgfName = "" | |||
) |
References ALU3DSPACE, Dune::hexa, Dune::tetra, and Dune::VTK::vertex.
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundary | ( | const GeometryType & | geometry, | |
const std::vector< unsigned int > & | faceVertices, | |||
const int | id | |||
) | [virtual] |
insert a boundary element into the coarse grid
[in] | geometry | GeometryType of the boundary element |
[in] | faceVertices | vertices of the boundary element |
[in] | id | boundary identifier of the boundary element, the default value is 0 (invalid boundary id) |
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundary | ( | const int | element, | |
const int | face, | |||
const int | id | |||
) | [virtual] |
mark a face as boundary (and assign a boundary id)
[in] | element | index of the element, the face belongs to |
[in] | face | local number of the face within the element |
[in] | id | boundary id to assign to the face |
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundaryProjection | ( | const DuneBoundaryProjectionType & | bndProjection | ) | [virtual] |
insert a boundary projection object, (a copy is made)
[in] | bndProjection | instance of an ALUGridBoundaryProjection projecting vertices to a curved |
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertBoundaryProjection | ( | const GeometryType & | type, | |
const std::vector< unsigned int > & | vertices, | |||
const DuneBoundaryProjectionType * | projection | |||
) | [virtual] |
insert a boundary projection into the macro grid
[in] | type | geometry type of boundary face |
[in] | vertices | vertices of the boundary face |
[in] | projection | boundary projection |
References Dune::ALU3dGridFactory< ALUGrid >::dimension.
virtual void Dune::GridFactoryInterface< ALUGrid >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices, | |
const shared_ptr< BoundarySegment< dimension, dimworld > > & | boundarySegment | |||
) | [inline, virtual, inherited] |
insert an arbitrarily shaped boundary segment
This method inserts a boundary segment into the coarse grid.
[in] | vertices | the indices of the vertices of the segment |
[in] | boundarySegment | user defined implementation of the boundary segment's geometry |
void Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices | ) | [inline, virtual] |
insert a boundary segment into the macro grid
[in] | vertices | vertex indices of boundary face |
Implements Dune::GridFactoryInterface< ALUGrid >.
References Dune::FaceTopologyMapping< type >::dune2aluVertex().
void Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices, | |
const shared_ptr< BoundarySegment< 3, 3 > > & | boundarySegment | |||
) | [inline, virtual] |
insert a shaped boundary segment into the macro grid
[in] | vertices | vertex indices of boundary face |
[in] | boundarySegment | geometric realization of shaped boundary |
References Dune::ALU3dGridFactory< ALUGrid >::dimension, Dune::ALU3dGridFactory< ALUGrid >::dimensionworld, and Dune::FaceTopologyMapping< type >::dune2aluVertex().
virtual void Dune::GridFactoryInterface< ALUGrid >::insertElement | ( | const GeometryType & | type, | |
const std::vector< unsigned int > & | vertices, | |||
const shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > & | elementParametrization | |||
) | [inline, virtual, inherited] |
Insert a parametrized element into the coarse grid.
type | The GeometryType of the new element | |
vertices | The vertices of the new element, using the DUNE numbering | |
elementParametrization | A 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.
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertElement | ( | const GeometryType & | geometry, | |
const std::vector< unsigned int > & | vertices | |||
) | [virtual] |
insert an element into the coarse grid
[in] | geometry | GeometryType of the new element |
[in] | vertices | vertices of the new element |
Implements Dune::GridFactoryInterface< 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.
[in] | matrix | matrix describing the linear part of T |
[in] | shift | vector describing T( 0 ) |
virtual unsigned int Dune::GridFactoryInterface< ALUGrid >::insertionIndex | ( | const typename ALUGrid ::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
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.
[in] | intersection | intersection whose insertion index is requested |
virtual unsigned int Dune::GridFactoryInterface< ALUGrid >::insertionIndex | ( | const typename Codim< 0 >::Entity & | entity | ) | const [inline, virtual, inherited] |
obtain an element'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.
[in] | entity | entity whose insertion index is requested |
virtual unsigned int Dune::GridFactoryInterface< ALUGrid >::insertionIndex | ( | const typename Codim< dimension >::Entity & | entity | ) | const [inline, virtual, inherited] |
obtain a vertex' 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.
[in] | entity | entity whose insertion index is requested |
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex | ( | const typename Codim< 0 >::Entity & | entity | ) | const [inline, virtual] |
Referenced by Dune::ALU3dGridFactory< ALUCubeGrid< 3, 3 > >::wasInserted().
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex | ( | const typename Codim< dimension >::Entity & | entity | ) | const [inline, virtual] |
virtual unsigned int Dune::ALU3dGridFactory< ALUGrid >::insertionIndex | ( | const typename Grid::LeafIntersection & | intersection | ) | const [inline, virtual] |
virtual void Dune::GridFactoryInterface< ALUGrid >::insertVertex | ( | const FieldVector< ctype, dimworld > & | pos | ) | [pure virtual, inherited] |
Insert a vertex into the coarse grid.
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertVertex | ( | const VertexType & | pos | ) | [virtual] |
insert a vertex into the coarse grid
[in] | pos | position of the vertex |
virtual bool Dune::ALU3dGridFactory< ALUGrid >::wasInserted | ( | const typename Grid::LeafIntersection & | intersection | ) | const [inline, virtual] |
virtual bool Dune::GridFactoryInterface< ALUGrid >::wasInserted | ( | const typename ALUGrid ::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
determine whether an intersection was inserted
This method allows checking wheter an intersection was actually inserted into the grid factory.
[in] | intersection | intersection in question |
const unsigned int Dune::ALU3dGridFactory< ALUGrid >::dimension = Grid::dimension [static] |
dimension of the grid
Reimplemented from Dune::GridFactoryInterface< ALUGrid >.
Referenced by Dune::ALU3dGridFactory< ALUGrid >::insertBoundaryProjection(), and Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment().
const unsigned int Dune::ALU3dGridFactory< ALUGrid >::dimensionworld = Grid::dimensionworld [static] |
Referenced by Dune::ALU3dGridFactory< ALUGrid >::insertBoundarySegment().
const ALU3dGridElementType Dune::ALU3dGridFactory< ALUGrid >::elementType = Grid::elementType [static] |
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].