From: wolf Date: Fri, 19 Feb 1999 13:11:16 +0000 (+0000) Subject: Fix at least one of the two testcases in this file. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ac692d19d29069ec1131ee88f5537f9a0e827d1;p=dealii-svn.git Fix at least one of the two testcases in this file. git-svn-id: https://svn.dealii.org/trunk@848 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/second_derivatives.cc b/tests/deal.II/second_derivatives.cc index cfac394bba..10d024bc07 100644 --- a/tests/deal.II/second_derivatives.cc +++ b/tests/deal.II/second_derivatives.cc @@ -65,10 +65,29 @@ int main () { for (unsigned int point=0; point<4; ++point) { // on the unit cell, - // the second derivative - // of a linear element - // should be zero - if (derivs[point] != Tensor<2,2>()) + bool ok=true; + + if ((derivs[point][0][0] != 0) || + (derivs[point][1][1] != 0)) + ok = false; + + switch (vertex) + { + case 0: + case 2: + if ((derivs[point][0][1] != 1) || + (derivs[point][1][0] != 1)) + ok = false; + break; + case 1: + case 3: + if ((derivs[point][0][1] != -1) || + (derivs[point][1][0] != -1)) + ok = false; + break; + }; + + if (!ok) { testcase_succeeded = false; cout << "WRONG! ";