Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into remove_calls…
Browse files Browse the repository at this point in the history
…_to_warpx_get_instance_from_macroscopic_properties
  • Loading branch information
lucafedeli88 committed Apr 24, 2024
2 parents 61e69af + cbe4355 commit cda66e8
Show file tree
Hide file tree
Showing 77 changed files with 249 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 7813bb7d6bc6cea658edac1f2bde046c7d174168 && cd -
cd ../amrex && git checkout --detach b752027c1aebdfb4be339b1e30932b4108286a7a && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE USE_CCACHE=TRUE -j 4
ccache -s
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
brew tap openpmd/openpmd
brew install openpmd-api
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade virtualenv
python3 -m venv py-venv
source py-venv/bin/activate
python3 -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion Regression/WarpX-GPU-tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ emailBody = Check https://ccse.lbl.gov/pub/GpuRegressionTesting/WarpX/ for more

[AMReX]
dir = /home/regtester/git/amrex/
branch = 7813bb7d6bc6cea658edac1f2bde046c7d174168
branch = b752027c1aebdfb4be339b1e30932b4108286a7a

[source]
dir = /home/regtester/git/WarpX
Expand Down
2 changes: 1 addition & 1 deletion Regression/WarpX-tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ emailBody = Check https://ccse.lbl.gov/pub/RegressionTesting/WarpX/ for more det

[AMReX]
dir = /home/regtester/AMReX_RegTesting/amrex/
branch = 7813bb7d6bc6cea658edac1f2bde046c7d174168
branch = b752027c1aebdfb4be339b1e30932b4108286a7a

[source]
dir = /home/regtester/AMReX_RegTesting/warpx
Expand Down
6 changes: 3 additions & 3 deletions Source/BoundaryConditions/PML_current.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef PML_CURRENT_H_
#define PML_CURRENT_H_
#ifndef WARPX_PML_CURRENT_H_
#define WARPX_PML_CURRENT_H_

#include "BoundaryConditions/PMLComponent.H"

Expand Down Expand Up @@ -143,4 +143,4 @@ void damp_jz_pml (int j, int k, int l,
#endif
}

#endif
#endif //WARPX_PML_CURRENT_H_
6 changes: 3 additions & 3 deletions Source/Diagnostics/BTD_Plotfile_Header_Impl.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef BTD_PLOTFILE_HEADER_IMPL_H
#define BTD_PLOTFILE_HEADER_IMPL_H
#ifndef WARPX_BTD_PLOTFILE_HEADER_IMPL_H
#define WARPX_BTD_PLOTFILE_HEADER_IMPL_H

#include <AMReX_Array.H>
#include <AMReX_Box.H>
Expand Down Expand Up @@ -342,4 +342,4 @@ public:
std::string m_Header_path;
};

#endif
#endif //WARPX_BTD_PLOTFILE_HEADER_IMPL_H
1 change: 0 additions & 1 deletion Source/Diagnostics/FlushFormats/FlushFormat.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "Diagnostics/ParticleDiag/ParticleDiag.H"
#include "Particles/MultiParticleContainer.H"
#include "WarpX.H"

class FlushFormat
{
Expand Down
6 changes: 3 additions & 3 deletions Source/EmbeddedBoundary/DistanceToEB.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef DISTANCETOEB_H_
#define DISTANCETOEB_H_
#ifndef WARPX_DISTANCETOEB_H_
#define WARPX_DISTANCETOEB_H_

#include "Utils/TextMsg.H"

Expand Down Expand Up @@ -129,4 +129,4 @@ amrex::RealVect interp_normal (int i, int j, int k, const amrex::Real W[AMREX_SP
}

#endif // AMREX_USE_EB
#endif // DISTANCETOEB_H_
#endif // WARPX_DISTANCETOEB_H_
6 changes: 3 additions & 3 deletions Source/EmbeddedBoundary/ParticleBoundaryProcess.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef PARTICLEBOUNDARYPROCESS_H_
#define PARTICLEBOUNDARYPROCESS_H_
#ifndef WARPX_PARTICLEBOUNDARYPROCESS_H_
#define WARPX_PARTICLEBOUNDARYPROCESS_H_

#include <AMReX_Particle.H>
#include <AMReX_REAL.H>
Expand Down Expand Up @@ -36,4 +36,4 @@ struct Absorb {
};
}

#endif
#endif //WARPX_PARTICLEBOUNDARYPROCESS_H_
18 changes: 9 additions & 9 deletions Source/EmbeddedBoundary/ParticleScraper.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef PARTICLESCRAPER_H_
#define PARTICLESCRAPER_H_
#ifndef WARPX_PARTICLESCRAPER_H_
#define WARPX_PARTICLESCRAPER_H_

#include "EmbeddedBoundary/DistanceToEB.H"
#include "Particles/Pusher/GetAndSetPosition.H"
Expand Down Expand Up @@ -65,9 +65,9 @@
*/
template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value, int> foo = 0>
void
scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb, int lev, F&& f)
scrapeParticlesAtEB (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb, int lev, F&& f)
{
scrapeParticles(pc, distance_to_eb, lev, lev, std::forward<F>(f));
scrapeParticlesAtEB(pc, distance_to_eb, lev, lev, std::forward<F>(f));
}

