WarpX
Functions
detail Namespace Reference

Functions

std::string snakeToCamel (const std::string &snake_string)
 Convert a snake_case string to a camelCase one. More...
 
std::string getSeriesOptions (std::string const &operator_type, std::map< std::string, std::string > const &operator_parameters)
 
std::pair< std::string, std::string > name2openPMD (std::string const &fullName)
 
std::vector< std::string > getParticlePositionComponentLabels ()
 
std::vector< std::string > getFieldAxisLabels ()
 
std::vector< std::string > getFieldComponentLabels ()
 
std::map< openPMD::UnitDimension, double > getUnitDimension (std::string const &record_name)
 
void 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...
 

Function Documentation

◆ getFieldAxisLabels()

std::vector< std::string > detail::getFieldAxisLabels ( )
inline

Return the axis (index) names of a mesh

This will be returned in C order. This is inverse of the Fortran order of the index labels for the AMReX FArrayBox.

◆ getFieldComponentLabels()

std::vector< std::string > detail::getFieldComponentLabels ( )
inline

Return the component names of a mesh

◆ getParticlePositionComponentLabels()

std::vector< std::string > detail::getParticlePositionComponentLabels ( )
inline

Return the component labels for particle positions

◆ getSeriesOptions()

std::string detail::getSeriesOptions ( std::string const &  operator_type,
std::map< std::string, std::string > const &  operator_parameters 
)
inline

Create the option string

Returns
JSON option string for openPMD::Series

◆ getUnitDimension()

std::map< openPMD::UnitDimension, double > detail::getUnitDimension ( std::string const &  record_name)
inline

Get the openPMD physical dimensionality of a record

Parameters
record_namename of the openPMD record
Returns
map with base quantities and power scaling

◆ name2openPMD()

std::pair< std::string, std::string > detail::name2openPMD ( std::string const &  fullName)
inline

Unclutter a real_names to openPMD record

Parameters
fullNamename as in real_names variable
Returns
pair of openPMD record and component name

◆ setOpenPMDUnit()

void detail::setOpenPMDUnit ( openPMD::Mesh  mesh,
const std::string  field_name 
)
inline

For a given field that is to be written to an openPMD file, set the metadata that indicates the physical unit.

◆ snakeToCamel()

std::string detail::snakeToCamel ( const std::string &  snake_string)
inline

Convert a snake_case string to a camelCase one.

WarpX uses snake_case internally for some component names, but OpenPMD assumes "_" indicates vector or tensor fields.

Returns
camelCase version of input