libMesh
Public Member Functions | Protected Types | List of all members
PointTest Class Reference
Inheritance diagram for PointTest:
[legend]

Public Member Functions

 CPPUNIT_TEST_SUITE (PointTest)
 
POINTTEST CPPUNIT_TEST_SUITE_END ()
 
virtual void setUp ()
 
virtual void tearDown ()
 
void testValue ()
 
void testZero ()
 
void testNorm ()
 
void testNormSq ()
 
void testEquality ()
 
void testInEquality ()
 
void testAssignment ()
 
void testScalarInit ()
 
void testScalarMult ()
 
void testScalarDiv ()
 
void testScalarMultAssign ()
 
void testScalarDivAssign ()
 
void testVectorAdd ()
 
void testVectorAddScaled ()
 
void testVectorSub ()
 
void testVectorMult ()
 
void testVectorAddAssign ()
 
void testVectorSubAssign ()
 
void testValueBase ()
 
void testZeroBase ()
 
void testNormBase ()
 
void testNormSqBase ()
 
void testEqualityBase ()
 
void testInEqualityBase ()
 
void testAssignmentBase ()
 
void testScalarMultBase ()
 
void testScalarDivBase ()
 
void testScalarMultAssignBase ()
 
void testScalarDivAssignBase ()
 
void testVectorAddBase ()
 
void testVectorAddScaledBase ()
 
void testVectorSubBase ()
 
void testVectorMultBase ()
 
void testVectorAddAssignBase ()
 
void testVectorSubAssignBase ()
 

Protected Types

typedef Point::value_type T
 

Detailed Description

Definition at line 23 of file point_test.C.

Member Typedef Documentation

typedef Point ::value_type TypeVectorTestBase< Point >::T
protectedinherited

Definition at line 60 of file type_vector_test.h.

Member Function Documentation

PointTest::CPPUNIT_TEST_SUITE ( PointTest  )
POINTTEST PointTest::CPPUNIT_TEST_SUITE_END ( )
virtual void PointTestBase< Point >::setUp ( )
virtualinherited

Reimplemented from TypeVectorTestBase< Point >.

Definition at line 15 of file point_test.h.

References TypeVectorTestBase< DerivedClass >::setUp().

virtual void PointTestBase< Point >::tearDown ( )
virtualinherited

Reimplemented from TypeVectorTestBase< Point >.

Definition at line 20 of file point_test.h.

References TypeVectorTestBase< DerivedClass >::tearDown().

void TypeVectorTestBase< Point >::testAssignment ( )
inherited

Definition at line 125 of file type_vector_test.h.

126  {
127  DerivedClass avector = (*m_1_1_1);
128 
129  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(0) );
130  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(1) );
131  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(2) );
132  }
void TypeVectorTestBase< Point >::testAssignmentBase ( )
inherited

Definition at line 273 of file type_vector_test.h.

274  {
275  TypeVector<T> avector = (*m_1_1_1);
276 
277  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(0) );
278  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(1) );
279  CPPUNIT_ASSERT_EQUAL( T(1), (avector)(2) );
280  }
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testEquality ( )
inherited

Definition at line 113 of file type_vector_test.h.

114  {
115  CPPUNIT_ASSERT( (*m_1_1_1) == (*m_1_1_1) );
116  CPPUNIT_ASSERT( !((*m_1_1_1) == (*m_n1_1_n1)) );
117  }
void TypeVectorTestBase< Point >::testEqualityBase ( )
inherited

Definition at line 261 of file type_vector_test.h.

262  {
263  CPPUNIT_ASSERT( (*basem_1_1_1) == (*basem_1_1_1) );
264  CPPUNIT_ASSERT( !((*basem_1_1_1) == (*basem_n1_1_n1)) );
265  }
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
void TypeVectorTestBase< Point >::testInEquality ( )
inherited

Definition at line 119 of file type_vector_test.h.

120  {
121  CPPUNIT_ASSERT( !((*m_1_1_1) != (*m_1_1_1)) );
122  CPPUNIT_ASSERT( (*m_1_1_1) != (*m_n1_1_n1) );
123  }
void TypeVectorTestBase< Point >::testInEqualityBase ( )
inherited

