37 : m_coords(coords) { }
145 ARCANE_UNUSED(center);
164 ARCANE_UNUSED(center);
208 static inline Real computeTetraedronVolume(
const Real3 & n0,
const Real3 & n1,
const Real3 & n2,
const Real3 & n3)
213 static inline Real3 computeTetraedronCenter(
const Real3 & n0,
const Real3 & n1,
const Real3 & n2,
const Real3 & n3)
215 return 0.25 * (n0+n1+n2+n3);
218 static inline Real3 computeQuadrilateralCenter(
const Real3 & n0,
const Real3 & n1,
const Real3 & n2,
const Real3 & n3)
220 const Real s0 = computeTriangleSurface(n0,n1,n2);
221 const Real s1 = computeTriangleSurface(n0,n2,n3);
222 const Real s2 = computeTriangleSurface(n1,n2,n3);
223 const Real s3 = computeTriangleSurface(n0,n1,n3);
224 return (s0 * computeTriangleCenter(n0,n1,n2) +
225 s1 * computeTriangleCenter(n0,n2,n3) +
226 s2 * computeTriangleCenter(n1,n2,n3) +
227 s3 * computeTriangleCenter(n0,n1,n3)) / (s0+s1+s2+s3);
230 static inline Real3 computePentagonalCenter(
const Real3 & n0,
const Real3 & n1,
const Real3 & n2,
const Real3 & n3,
const Real3 & n4)
232 const Real s0 = computeTriangleSurface(n4,n0,n1);
233 const Real s1 = computeTriangleSurface(n0,n1,n2);
234 const Real s2 = computeTriangleSurface(n1,n2,n3);
235 const Real s3 = computeTriangleSurface(n2,n3,n4);
236 const Real s4 = computeTriangleSurface(n3,n4,n0);
237 const Real s5 = computeTriangleSurface(n0,n2,n3);
238 const Real s6 = computeTriangleSurface(n1,n3,n4);
239 const Real s7 = computeTriangleSurface(n2,n4,n0);
240 const Real s8 = computeTriangleSurface(n3,n0,n1);
241 const Real s9 = computeTriangleSurface(n4,n1,n2);
243 return (2*(s0 * computeTriangleCenter(n4,n0,n1) +
244 s1 * computeTriangleCenter(n0,n1,n2) +
245 s2 * computeTriangleCenter(n1,n2,n3) +
246 s3 * computeTriangleCenter(n2,n3,n4) +
247 s4 * computeTriangleCenter(n3,n4,n0)) +
248 s5 * computeTriangleCenter(n0,n2,n3) +
249 s6 * computeTriangleCenter(n1,n3,n4) +
250 s7 * computeTriangleCenter(n2,n4,n0) +
251 s8 * computeTriangleCenter(n3,n0,n1) +
252 s9 * computeTriangleCenter(n4,n1,n2)) / (2*(s0+s1+s2+s3+s4) + s5 + s6 + s7 + s8 + s9);
255 static inline Real3 computeHexagonalCenter(
const Real3 & n0,
const Real3 & n1,
const Real3 & n2,
const Real3 & n3,
const Real3 & n4,
const Real3 & n5)
257 const Real s0 = computeTriangleSurface(n0,n1,n5);
258 const Real s1 = computeTriangleSurface(n1,n2,n3);
259 const Real s2 = computeTriangleSurface(n3,n4,n5);
260 const Real s3 = computeTriangleSurface(n1,n3,n5);
261 const Real s4 = computeTriangleSurface(n0,n1,n2);
262 const Real s5 = computeTriangleSurface(n2,n3,n4);
263 const Real s6 = computeTriangleSurface(n4,n5,n0);
264 const Real s7 = computeTriangleSurface(n0,n2,n4);
266 return (s0 * computeTriangleCenter(n0,n1,n5) +
267 s1 * computeTriangleCenter(n1,n2,n3) +
268 s2 * computeTriangleCenter(n3,n4,n5) +
269 s3 * computeTriangleCenter(n1,n3,n5) +
270 s4 * computeTriangleCenter(n0,n1,n2) +
271 s5 * computeTriangleCenter(n2,n3,n4) +
272 s6 * computeTriangleCenter(n4,n5,n0) +
273 s7 * computeTriangleCenter(n0,n2,n4)) / (s0 + s1 + s2 + s3 + s4 + s5 + s6 + s7);