Dune Core Modules (2.9.1)

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 (C) 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
268#include <vector>
269
270#include <dune/common/fvector.hh>
271
272#include "refinement.hh"
273#include "type.hh"
274
275namespace Dune
276{
277 // //////////////////////////////////////////
278 //
279 // The virtual base class and its iterators
280 //
281
282 //
283 // Refinement
284 //
285
292 template<int dimension, class CoordType>
294 {
295 public:
296 template<int codimension>
297 struct Codim;
302
314 typedef std::vector<int> IndexVector;
315
316 template<int codimension>
317 class SubEntityIteratorBack;
318 typedef SubEntityIteratorBack<dimension> VertexIteratorBack;
319 typedef SubEntityIteratorBack<0> ElementIteratorBack;
320
326 virtual int nVertices(Dune::RefinementIntervals tag) const = 0;
327
334
341
347 virtual int nElements(Dune::RefinementIntervals tag) const = 0;
348
355
362
365 {}
366
367 protected:
368 virtual VertexIteratorBack *vBeginBack(Dune::RefinementIntervals tag) const = 0;
369 virtual VertexIteratorBack *vEndBack(Dune::RefinementIntervals tag) const = 0;
370 virtual ElementIteratorBack *eBeginBack(Dune::RefinementIntervals tag) const = 0;
371 virtual ElementIteratorBack *eEndBack(Dune::RefinementIntervals tag) const = 0;
372 };
373
375 template<int dimension, class CoordType>
376 template<int codimension>
377 struct VirtualRefinement<dimension, CoordType>::Codim
378 {
379 class SubEntityIterator;
380 };
381
382 // ////////////////////////
383 //
384 // The refinement builder
385 //
386
387 template<int dimension, class CoordType>
389 buildRefinement(GeometryType geometryType, GeometryType coerceTo);
390
391} // namespace Dune
392
393#include "virtualrefinement.cc"
394
395#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:126
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition: base.cc:94
VirtualRefinement base class.
Definition: virtualrefinement.hh:294
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:301
virtual ~VirtualRefinement()
Destructor.
Definition: virtualrefinement.hh:364
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:308
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:314
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition: virtualrefinement.hh:299
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:378
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 21, 23:30, 2024)