Skip to content

Commit

Permalink
More robust if conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Mar 1, 2024
1 parent f66e523 commit 6574162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Source/Evolve/WarpXEvolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ WarpX::Evolve (int numsteps)

ExecutePythonCallback("particleinjection");

if (evolve_scheme == EvolveScheme::SemiImplicitEM ||
evolve_scheme == EvolveScheme::ThetaImplicitEM) {
if (m_implicit_solver) {
m_implicit_solver->OneStep(cur_time, dt[0], step);
}
else if ( electromagnetic_solver_id == ElectromagneticSolverAlgo::None ||
Expand Down
3 changes: 1 addition & 2 deletions Source/Initialization/WarpXInitData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ WarpX::InitFromScratch ()

AmrCore::InitFromScratch(time); // This will call MakeNewLevelFromScratch

if (evolve_scheme == EvolveScheme::ThetaImplicitEM ||
evolve_scheme == EvolveScheme::SemiImplicitEM) {
if (m_implicit_solver) {

m_implicit_solver->Define(this);
m_implicit_solver->GetParticleSolverParams(max_particle_iterations,particle_tolerance);
Expand Down

0 comments on commit 6574162

Please sign in to comment.