DUNE-FEM (unstable)

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// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
6#define DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
7
257#include <vector>
258
259#include <dune/common/fvector.hh>
260
261#include "refinement.hh"
262#include "type.hh"
263
264namespace Dune
265{
266 // //////////////////////////////////////////
267 //
268 // The virtual base class and its iterators
269 //
270
271 //
272 // Refinement
273 //
274
281 template<int dimension, class CoordType>
283 {
284 public:
285 template<int codimension>
286 struct Codim;
291
303 typedef std::vector<int> IndexVector;
304
305 template<int codimension>
306 class SubEntityIteratorBack;
307 typedef SubEntityIteratorBack<dimension> VertexIteratorBack;
308 typedef SubEntityIteratorBack<0> ElementIteratorBack;
309
315 virtual int nVertices(Dune::RefinementIntervals tag) const = 0;
316
323
330
336 virtual int nElements(Dune::RefinementIntervals tag) const = 0;
337
344
351
354 {}
355
356 protected:
357 virtual VertexIteratorBack *vBeginBack(Dune::RefinementIntervals tag) const = 0;
358 virtual VertexIteratorBack *vEndBack(Dune::RefinementIntervals tag) const = 0;
359 virtual ElementIteratorBack *eBeginBack(Dune::RefinementIntervals tag) const = 0;
360 virtual ElementIteratorBack *eEndBack(Dune::RefinementIntervals tag) const = 0;
361 };
362
364 template<int dimension, class CoordType>
365 template<int codimension>
366 struct VirtualRefinement<dimension, CoordType>::Codim
367 {
368 class SubEntityIterator;
369 };
370
371 // ////////////////////////
372 //
373 // The refinement builder
374 //
375
376 template<int dimension, class CoordType>
378 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
379
380} // namespace Dune
381
382#include "virtualrefinement.cc"
383
384#endif // DUNE_GEOMETRY_VIRTUALREFINEMENT_HH
vector space out of a tensor product of fields.
Definition: fvector.hh:91
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition: base.cc:94
VirtualRefinement base class.
Definition: virtualrefinement.hh:283
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:38
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition: virtualrefinement.cc:54
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:62
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:290
virtual ~VirtualRefinement()
Destructor.
Definition: virtualrefinement.hh:353
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition: virtualrefinement.cc:46
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition: virtualrefinement.hh:297
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:303
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:288
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:13
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition: virtualrefinement.cc:503
codim database of VirtualRefinement
Definition: virtualrefinement.hh:367
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 12, 23:30, 2024)