Definition at line 267 of file type_vector_test.h.

268  {
269  CPPUNIT_ASSERT( !((*basem_1_1_1) != (*basem_1_1_1)) );
270  CPPUNIT_ASSERT( (*basem_1_1_1) != (*basem_n1_1_n1) );
271  }
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
void TypeVectorTestBase< Point >::testNorm ( )
inherited

Definition at line 103 of file type_vector_test.h.

104  {
105  CPPUNIT_ASSERT_DOUBLES_EQUAL( std::sqrt(3.0) , m_1_1_1->norm() , TOLERANCE*TOLERANCE );
106  }
Real norm() const
Definition: type_vector.h:909
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testNormBase ( )
inherited

Definition at line 251 of file type_vector_test.h.

252  {
253  CPPUNIT_ASSERT_DOUBLES_EQUAL( std::sqrt(3.0) , basem_1_1_1->norm() , TOLERANCE*TOLERANCE );
254  }
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testNormSq ( )
inherited

Definition at line 108 of file type_vector_test.h.

109  {
110  CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.0 , m_1_1_1->norm_sq() , TOLERANCE*TOLERANCE );
111  }
static const Real TOLERANCE
Real norm_sq() const
Definition: type_vector.h:940
void TypeVectorTestBase< Point >::testNormSqBase ( )
inherited

Definition at line 256 of file type_vector_test.h.

257  {
258  CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.0 , basem_1_1_1->norm_sq() , TOLERANCE*TOLERANCE );
259  }
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarDiv ( )
inherited

Definition at line 154 of file type_vector_test.h.

155  {
156  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*m_1_1_1)/5.0)(0)) , TOLERANCE*TOLERANCE );
157  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*m_1_1_1)/5.0)(1)) , TOLERANCE*TOLERANCE );
158  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*m_1_1_1)/5.0)(2)) , TOLERANCE*TOLERANCE );
159  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarDivAssign ( )
inherited

Definition at line 171 of file type_vector_test.h.

172  {
173  DerivedClass avector(1.0,1.0,1.0);
174  avector/=5.0;
175 
176  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
177  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
178  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
179  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarDivAssignBase ( )
inherited

Definition at line 306 of file type_vector_test.h.

307  {
308  TypeVector<T> avector(*m_1_1_1);
309  avector/=5.0;
310 
311  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
312  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
313  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
314  }
T libmesh_real(T a)
static const Real TOLERANCE
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testScalarDivBase ( )
inherited

Definition at line 289 of file type_vector_test.h.

290  {
291  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*basem_1_1_1)/5.0)(0)) , TOLERANCE*TOLERANCE );
292  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*basem_1_1_1)/5.0)(1)) , TOLERANCE*TOLERANCE );
293  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0/5.0 , libmesh_real(((*basem_1_1_1)/5.0)(2)) , TOLERANCE*TOLERANCE );
294  }
T libmesh_real(T a)
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarInit ( )
inherited

Definition at line 134 of file type_vector_test.h.

135  {
136  DerivedClass avector = 0;
137  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
138  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
139  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
140 
141  DerivedClass bvector = 2.0;
142  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(bvector(0)) , TOLERANCE*TOLERANCE );
143  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(bvector(1)) , TOLERANCE*TOLERANCE );
144  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(bvector(2)) , TOLERANCE*TOLERANCE );
145  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarMult ( )
inherited

Definition at line 147 of file type_vector_test.h.

148  {
149  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*m_1_1_1)*5.0)(0)) , TOLERANCE*TOLERANCE );
150  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*m_1_1_1)*5.0)(1)) , TOLERANCE*TOLERANCE );
151  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*m_1_1_1)*5.0)(2)) , TOLERANCE*TOLERANCE );
152  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarMultAssign ( )
inherited

Definition at line 161 of file type_vector_test.h.

