Trying to find bug in ComputePhaseComponent
This commit is contained in:
parent
3462c42bd1
commit
b43d370a56
@ -158,7 +158,7 @@ int ComputeLocalBlobIDs( const DoubleArray& Phase, const DoubleArray& SignDist,
|
|||||||
PROFILE_STOP("ComputeLocalBlobIDs");
|
PROFILE_STOP("ComputeLocalBlobIDs");
|
||||||
return nblobs;
|
return nblobs;
|
||||||
}
|
}
|
||||||
int ComputeLocalPhaseComponent(const IntArray &PhaseID, int VALUE, BlobIDArray &ComponentLabel, bool periodic )
|
int ComputeLocalPhaseComponent(const IntArray &PhaseID, int &VALUE, BlobIDArray &ComponentLabel, bool periodic )
|
||||||
{
|
{
|
||||||
PROFILE_START("ComputeLocalPhaseComponent");
|
PROFILE_START("ComputeLocalPhaseComponent");
|
||||||
size_t Nx = PhaseID.size(0);
|
size_t Nx = PhaseID.size(0);
|
||||||
@ -445,7 +445,7 @@ int ComputeGlobalBlobIDs( int nx, int ny, int nz, const RankInfoStruct& rank_inf
|
|||||||
return nglobal;
|
return nglobal;
|
||||||
}
|
}
|
||||||
int ComputeGlobalPhaseComponent( int nx, int ny, int nz, const RankInfoStruct& rank_info,
|
int ComputeGlobalPhaseComponent( int nx, int ny, int nz, const RankInfoStruct& rank_info,
|
||||||
const IntArray &PhaseID, int VALUE, BlobIDArray &GlobalBlobID )
|
const IntArray &PhaseID, int &VALUE, BlobIDArray &GlobalBlobID )
|
||||||
{
|
{
|
||||||
PROFILE_START("ComputeGlobalPhaseComponent");
|
PROFILE_START("ComputeGlobalPhaseComponent");
|
||||||
// First compute the local ids
|
// First compute the local ids
|
||||||
|
@ -457,7 +457,7 @@ void TwoPhase::AssignComponentLabels()
|
|||||||
int LabelNWP=1;
|
int LabelNWP=1;
|
||||||
int LabelWP=2;
|
int LabelWP=2;
|
||||||
// NOTE: labeling the wetting phase components is tricky! One sandstone media had over 800,000 components
|
// NOTE: labeling the wetting phase components is tricky! One sandstone media had over 800,000 components
|
||||||
//NumberComponents_WP = ComputeGlobalPhaseComponent(Dm.Nx-2,Dm.Ny-2,Dm.Nz-2,Dm.rank_info,PhaseID,LabelWP,Label_WP);
|
// NumberComponents_WP = ComputeGlobalPhaseComponent(Dm.Nx-2,Dm.Ny-2,Dm.Nz-2,Dm.rank_info,PhaseID,LabelWP,Label_WP);
|
||||||
// treat all wetting phase is connected
|
// treat all wetting phase is connected
|
||||||
NumberComponents_WP=1;
|
NumberComponents_WP=1;
|
||||||
for (int k=0; k<Nz; k++){
|
for (int k=0; k<Nz; k++){
|
||||||
@ -465,8 +465,8 @@ void TwoPhase::AssignComponentLabels()
|
|||||||
for (int i=0; i<Nx; i++){
|
for (int i=0; i<Nx; i++){
|
||||||
Label_WP(i,j,k) = 0;
|
Label_WP(i,j,k) = 0;
|
||||||
if (SDs(i,j,k) > 0.0) PhaseID(i,j,k) = 0;
|
if (SDs(i,j,k) > 0.0) PhaseID(i,j,k) = 0;
|
||||||
else if (Phase(i,j,k) > 0.0) PhaseID(i,j,k) = 1;
|
else if (Phase(i,j,k) > 0.0) PhaseID(i,j,k) = LabelNWP;
|
||||||
else PhaseID(i,j,k) = 2;
|
else PhaseID(i,j,k) = LabelWP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user