Skip to content
Snippets Groups Projects
Commit a2f72fc1 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[T] Initialize needed global vectors.

parent 306978e4
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
......@@ -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);
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment