X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FSplitterTetra.cxx;h=687c1dfefada01cf2c9e5b28ffb5dfc6dda13032;hb=19a5d11f2c31745a83bd6993357263641c0babe5;hp=b5e4999af0cedbfe9162f212a56d979eeb64472a;hpb=204a1120bdd573522acb77a7282dcec5133e9d03;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/SplitterTetra.cxx b/src/INTERP_KERNEL/SplitterTetra.cxx index b5e4999af..687c1dfef 100644 --- a/src/INTERP_KERNEL/SplitterTetra.cxx +++ b/src/INTERP_KERNEL/SplitterTetra.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 @@ -24,7 +24,7 @@ namespace INTERP_KERNEL { void SplitHexa8IntoTetras(SplittingPolicy policy, const int *nodalConnBg, const int *nodalConnEnd, const double *coords, - std::vector& tetrasNodalConn, std::vector& addCoords) throw(INTERP_KERNEL::Exception) + std::vector& tetrasNodalConn, std::vector& addCoords) { if(std::distance(nodalConnBg,nodalConnEnd)!=8) throw INTERP_KERNEL::Exception("SplitHexa8IntoTetras : input hexa do not have 8 nodes !"); @@ -66,10 +66,11 @@ namespace INTERP_KERNEL tmp2[0]=0.; tmp2[1]=0.; tmp2[2]=0.; for(int j=0;j<4;j++,conn+=4) { - tmp2[0]+=coords[3*nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]+0]; - tmp2[1]+=coords[3*nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]+1]; - tmp2[2]+=coords[3*nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]+3]; - conn[0]=nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]; + int tmp3(nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]); + tmp2[0]+=coords[3*tmp3+0]; + tmp2[1]+=coords[3*tmp3+1]; + tmp2[2]+=coords[3*tmp3+2]; + conn[0]=tmp3; conn[1]=nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+(j+1)%4]]; conn[2]=-(i+1); conn[3]=-7; } @@ -92,9 +93,9 @@ namespace INTERP_KERNEL } for(int i=0;i<7;i++,tmp2+=3) { - tmp2[0]=(tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+24]-8)]+0]+tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+25]-8)]+0])/2.; - tmp2[1]=(tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+24]-8)]+1]+tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+25]-8)]+1])/2.; - tmp2[2]=(tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+24]-8)]+2]+tmp[3*nodalConnBg[(GENERAL_48_SUB_NODES[2*i+25]-8)]+2])/2.; + tmp2[0]=(tmp[3*(GENERAL_48_SUB_NODES[2*i+24]-8)+0]+tmp[3*(GENERAL_48_SUB_NODES[2*i+25]-8)+0])/2.; + tmp2[1]=(tmp[3*(GENERAL_48_SUB_NODES[2*i+24]-8)+1]+tmp[3*(GENERAL_48_SUB_NODES[2*i+25]-8)+1])/2.; + tmp2[2]=(tmp[3*(GENERAL_48_SUB_NODES[2*i+24]-8)+2]+tmp[3*(GENERAL_48_SUB_NODES[2*i+25]-8)+2])/2.; } int *conn(&tetrasNodalConn[0]); std::vector dummy; @@ -119,7 +120,7 @@ namespace INTERP_KERNEL } void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const int *nodalConnBg, const int *nodalConnEnd, const double *coords, - std::vector& tetrasNodalConn, std::vector& addCoords) throw(INTERP_KERNEL::Exception) + std::vector& tetrasNodalConn, std::vector& addCoords) { switch(gt) {