A factory class for conveniently creating tensorproduct grids.
More...
#include <dune/grid/utility/tensorgridfactory.hh>
|
| std::unique_ptr< Grid > | createGrid (Comm comm=Comm()) |
| |
| std::array< std::vector< ctype >, dim > | coords () const |
| |
| std::vector< ctype > & | operator[] (std::size_t d) |
| | allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the coordinate directories.
|
| |
| const std::vector< ctype > & | operator[] (std::size_t d) const |
| | allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the coordinate directories.
|
| |
| void | setStart (int d, ctype value) |
| | set a starting value in a given direction d
|
| |
| void | fillIntervals (int d, int n, ctype h) |
| | pushs n intervals of length h in direction d
|
| |
| void | fillRange (int d, int n, ctype end) |
| | fills the range to end with n intervals in direction d
|
| |
| void | fillUntil (int d, ctype h, ctype end) |
| | adds intervals in direction d until a given coordinate is reached
|
| |
| void | geometricFillIntervals (int d, int n, ctype ratio, ctype h0=static_cast< ctype >(0)) |
| | adds n intervals in direction d with a given length ratio and a given starting interval length.
|
| |
| void | geometricFillUntil (int d, ctype ratio, ctype end, ctype h0=static_cast< ctype >(0)) |
| | adds intervals in direction d according with a given length ratio until a given coordinate is reached
|
| |
| void | geometricFillRange (int d, int n, ctype end, ctype h=static_cast< ctype >(0), bool first=true) |
| | fills a coordinate range in direction d with n intervals according to a geometric series
|
| |
| void | print () |
| | print the coordinate information given to the factory so far
|
| |
template<typename
Grid>
class Dune::TensorGridFactory< Grid >
A factory class for conveniently creating tensorproduct grids.
- Template Parameters
-
◆ Comm
◆ ctype
◆ coords()
◆ createGrid()
◆ fillIntervals()
pushs n intervals of length h in direction d
- Parameters
-
| d | the coordinate direction |
| n | the number of intervals to add |
| h | the interval length |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that \(x_i=x_0+i*h\).
◆ fillRange()
fills the range to end with n intervals in direction d
- Parameters
-
| d | the coordinate direction |
| n | the number of intervals to add |
| end | the coordinate on the upper border of the range |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that \(x_i=x_0+i*\frac{end-x_0}{n}\).
◆ fillUntil()
adds intervals in direction d until a given coordinate is reached
- Parameters
-
| d | the coordinate direction |
| h | the interval length |
| end | the coordinate on the upper border of the range |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that \(x_n < end < x_n + h\) and \(x_{i+1}-x_i = h\).
◆ geometricFillIntervals()
adds n intervals in direction d with a given length ratio and a given starting interval length.
- Parameters
-
| d | the coordinate direction |
| n | the number of intervals to add |
| ratio | the ratio of \( h_{i+1}\) to \(h_i\) |
| h0 | the starting interval length (optional) |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that \(h_{i+1}=qh_i\) for a given ratio \(q\) and interval length \(h_i=x_{i+1}-x_i\). The first interval length can either be explicitly given or be deduced by multiplying the ratio with the last interval length in the container.
◆ geometricFillRange()
fills a coordinate range in direction d with n intervals according to a geometric series
- Parameters
-
| d | the coordinate direction |
| n | the number of intervals to add |
| end | the coordinate of the upper border of the range |
| h | the interval length to start or end with (see below) (optional) |
| first | true if the given h is to be the first interval, false if last one |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that the ratio \(h_{i+1} / h_i\) is fixed throughout the range and \(x_n=end\), while \(h_i=x_{i+1}-x_i\) is the interval length. The first interval length can either be explicitly given or be deduced by taking the last interval length in the container. By setting the optional parameter first to false, the given h can instead be used as last interval length in the range.
◆ geometricFillUntil()
adds intervals in direction d according with a given length ratio until a given coordinate is reached
- Parameters
-
| d | the coordinate direction |
| ratio | the ratio of \(h_{i+1}\) to \(h_i\) |
| end | the coordinate on the right border of the range |
| h0 | the starting interval length (optional) |
Given a vector with last element \(x_0\), this will add elements \(x_1,\dots ,x_n\) such that - with \(h_i=x_{i+1}-x_i\) - \(h_{i+1}=qh_i\) for a given ratio \(q\) and that \(x_n < end < x_n + h\). The first interval length can either be explicitly given or be deduced by multiplying the ratio with the last interval length in the container.
◆ operator[]() [1/2]
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the coordinate directories.
◆ operator[]() [2/2]
allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the coordinate directories.
◆ print()
print the coordinate information given to the factory so far
◆ setStart()
set a starting value in a given direction d
- Parameters
-
| d | the coordinate direction |
| value | the value to set |
This resizes the coordinate vector for the given direction to 1. Not using this function will result in 0.0 to be used as a lower bound of the coordinate range.
◆ dim
The documentation for this class was generated from the following file: