From 8ad9e59e819880e4ceed08e5e3db834ea75ae5ff Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 18 Feb 2015 06:46:37 -0600 Subject: [PATCH] Further fixes to accommodate new Point vs Tensor distinction. --- source/opencascade/boundary_lib.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/opencascade/boundary_lib.cc b/source/opencascade/boundary_lib.cc index c5b3a3a80b..ce4873000a 100644 --- a/source/opencascade/boundary_lib.cc +++ b/source/opencascade/boundary_lib.cc @@ -171,19 +171,23 @@ namespace OpenCASCADE { Tensor<1,3> u = surrounding_points[1]-surrounding_points[0]; Tensor<1,3> v = surrounding_points[2]-surrounding_points[0]; - Tensor<1,3> n1(u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)); + const double n1_coords[3] = {u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)}; + Tensor<1,3> n1(n1_coords); n1 = n1/n1.norm(); u = surrounding_points[2]-surrounding_points[3]; v = surrounding_points[1]-surrounding_points[3]; - Tensor<1,3> n2(u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)); + const double n2_coords[3] = {u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)}; + Tensor<1,3> n2(n2_coords); n2 = n2/n2.norm(); u = surrounding_points[4]-surrounding_points[7]; v = surrounding_points[6]-surrounding_points[7]; - Point<3> n3(u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)); + const double n3_coords[3] = {u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)}; + Tensor<1,3> n3(n3_coords); n3 = n3/n3.norm(); u = surrounding_points[6]-surrounding_points[7]; v = surrounding_points[5]-surrounding_points[7]; - Point<3> n4(u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)); + const double n4_coords[3] = {u(1)*v(2)-u(2)*v(1),u(2)*v(0)-u(0)*v(2),u(0)*v(1)-u(1)*v(0)}; + Tensor<1,3> n4(n4_coords); n4 = n4/n4.norm(); //for (unsigned int i=0; i