dune-foamgrid  2.7-git
Classes | Public Member Functions | Protected Attributes | List of all members
Dune::GridFactory< FoamGrid< 2, dimworld, ct > > Class Template Reference

Specialization of GridFactoryBase for 2D-FoamGrid<2, dimworld> More...

#include <dune/foamgrid/foamgrid/foamgridfactory.hh>

Inheritance diagram for Dune::GridFactory< FoamGrid< 2, dimworld, ct > >:
Inheritance graph

Public Member Functions

 GridFactory ()
 
 GridFactory (FoamGrid< 2, dimworld, ctype > *grid)
 
void insertBoundarySegment (const std::vector< unsigned int > &vertices) override
 Insert a boundary segment. This is only needed if you want to control the numbering of the boundary segments. More...
 
void insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimgrid, dimworld > > &boundarySegment) override
 Insert a boundary segment (== a line) and the boundary segment geometry This influences the ordering of the boundary segments. More...
 
bool wasInserted (const typename FoamGrid< dimgrid, dimworld, ctype >::LeafIntersection &intersection) const override
 Return true if leaf intersection was inserted as boundary segment. More...
 
void insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices) override
 Insert an element into the coarse grid. More...
 
void insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, const std::shared_ptr< VirtualFunction< FieldVector< ctype, dimgrid >, FieldVector< ctype, dimworld > > > &elementParametrization) override
 Insert a parametrized element into the coarse grid. More...
 
ToUniquePtr< FoamGrid< dimgrid, dimworld, ctype > > createGrid () override
 Finalize grid creation and hand over the grid The receiver takes responsibility of the memory allocated for the grid. More...
 
void insertVertex (const FieldVector< ctype, dimworld > &pos) override
 Insert a vertex into the coarse grid. More...
 
unsigned int insertionIndex (const typename FoamGrid< dimgrid, dimworld, ctype >::Traits::template Codim< 0 >::Entity &entity) const override
 Obtain an element's insertion index. More...
 
unsigned int insertionIndex (const typename FoamGrid< dimgrid, dimworld, ctype >::Traits::template Codim< dimgrid >::Entity &vertex) const override
 Obtain a vertex' insertion index. More...
 
unsigned int insertionIndex (const typename FoamGrid< dimgrid, dimworld, ctype >::LeafIntersection &intersection) const override
 Obtain a boundary's insertion index. More...
 

Protected Attributes

FoamGrid< dimgrid, dimworld, ctype > * grid_
 
bool factoryOwnsGrid_
 
std::vector< FoamGridEntityImp< 0, dimgrid, dimworld, ctype > * > vertexArray_
 Array containing all vertices. More...
 
unsigned int boundarySegmentCounter_
 Counter that creates the boundary segment indices. More...
 

Detailed Description

template<int dimworld, class ct>
class Dune::GridFactory< FoamGrid< 2, dimworld, ct > >

Specialization of GridFactoryBase for 2D-FoamGrid<2, dimworld>

Constructor & Destructor Documentation

◆ GridFactory() [1/2]

template<int dimworld, class ct >
Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::GridFactory ( )
inline

◆ GridFactory() [2/2]

template<int dimworld, class ct >
Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::GridFactory ( FoamGrid< 2, dimworld, ctype > *  grid)
inline

Member Function Documentation

◆ createGrid()

template<int dimworld, class ct >
ToUniquePtr<FoamGrid<dimgrid, dimworld, ctype> > Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::createGrid ( )
inlineoverride

Finalize grid creation and hand over the grid The receiver takes responsibility of the memory allocated for the grid.

◆ insertBoundarySegment() [1/2]

template<int dimworld, class ct >
void Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices)
inlineoverride

Insert a boundary segment. This is only needed if you want to control the numbering of the boundary segments.

◆ insertBoundarySegment() [2/2]

template<int dimworld, class ct >
void Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices,
const std::shared_ptr< BoundarySegment< dimgrid, dimworld > > &  boundarySegment 
)
inlineoverride

Insert a boundary segment (== a line) and the boundary segment geometry This influences the ordering of the boundary segments.

◆ insertElement() [1/2]

template<int dimworld, class ct >
void Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  vertices 
)
inlineoverride

Insert an element into the coarse grid.

Parameters
typeThe GeometryType of the new element
verticesThe vertices of the new element, using the DUNE numbering

◆ insertElement() [2/2]

template<int dimworld, class ct >
void Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  vertices,
const std::shared_ptr< VirtualFunction< FieldVector< ctype, dimgrid >, FieldVector< ctype, dimworld > > > &  elementParametrization 
)
inlineoverride

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

◆ insertionIndex() [1/3]

unsigned int Dune::GridFactoryBase< dimgrid, dimworld, ct >::insertionIndex ( const typename FoamGrid< dimgrid, dimworld, ctype >::LeafIntersection &  intersection) const
inlineoverrideinherited

Obtain a boundary's insertion index.

◆ insertionIndex() [2/3]

unsigned int Dune::GridFactoryBase< dimgrid, dimworld, ct >::insertionIndex ( const typename FoamGrid< dimgrid, dimworld, ctype >::Traits::template Codim< 0 >::Entity &  entity) const
inlineoverrideinherited

Obtain an element's insertion index.

◆ insertionIndex() [3/3]

unsigned int Dune::GridFactoryBase< dimgrid, dimworld, ct >::insertionIndex ( const typename FoamGrid< dimgrid, dimworld, ctype >::Traits::template Codim< dimgrid >::Entity &  vertex) const
inlineoverrideinherited

Obtain a vertex' insertion index.

◆ insertVertex()

void Dune::GridFactoryBase< dimgrid, dimworld, ct >::insertVertex ( const FieldVector< ctype, dimworld > &  pos)
inlineoverrideinherited

Insert a vertex into the coarse grid.

◆ wasInserted()

template<int dimworld, class ct >
bool Dune::GridFactory< FoamGrid< 2, dimworld, ct > >::wasInserted ( const typename FoamGrid< dimgrid, dimworld, ctype >::LeafIntersection &  intersection) const
inlineoverride

Return true if leaf intersection was inserted as boundary segment.

Member Data Documentation

◆ boundarySegmentCounter_

unsigned int Dune::GridFactoryBase< dimgrid, dimworld, ct >::boundarySegmentCounter_
protectedinherited

Counter that creates the boundary segment indices.

◆ factoryOwnsGrid_

bool Dune::GridFactoryBase< dimgrid, dimworld, ct >::factoryOwnsGrid_
protectedinherited

◆ grid_

FoamGrid<dimgrid, dimworld, ctype>* Dune::GridFactoryBase< dimgrid, dimworld, ct >::grid_
protectedinherited

◆ vertexArray_

std::vector<FoamGridEntityImp<0, dimgrid, dimworld, ctype>*> Dune::GridFactoryBase< dimgrid, dimworld, ct >::vertexArray_
protectedinherited

Array containing all vertices.


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