2018-06-06 22:38:46 -04:00
|
|
|
// Header file for two-phase averaging class
|
|
|
|
|
#ifndef Minkowski_INC
|
|
|
|
|
#define Minkowski_INC
|
|
|
|
|
|
2019-03-18 09:42:44 -04:00
|
|
|
#include <memory>
|
2018-06-06 22:38:46 -04:00
|
|
|
#include <vector>
|
|
|
|
|
|
2018-09-15 13:39:01 -04:00
|
|
|
#include "analysis/dcel.h"
|
2018-06-06 22:38:46 -04:00
|
|
|
#include "common/Domain.h"
|
|
|
|
|
#include "common/Communication.h"
|
|
|
|
|
#include "analysis/analysis.h"
|
2019-03-20 16:17:35 -04:00
|
|
|
#include "analysis/distance.h"
|
2020-07-22 13:14:07 -04:00
|
|
|
#include "analysis/filters.h"
|
2018-06-06 22:38:46 -04:00
|
|
|
|
|
|
|
|
#include "common/Utilities.h"
|
2020-03-17 21:44:45 -04:00
|
|
|
#include "common/MPI_Helpers.h"
|
2018-06-06 22:38:46 -04:00
|
|
|
#include "IO/MeshDatabase.h"
|
|
|
|
|
#include "IO/Reader.h"
|
|
|
|
|
#include "IO/Writer.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Minkowski{
|
|
|
|
|
//...........................................................................
|
|
|
|
|
int kstart,kfinish;
|
|
|
|
|
|
|
|
|
|
double isovalue;
|
|
|
|
|
double Volume;
|
|
|
|
|
|
|
|
|
|
// 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;
|
2019-03-20 16:17:35 -04:00
|
|
|
Array <char> id;
|
|
|
|
|
Array <int> label;
|
2019-03-19 08:36:08 -04:00
|
|
|
Array <double> distance;
|
2018-06-06 22:38:46 -04:00
|
|
|
//...........................................................................
|
|
|
|
|
// Averaging variables
|
|
|
|
|
//...........................................................................
|
|
|
|
|
// local averages (to each MPI process)
|
2018-09-10 21:30:04 -04:00
|
|
|
double Ai,Ji,Xi,Vi;
|
2018-09-15 13:39:01 -04:00
|
|
|
// Global averages (all processes)
|
2018-09-10 23:46:58 -04:00
|
|
|
double Ai_global,Ji_global,Xi_global,Vi_global;
|
2019-03-22 07:51:56 -04:00
|
|
|
int n_connected_components;
|
2018-06-06 22:38:46 -04:00
|
|
|
//...........................................................................
|
2018-06-07 10:35:32 -04:00
|
|
|
int Nx,Ny,Nz;
|
2019-03-20 16:17:35 -04:00
|
|
|
double V(){
|
|
|
|
|
return Vi;
|
|
|
|
|
}
|
|
|
|
|
double A(){
|
|
|
|
|
return Ai;
|
|
|
|
|
}
|
|
|
|
|
double H(){
|
|
|
|
|
return Ji;
|
|
|
|
|
}
|
|
|
|
|
double X(){
|
|
|
|
|
return Xi;
|
|
|
|
|
}
|
2019-03-19 08:36:08 -04:00
|
|
|
|
2018-09-28 16:36:42 -04:00
|
|
|
//..........................................................................
|
|
|
|
|
Minkowski(){};//NULL CONSTRUCTOR
|
2018-06-06 22:38:46 -04:00
|
|
|
Minkowski(std::shared_ptr <Domain> Dm);
|
|
|
|
|
~Minkowski();
|
2019-03-20 16:17:35 -04:00
|
|
|
void MeasureObject();
|
2019-03-22 07:51:56 -04:00
|
|
|
int MeasureConnectedPathway();
|
2018-09-17 13:03:00 -04:00
|
|
|
void ComputeScalar(const DoubleArray& Field, const double isovalue);
|
2019-03-19 08:36:08 -04:00
|
|
|
|
2018-09-15 13:39:01 -04:00
|
|
|
void PrintAll();
|
|
|
|
|
|
2018-06-06 22:38:46 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|