From 450cdf409e97b76505f039df800c4419ebaa5b9e Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 2 Oct 2009 08:07:48 +0000 Subject: [PATCH] bug mantis 20457 --- src/INTERP_KERNEL/VolSurfFormulae.hxx | 30 ++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/INTERP_KERNEL/VolSurfFormulae.hxx b/src/INTERP_KERNEL/VolSurfFormulae.hxx index 7effb8eff..6e4a3d18a 100644 --- a/src/INTERP_KERNEL/VolSurfFormulae.hxx +++ b/src/INTERP_KERNEL/VolSurfFormulae.hxx @@ -373,9 +373,9 @@ namespace INTERP_KERNEL + 2.0*(I + R + U + X + Y + Z) + AA ) / 27.0 ; } - // ========================= - // Calculate Volume for Poly - // ========================= + // ========================================================================================================================= + // Calculate Volume for Generic Polyedron, even not convex one, WARNING !!! The polyedron's faces must be correctly ordered + // ========================================================================================================================= inline double calculateVolumeForPolyh(const double ***pts, const int *nbOfNodesPerFaces, int nbOfFaces, @@ -397,6 +397,30 @@ namespace INTERP_KERNEL return -volume/3.; } + // ============================================================================================================================================ + // Calculate Volume for NON Generic Polyedron. Only polydrons with bary included in pts is supported by this method. Result is always positive. + // ============================================================================================================================================ + inline double calculateVolumeForPolyhAbs(const double ***pts, + const int *nbOfNodesPerFaces, + int nbOfFaces, + const double *bary) + { + double volume=0.; + + for ( int i=0; i inline double addComponentsOfVec(const double **pts, int rk) { -- 2.39.2