Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take Version and PicsarVersion out of the WarpX class #4967

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Source/Diagnostics/WarpXOpenPMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Utils/RelativeCellPosition.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "Utils/WarpXVersion.H"
#include "WarpX.H"
#include "OpenPMDHelpFunction.H"

Expand Down Expand Up @@ -518,7 +519,7 @@ WarpXOpenPMDPlot::Init (openPMD::Access access, bool isBTD)
uint32_t const openPMD_ED_PIC = 1u;
m_Series->setOpenPMDextension( openPMD_ED_PIC );
// meta info
m_Series->setSoftware( "WarpX", WarpX::Version() );
m_Series->setSoftware( "WarpX", warpx::Version() );
}

void
Expand Down
5 changes: 3 additions & 2 deletions Source/Initialization/WarpXInitData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "Utils/WarpXConst.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "Utils/WarpXUtil.H"
#include "Utils/WarpXVersion.H"
#include "Python/callbacks.H"

#include <ablastr/fields/MultiFabRegister.H>
Expand Down Expand Up @@ -514,10 +515,10 @@ WarpX::InitData ()
ablastr::parallelization::check_mpi_thread_level();

#ifdef WARPX_QED
Print() << "PICSAR (" << WarpX::PicsarVersion() << ")\n";
Print() << "PICSAR (" << warpx::PicsarVersion() << ")\n";
#endif

Print() << "WarpX (" << WarpX::Version() << ")\n";
Print() << "WarpX (" << warpx::Version() << ")\n";

Print() << utils::logo::get_logo();

Expand Down
2 changes: 1 addition & 1 deletion Source/Python/pyWarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ PYBIND11_MODULE(PYWARPX_MODULE_NAME, m) {
m.attr("__version__") = MACRO_STRINGIFY(PYWARPX_VERSION_INFO);
#else
// note: not necessarily PEP-440 compliant
m.attr("__version__") = WarpX::Version();
m.attr("__version__") = warpx::Version();
#endif

// authors
Expand Down
9 changes: 9 additions & 0 deletions Source/Utils/WarpXVersion.H.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@
# define PICSAR_GIT_VERSION "@PXRMP_QED_GIT_VERSION@"
#endif

#include <string>

namespace warpx
{
[[nodiscard]] std::string Version () noexcept; //!< Version of WarpX executable

[[nodiscard]] std::string PicsarVersion () noexcept; //!< Version of PICSAR dependency
}

#endif // WARPX_VERSION_H_
10 changes: 2 additions & 8 deletions Source/Utils/WarpXVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
*
* License: BSD-3-Clause-LBNL
*/
#include "WarpX.H"
#include "Utils/WarpXVersion.H"

#include <string>


std::string
WarpX::Version ()
std::string warpx::Version () noexcept
{
std::string version;
#ifdef WARPX_GIT_VERSION
Expand All @@ -24,8 +19,7 @@ WarpX::Version ()
}
}

std::string
WarpX::PicsarVersion ()
std::string warpx::PicsarVersion () noexcept
{
std::string version;
#ifdef PICSAR_GIT_VERSION
Expand Down
3 changes: 0 additions & 3 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ public:
/** Move operator */
WarpX& operator= ( WarpX && ) = delete;

static std::string Version (); //!< Version of WarpX executable
static std::string PicsarVersion (); //!< Version of PICSAR dependency

[[nodiscard]] int Verbose () const { return verbose; }

[[nodiscard]] const amrex::Array<FieldBoundaryType,AMREX_SPACEDIM>& GetFieldBoundaryLo () const
Expand Down
Loading