Added class for TwoPhase TCAT averages and unit test tests/TestTwoPhase.cpp

This commit is contained in:
James E McClure
2015-01-07 20:50:41 -05:00
parent e7fe316adc
commit 8ea7f86eae
3 changed files with 17 additions and 5 deletions

View File

@@ -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

View File

@@ -4,7 +4,6 @@
#include <fstream>
#include <math.h>
#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

View File

@@ -7,8 +7,7 @@
#include <stdexcept>
#include <fstream>
#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;
}