/**
Expand Down Expand Up @@ -108,9 +108,9 @@ scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_t
*/
template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value, int> foo = 0>
void
scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb, F&& f)
scrapeParticlesAtEB (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb, F&& f)
{
scrapeParticles(pc, distance_to_eb, 0, pc.finestLevel(), std::forward<F>(f));
scrapeParticlesAtEB(pc, distance_to_eb, 0, pc.finestLevel(), std::forward<F>(f));
}

/**
Expand Down Expand Up @@ -153,10 +153,10 @@ scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_t
*/
template <class PC, class F, std::enable_if_t<amrex::IsParticleContainer<PC>::value, int> foo = 0>
void
scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb,
scrapeParticlesAtEB (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_to_eb,
int lev_min, int lev_max, F&& f)
{
BL_PROFILE("scrapeParticles");
BL_PROFILE("scrapeParticlesAtEB");

for (int lev = lev_min; lev <= lev_max; ++lev)
{
Expand Down Expand Up @@ -216,4 +216,4 @@ scrapeParticles (PC& pc, const amrex::Vector<const amrex::MultiFab*>& distance_t
}
}

#endif
#endif //WARPX_PARTICLESCRAPER_H_
15 changes: 8 additions & 7 deletions Source/Evolve/WarpXEvolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,7 @@ void WarpX::HandleParticlesAtBoundaries (int step, amrex::Real cur_time, int num
mypc->ContinuousFluxInjection(cur_time, dt[0]);

mypc->ApplyBoundaryConditions();

// interact the particles with EB walls (if present)
#ifdef AMREX_USE_EB
mypc->ScrapeParticles(amrex::GetVecOfConstPtrs(m_distance_to_eb));
#endif

m_particle_boundary_buffer->gatherParticles(*mypc, amrex::GetVecOfConstPtrs(m_distance_to_eb));
m_particle_boundary_buffer->gatherParticlesFromDomainBoundaries(*mypc);

// Non-Maxwell solver: particles can move by an arbitrary number of cells
if( electromagnetic_solver_id == ElectromagneticSolverAlgo::None ||
Expand Down Expand Up @@ -523,6 +517,13 @@ void WarpX::HandleParticlesAtBoundaries (int step, amrex::Real cur_time, int num
}
}

// interact the particles with EB walls (if present)
#ifdef AMREX_USE_EB
mypc->ScrapeParticlesAtEB(amrex::GetVecOfConstPtrs(m_distance_to_eb));
m_particle_boundary_buffer->gatherParticlesFromEmbeddedBoundaries(*mypc, amrex::GetVecOfConstPtrs(m_distance_to_eb));
mypc->deleteInvalidParticles();
#endif

if (sort_intervals.contains(step+1)) {
if (verbose) {
amrex::Print() << Utils::TextMsg::Info("re-sorting particles");
Expand Down
6 changes: 3 additions & 3 deletions Source/FieldSolver/ElectrostaticSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef ELECTROSTATICSOLVER_H_
#define ELECTROSTATICSOLVER_H_
#ifndef WARPX_ELECTROSTATICSOLVER_H_
#define WARPX_ELECTROSTATICSOLVER_H_

#include <AMReX_Array.H>
#include <AMReX_Geometry.H>
Expand Down Expand Up @@ -122,4 +122,4 @@ namespace ElectrostaticSolver {
};
} // namespace ElectrostaticSolver

#endif // ELECTROSTATICSOLVER_H_
#endif // WARPX_ELECTROSTATICSOLVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
#ifndef WARPX_FIELD_ACCESSOR_FUNCTORS_H
#define WARPX_FIELD_ACCESSOR_FUNCTORS_H

#include "WarpX.H"
#include "FieldSolver/FiniteDifferenceSolver/MacroscopicProperties/MacroscopicProperties.H"

#include <AMReX_Array.H>

#include <AMReX_Extension.H>
#include <AMReX_Gpu.H>

/**
* \brief Functor that returns the division of the source m_field Array4 value
Expand Down
6 changes: 3 additions & 3 deletions Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef MAGNETOSTATICSOLVER_H_
#define MAGNETOSTATICSOLVER_H_
#ifndef WARPX_MAGNETOSTATICSOLVER_H_
#define WARPX_MAGNETOSTATICSOLVER_H_

#include <AMReX_Array.H>
#include <AMReX_MultiFab.H>
Expand Down Expand Up @@ -54,4 +54,4 @@ namespace MagnetostaticSolver {
};
} // namespace MagnetostaticSolver

#endif //MAGNETOSTATICSOLVER_H_
#endif //WARPX_MAGNETOSTATICSOLVER_H_
6 changes: 3 additions & 3 deletions Source/FieldSolver/WarpXPushFieldsEM_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* License: BSD-3-Clause-LBNL
*/

#ifndef WarpXPushFieldsEM_K_h
#define WarpXPushFieldsEM_K_h
#ifndef WARPX_PushFieldsEM_K_h
#define WARPX_PushFieldsEM_K_h

#include "Utils/WarpXConst.H"

Expand Down Expand Up @@ -117,4 +117,4 @@ void damp_field_in_guards(
}
}

#endif
#endif //WARPX_PushFieldsEM_K_h
6 changes: 3 additions & 3 deletions Source/FieldSolver/WarpX_QED_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* License: BSD-3-Clause-LBNL
*/

#ifndef WarpX_QED_K_h
#define WarpX_QED_K_h
#ifndef WARPX_QED_K_h
#define WARPX_QED_K_h

#include "Utils/WarpXConst.H"

Expand Down Expand Up @@ -359,4 +359,4 @@ const amrex::Real dyi = 1._rt/dy;

}

#endif
#endif //WARPX_QED_K_h
1 change: 1 addition & 0 deletions Source/Fluids/MultiFluidContainer_fwd.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#ifndef WARPX_MultiFluidContainer_fwd_H_
#define WARPX_MultiFluidContainer_fwd_H_

class MultiFluidContainer;

Expand Down
1 change: 1 addition & 0 deletions Source/Fluids/WarpXFluidContainer_fwd.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#ifndef WARPX_WarpXFluidContainer_fwd_H_
#define WARPX_WarpXFluidContainer_fwd_H_

class WarpXFluidContainer;

Expand Down
6 changes: 3 additions & 3 deletions Source/Initialization/ExternalField.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef EXTERNAL_FIELD_H_
#define EXTERNAL_FIELD_H_
#ifndef WARPX_EXTERNAL_FIELD_H_
#define WARPX_EXTERNAL_FIELD_H_

#include "ExternalField_fwd.H"

Expand Down Expand Up @@ -66,4 +66,4 @@ struct ExternalFieldParams
std::string external_fields_path;
};

