Files
LBPM/analysis/Minkowski.h

88 lines
2.3 KiB
C
Raw Normal View History

2018-06-06 22:38:46 -04:00
// Header file for two-phase averaging class
#ifndef Minkowski_INC
#define Minkowski_INC
#include <vector>
#include "analysis/pmmc.h"
#include "common/Domain.h"
#include "common/Communication.h"
#include "analysis/analysis.h"
#include "shared_ptr.h"
#include "common/Utilities.h"
#include "common/MPI_Helpers.h"
#include "IO/MeshDatabase.h"
#include "IO/Reader.h"
#include "IO/Writer.h"
class Minkowski{
//...........................................................................
int n_obj_pts;
int n_obj_tris;
//...........................................................................
int nc;
int kstart,kfinish;
double isovalue;
double Volume;
// initialize lists for vertices for surfaces, common line
DTMutableList<Point> obj_pts;
DTMutableList<Point> tmp;
// initialize triangle lists for surfaces
IntArray obj_tris;
// Temporary storage arrays
DoubleArray CubeValues;
DoubleArray Values;
DoubleArray NormalVector;
DoubleArray RecvBuffer;
char *TempID;
// CSV / text file where time history of averages is saved
2018-06-07 10:35:32 -04:00
FILE *LOGFILE;
2018-06-06 22:38:46 -04:00
public:
//...........................................................................
std::shared_ptr <Domain> Dm;
//...........................................................................
// Averaging variables
//...........................................................................
// local averages (to each MPI process)
double vol_n; // volumes the exclude the interfacial region
// Global averages (all processes)
double vol_n_global; // volumes the exclude the interfacial region
double euler,Kn,Jn,An;
double euler_global,Kn_global,Jn_global,An_global;
//...........................................................................
2018-06-07 10:35:32 -04:00
int Nx,Ny,Nz;
2018-06-06 22:38:46 -04:00
IntArray PhaseID; // Phase ID array (solid=0, non-wetting=1, wetting=2)
DoubleArray SDn;
DoubleArray MeanCurvature;
DoubleArray GaussCurvature;
DoubleArray SDn_x; // Gradient of the signed distance
DoubleArray SDn_y;
DoubleArray SDn_z;
//...........................................................................
Minkowski(std::shared_ptr <Domain> Dm);
~Minkowski();
void Initialize();
void UpdateMeshValues();
void ComputeLocal();
void Reduce();
void NonDimensionalize(double D);
2018-06-06 22:54:38 -04:00
void PrintAll();
2018-06-06 22:38:46 -04:00
int GetCubeLabel(int i, int j, int k, IntArray &BlobLabel);
void SortBlobs();
};
#endif