Try to prevent identification fo isolated blobs near the solid
This commit is contained in:
parent
de8467c9ef
commit
3ed9afd03e
@ -145,7 +145,7 @@ int ComputeLocalBlobIDs( const DoubleArray& Phase, const DoubleArray& SignDist,
|
|||||||
Array<bool> isPhase(Nx,Ny,Nz);
|
Array<bool> isPhase(Nx,Ny,Nz);
|
||||||
memset(isPhase.get(),0,Nx*Ny*Nz*sizeof(bool));
|
memset(isPhase.get(),0,Nx*Ny*Nz*sizeof(bool));
|
||||||
for (size_t i=0; i<N; i++) {
|
for (size_t i=0; i<N; i++) {
|
||||||
if ( SignDist(i) < 0.0) {
|
if ( SignDist(i) <= vS) {
|
||||||
// Solid phase
|
// Solid phase
|
||||||
LocalBlobID(i) = -2;
|
LocalBlobID(i) = -2;
|
||||||
} else {
|
} else {
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
MPI_Comm newcomm;
|
MPI_Comm newcomm;
|
||||||
MPI_Comm_dup(MPI_COMM_WORLD,&newcomm);
|
MPI_Comm_dup(MPI_COMM_WORLD,&newcomm);
|
||||||
double vF = 0.0;
|
double vF = 0.0;
|
||||||
double vS = 0.0;
|
double vS = -1.0; // one voxel buffer region around solid
|
||||||
IntArray& ids = new_index->second;
|
IntArray& ids = new_index->second;
|
||||||
new_index->first = ComputeGlobalBlobIDs(Nx-2,Ny-2,Nz-2,rank_info,*phase,dist,vF,vS,ids,newcomm);
|
new_index->first = ComputeGlobalBlobIDs(Nx-2,Ny-2,Nz-2,rank_info,*phase,dist,vF,vS,ids,newcomm);
|
||||||
MPI_Comm_free(&newcomm);
|
MPI_Comm_free(&newcomm);
|
||||||
@ -168,7 +168,6 @@ private:
|
|||||||
double beta;
|
double beta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Function to start the analysis
|
// Function to start the analysis
|
||||||
void run_analysis( int timestep, int restart_interval,
|
void run_analysis( int timestep, int restart_interval,
|
||||||
const RankInfoStruct& rank_info, TwoPhase& Averages,
|
const RankInfoStruct& rank_info, TwoPhase& Averages,
|
||||||
|
Loading…
Reference in New Issue
Block a user