WarpX
Functions
FieldIO.cpp File Reference
#include "FieldIO.H"
#include "WarpX.H"
#include "Utils/CoarsenIO.H"
#include "Utils/WarpXUtil.H"
#include "FieldSolver/SpectralSolver/SpectralSolver.H"
#include <openPMD/openPMD.hpp>
#include <AMReX.H>

Functions

std::vector< std::uint64_t > getReversedVec (const IntVect &v)
 Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for compatibility with the openPMD API) More...
 
std::vector< double > getReversedVec (const Real *v)
 Convert Real* pointer to a std::vector<double>, and reverse the order of the elements (used for compatibility with the openPMD API) More...
 
void ConstructTotalRZVectorField (const std::array< std::unique_ptr< MultiFab >, 3 > &vector_total, const std::array< std::unique_ptr< MultiFab >, 3 > &vector_field)
 
void ConstructTotalRZScalarField (MultiFab &scalar_total, const MultiFab &scalar_field)
 
void AverageAndPackVectorField (MultiFab &mf_avg, const std::array< std::unique_ptr< MultiFab >, 3 > &vector_field, const DistributionMapping &dm, const int dcomp, const int ngrow)
 Takes an array of 3 MultiFab vector_field (representing the x, y, z components of a vector), averages it to the cell center, and stores the resulting MultiFab in mf_avg (in the components dcomp to dcomp+2) Should only be used for BTD now. More...
 
void AverageAndPackScalarField (MultiFab &mf_avg, const MultiFab &scalar_field, const DistributionMapping &dm, const int dcomp, const int ngrow)
 Take a MultiFab scalar_field averages it to the cell center, and stores the resulting MultiFab in mf_avg (in the components dcomp) More...
 

Function Documentation

◆ AverageAndPackScalarField()

void AverageAndPackScalarField ( MultiFab &  mf_avg,
const MultiFab &  scalar_field,
const DistributionMapping &  dm,
const int  dcomp,
const int  ngrow 
)

Take a MultiFab scalar_field averages it to the cell center, and stores the resulting MultiFab in mf_avg (in the components dcomp)

◆ AverageAndPackVectorField()

void AverageAndPackVectorField ( MultiFab &  mf_avg,
const std::array< std::unique_ptr< MultiFab >, 3 > &  vector_field,
const DistributionMapping &  dm,
const int  dcomp,
const int  ngrow 
)

Takes an array of 3 MultiFab vector_field (representing the x, y, z components of a vector), averages it to the cell center, and stores the resulting MultiFab in mf_avg (in the components dcomp to dcomp+2) Should only be used for BTD now.

◆ ConstructTotalRZScalarField()

void ConstructTotalRZScalarField ( MultiFab &  scalar_total,
const MultiFab &  scalar_field 
)

◆ ConstructTotalRZVectorField()

void ConstructTotalRZVectorField ( const std::array< std::unique_ptr< MultiFab >, 3 > &  vector_total,
const std::array< std::unique_ptr< MultiFab >, 3 > &  vector_field 
)

◆ getReversedVec() [1/2]

std::vector<std::uint64_t> getReversedVec ( const IntVect &  v)

Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for compatibility with the openPMD API)

◆ getReversedVec() [2/2]

std::vector<double> getReversedVec ( const Real *  v)

Convert Real* pointer to a std::vector<double>, and reverse the order of the elements (used for compatibility with the openPMD API)