From a68a8639210c59a7b48d5b4be67926386cf5b05a Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Tue, 8 Mar 2016 11:26:52 +0100 Subject: [PATCH] [T] use new matrix specs --- Tests/NumLib/ODEs.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Tests/NumLib/ODEs.h b/Tests/NumLib/ODEs.h index d3d2d324e2e..7bf6502d6a0 100644 --- a/Tests/NumLib/ODEs.h +++ b/Tests/NumLib/ODEs.h @@ -55,7 +55,7 @@ public: MathLib::MatrixSpecifications getMatrixSpecifications() const override { - return { N, N }; + return { N, N, nullptr, nullptr, nullptr }; } bool isLinear() const override @@ -73,12 +73,14 @@ public: static void setIC(Vector& x0) { MathLib::setVector(x0, { 1.0, 0.0 }); + MathLib::BLAS::finalizeAssembly(x0); } static Vector solution(const double t) { Vector v(2); MathLib::setVector(v, { cos(t), sin(t) }); + MathLib::BLAS::finalizeAssembly(v); return v; } @@ -123,12 +125,15 @@ public: MathLib::addToMatrix(Jac, N, N, { x[0] }); // add dK_dx if (dx_dx != 0.0) + { + BLAS::finalizeAssembly(Jac); BLAS::axpy(Jac, dx_dx, K); + } } MathLib::MatrixSpecifications getMatrixSpecifications() const override { - return { N, N }; + return { N, N, nullptr, nullptr, nullptr }; } bool isLinear() const override @@ -146,12 +151,14 @@ public: static void setIC(Vector& x0) { MathLib::setVector(x0, { 1.0 }); + MathLib::BLAS::finalizeAssembly(x0); } static Vector solution(const double t) { Vector v(1); MathLib::setVector(v, { 1.0/t }); + MathLib::BLAS::finalizeAssembly(v); return v; } @@ -264,7 +271,7 @@ public: MathLib::MatrixSpecifications getMatrixSpecifications() const override { - return { N, N }; + return { N, N, nullptr, nullptr, nullptr }; } bool isLinear() const override @@ -291,6 +298,7 @@ public: MathLib::setVector(x0, { sin(omega*t0)/omega/t0, 1.0/t0, cos(omega*t0) }); + MathLib::BLAS::finalizeAssembly(x0); // std::cout << "IC:\n" << Eigen::VectorXd(x0.getRawVector()) << "\n"; } @@ -303,6 +311,7 @@ public: MathLib::setVector(v, { sin(omega*t)/omega/t, 1.0/t, cos(omega*t) }); + MathLib::BLAS::finalizeAssembly(v); return v; } -- GitLab