This file tests several math functions: the vtmv function with vtmv(Vector, FieldScalar, Vector) and vtmv(Vector, Matrix, Vector). the trace function the harmonicMean function. More...
#include <config.h>
#include <iostream>
#include <utility>
#include <dune/common/float_cmp.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/dynmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/common/dynvector.hh>
#include <dumux/common/math.hh>
This file tests several math functions: the vtmv function with vtmv(Vector, FieldScalar, Vector) and vtmv(Vector, Matrix, Vector). the trace function the harmonicMean function.
We declare some vectors and matrices and test the combinations of them against a previously calculated result.
Namespaces | |
namespace | Test |
Functions | |
template<class Scalar , class Table > | |
void | Test::checkTableInterpolation (Scalar ip, Scalar expected, const Table &table, Scalar eps=1e-15) |
int | main () |
int main | ( | ) |
Declare Vectors (FieldVector and DynamicVector)
Declare 3x3 Matrices with 3's on the principal diagonal
Set reference result. Should be -15 for all combinations
Test with FieldVector v1 Test vtmv function with FieldVector v1 and Scalar k and FieldVector v2
Test vtmv function with FieldVector v1 and FieldMatrix K and FieldVector v2
Test vtmv function with FieldVector v1 and FieldMatrix K and DynamicVector v2_dyn
Test vtmv function with FieldVector v1 and DynamicMatrix K_dyn and FieldVector v2
Test with DynamicVector v1_dyn Test vtmv function with DynamicVector v1_dyn and Scalar k and FieldVector v2
Test vtmv function with DynamicVector v1_dyn and FieldMatrix K and FieldVector v2
Test vtmv function with DynamicVector v1_dyn and Scalar k and DynamicVector v2_dyn
Test vtmv function with DynamicVector v1_dyn and DynamicMatrix K_dyn and FieldVector v2
Test Dynamic Vectors and Dynamic Matrices Test vtmv function with DynamicVector v1_dyn and DynamicMatrix K_dyn and DynamicVector v2_dyn
Test mv with FieldMatrix and FieldVector
Test mv with Scalar and FieldVector
Test mv with FieldMatrix and DynamicVector (use cast to FieldVector, there is no specialization of eq() for DynamicVector)
Test mv with Scalar and DynamicVector (use cast to FieldVector, there is no specialization of eq() for DynamicVector)
Test mv with DynamicMatrix and DynamicVector (use cast to FieldVector, there is no specialization of eq() for DynamicVector)
Test mv with DynamicMatrix and FieldVector