See Refinement implementation for simplices.
Classes | |
struct | Factorial |
Calculate factorial at compile time. More... | |
Functions | |
Utilities | |
int | factorial (int n) |
Calculate n! | |
int | binomial (int upper, int lower) |
calculate ![]() | |
template<int dimension> | |
int | pointIndex (const FieldVector< int, dimension > &point) |
calculate the index of a given gridpoint within a Kuhn0 simplex | |
template<int n> | |
FieldVector< int, n > | getPermutation (int m) |
Calculate permutation from it's index. | |
template<int dimension, class CoordType> | |
FieldVector< CoordType, dimension > | referenceToKuhn (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn) |
Map from the reference simplex to some Kuhn simplex. | |
template<int dimension, class CoordType> | |
FieldVector< CoordType, dimension > | kuhnToReference (FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn) |
Map from some Kuhn simplex to the reference simplex. |
int Dune::RefinementImp::Simplex::binomial | ( | int | upper, | |
int | lower | |||
) | [inline] |
calculate
Runtime is of order O(min {lower, upper-lower})
References factorial().
Referenced by pointIndex().
int Dune::RefinementImp::Simplex::factorial | ( | int | n | ) | [inline] |
FieldVector<int, n> Dune::RefinementImp::Simplex::getPermutation | ( | int | m | ) | [inline] |
Calculate permutation from it's index.
Runtime is of order O(n).
FieldVector<CoordType, dimension> Dune::RefinementImp::Simplex::kuhnToReference | ( | FieldVector< CoordType, dimension > | point, | |
const FieldVector< int, dimension > & | kuhn | |||
) | [inline] |
Map from some Kuhn simplex to the reference simplex.
dimension | Dimension of the simplices |
point | Point to map |
kuhn | Permutation of the Kuhn simplex to map from |
int Dune::RefinementImp::Simplex::pointIndex | ( | const FieldVector< int, dimension > & | point | ) | [inline] |
calculate the index of a given gridpoint within a Kuhn0 simplex
Runtime is of order O(dimension^2) (or better for dimension > the coordinates of the point)
References binomial().
FieldVector<CoordType, dimension> Dune::RefinementImp::Simplex::referenceToKuhn | ( | FieldVector< CoordType, dimension > | point, | |
const FieldVector< int, dimension > & | kuhn | |||
) | [inline] |
Map from the reference simplex to some Kuhn simplex.
dimension | Dimension of the simplices |
point | Point to map |
kuhn | Permutation of the Kuhn simplex to map to |