Dune Core Modules (2.7.1)
Modules | |
Refinement implementation for hypercubes | |
Refinement implementation for triangulating hypercubes | |
Refinement implementation for simplices | |
Virtual Refinement | |
Classes | |
class | Dune::RefinementIntervals |
Holds the number of refined intervals per axis needed for virtual and static refinement. More... | |
class | Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension_ > |
Wrap each Refinement implementation to get a consistent interface. More... | |
Functions | |
RefinementIntervals | Dune::refinementIntervals (int intervals) |
Creates a RefinementIntervals object. More... | |
RefinementIntervals | Dune::refinementLevels (int levels) |
Creates a RefinementIntervals object. More... | |
Detailed Description
General
The Refinement system allows to temporarily refine a grid or single entities without changing the grid itself. You may want to do this because you want to write your data to a file and have to do subsampling, but want to continue the calculation with the unmodified grid afterwards.
What Refinement can do for you
The Iterators can do all the usual things that Iterators can do, except dereferencing. In addition, to do something useful, they support some additional methods:
How to use it
If you want to write a Refinement implementation for a particular geometry type, e.g. SquaringTheCircle (or a particular set of geometry types) here is how:
- create a file refinement/squaringthecircle.cc and #include "base.cc". Your file will be included by others, so don't forget to protect against double inclusion.
- implement a class (or template class) RefinementImp conforming exactly to the user interface above.
- put it (and it's helper stuff as appropriate) into it's own namespace Dune::RefinementImp::SquaringTheCircle.
- define the mapping of topologyId, CoordType and coerceToId to your implementation by specialising template struct RefinementImp::Traits. It should look like this: If you implement a template class, you have to specialise struct RefinementImp::Traits for every possible combination of topologyId and coerceToId that your implementation supports.namespace Dune::RefinementImp {// we're only implementing this for dim=2template<class CoordType>struct Traits<sphereTopologyId, CoordType,Impl::CubeTopology<2>::type::id, 2>{typedef SquaringTheCircle::RefinementImp<CoordType> Imp;};}
- #include "refinement/squaringthecircle.cc" from refinement.hh.
This is enough to integrate your implementation into the Refinement system. You probably want to include it into VirtualRefinement also.
Namespaces
Function Documentation
◆ refinementIntervals()
|
inline |
Creates a RefinementIntervals object.
- Parameters
-
intervals Number of refined intervals per axis
Referenced by Dune::VirtualRefinement< dimension, CoordType >::eBegin(), Dune::VirtualRefinement< dimension, CoordType >::eEnd(), Dune::VirtualRefinement< dimension, CoordType >::vBegin(), and Dune::VirtualRefinement< dimension, CoordType >::vEnd().
◆ refinementLevels()
|
inline |
Creates a RefinementIntervals object.
- Parameters
-
levels Number of refinement levels, translates to \(2^{levels}\) intervals per axis