Skip to content

Commit

Permalink
Fix when we test moisture model and instantiate. (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Dec 12, 2023
1 parent 5f80c57 commit 0ea42fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,20 +961,6 @@ ERF::ReadParameters ()
particleData.init_particle_params();
#endif

// What type of moisture model to use
if (solverChoice.moisture_type == MoistureType::SAM) {
micro.SetModel<SAM>();
} else if (solverChoice.moisture_type == MoistureType::Kessler) {
micro.SetModel<Kessler>();
} else if (solverChoice.moisture_type == MoistureType::FastEddy) {
micro.SetModel<FastEddy>();
} else if (solverChoice.moisture_type == MoistureType::None) {
micro.SetModel<NullMoist>();
amrex::Print() << "WARNING: Compiled with moisture but using NullMoist model!\n";
} else {
amrex::Abort("Dont know this moisture_type!") ;
}

// If this is set, it must be even
if (fixed_mri_dt_ratio > 0 && (fixed_mri_dt_ratio%2 != 0) )
{
Expand Down Expand Up @@ -1129,6 +1115,22 @@ ERF::ReadParameters ()
#endif

solverChoice.init_params(max_level);

// What type of moisture model to use
// NOTE: Must be checked after init_params
if (solverChoice.moisture_type == MoistureType::SAM) {
micro.SetModel<SAM>();
} else if (solverChoice.moisture_type == MoistureType::Kessler) {
micro.SetModel<Kessler>();
} else if (solverChoice.moisture_type == MoistureType::FastEddy) {
micro.SetModel<FastEddy>();
} else if (solverChoice.moisture_type == MoistureType::None) {
micro.SetModel<NullMoist>();
amrex::Print() << "WARNING: Compiled with moisture but using NullMoist model!\n";
} else {
amrex::Abort("Dont know this moisture_type!") ;
}

if (verbose > 0) {
solverChoice.display();
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Microphysics/Kessler/Init_Kessler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void Kessler::Init (const MultiFab& cons_in,
});

// This fills qv
//Diagnose();
Diagnose();

#if 0
amrex::ParallelFor( box3d, [=] AMREX_GPU_DEVICE (int k, int j, int i)
Expand Down

0 comments on commit 0ea42fd

Please sign in to comment.