1#ifndef included_AMP_test_MatrixTests
2#define included_AMP_test_MatrixTests
4#include "AMP/matrices/Matrix.h"
5#include "AMP/mesh/Mesh.h"
6#include "AMP/utils/UnitTest.h"
7#include "AMP/vectors/Variable.h"
8#include "AMP/vectors/Vector.h"
27 virtual std::shared_ptr<AMP::Mesh::Mesh>
getMesh()
const = 0;
28 virtual std::shared_ptr<AMP::LinearAlgebra::Vector>
getVector()
const = 0;
29 virtual std::shared_ptr<AMP::LinearAlgebra::Matrix>
getMatrix()
const = 0;
30 virtual std::shared_ptr<AMP::Discretization::DOFManager>
getDOFMap()
const = 0;
31 virtual std::shared_ptr<AMP::Discretization::DOFManager>
getDOFMapL()
const = 0;
32 virtual std::string
name()
const = 0;
51 explicit MatrixTests( std::shared_ptr<const MatrixFactory> factory,
52 std::shared_ptr<const MatrixFactory> copy_factory =
nullptr )
73 std::shared_ptr<AMP::LinearAlgebra::Matrix>
83 std::shared_ptr<MatrixFactory> factory,
84 std::shared_ptr<MatrixFactory> copy_factory =
nullptr );
virtual std::string name() const =0
virtual std::shared_ptr< AMP::Discretization::DOFManager > getDOFMap() const =0
MatrixFactory(const std::string &type)
virtual std::shared_ptr< AMP::Discretization::DOFManager > getDOFMapL() const =0
virtual std::shared_ptr< AMP::LinearAlgebra::Vector > getVector() const =0
virtual std::shared_ptr< AMP::LinearAlgebra::Matrix > getMatrix() const =0
const std::string & type() const
virtual std::shared_ptr< AMP::Mesh::Mesh > getMesh() const =0
MatrixFactory(const MatrixFactory &)
A helper class to store/run tests for a matrix.
void VerifyGetSetValuesMatrix(AMP::UnitTest *ut)
void VerifyScaleMatrix(AMP::UnitTest *ut)
void VerifyAXPYMatrix(AMP::UnitTest *ut)
void VerifyExtractDiagonal(AMP::UnitTest *ut)
void VerifyMatMultMatrix_AI(AMP::UnitTest *ut)
void VerifyCopyMatrix(AMP::UnitTest *ut)
void VerifyMatMultMatrix(AMP::UnitTest *ut)
void VerifyGetLeftRightVector(AMP::UnitTest *ut)
MatrixTests(std::shared_ptr< const MatrixFactory > factory, std::shared_ptr< const MatrixFactory > copy_factory=nullptr)
void VerifyMultMatrix(AMP::UnitTest *ut)
void VerifyMatMultMatrix_IA(AMP::UnitTest *ut)
void VerifyAddElementNode(AMP::UnitTest *ut)
std::shared_ptr< const MatrixFactory > d_copy_factory
std::shared_ptr< AMP::LinearAlgebra::Matrix > getCopyMatrix(std::shared_ptr< AMP::LinearAlgebra::Matrix > matrix)
void InstantiateMatrix(AMP::UnitTest *ut)
std::shared_ptr< const MatrixFactory > d_factory
void VerifyMatMultMatrix_AA(AMP::UnitTest *ut)
Class UnitTest is simple utility for running unit tests. It provides basic routines for tracing succe...
void fillWithPseudoLaplacian(std::shared_ptr< AMP::LinearAlgebra::Matrix > matrix)
void test_matrix_loop(AMP::UnitTest &ut, std::shared_ptr< MatrixTests > tests)
void testBasics(AMP::UnitTest &ut, const std::string &type)