From 50f26adccaab7f4beba9afd73d1031bb4fafb814 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Tue, 4 Sep 2018 21:40:44 -0400 Subject: [PATCH] fix phase field init --- cpu/Color.cpp | 2 +- gpu/Color.cu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/Color.cpp b/cpu/Color.cpp index b2080ec7..dd2f863a 100644 --- a/cpu/Color.cpp +++ b/cpu/Color.cpp @@ -2785,7 +2785,7 @@ extern "C" void ScaLBL_PhaseField_Init(int *Map, double *Phi, double *Den, doubl } else{ nA=0.5*(phi-1.f); - nB=0.5*(phi+1.f); + nB=0.5*(1.f-phi); } Den[idx] = nA; Den[Np+idx] = nB; diff --git a/gpu/Color.cu b/gpu/Color.cu index f5931d51..3fdc272a 100644 --- a/gpu/Color.cu +++ b/gpu/Color.cu @@ -3910,7 +3910,7 @@ __global__ void dvc_ScaLBL_PhaseField_Init(int *Map, double *Phi, double *Den, d } else{ nA=0.5*(phi-1.f); - nB=0.5*(phi+1.f); + nB=0.5*(1.f-phi); } Den[idx] = nA; Den[Np+idx] = nB;