]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Address and document issues with compress() in these testcases.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 6 Jan 2015 20:11:17 +0000 (14:11 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 9 Jan 2015 06:56:05 +0000 (00:56 -0600)
tests/trilinos/14.cc
tests/trilinos/15.cc
tests/trilinos/16.cc

index 91d49e6cca652f1af39b71d659790bb20dddecb9..89c16056e106e8f21a531f2782afbc9045cd4807 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2013 by the deal.II authors
+// Copyright (C) 2004 - 2013, 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
 
 
 
-// check TrilinosWrappers::Vector::operator() in set/add-mode alternatingly
+// check TrilinosWrappers::Vector::operator() in set/add-mode
+// alternatingly. this test doesn't really make sense any more -- at
+// least one a single processor. on multiple processors, one has to
+// call compress() and it used to be that we had code that called
+// compress() either with VectorOperation::insert or
+// VectorOperation::add automatically whenever we switched from one
+// kind of operation to the other. this is no longer the case -- the
+// user has to select which operation herself. on the other hand, as
+// long as we're working on a single processor, it doesn't matter
+// anyway.
+//
+// so the test doesn't make much sense any more for the original
+// purpose, but it's still worth keeping it around just to test that
+// set and write operations on a single processor go right through to
+// the stored data, rather than ending up in separate caches that only
+// get flushed when the right kind of compress() function is called.
 
 #include "../tests.h"
 #include <deal.II/base/utilities.h>
@@ -43,8 +58,6 @@ void test (TrilinosWrappers::Vector &v)
       pattern[i] = true;
     }
 
-  v.compress ();
-
   // check that they are ok, and this time
   // all of them
   for (unsigned int i=0; i<v.size(); ++i)
index fb00ab2e2cd8a1df4076a727a55848c6d5eef4d2..28eabf75ff69256f09f189932be3c0296b8c585f 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2013 by the deal.II authors
+// Copyright (C) 2004 - 2013, 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
 
 // check TrilinosWrappers::Vector::operator() in set/add-mode alternatingly, but
 // writing to the same elements
+//
+// this test doesn't really make sense any more -- at least one a
+// single processor. on multiple processors, one has to call
+// compress() and it used to be that we had code that called
+// compress() either with VectorOperation::insert or
+// VectorOperation::add automatically whenever we switched from one
+// kind of operation to the other. this is no longer the case -- the
+// user has to select which operation herself. on the other hand, as
+// long as we're working on a single processor, it doesn't matter
+// anyway.
+//
+// so the test doesn't make much sense any more for the original
+// purpose, but it's still worth keeping it around just to test that
+// set and write operations on a single processor go right through to
+// the stored data, rather than ending up in separate caches that only
+// get flushed when the right kind of compress() function is called.
 
 #include "../tests.h"
 #include <deal.II/base/utilities.h>
@@ -40,8 +56,6 @@ void test (TrilinosWrappers::Vector &v)
   for (unsigned int i=0; i<v.size(); i+=1+i)
     v(i) += i;
 
-  v.compress ();
-
   // check that they are ok, and this time
   // all of them
   for (unsigned int i=0; i<v.size(); ++i)
index cc7b67dad40adeac0d701a8ad7bc538f0e830a39..d5f4c7747273c26e32b3fefe11926d8359d9c07c 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2013 by the deal.II authors
+// Copyright (C) 2004 - 2013, 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
 
 // check TrilinosWrappers::Vector::operator() in set/add-mode alternatingly, but
 // writing and overwriting the same elements
+//
+// this test doesn't really make sense any more -- at least one a
+// single processor. on multiple processors, one has to call
+// compress() and it used to be that we had code that called
+// compress() either with VectorOperation::insert or
+// VectorOperation::add automatically whenever we switched from one
+// kind of operation to the other. this is no longer the case -- the
+// user has to select which operation herself. on the other hand, as
+// long as we're working on a single processor, it doesn't matter
+// anyway.
+//
+// so the test doesn't make much sense any more for the original
+// purpose, but it's still worth keeping it around just to test that
+// set and write operations on a single processor go right through to
+// the stored data, rather than ending up in separate caches that only
+// get flushed when the right kind of compress() function is called.
 
 #include "../tests.h"
 #include <deal.II/base/utilities.h>
@@ -42,8 +58,6 @@ void test (TrilinosWrappers::Vector &v)
   for (unsigned int i=0; i<v.size(); i+=1+i)
     v(i) = i;
 
-  v.compress ();
-
   // check that they are ok, and this time
   // all of them
   for (unsigned int i=0; i<v.size(); ++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.