DUNE PDELab (2.8)

virtualrefinement.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
4#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
5
266#include <vector>
267
268#include <dune/common/fvector.hh>
269
270#include "refinement.hh"
271#include "type.hh"
272
273namespace Dune
274{
275 // //////////////////////////////////////////
276 //
277 // The virtual base class and its iterators
278 //
279
280 //
281 // Refinement
282 //
283
290 template<int dimension, class CoordType>
292 {
293 public:
294 template<int codimension>
295 struct Codim;
300
312 typedef std::vector<int> IndexVector;
313
314 template<int codimension>
315 class SubEntityIteratorBack;
316 typedef SubEntityIteratorBack<dimension> VertexIteratorBack;
317 typedef SubEntityIteratorBack<0> ElementIteratorBack;
318
324 virtual int nVertices(Dune::RefinementIntervals tag) const = 0;
325
332
339
345 virtual int nElements(Dune::RefinementIntervals tag) const = 0;
346
353
360
363 {}
364
365 protected:
366 virtual VertexIteratorBack *vBeginBack(Dune::RefinementIntervals tag) const = 0;
367 virtual VertexIteratorBack *vEndBack(Dune::RefinementIntervals tag) const = 0;
368 virtual ElementIteratorBack *eBeginBack(Dune::RefinementIntervals tag) const = 0;
369 virtual ElementIteratorBack *eEndBack(Dune::RefinementIntervals tag) const = 0;
370 };
371
373 template<int dimension, class CoordType>
374 template<int codimension>
375 struct VirtualRefinement<dimension, CoordType>::Codim
376 {
377 class SubEntityIterator;
378 };
379
380 // ////////////////////////
381 //
382 // The refinement builder
383 //
384
385 template<int dimension, class CoordType>
387 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
388
389} // namespace Dune
390
391#include "virtualrefinement.cc"
392
393#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
vector space out of a tensor product of fields.
Definition: fvector.hh:95
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition: base.cc:92
VirtualRefinement base class.
Definition: virtualrefinement.hh:292
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:36
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition: virtualrefinement.cc:52
virtual int nElements(Dune::RefinementIntervals tag) const =0
Get the number of Elements.
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition: virtualrefinement.cc:60
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:299
virtual ~VirtualRefinement()
Destructor.
Definition: virtualrefinement.hh:362
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:44
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition: virtualrefinement.hh:306
virtual int nVertices(Dune::RefinementIntervals tag) const =0
Get the number of Vertices.
std::vector< int > IndexVector
The IndexVector of the VirtualRefinement.
Definition: virtualrefinement.hh:312
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:297
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
Implements a vector constructed from a given type representing a field and a compile-time given size.
Dune namespace.
Definition: alignedallocator.hh:11
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition: virtualrefinement.cc:501
codim database of VirtualRefinement
Definition: virtualrefinement.hh:376
A unique label for each type of element that can occur in a grid.
This file contains the virtual wrapper around refinement.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 24, 22:29, 2024)