wetting energy in analysis
This commit is contained in:
@@ -187,6 +187,10 @@ void SubPhase::Basic(){
|
||||
double phi = (nA-nB)/(nA+nB);
|
||||
Phi(n) = phi;
|
||||
}
|
||||
if (Phi(n) != Phi(n)){
|
||||
// check for NaN
|
||||
Phi(n) = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -328,13 +332,19 @@ void SubPhase::Basic(){
|
||||
local_wetting_weight += 0.5;
|
||||
}
|
||||
/* interaction due to this solid site*/
|
||||
total_wetting_interaction += 0.5*local_wetting_interaction;
|
||||
if (local_wetting_weight > 0.0)
|
||||
count_wetting_interaction += local_wetting_weight;
|
||||
if (local_wetting_interaction == local_wetting_interaction){
|
||||
total_wetting_interaction += 0.5*local_wetting_interaction;
|
||||
if (local_wetting_weight > 0.0)
|
||||
count_wetting_interaction += local_wetting_weight;
|
||||
}
|
||||
else{
|
||||
//printf("Check interaction at %i %i %i \n",i,j,k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("wetting interaction = %f, count = %f\n",total_wetting_interaction,count_wetting_interaction);
|
||||
total_wetting_interaction_global=Dm->Comm.sumReduce( total_wetting_interaction);
|
||||
count_wetting_interaction_global=Dm->Comm.sumReduce( count_wetting_interaction);
|
||||
/* normalize wetting interactions */
|
||||
|
||||
@@ -975,10 +975,11 @@ void runAnalysis::basic(int timestep, std::shared_ptr<Database> input_db, SubPha
|
||||
PROFILE_START("Copy-Wait",1);
|
||||
PROFILE_STOP("Copy-Wait",1);
|
||||
PROFILE_START("Copy-State",1);
|
||||
if (d_regular)
|
||||
/*if (d_regular)
|
||||
d_ScaLBL_Comm->RegularLayout(d_Map,Phi,Averages.Phi);
|
||||
else
|
||||
ScaLBL_CopyToHost(Averages.Phi.data(),Phi,N*sizeof(double));
|
||||
else */
|
||||
ScaLBL_CopyToHost(Averages.Phi.data(),Phi,N*sizeof(double));
|
||||
|
||||
// copy other variables
|
||||
d_ScaLBL_Comm->RegularLayout(d_Map,Pressure,Averages.Pressure);
|
||||
d_ScaLBL_Comm->RegularLayout(d_Map,&Den[0],Averages.Rho_n);
|
||||
|
||||
@@ -35,8 +35,8 @@ int main(int argc, char **argv)
|
||||
|
||||
// Initialize MPI and error handlers
|
||||
auto multiple = db->getWithDefault<bool>( "MPI_THREAD_MULTIPLE", true );
|
||||
Utilities::startup( argc, argv, multiple );
|
||||
Utilities::MPI::changeProfileLevel( 1 );
|
||||
//Utilities::startup( argc, argv, multiple );
|
||||
//Utilities::MPI::changeProfileLevel( 1 );
|
||||
|
||||
{ // Limit scope so variables that contain communicators will free before MPI_Finialize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user