8 #ifndef WARPX_FieldIO_H_
9 #define WARPX_FieldIO_H_
22 const std::array< std::unique_ptr<amrex::MultiFab>, 3 >& vector_field,
38 std::vector<std::uint64_t>
48 getVec(
const amrex::Real* v,
bool reverse =
false );
50 std::vector<std::uint64_t>
std::vector< std::uint64_t > getReversedVec(const amrex::IntVect &v)
Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for co...
Definition: FieldIO.cpp:80
void AverageAndPackScalarField(amrex::MultiFab &mf_avg, const amrex::MultiFab &scalar_field, const amrex::DistributionMapping &dm, int dcomp, amrex::IntVect ngrow)
Take a MultiFab scalar_field averages it to the cell center, and stores the resulting MultiFab in mf_...
Definition: FieldIO.cpp:197
void AverageAndPackVectorField(amrex::MultiFab &mf_avg, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &vector_field, const amrex::DistributionMapping &dm, int dcomp, amrex::IntVect ngrow)
Takes an array of 3 MultiFab vector_field (representing the x, y, z components of a vector),...
Definition: FieldIO.cpp:157
std::vector< std::uint64_t > getVec(const amrex::IntVect &v, bool reverse=false)
Convert an IntVect to a std::vector<std::uint64_t> (used for compatibility with openPMD-api)
Definition: FieldIO.cpp:30