From 8ea7f86eae676b8c02a9ed747c28a0db98fd204b Mon Sep 17 00:00:00 2001 From: James E McClure Date: Wed, 7 Jan 2015 20:50:41 -0500 Subject: [PATCH] Added class for TwoPhase TCAT averages and unit test tests/TestTwoPhase.cpp --- common/Domain.h | 3 +-- common/pmmc.h | 2 +- tests/TestTwoPhase.cpp | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/Domain.h b/common/Domain.h index f3f1ff9f..f6e7e12f 100755 --- a/common/Domain.h +++ b/common/Domain.h @@ -12,8 +12,6 @@ #include "common/Utilities.h" #include "common/MPI.h" - - int MAX_BLOB_COUNT=50; using namespace std; @@ -38,6 +36,7 @@ struct Domain{ int nprocx,nprocy,nprocz; double Lx,Ly,Lz; int rank; + bool pBC; //********************************** // MPI ranks for all 18 neighbors diff --git a/common/pmmc.h b/common/pmmc.h index c1db94e9..434f9233 100644 --- a/common/pmmc.h +++ b/common/pmmc.h @@ -4,7 +4,6 @@ #include #include #include "Array.h" - #include "PointList.h" //#include "vecLib/clapack.h" @@ -301,6 +300,7 @@ char triTable[256][16] = {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; //-------------------------------------------------------------------------------------------------------- + class TriLinPoly{ /* Compute a tri-linear polynomial within a given cube (i,j,k) x (i+1,j+1,k+1) * Values are provided at the corners in CubeValues diff --git a/tests/TestTwoPhase.cpp b/tests/TestTwoPhase.cpp index 85276982..271b862b 100644 --- a/tests/TestTwoPhase.cpp +++ b/tests/TestTwoPhase.cpp @@ -7,8 +7,7 @@ #include #include -#include "pmmc.h" -#include "Domain.h" +#include "TwoPhase.h" #include "Extras.h" #include "D3Q19.h" #include "D3Q7.h" @@ -21,6 +20,20 @@ int main(int argc, char **argv) { + int rank,npx,npy,npz; + int Nx,Ny,Nz; + double Lx,Ly,Lz; + Nx=Ny=Nz=40; + rank=0; + npx=npy=npz=1; + Lx=Ly=Lz=1.0; + + Domain Dm(Nx,Ny,Nz,rank,npx,npy,npz,Lx,Ly,Lz); + + TwoPhase Averages(Dm); + Averages.SetupCubes(Dm); + Averages.Initialize(); + Averages.Compute(); return 0; }