4 #ifndef DUNE_UGGRID_FACTORY_HH
5 #define DUNE_UGGRID_FACTORY_HH
14 #include <dune/common/fvector.hh>
158 template <
int dimworld>
165 dune_static_assert(dimworld==2 || dimworld || 3,
"UGGrid only in 2d and 3d");
188 virtual void insertVertex(
const FieldVector<ctype,dimworld>& pos);
195 const std::vector<unsigned int>& vertices);
221 template<
int codim >
234 return UG_NS<dimension>::levelIndex(grid_->getRealImplementation(entity).target_);
244 return UG_NS<dimension>::levelIndex(grid_->getRealImplementation(entity).target_);
257 bool factoryOwnsGrid_;
260 std::vector<array<int, dimworld*2-2> > boundarySegmentVertices_;
264 std::vector<unsigned char> elementTypes_;
268 std::vector<unsigned int> elementVertices_;
271 std::vector<FieldVector<double, dimworld> > vertexPositions_;
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Base class for classes implementing geometries of boundary segments.
Definition: boundarysegment.hh:29
Base class for grid boundary segments of arbitrary geometry.
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition: common/gridfactory.hh:290
Provide a generic factory class for unstructured grids.
Definition: common/gridfactory.hh:263
Provide a generic factory class for unstructured grids.
static const int dimension
dimension of the grid
Definition: common/gridfactory.hh:78
[ provides Dune::Grid ]
Definition: uggrid.hh:202
UGGrid< dimworld >::template Codim< codim >::Entity Entity
Definition: uggridfactory.hh:224
Provide a generic factory class for unstructured grids.
Definition: common/gridfactory.hh:73
virtual GridType * createGrid()
Finalize grid creation and hand over the grid.
Definition: common/gridfactory.hh:316
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
Return the number of the element in the order of insertion into the factory.
Definition: uggridfactory.hh:232
GridFactory()
Default constructor.
Definition: common/gridfactory.hh:274
virtual unsigned int insertionIndex(const typename Codim< dimension >::Entity &entity) const
Return the number of the vertex in the order of insertion into the factory.
Definition: uggridfactory.hh:242
virtual void insertBoundarySegment(const std::vector< unsigned int > &vertices)
insert a boundary segment
Definition: common/gridfactory.hh:308
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition: common/gridfactory.hh:279