Feature/arbitrary virtual refinement
This merge adds more flexibility to the VirtualRefinement
class. The old version of VirtualRefinement
could only produce
|\
| `\
| `\
|-----`\
|`\ | `\
| `\ | `\
|----`\-----`\
|`\ |`\ | `\
| `\ | `\ | `\
|----`\----`\-----`\
|`\ |`\ |`\ | `\
| `\ | `\ | `\ | `\
|----`\----`\----`\-----`\
Now it is possible to have an arbitrary number of sub elements per axis. For example, a refined triangle with
|\
| `\
| `\
| `\
|-------`\
|`\ | `\
| `\ | `\
| `\ | `\
|------`\-------`\
|`\ |`\ | `\
| `\ | `\ | `\
| `\ | `\ | `\
|------`\------`\-------`\
To use the number of sub elements in a call of a VirtualRefinement
function an RefinementIntervals
object must be passed, instead of just one int. For example, to call nVertices
use
nVertices(Dune::refinementIntervals(n)).
To use the old functionality, call the same function with Dune::refinementLevels(int)
, which creates an RefinementIntervals
object with
Calling the VirtualRefinement
functions with one int
yields the same result as before, but will additionally give a deprecation warning.
The changes above are now also implemented for the StaticRefinement
interface.
Intended merge date: 2017-08-28 (@joe).
Closes: !56 (merged).
Merge request reports
Activity
added 1 commit
- e3f109e3 - [virtual refinement] Removes an unnecessary variable
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
- Resolved by Jö Fahlke
added 1 commit
- 46f8503f - [virtual refinement] Uses more appropriate naming scheme
- Resolved by Jö Fahlke
There is also
StaticRefinement
inrefinement/base.cc
. It should not be too hard to extend it to support the tags, too.Note: currently
StaticRefinement
derives from some refinement implementation, and just exports all the methods. Any methods you see declared inStaticRefinement
are for documentation puposes only (e.g. inside#ifdef DOXYGEN
). You can add tag support by actually implementing these methods insideStaticRefinement
for real and just forwarding the calls to the base class (the implementation), converting fromlevel
tonIntervals
as appropriate. This avoids the need to have backward compatibility methods in each implementation class.Edited by Jö Fahlkeadded 1 commit
- 37c4f178 - [virtual refinement] Uses static overloads instead of dynamic dispatch
added 1 commit
- dcca08f4 - [virtual refinement] Adds tag information to the test output
mentioned in merge request dune-grid!193 (merged)
added 1 commit
- 7eb1685f - [virtual refinement] Adds strongly typed refinement tags and deprecation warnings