Feature/arbitrary virtual refinement
This merge adds more flexibility to the VirtualRefinement
class. The old version of VirtualRefinement
could only produce 2^n
sub elements per axis. For example, refined triangle with n=2
:
|\
| `\
| `\
|-----`\
|`\ | `\
| `\ | `\
|----`\-----`\
|`\ |`\ | `\
| `\ | `\ | `\
|----`\----`\-----`\
|`\ |`\ |`\ | `\
| `\ | `\ | `\ | `\
|----`\----`\----`\-----`\
Now it is possible to have an arbitrary number of sub elements per axis. For example, a refined triangle with 3
sub triangles per axis is possible:
|\
| `\
| `\
| `\
|-------`\
|`\ | `\
| `\ | `\
| `\ | `\
|------`\-------`\
|`\ |`\ | `\
| `\ | `\ | `\
| `\ | `\ | `\
|------`\------`\-------`\
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 2^n
intervals.
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).