Skip to content
Snippets Groups Projects
Commit 9b9d746d authored by Christian Engwer's avatar Christian Engwer
Browse files

add vec-scalar operator test to fvectortest

[[Imported from SVN: r6123]]
parent 4a08873a
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ class FieldVectorMainTest
{
protected:
FieldVectorMainTest() {
ct a = 1;
FieldVector<ct,d> v(1);
FieldVector<ct,d> w(2);
FieldVector<ct,d> z(2);
......@@ -27,13 +28,26 @@ protected:
(w+v).infinity_norm();
(w+v).infinity_norm_real();
// test op(vec,vec)
z = v + w;
z = v - w;
FieldVector<ct,d> z2 = v + w;
w -= v;
w += v;
// test op(vec,scalar)
w +=a;
w -= a;
w *= a;
w /= a;
// test scalar product, axpy
a = v * w;
z = v.axpy(a,w);
// test comparison
b = (w != v);
b = (w == v);
w=v;
}
};
......
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