pdated sign in distance calculation (no change in phase)
This commit is contained in:
parent
c0d2c4dc3d
commit
637858558c
@ -16,11 +16,8 @@
|
||||
#include "common/MPI_Helpers.h"
|
||||
#include "common/Communication.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
struct Domain{
|
||||
// Default constructor
|
||||
Domain(int nx, int ny, int nz, int rnk, int npx, int npy, int npz,
|
||||
@ -184,8 +181,10 @@ inline void SSO(DoubleArray &Distance, char *ID, Domain &Dm, int timesteps){
|
||||
for (j=1;j<Dm.Ny-1;j++){
|
||||
for (i=1;i<Dm.Nx-1;i++){
|
||||
|
||||
sign = Distance(i,j,k) / fabs(Distance(i,j,k));
|
||||
|
||||
int n = k*Dm.Nx*Dm.Ny + j*Dm.Nx + i;
|
||||
// sign = Distance(i,j,k) / fabs(Distance(i,j,k));
|
||||
sign = -1;
|
||||
if (ID[n] == 0) sign = 1;
|
||||
/*
|
||||
if (!(i+1<Nx)) nx=0.5*Distance(i,j,k);
|
||||
else nx=0.5*Distance(i+1,j,k);;
|
||||
|
@ -203,7 +203,7 @@ void TwoPhase::ColorToSignedDistance(double Beta, DoubleArray &ColorData, Double
|
||||
}
|
||||
}
|
||||
|
||||
SSO(DistData,Dm.id,Dm,40);
|
||||
SSO(DistData,TempID,Dm,40);
|
||||
|
||||
for (int k=0; k<Nz; k++){
|
||||
for (int j=0; j<Ny; j++){
|
||||
|
Loading…
Reference in New Issue
Block a user