Skip to content

Commit

Permalink
minor clean-ups
Browse files Browse the repository at this point in the history
Signed-off-by: roelof-groenewald <[email protected]>
  • Loading branch information
roelof-groenewald committed Sep 12, 2024
1 parent f71dd7a commit 81bfa54
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Source/FieldSolver/ElectrostaticSolvers/LabFrameExplicitES.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef WARPX_LABFRAME_EXPLICITES_H_
#define WARPX_LABFRAME_EXPLICITES_H_
#ifndef WARPX_LABFRAMEEXPLICITES_H_
#define WARPX_LABFRAMEEXPLICITES_H_

#include "ElectrostaticSolver.H"

Expand Down Expand Up @@ -41,4 +41,4 @@ public:

};

#endif
#endif // WARPX_LABFRAMEEXPLICITES_H_
14 changes: 11 additions & 3 deletions Source/FieldSolver/ElectrostaticSolvers/RelativisticExplicitES.H
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

#ifndef WARPX_RELATIVISTICEXPLICITSOLVERES_H_
#define WARPX_RELATIVISTICEXPLICITSOLVERES_H_
/* Copyright 2024 The WarpX Community
*
* This file is part of WarpX.
*
* Authors: Remi Lehe, Roelof Groenewald, Arianna Formenti, Revathi Jambunathan
*
* License: BSD-3-Clause-LBNL
*/
#ifndef WARPX_RELATIVISTICEXPLICITES_H_
#define WARPX_RELATIVISTICEXPLICITES_H_

#include "ElectrostaticSolver.H"
#include "Particles/WarpXParticleContainer.H"
Expand Down Expand Up @@ -75,4 +83,4 @@ public:
);
};

#endif // WARPX_RELATIVISTICEXPLICITSOLVERES_H_
#endif // WARPX_RELATIVISTICEXPLICITES_H_
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* Copyright 2024 The WarpX Community
*
* This file is part of WarpX.
*
* Authors: Remi Lehe, Roelof Groenewald, Arianna Formenti, Revathi Jambunathan
*
* License: BSD-3-Clause-LBNL
*/
#include "WarpX.H"

#include "RelativisticExplicitES.H"
Expand Down
10 changes: 2 additions & 8 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2106,10 +2106,7 @@ WarpX::ClearLevel (int lev)
current_buf[lev][i].reset();
}

if (WarpX::electrostatic_solver_id != ElectrostaticSolverAlgo::None)
{
m_electrostatic_solver->ClearLevel(lev);
}
m_electrostatic_solver->ClearLevel(lev);

if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::HybridPIC)
{
Expand Down Expand Up @@ -2377,10 +2374,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
}

// Allocate extra multifabs needed by the electrostatic algorithm.
if (WarpX::electrostatic_solver_id != ElectrostaticSolverAlgo::None)
{
m_electrostatic_solver->AllocateLevelMFs();
}
m_electrostatic_solver->AllocateLevelMFs();

// Allocate extra multifabs needed by the kinetic-fluid hybrid algorithm.
if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::HybridPIC)
Expand Down

0 comments on commit 81bfa54

Please sign in to comment.