Dune Core Modules (2.5.0)

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
320 virtual int nVertices(int level) const = 0;
322 VertexIterator vBegin(int level) const;
324 VertexIterator vEnd(int level) const;
325
327 virtual int nElements(int level) const = 0;
329 ElementIterator eBegin(int level) const;
331 ElementIterator eEnd(int level) const;
332
335 {}
336
337 protected:
338 virtual VertexIteratorBack *vBeginBack(int level) const = 0;
339 virtual VertexIteratorBack *vEndBack(int level) const = 0;
340 virtual ElementIteratorBack *eBeginBack(int level) const = 0;
341 virtual ElementIteratorBack *eEndBack(int level) const = 0;
342 };
343
345 template<int dimension, class CoordType>
346 template<int codimension>
347 struct VirtualRefinement<dimension, CoordType>::Codim
348 {
349 class SubEntityIterator;
350 };
351
352 // ////////////////////////
353 //
354 // The refinement builder
355 //
356
357 template<int dimension, class CoordType>
359 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
360
361} // namespace Dune
362
363#include "virtualrefinement.cc"
364
365#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
vector space out of a tensor product of fields.
Definition: fvector.hh:93
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:268
VirtualRefinement base class.
Definition: virtualrefinement.hh:292
VertexIterator vEnd(int level) const
Get a VertexIterator.
Definition: virtualrefinement.cc:44
ElementIterator eBegin(int level) const
Get an ElementIterator.
Definition: virtualrefinement.cc:52
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:299
virtual ~VirtualRefinement()
Destructor.
Definition: virtualrefinement.hh:334
ElementIterator eEnd(int level) const
Get an ElementIterator.
Definition: virtualrefinement.cc:60
virtual int nVertices(int level) const =0
Get the number of Vertices.
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition: virtualrefinement.hh:306
VertexIterator vBegin(int level) const
Get a VertexIterator.
Definition: virtualrefinement.cc:36
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
virtual int nElements(int level) const =0
Get the number of Elements.
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: alignment.hh:11
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition: virtualrefinement.cc:492
codim database of VirtualRefinement
Definition: virtualrefinement.hh:348
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 (Nov 23, 23:29, 2024)