added switchto color model

This commit is contained in:
James McClure
2018-11-29 15:06:02 -05:00
parent 7b6d2b5513
commit 9957d78cd5

View File

@@ -645,11 +645,18 @@ void ScaLBL_ColorModel::Run(){
if (fabs(morph_delta) < 0.05 ) morph_delta = 0.05*(morph_delta)/fabs(morph_delta); // set minimum
if (rank==0) printf(" Adjust morph delta: %f \n", morph_delta);
}
//MORPH_ADAPT = false;
if (morph_delta < 0.f){
if (volB/(volA + volB) > TARGET_SATURATION){
MORPH_ADAPT = false;
TARGET_SATURATION = target_saturation[target_saturation_index++];
}
}
else{
if (volB/(volA + volB) < TARGET_SATURATION){
MORPH_ADAPT = false;
TARGET_SATURATION = target_saturation[target_saturation_index++];
}
}
MPI_Barrier(comm);
morph_timesteps = 0;
}