Merge branch 'morphLBM' of github.com:JamesEMcClure/LBPM-WIA into morphLBM
This commit is contained in:
commit
e7904bfd24
@ -451,7 +451,11 @@ double MorphDrain(DoubleArray &SignDist, signed char *id, std::shared_ptr<Domain
|
||||
// if (rank==0) printf("Max. distance =%f, Initial critical radius = %f \n",maxdistGlobal,Rcrit_new);
|
||||
//}
|
||||
MPI_Barrier(Dm->Comm);
|
||||
|
||||
|
||||
FILE *DRAIN = fopen("morphdrain.csv","w");
|
||||
fprintf(DRAIN,"sw radius\n");
|
||||
|
||||
while (void_fraction_new > VoidFraction && Rcrit_new > 0.5)
|
||||
{
|
||||
void_fraction_diff_old = void_fraction_diff_new;
|
||||
@ -653,6 +657,8 @@ double MorphDrain(DoubleArray &SignDist, signed char *id, std::shared_ptr<Domain
|
||||
void_fraction_new = countGlobal/totalGlobal;
|
||||
void_fraction_diff_new = abs(void_fraction_new-VoidFraction);
|
||||
if (rank==0){
|
||||
fprintf(DRAIN,"%f ",void_fraction_new);
|
||||
fprintf(DRAIN,"%f\n",Rcrit_new);
|
||||
printf(" %f ",void_fraction_new);
|
||||
printf(" %f\n",Rcrit_new);
|
||||
}
|
||||
|
@ -742,7 +742,6 @@ void ScaLBL_ColorModel::Run(){
|
||||
CURRENT_MORPH_TIMESTEPS += analysis_interval;
|
||||
double massChange = SeedPhaseField(seed_water);
|
||||
if (rank==0) printf("***Seed water in oil %f, mass change %f ***\n", seed_water, massChange);
|
||||
|
||||
}
|
||||
else{
|
||||
if (rank==0) printf("***Morphological step with target volume change %f ***\n", delta_volume_target);
|
||||
@ -827,6 +826,12 @@ double ScaLBL_ColorModel::SeedPhaseField(const double seed_water_in_oil){
|
||||
mass_loss= sumReduce( Dm->Comm, mass_loss);
|
||||
if (rank == 0) printf("Remove mass %f from %f voxels \n",mass_loss,count);
|
||||
ScaLBL_CopyToDevice(Phi,phase.data(),N*sizeof(double));
|
||||
|
||||
FILE *OUTFILE;
|
||||
sprintf(LocalRankFilename,"Phase.%05i.raw",rank);
|
||||
OUTFILE = fopen(LocalRankFilename,"wb");
|
||||
fwrite(phase.data(),8,N,OUTFILE);
|
||||
fclose(OUTFILE);
|
||||
|
||||
// 7. Re-initialize phase field and density
|
||||
ScaLBL_PhaseField_Init(dvcMap, Phi, Den, Aq, Bq, 0, ScaLBL_Comm->LastExterior(), Np);
|
||||
|
@ -135,7 +135,7 @@ int main(int argc, char **argv)
|
||||
auto HistoryLabels = domain_db->getVector<int>( "HistoryLabels" );
|
||||
size_t NLABELS=LabelList.size();
|
||||
if (rank==0){
|
||||
for (unsigned int idx=0; idx < NLABELS; idx++){
|
||||
for (unsigned int idx=0; idx < NLABELS; idx++){
|
||||
signed char VALUE = LabelList[idx];
|
||||
signed char NEWVAL = HistoryLabels[idx];
|
||||
printf(" Relabel component %hhd as %hhd \n", VALUE, NEWVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user