From 4c26a3303822557c5ea8d920f880e876554c08f9 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Fri, 4 Sep 2015 16:13:32 -0400 Subject: [PATCH] Added other minkowski measures (curvature, surface area) --- common/TwoPhase.cpp | 22 +++++----------------- common/pmmc.h | 18 ++++++++++++++++-- tests/lbpm_color_simulator.cpp | 2 +- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/common/TwoPhase.cpp b/common/TwoPhase.cpp index 494336dc..c013b53c 100644 --- a/common/TwoPhase.cpp +++ b/common/TwoPhase.cpp @@ -367,14 +367,6 @@ void TwoPhase::ComputeLocal() if (Dm.BoundaryCondition > 0 && Dm.kproc == 0) kmin=4; if (Dm.BoundaryCondition > 0 && Dm.kproc == Dm.nprocz-1) kmax=Nz-4; - // Map solid to erode the fluid so that interfaces can be calculated accurately - for (k=0; k #include #include @@ -1836,7 +1835,7 @@ inline void TRIM(DTMutableList &local_sol_pts, int &n_local_sol_pts, doub } } } -inline void geomavg_MarchingCubes( DoubleArray &A, double &v, int &i, int &j, int &k, +inline double geomavg_MarchingCubes( DoubleArray &A, double &v, int &i, int &j, int &k, DTMutableList &nw_pts, int &n_nw_pts, IntArray &nw_tris, int &n_nw_tris) { @@ -1847,6 +1846,7 @@ inline void geomavg_MarchingCubes( DoubleArray &A, double &v, int &i, int &j, in int m; int o; int p; + int area; // Go over each corner -- check to see if the corners are themselves vertices //1 @@ -2149,6 +2149,20 @@ inline void geomavg_MarchingCubes( DoubleArray &A, double &v, int &i, int &j, in n_nw_tris++; } } + // Compute the Interfacial Area + double s1,s2,s3,s; + for (int r=n_nw_tris_beg;rSDs(i) -= (1.0); // + for (i=0; iSDs(i) -= (1.0); // //....................................................................... // Finalize setup for averaging domain //Averages->SetupCubes(Dm);