From 6650c3eaf1eec2962cb3dc70b61e966f7d18cee1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 29 Mar 2005 16:44:29 +0000 Subject: [PATCH] Rename variable. git-svn-id: https://svn.dealii.org/trunk@10292 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/symmetric_tensor_01.cc | 20 ++++++++++---------- tests/base/symmetric_tensor_02.cc | 26 +++++++++++++------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/base/symmetric_tensor_01.cc b/tests/base/symmetric_tensor_01.cc index f318a121c7..af3b19754c 100644 --- a/tests/base/symmetric_tensor_01.cc +++ b/tests/base/symmetric_tensor_01.cc @@ -26,30 +26,30 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - SymmetricTensor<2,2> t2; - t2[0][0] = 1; - t2[1][1] = 2; - t2[0][1] = 3; + SymmetricTensor<2,2> t; + t[0][0] = 1; + t[1][1] = 2; + t[0][1] = 3; - Assert (t2[0][1] == t2[1][0], ExcInternalError()); + Assert (t[0][1] == t[1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value - t2[1][0] = 4; - Assert (t2[0][1] == 4, ExcInternalError()); + t[1][0] = 4; + Assert (t[0][1] == 4, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t2 == transpose(t2), ExcInternalError()); + Assert (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t2.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, + Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+2*4*4)) < 1e-14, ExcInternalError()); // make sure norm is induced by scalar // product - Assert (std::fabs (t2.norm()*t2.norm() - t2*t2) < 1e-14, + Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; diff --git a/tests/base/symmetric_tensor_02.cc b/tests/base/symmetric_tensor_02.cc index 72c71a232f..1ba67ea870 100644 --- a/tests/base/symmetric_tensor_02.cc +++ b/tests/base/symmetric_tensor_02.cc @@ -26,34 +26,34 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - SymmetricTensor<2,3> t3; - t3[0][0] = 1; - t3[1][1] = 2; - t3[2][2] = 3; - t3[0][1] = 4; - t3[0][2] = 5; - t3[1][2] = 6; + SymmetricTensor<2,3> t; + t[0][0] = 1; + t[1][1] = 2; + t[2][2] = 3; + t[0][1] = 4; + t[0][2] = 5; + t[1][2] = 6; - Assert (t3[0][1] == t3[1][0], ExcInternalError()); + Assert (t[0][1] == t[1][0], ExcInternalError()); // check that if a single element is // accessed, its transpose element gets the // same value - t3[1][0] = 14; - Assert (t3[0][1] == 14, ExcInternalError()); + t[1][0] = 14; + Assert (t[0][1] == 14, ExcInternalError()); // make sure transposition doesn't change // anything - Assert (t3 == transpose(t3), ExcInternalError()); + Assert (t == transpose(t), ExcInternalError()); // check norm of tensor - Assert (std::fabs(t3.norm() - std::sqrt(1.*1+2*2+3*3+2*14*14+2*5*5+2*6*6)) + Assert (std::fabs(t.norm() - std::sqrt(1.*1+2*2+3*3+2*14*14+2*5*5+2*6*6)) < 1e-14, ExcInternalError()); // make sure norm is induced by scalar // product - Assert (std::fabs (t3.norm()*t3.norm() - t3*t3) < 1e-14, + Assert (std::fabs (t.norm()*t.norm() - t*t) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; -- 2.39.5