1 // Copyright (C) 2007-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
20 #ifndef __VOLSURFUSER_TXX__
21 #define __VOLSURFUSER_TXX__
23 #include "VolSurfUser.hxx"
24 #include "VolSurfFormulae.hxx"
25 #include "InterpolationUtils.hxx"
29 namespace INTERP_KERNEL
31 template<class ConnType, NumberingPolicy numPol, int SPACEDIM>
32 double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords)
36 case INTERP_KERNEL::NORM_SEG2 :
37 case INTERP_KERNEL::NORM_SEG4 :
39 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
40 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
41 return INTERP_KERNEL::calculateLgthForSeg2(coords+(SPACEDIM*N1),coords+(SPACEDIM*N2),SPACEDIM);
43 case INTERP_KERNEL::NORM_SEG3 :
45 ConnType beginNode = OTT<ConnType,numPol>::coo2C(connec[0]);
46 ConnType endNode = OTT<ConnType,numPol>::coo2C(connec[1]);
47 ConnType middleNode = OTT<ConnType,numPol>::coo2C(connec[2]);
48 return INTERP_KERNEL::calculateLgthForSeg3(coords+(SPACEDIM*beginNode),coords+(SPACEDIM*endNode),coords+(SPACEDIM*middleNode),SPACEDIM);
50 case INTERP_KERNEL::NORM_TRI3 :
52 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
53 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
54 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
56 return INTERP_KERNEL::calculateAreaForTria(coords+(SPACEDIM*N1),
63 case INTERP_KERNEL::NORM_TRI6 :
64 case INTERP_KERNEL::NORM_TRI7 :
67 pts[0] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]);
68 pts[1] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]);
69 pts[2] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[2]);
70 pts[3] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[3]);
71 pts[4] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[4]);
72 pts[5] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[5]);
73 return INTERP_KERNEL::calculateAreaForQPolyg(pts,6,SPACEDIM);
76 case INTERP_KERNEL::NORM_QUAD4 :
78 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
79 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
80 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
81 ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
83 return INTERP_KERNEL::calculateAreaForQuad(coords+SPACEDIM*N1,
90 case INTERP_KERNEL::NORM_QUAD8 :
91 case INTERP_KERNEL::NORM_QUAD9 :
94 pts[0] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]);
95 pts[1] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]);
96 pts[2] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[2]);
97 pts[3] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[3]);
98 pts[4] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[4]);
99 pts[5] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[5]);
100 pts[6] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[6]);
101 pts[7] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[7]);
102 return INTERP_KERNEL::calculateAreaForQPolyg(pts,8,SPACEDIM);
105 case INTERP_KERNEL::NORM_POLYGON :
107 const double **pts=new const double *[lgth];
108 for(int inod=0;inod<lgth;inod++)
109 pts[inod] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[inod]);
110 double val=INTERP_KERNEL::calculateAreaForPolyg(pts,lgth,SPACEDIM);
115 case INTERP_KERNEL::NORM_QPOLYG :
117 const double **pts=new const double *[lgth];
118 for(int inod=0;inod<lgth;inod++)
119 pts[inod] = coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[inod]);
120 double val=INTERP_KERNEL::calculateAreaForQPolyg(pts,lgth,SPACEDIM);
125 case INTERP_KERNEL::NORM_TETRA4 :
126 case INTERP_KERNEL::NORM_TETRA10 :
128 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
129 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
130 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
131 ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
133 return INTERP_KERNEL::calculateVolumeForTetra(coords+SPACEDIM*N1,
140 case INTERP_KERNEL::NORM_PYRA5 :
141 case INTERP_KERNEL::NORM_PYRA13 :
143 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
144 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
145 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
146 ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
147 ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
149 return INTERP_KERNEL::calculateVolumeForPyra(coords+SPACEDIM*N1,
157 case INTERP_KERNEL::NORM_PENTA6 :
158 case INTERP_KERNEL::NORM_PENTA15 :
159 case INTERP_KERNEL::NORM_PENTA18 :
161 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
162 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
163 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
164 ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
165 ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
166 ConnType N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
168 return INTERP_KERNEL::calculateVolumeForPenta(coords+SPACEDIM*N1,
177 case INTERP_KERNEL::NORM_HEXA8 :
178 case INTERP_KERNEL::NORM_HEXA20 :
179 case INTERP_KERNEL::NORM_HEXA27 :
181 ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
182 ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
183 ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
184 ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
185 ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
186 ConnType N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
187 ConnType N7 = OTT<ConnType,numPol>::coo2C(connec[6]);
188 ConnType N8 = OTT<ConnType,numPol>::coo2C(connec[7]);
190 return INTERP_KERNEL::calculateVolumeForHexa(coords+SPACEDIM*N1,
200 case INTERP_KERNEL::NORM_HEXGP12:
202 const ConnType connecHexa12[43]={
203 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
204 OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[7]),-1,
205 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[1]),-1,
206 OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[2]),-1,
207 OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
208 OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
209 OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
210 OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[0])};
211 return calculateVolumeForPolyh2<ConnType,numPol>(connecHexa12,43,coords);
213 case INTERP_KERNEL::NORM_POLYHED :
215 return calculateVolumeForPolyh2<ConnType,numPol>(connec,lgth,coords);
219 throw INTERP_KERNEL::Exception("Not recognized cell type to get Length/Area/Volume on it !");
223 template<class ConnType, NumberingPolicy numPolConn>
224 double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim)
227 return computeVolSurfOfCell<ConnType,numPolConn,3>(type,connec,lgth,coords);
229 return computeVolSurfOfCell<ConnType,numPolConn,2>(type,connec,lgth,coords);
231 return computeVolSurfOfCell<ConnType,numPolConn,1>(type,connec,lgth,coords);
232 throw INTERP_KERNEL::Exception("Invalid spaceDim specified : must be 1, 2 or 3");
236 template<class ConnType, NumberingPolicy numPol,int SPACEDIM>
237 void computeBarycenter(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, double *res)
244 std::copy(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]),
245 coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]+1),res);
246 std::transform(res,res+SPACEDIM,coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]),res,std::plus<double>());
247 std::transform(res,res+SPACEDIM,res,std::bind2nd(std::multiplies<double>(),0.5));
254 Edge *ed=Edge::BuildEdgeFrom3Points(coords+2*OTT<ConnType,numPol>::coo2C(connec[0]),coords+2*OTT<ConnType,numPol>::coo2C(connec[2]),coords+2*OTT<ConnType,numPol>::coo2C(connec[1]));
255 ed->getBarycenter(res);
260 *res=(coords[OTT<ConnType,numPol>::coo2C(connec[0])]+coords[OTT<ConnType,numPol>::coo2C(connec[1])])/2.;
264 std::copy(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]),
265 coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]+1),res);
266 std::transform(res,res+SPACEDIM,coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]),res,std::plus<double>());
267 std::transform(res,res+SPACEDIM,res,std::bind2nd(std::multiplies<double>(),0.5));
270 throw INTERP_KERNEL::Exception("computeBarycenter for SEG3 only SPACEDIM 1,2 or 3 supported !");
276 std::copy(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]),
277 coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]+1),res);
278 std::transform(res,res+SPACEDIM,coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]),res,std::plus<double>());
279 std::transform(res,res+SPACEDIM,coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[2]),res,std::plus<double>());
280 std::transform(res,res+SPACEDIM,res,std::bind2nd(std::multiplies<double>(),1./3.));
288 pts[0] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]));
289 pts[1] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]));
290 pts[2] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[2]));
291 pts[3] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[3]));
292 pts[4] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[4]));
293 pts[5] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[5]));
294 computeQPolygonBarycenter2D(pts,6,2,res);
297 computePolygonBarycenter3D<ConnType,numPol>(connec,lgth/2,coords,res);
299 throw INTERP_KERNEL::Exception("Impossible spacedim linked to cell 2D Cell !");
306 computePolygonBarycenter2D<ConnType,numPol>(connec,lgth,coords,res);
308 computePolygonBarycenter3D<ConnType,numPol>(connec,lgth,coords,res);
310 throw INTERP_KERNEL::Exception("Impossible spacedim linked to cell 2D Cell !");
318 pts[0] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[0]));
319 pts[1] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[1]));
320 pts[2] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[2]));
321 pts[3] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[3]));
322 pts[4] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[4]));
323 pts[5] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[5]));
324 pts[6] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[6]));
325 pts[7] = const_cast<double *>(coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(connec[7]));
326 computeQPolygonBarycenter2D(pts,8,2,res);
329 computePolygonBarycenter3D<ConnType,numPol>(connec,lgth/2,coords,res);
331 throw INTERP_KERNEL::Exception("Impossible spacedim linked to cell 2D Cell !");
334 case INTERP_KERNEL::NORM_QPOLYG :
338 double **pts=new double *[lgth];
339 for(int i=0;i<lgth;i++)
340 pts[i]=const_cast<double *>(coords+2*OTT<ConnType,numPol>::coo2C(connec[i]));
341 computeQPolygonBarycenter2D(pts,lgth,2,res);
345 computePolygonBarycenter3D<ConnType,numPol>(connec,lgth/2,coords,res);
347 throw INTERP_KERNEL::Exception("Impossible spacedim linked to cell 2D Cell !");
353 res[0]=coords[3*OTT<ConnType,numPol>::coo2C(connec[0])];
354 res[1]=coords[3*OTT<ConnType,numPol>::coo2C(connec[0])+1];
355 res[2]=coords[3*OTT<ConnType,numPol>::coo2C(connec[0])+2];
356 res[0]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[1])];
357 res[1]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[1])+1];
358 res[2]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[1])+2];
359 res[0]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[2])];
360 res[1]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[2])+1];
361 res[2]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[2])+2];
362 res[0]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[3])];
363 res[1]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[3])+1];
364 res[2]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[3])+2];
365 res[0]*=0.25; res[1]*=0.25; res[2]*=0.25;
371 computePolygonBarycenter3D<ConnType,numPol>(connec,lgth-1,coords,tmp);
372 res[0]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[4])]+3.*tmp[0])/4.;
373 res[1]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[4])+1]+3.*tmp[1])/4.;
374 res[2]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[4])+2]+3.*tmp[2])/4.;
379 const ConnType conn[29]={
380 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
381 OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
382 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
383 OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[7]),-1,
384 OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[6]),-1,
385 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[1]),
387 barycenterOfPolyhedron<ConnType,numPol>(conn,29,coords,res);
392 const ConnType conn[22]={
393 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),-1,
394 OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
395 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
396 OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
397 OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[4])
399 barycenterOfPolyhedron<ConnType,numPol>(conn,22,coords,res);
402 case INTERP_KERNEL::NORM_HEXGP12:
404 const ConnType connecHexa12[43]={
405 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
406 OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[7]),-1,
407 OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[1]),-1,
408 OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[2]),-1,
409 OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
410 OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
411 OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
412 OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[0])};
413 barycenterOfPolyhedron<ConnType,numPol>(connecHexa12,43,coords,res);
418 barycenterOfPolyhedron<ConnType,numPol>(connec,lgth,coords,res);
422 throw INTERP_KERNEL::Exception("Not recognized cell type to get Barycenter on it !");
426 template<class ConnType, NumberingPolicy numPolConn>
427 void computeBarycenter2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim, double *res)
430 return computeBarycenter<ConnType,numPolConn,3>(type,connec,lgth,coords,res);
432 return computeBarycenter<ConnType,numPolConn,2>(type,connec,lgth,coords,res);
434 return computeBarycenter<ConnType,numPolConn,1>(type,connec,lgth,coords,res);
435 throw INTERP_KERNEL::Exception("Invalid spaceDim specified for compute barycenter : must be 1, 2 or 3");