Dune Core Modules (2.5.0)
A factory class for conveniently creating tensorproduct grids. More...
#include <dune/grid/utility/tensorgridfactory.hh>
Public Member Functions | |
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 More... | |
void | fillIntervals (int d, int n, ctype h) |
pushs n intervals of length h in direction d More... | |
void | fillRange (int d, int n, ctype end) |
fills the range to end with n intervals in direction d More... | |
void | fillUntil (int d, ctype h, ctype end) |
adds intervals in direction d until a given coordinate is reached More... | |
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. More... | |
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 More... | |
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 More... | |
void | print () |
print the coordinate information given to the factory so far | |
Detailed Description
class Dune::TensorGridFactory< Grid >
A factory class for conveniently creating tensorproduct grids.
- Template Parameters
-
Grid the grid type
Member Function Documentation
◆ fillIntervals()
|
inline |
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()
|
inline |
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()
|
inline |
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()
|
inline |
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()
|
inline |
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()
|
inline |
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.
◆ setStart()
|
inline |
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.
The documentation for this class was generated from the following file:
- dune/grid/utility/tensorgridfactory.hh