#endif //EXTERNAL_FIELD_H_
#endif //WARPX_EXTERNAL_FIELD_H_
6 changes: 3 additions & 3 deletions Source/Initialization/ExternalField_fwd.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef EXTERNAL_FIELD_FWD_H_
#define EXTERNAL_FIELD_FWD_H_
#ifndef WARPX_EXTERNAL_FIELD_FWD_H_
#define WARPX_EXTERNAL_FIELD_FWD_H_

struct ExternalFieldParams;

#endif //EXTERNAL_FIELD_FWD_H_
#endif //WARPX_EXTERNAL_FIELD_FWD_H_
6 changes: 3 additions & 3 deletions Source/Initialization/GetTemperature.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* License: BSD-3-Clause-LBNL
*/

#ifndef GET_TEMPERATURE_H_
#define GET_TEMPERATURE_H_
#ifndef WARPX_GET_TEMPERATURE_H_
#define WARPX_GET_TEMPERATURE_H_

#include "TemperatureProperties.H"

Expand Down Expand Up @@ -69,4 +69,4 @@ struct GetTemperature
}
}
};
#endif
#endif //WARPX_GET_TEMPERATURE_H_
6 changes: 3 additions & 3 deletions Source/Initialization/GetVelocity.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* License: BSD-3-Clause-LBNL
*/

#ifndef GET_VELOCITY_H_
#define GET_VELOCITY_H_
#ifndef WARPX_GET_VELOCITY_H_
#define WARPX_GET_VELOCITY_H_

#include "VelocityProperties.H"

Expand Down Expand Up @@ -86,4 +86,4 @@ struct GetVelocity
return m_dir;
}
};
#endif
#endif //WARPX_GET_VELOCITY_H_
6 changes: 3 additions & 3 deletions Source/Initialization/InjectorDensity.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef INJECTOR_DENSITY_H_
#define INJECTOR_DENSITY_H_
#ifndef WARPX_INJECTOR_DENSITY_H_
#define WARPX_INJECTOR_DENSITY_H_

#include "Utils/WarpXConst.H"

Expand Down Expand Up @@ -218,4 +218,4 @@ struct InjectorDensityDeleter {
}
};

#endif
#endif //WARPX_INJECTOR_DENSITY_H_
6 changes: 3 additions & 3 deletions Source/Initialization/InjectorFlux.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* License: BSD-3-Clause-LBNL
*/
#ifndef INJECTOR_FLUX_H_
#define INJECTOR_FLUX_H_
#ifndef WARPX_INJECTOR_FLUX_H_
#define WARPX_INJECTOR_FLUX_H_

#include "Utils/WarpXConst.H"

Expand Down Expand Up @@ -149,4 +149,4 @@ struct InjectorFluxDeleter {
}
};

#endif
#endif //WARPX_INJECTOR_FLUX_H_
Loading

0 comments on commit cda66e8

Please sign in to comment.