-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void UnitTetraIntersectionBaryTest::test_TetraAffineTransform_reverseApply()
{
- double nodes[4][3] = { {-4.0, 9.0, 3.0 },
- {11.0, 0.0, 2.0 },
- { 0.0, 0.0, 0.0 },
- { 2.0, 1.0,10.0 }};
+ double nodes[12] = { -4.0, 9.0, 3.0,
+ 11.0, 0.0, 2.0,
+ 0.0, 0.0, 0.0,
+ 2.0, 1.0,10.0 };
// double pSrc[3] = { -4.0, 9.0, 3.0 };
double pSrc[3] = { 40., -20., 100. };
double pDest[] = {1,1,1};
- const double* n[4] = { &nodes[0][0], &nodes[1][0], &nodes[2][0], &nodes[3][0] };
- TetraAffineTransform a(&n[0]);
+ TetraAffineTransform a(nodes);
a.apply( pDest, pSrc );
a.reverseApply( pDest, pDest );
CPPUNIT_ASSERT_DOUBLES_EQUAL( pSrc[0], pDest[0], 1e-12);