4 #ifndef DUNE_UGGRID_FACTORY_HH 5 #define DUNE_UGGRID_FACTORY_HH 16 #include <dune/common/fvector.hh> 160 template <
int dimworld>
167 static_assert(dimworld==2 || dimworld == 3,
"UGGrid only in 2d and 3d");
190 virtual void insertVertex(
const FieldVector<ctype,dimworld>& pos);
197 const std::vector<unsigned int>& vertices);
223 template<
int codim >
236 return UG_NS<dimension>::levelIndex(grid_->getRealImplementation(entity).target_);
246 return UG_NS<dimension>::levelIndex(grid_->getRealImplementation(entity).target_);
256 return intersection.boundarySegmentIndex();
263 return (
insertionIndex( intersection ) < boundarySegmentVertices_.size());
276 bool factoryOwnsGrid_;
279 std::vector<std::array<int, dimworld*2-2> > boundarySegmentVertices_;
283 std::vector<unsigned char> elementTypes_;
287 std::vector<unsigned int> elementVertices_;
290 std::vector<FieldVector<double, dimworld> > vertexPositions_;
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:244
Provide a generic factory class for unstructured grids.
Definition: common/gridfactory.hh:263
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
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Provide a generic factory class for unstructured grids.
static const int dimension
dimension of the grid
Definition: common/gridfactory.hh:78
virtual GridType * createGrid()
Finalize grid creation and hand over the grid.
Definition: common/gridfactory.hh:316
UGGrid< dimworld >::template Codim< codim >::Entity Entity
Definition: uggridfactory.hh:226
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition: common/gridfactory.hh:179
Front-end for the grid manager of the finite element toolbox UG.
Definition: uggrid.hh:230
virtual void insertBoundarySegment(const std::vector< unsigned int > &vertices)
insert a boundary segment
Definition: common/gridfactory.hh:308
GridFactory()
Default constructor.
Definition: common/gridfactory.hh:274
Include standard header files.
Definition: agrid.hh:59
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition: common/gridfactory.hh:279
Base class for classes implementing geometries of boundary segments.
Definition: boundarysegment.hh:29
virtual unsigned int insertionIndex(const typename UGGrid< dimworld >::LeafIntersection &intersection) const
Return the number of the intersection in the order of insertion into the factory. ...
Definition: uggridfactory.hh:254
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:234
virtual bool wasInserted(const typename UGGrid< dimworld >::LeafIntersection &intersection) const
Return true if the intersection has been explictily insterted into the factory.
Definition: uggridfactory.hh:261
Provide a generic factory class for unstructured grids.
Definition: common/gridfactory.hh:73