diff --git a/Tests/MathLib/TestGlobalVectorInterface.cpp b/Tests/MathLib/TestGlobalVectorInterface.cpp index 51582e59f1ad9f20857c41479910b892d751978f..17c699a838f467b118790fc76884c2d5d4937f7a 100644 --- a/Tests/MathLib/TestGlobalVectorInterface.cpp +++ b/Tests/MathLib/TestGlobalVectorInterface.cpp @@ -36,6 +36,7 @@ template <class T_VECTOR> void checkGlobalVectorInterface() { T_VECTOR x(10); + x.setZero(); ASSERT_EQ(10u, x.size()); ASSERT_EQ(0u, x.getRangeBegin()); diff --git a/Tests/MathLib/TestLinearSolver.cpp b/Tests/MathLib/TestLinearSolver.cpp index 387dcbbef857ae2979ea274e999a05f4ade18756..23f69595d56c0da5f0440b41c43aec9943e687a0 100644 --- a/Tests/MathLib/TestLinearSolver.cpp +++ b/Tests/MathLib/TestLinearSolver.cpp @@ -117,7 +117,9 @@ void checkLinearSolverInterface(T_MATRIX &A, BaseLib::ConfigTree const& ls_optio // set RHS and solution vectors T_VECTOR rhs(ex1.dim_eqs); + rhs.setZero(); T_VECTOR x(ex1.dim_eqs); + x.setZero(); // apply BC MathLib::applyKnownSolution(A, rhs, x, ex1.vec_dirichlet_bc_id, ex1.vec_dirichlet_bc_value); diff --git a/Tests/NumLib/TestSerialLinearSolver.cpp b/Tests/NumLib/TestSerialLinearSolver.cpp index d929a3f0f8348eb04235736669beb7fcd878d46a..cb97f08ba8bc24e7abc6c5fd98a40d3109dd6852 100644 --- a/Tests/NumLib/TestSerialLinearSolver.cpp +++ b/Tests/NumLib/TestSerialLinearSolver.cpp @@ -69,8 +69,9 @@ TEST(NumLibSerialLinearSolver, Steady2DdiffusionQuadElem) auto A = MathLib::MatrixVectorTraits<GlobalMatrix>::newInstance(ms); A->setZero(); auto rhs = MathLib::MatrixVectorTraits<GlobalVector>::newInstance(ms); + rhs->setZero(); auto x = MathLib::MatrixVectorTraits<GlobalVector>::newInstance(ms); - // TODO no setZero() for rhs, x? + x->setZero(); using LocalAssembler = Example::LocalAssemblerData; // Initializer of the local assembler data.