Reference documentation for deal.II version 9.3.3
|
#include <deal.II/matrix_free/mapping_info.h>
Public Member Functions | |
FPArrayComparator (const Number scaling) | |
bool | operator() (const std::vector< Number > &v1, const std::vector< Number > &v2) const |
bool | operator() (const Tensor< 1, VectorizedArrayType::size(), Number > &t1, const Tensor< 1, VectorizedArrayType::size(), Number > &t2) const |
template<int dim> | |
bool | operator() (const Tensor< 1, dim, Tensor< 1, VectorizedArrayType::size(), Number > > &t1, const Tensor< 1, dim, Tensor< 1, VectorizedArrayType::size(), Number > > &t2) const |
template<int dim> | |
bool | operator() (const Tensor< 2, dim, Tensor< 1, VectorizedArrayType::size(), Number > > &t1, const Tensor< 2, dim, Tensor< 1, VectorizedArrayType::size(), Number > > &t2) const |
template<int dim> | |
bool | operator() (const std::array< Tensor< 2, dim, Number >, dim+1 > &t1, const std::array< Tensor< 2, dim, Number >, dim+1 > &t2) const |
Public Attributes | |
Number | tolerance |
A class that is used to compare floating point arrays (e.g. std::vectors, Tensor<1,dim>, etc.). The idea of this class is to consider two arrays as equal if they are the same within a given tolerance. We use this comparator class within a std::map<> of the given arrays. Note that this comparison operator does not satisfy all the mathematical properties one usually wants to have (consider e.g. the numbers a=0, b=0.1, c=0.2 with tolerance 0.15; the operator gives a<c, but neither a<b? nor b<c? is satisfied). This is not a problem in the use cases for this class, but be careful when using it in other contexts.
Definition at line 595 of file mapping_info.h.
internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::FPArrayComparator | ( | const Number | scaling | ) |
bool internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::operator() | ( | const std::vector< Number > & | v1, |
const std::vector< Number > & | v2 | ||
) | const |
Compare two vectors of numbers (not necessarily of the same length)
bool internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::operator() | ( | const Tensor< 1, VectorizedArrayType::size(), Number > & | t1, |
const Tensor< 1, VectorizedArrayType::size(), Number > & | t2 | ||
) | const |
Compare two vectorized arrays (stored as tensors to avoid alignment issues).
bool internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::operator() | ( | const Tensor< 1, dim, Tensor< 1, VectorizedArrayType::size(), Number > > & | t1, |
const Tensor< 1, dim, Tensor< 1, VectorizedArrayType::size(), Number > > & | t2 | ||
) | const |
Compare two rank-1 tensors of vectorized arrays (stored as tensors to avoid alignment issues).
bool internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::operator() | ( | const Tensor< 2, dim, Tensor< 1, VectorizedArrayType::size(), Number > > & | t1, |
const Tensor< 2, dim, Tensor< 1, VectorizedArrayType::size(), Number > > & | t2 | ||
) | const |
Compare two rank-2 tensors of vectorized arrays (stored as tensors to avoid alignment issues).
bool internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::operator() | ( | const std::array< Tensor< 2, dim, Number >, dim+1 > & | t1, |
const std::array< Tensor< 2, dim, Number >, dim+1 > & | t2 | ||
) | const |
Compare two arrays of tensors.
Number internal::MatrixFreeFunctions::FPArrayComparator< Number, VectorizedArrayType >::tolerance |
Definition at line 647 of file mapping_info.h.