162  {
163  DerivedClass avector(1,1,1);
164  avector*=5.0;
165 
166  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
167  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
168  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
169  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testScalarMultAssignBase ( )
inherited

Definition at line 296 of file type_vector_test.h.

297  {
298  TypeVector<T> avector(*m_1_1_1);
299  avector*=5.0;
300 
301  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
302  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
303  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
304  }
T libmesh_real(T a)
static const Real TOLERANCE
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testScalarMultBase ( )
inherited

Definition at line 282 of file type_vector_test.h.

283  {
284  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*basem_1_1_1)*5.0)(0)) , TOLERANCE*TOLERANCE );
285  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*basem_1_1_1)*5.0)(1)) , TOLERANCE*TOLERANCE );
286  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0 , libmesh_real(((*basem_1_1_1)*5.0)(2)) , TOLERANCE*TOLERANCE );
287  }
T libmesh_real(T a)
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testValue ( )
inherited

Definition at line 82 of file type_vector_test.h.

83  {
84  CPPUNIT_ASSERT_EQUAL( T(1), (*m_1_1_1)(0));
85  CPPUNIT_ASSERT_EQUAL( T(1), (*m_1_1_1)(1));
86  CPPUNIT_ASSERT_EQUAL( T(1), (*m_1_1_1)(2));
87 
88  CPPUNIT_ASSERT_EQUAL( T(-1), (*m_n1_1_n1)(0));
89  CPPUNIT_ASSERT_EQUAL( T(1) , (*m_n1_1_n1)(1));
90  CPPUNIT_ASSERT_EQUAL( T(-1), (*m_n1_1_n1)(2));
91  }
void TypeVectorTestBase< Point >::testValueBase ( )
inherited

Definition at line 230 of file type_vector_test.h.

231  {
232  CPPUNIT_ASSERT_EQUAL( T(1), (*basem_1_1_1)(0));
233  CPPUNIT_ASSERT_EQUAL( T(1), (*basem_1_1_1)(1));
234  CPPUNIT_ASSERT_EQUAL( T(1), (*basem_1_1_1)(2));
235 
236  CPPUNIT_ASSERT_EQUAL( T(-1), (*basem_n1_1_n1)(0));
237  CPPUNIT_ASSERT_EQUAL( T(1 ), (*basem_n1_1_n1)(1));
238  CPPUNIT_ASSERT_EQUAL( T(-1), (*basem_n1_1_n1)(2));
239  }
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
void TypeVectorTestBase< Point >::testVectorAdd ( )
inherited

Definition at line 181 of file type_vector_test.h.

182  {
183  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*m_1_1_1)+(*m_n1_1_n1))(0)) , TOLERANCE*TOLERANCE );
184  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*m_1_1_1)+(*m_n1_1_n1))(1)) , TOLERANCE*TOLERANCE );
185  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*m_1_1_1)+(*m_n1_1_n1))(2)) , TOLERANCE*TOLERANCE );
186  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorAddAssign ( )
inherited

Definition at line 210 of file type_vector_test.h.

211  {
212  DerivedClass avector(1,1,1);
213  avector+=(*m_1_1_1);
214 
215  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
216  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
217  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
218  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorAddAssignBase ( )
inherited

Definition at line 345 of file type_vector_test.h.

346  {
347  TypeVector<T> avector(*m_1_1_1);
348  avector+=(*basem_1_1_1);
349 
350  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
351  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
352  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
353  }
T libmesh_real(T a)
static const Real TOLERANCE
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testVectorAddBase ( )
inherited

Definition at line 316 of file type_vector_test.h.

317  {
318  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*basem_1_1_1)+(*basem_n1_1_n1))(0)) , TOLERANCE*TOLERANCE );
319  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*basem_1_1_1)+(*basem_n1_1_n1))(1)) , TOLERANCE*TOLERANCE );
320  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*basem_1_1_1)+(*basem_n1_1_n1))(2)) , TOLERANCE*TOLERANCE );
321  }
T libmesh_real(T a)
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorAddScaled ( )
inherited

Definition at line 188 of file type_vector_test.h.

