]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test size() function
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 8 Oct 2019 07:16:10 +0000 (09:16 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 9 Oct 2019 07:28:21 +0000 (09:28 +0200)
tests/base/vectorization_01.cc

index 3f6e146c55a2c868635181cd9275ef3503b68c19..82c86cdbc479bc19fa5828a0101fae0566dd6abf 100644 (file)
@@ -36,6 +36,10 @@ test()
   for (unsigned int i = 0; i < n_vectors; ++i)
     c[i] = Number(i);
 
+  AssertDimension(n_vectors, a.size());
+  AssertDimension(a.size(), sizeof(a) / sizeof(Number));
+  AssertDimension(VectorizedArray<Number>::size(), sizeof(a) / sizeof(Number));
+
   deallog << "Addition: ";
   VectorizedArray<Number> d = a + b;
   for (unsigned int i = 0; i < n_vectors; ++i)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.