WarpX
Namespaces | Functions
WarpXOpenPMD.cpp File Reference
#include "WarpXOpenPMD.H"
#include "Particles/ParticleIO.H"
#include "Diagnostics/ParticleDiag/ParticleDiag.H"
#include "FieldIO.H"
#include "Particles/Filter/FilterFunctors.H"
#include "Particles/NamedComponentParticleContainer.H"
#include "Utils/TextMsg.H"
#include "Utils/Parser/ParserUtils.H"
#include "Utils/RelativeCellPosition.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "WarpX.H"
#include "OpenPMDHelpFunction.H"
#include <ablastr/warn_manager/WarnManager.H>
#include <AMReX.H>
#include <AMReX_BLassert.H>
#include <AMReX_Box.H>
#include <AMReX_Config.H>
#include <AMReX_DataAllocator.H>
#include <AMReX_FArrayBox.H>
#include <AMReX_FabArray.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_IntVect.H>
#include <AMReX_MFIter.H>
#include <AMReX_MultiFab.H>
#include <AMReX_PODVector.H>
#include <AMReX_ParallelDescriptor.H>
#include <AMReX_ParallelReduce.H>
#include <AMReX_Particle.H>
#include <AMReX_Particles.H>
#include <AMReX_Periodicity.H>
#include <AMReX_StructOfArrays.H>
#include <algorithm>
#include <cctype>
#include <cstdint>
#include <iostream>
#include <map>
#include <memory>
#include <regex>
#include <set>
#include <string>
#include <tuple>
#include <utility>

Namespaces

 detail
 

Functions

std::string detail::snakeToCamel (const std::string &snake_string)
 Convert a snake_case string to a camelCase one. More...
 
std::string detail::getSeriesOptions (std::string const &operator_type, std::map< std::string, std::string > const &operator_parameters, std::string const &engine_type, std::map< std::string, std::string > const &engine_parameters)
 
std::pair< std::string, std::string > detail::name2openPMD (std::string const &fullName)
 
std::vector< std::string > detail::getParticlePositionComponentLabels (bool ignore_dims=false)
 
std::vector< std::string > detail::getFieldAxisLabels ([[maybe_unused]] bool const var_in_theta_mode)
 
std::vector< std::string > detail::getFieldComponentLabels (bool const var_in_theta_mode)
 
std::map< openPMD::UnitDimension, double > detail::getUnitDimension (std::string const &record_name)
 
void detail::setOpenPMDUnit (openPMD::Mesh mesh, const std::string &field_name)
 For a given field that is to be written to an openPMD file, set the metadata that indicates the physical unit. More...
 
std::tuple< std::string, intGetFieldNameModeInt (const std::string &varname)
 

Function Documentation

◆ GetFieldNameModeInt()

std::tuple<std::string, int> GetFieldNameModeInt ( const std::string &  varname)

Find fieldName in varname and get the theta mode index, if varname = fieldName_mode_realOrImag

Parameters
[in]varnamename of the field variable being parsed
Returns
varname fieldName if varname = fieldName_mode_realOrImag, otherwise, varname and if varname = fieldName_modeNumber_realOrImag, returns 2 * mode - 1 + (realOrImag == 'imag'), otherwise, -1

Examples : rho -> rho, -1 rho_0_real -> rho, 1 Er_1_real -> Er, 2 rho_species_12_1_imag -> rho_species_12, 3