189  {
190  DerivedClass avector(1,1,1);
191  avector.add_scaled((*m_1_1_1),0.5);
192 
193  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
194  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
195  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
196  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorAddScaledBase ( )
inherited

Definition at line 323 of file type_vector_test.h.

324  {
325  TypeVector<T> avector(*m_1_1_1);
326  avector.add_scaled((*basem_1_1_1),0.5);
327 
328  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
329  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
330  CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
331  }
T libmesh_real(T a)
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testVectorMult ( )
inherited

Definition at line 205 of file type_vector_test.h.

206  {
207  CPPUNIT_ASSERT_DOUBLES_EQUAL( -1.0 , libmesh_real((*m_1_1_1)*(*m_n1_1_n1)) , TOLERANCE*TOLERANCE );
208  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorMultBase ( )
inherited

Definition at line 340 of file type_vector_test.h.

341  {
342  CPPUNIT_ASSERT_DOUBLES_EQUAL( -1.0 , libmesh_real((*basem_1_1_1)*(*basem_n1_1_n1)) , TOLERANCE*TOLERANCE );
343  }
T libmesh_real(T a)
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorSub ( )
inherited

Definition at line 198 of file type_vector_test.h.

199  {
200  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*m_1_1_1)-(*m_n1_1_n1))(0)) , TOLERANCE*TOLERANCE );
201  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*m_1_1_1)-(*m_n1_1_n1))(1)) , TOLERANCE*TOLERANCE );
202  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*m_1_1_1)-(*m_n1_1_n1))(2)) , TOLERANCE*TOLERANCE );
203  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorSubAssign ( )
inherited

Definition at line 220 of file type_vector_test.h.

221  {
222  DerivedClass avector(1,1,1);
223  avector-=(*m_n1_1_n1);
224 
225  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
226  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
227  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
228  }
T libmesh_real(T a)
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testVectorSubAssignBase ( )
inherited

Definition at line 355 of file type_vector_test.h.

356  {
357  TypeVector<T> avector(*m_1_1_1);
358  avector-=(*basem_n1_1_n1);
359 
360  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(0)) , TOLERANCE*TOLERANCE );
361  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(avector(1)) , TOLERANCE*TOLERANCE );
362  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(avector(2)) , TOLERANCE*TOLERANCE );
363  }
T libmesh_real(T a)
static const Real TOLERANCE
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30
void TypeVectorTestBase< Point >::testVectorSubBase ( )
inherited

Definition at line 333 of file type_vector_test.h.

334  {
335  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*basem_1_1_1)-(*basem_n1_1_n1))(0)) , TOLERANCE*TOLERANCE );
336  CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0 , libmesh_real(((*basem_1_1_1)-(*basem_n1_1_n1))(1)) , TOLERANCE*TOLERANCE );
337  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 , libmesh_real(((*basem_1_1_1)-(*basem_n1_1_n1))(2)) , TOLERANCE*TOLERANCE );
338  }
T libmesh_real(T a)
TypeVector< T > * basem_n1_1_n1
TypeVector< T > * basem_1_1_1
static const Real TOLERANCE
void TypeVectorTestBase< Point >::testZero ( )
inherited

Definition at line 93 of file type_vector_test.h.

94  {
95  DerivedClass avector(1,1,1);
96  avector.zero();
97 
98  CPPUNIT_ASSERT_EQUAL( T(0), avector(0));
99  CPPUNIT_ASSERT_EQUAL( T(0), avector(1));
100  CPPUNIT_ASSERT_EQUAL( T(0), avector(2));
101  }
void TypeVectorTestBase< Point >::testZeroBase ( )
inherited

Definition at line 241 of file type_vector_test.h.

242  {
243  TypeVector<T> avector((*basem_1_1_1));
244  avector.zero();
245 
246  CPPUNIT_ASSERT_EQUAL( T(0), avector(0));
247  CPPUNIT_ASSERT_EQUAL( T(0), avector(1));
248  CPPUNIT_ASSERT_EQUAL( T(0), avector(2));
249  }
TypeVector< T > * basem_1_1_1
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:30

The documentation for this class was generated from the following file: