![]() |
LifeV
|
This class helps the testsuites in verifying that the solutions do not change from one execution to the other. More...
#include <VerifySolutions.hpp>
Constructors and destructor | |
VerifySolutions () | |
virtual | ~VerifySolutions () |
Methods | |
Real | M_NormMean |
Epetra_SerialDenseMatrix | M_CorrelationMatrix |
std::list< VectorEpetra > | M_VectorList |
void | PushBack (VectorEpetra const &newVector) |
Add a vector to the list of stored vectors. More... | |
void | ComputeCorrelation () |
Compute the correlation matrix and norm of the mean. More... | |
bool | Check (Epetra_SerialDenseMatrix const &refM, Real tol) const |
Checks that the current Correlation matrix is the same as the one provided by the user. More... | |
bool | Check (Real referenceMean, Real tol) const |
Checks that the current norm of the mean of the vectors is the same as the one provided by the user. More... | |
void | Print () const |
Print Mean and Correlation matrix as c++ lines ready to be inserted into the test. More... | |
This class helps the testsuites in verifying that the solutions do not change from one execution to the other.
We want to check if the solutions are correct between versions. we want to produce a small number of scalars and check they are always the same.
Given: u_0, ustd::placeholders::_1, ...
mean: u = mean u_j
correlation matrix: (u_i-u , u_j-u) i,j=0,1,...
Store the correlation matrix and (u,u) each entry of the matrix shall be equal to the stored one up to a tolerance.
Example of use taken from testsuite/verify_solution/main.cpp
Definition at line 67 of file VerifySolutions.hpp.
VerifySolutions | ( | ) |
|
virtual |
Definition at line 51 of file VerifySolutions.cpp.
void PushBack | ( | VectorEpetra const & | newVector | ) |
Add a vector to the list of stored vectors.
The vector is copied in a list container.
newVector | vector to be copied and stored |
Definition at line 55 of file VerifySolutions.cpp.
void ComputeCorrelation | ( | ) |
Compute the correlation matrix and norm of the mean.
This has to be called after all vectors have been PushBack and befor the Checks
Definition at line 61 of file VerifySolutions.cpp.
bool Check | ( | Epetra_SerialDenseMatrix const & | refM, |
Real | tol | ||
) | const |
Checks that the current Correlation matrix is the same as the one provided by the user.
Usually the reference matrix is computed with a solution set which is known to be correct.
refM | precomputed correlation matrix |
tol | Tolerance for checking same results |
Definition at line 105 of file VerifySolutions.cpp.
Checks that the current norm of the mean of the vectors is the same as the one provided by the user.
Usually the norm of the mean is computed with a solution set which is known to be correct.
referenceMean | precomputed norm of the mean of the vectors |
tol | Tolerance for checking same results |
Definition at line 129 of file VerifySolutions.cpp.
void Print | ( | ) | const |
Print Mean and Correlation matrix as c++ lines ready to be inserted into the test.
Definition at line 142 of file VerifySolutions.cpp.
|
private |
Definition at line 117 of file VerifySolutions.hpp.
|
private |
Definition at line 118 of file VerifySolutions.hpp.
|
private |
Definition at line 120 of file VerifySolutions.hpp.