5#ifndef AMREX_PARTICLEHEADER_H_
6#define AMREX_PARTICLEHEADER_H_
7#include <AMReX_Config.H>
100 void parse (std::istream& is);
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:29
amrex_long Long
Definition AMReX_INT.H:30
Definition AMReX_Amr.cpp:50
One entry of the per-level grid table.
Definition AMReX_ParticleHeader.H:72
int count
number of particles stored for this grid
Definition AMReX_ParticleHeader.H:76
int which
index of the binary data file (DATA_XXXXX) holding this grid's particles
Definition AMReX_ParticleHeader.H:74
Long where
byte offset of this grid's particle data within the data file
Definition AMReX_ParticleHeader.H:78
Metadata prefix of an AMReX particle "Header" file.
Definition AMReX_ParticleHeader.H:38
static ParticleHeader read(const std::string &dir, const std::string &file)
Read and parse the "Header" file of a particle plotfile/checkpoint.
Definition AMReX_ParticleHeader.cpp:106
void parse_grid_table(std::istream &is)
Parse the per-level grid table into grids.
Definition AMReX_ParticleHeader.cpp:82
int num_int
number of integer components
Definition AMReX_ParticleHeader.H:52
Vector< Vector< GridEntry > > grids
Per level and grid: where each grid's particle data is stored.
Definition AMReX_ParticleHeader.H:88
Long next_id
the next particle id to hand out (maxnextid)
Definition AMReX_ParticleHeader.H:60
int dim
AMREX_SPACEDIM the file was written with.
Definition AMReX_ParticleHeader.H:46
Vector< std::string > real_comp_names
names of the real components, size() == num_real
Definition AMReX_ParticleHeader.H:50
bool is_checkpoint
true if the file is a checkpoint (full restart), false for a plotfile
Definition AMReX_ParticleHeader.H:56
bool convert_ids
whether particle ids need to be converted (Version_Two_Dot_One and later)
Definition AMReX_ParticleHeader.H:44
void parse(std::istream &is)
Parse the metadata prefix from an input stream.
Definition AMReX_ParticleHeader.cpp:16
Vector< std::string > int_comp_names
names of the integer components, size() == num_int
Definition AMReX_ParticleHeader.H:54
int finest_level
finest level present in the file
Definition AMReX_ParticleHeader.H:62
std::string how
precision the particle data was written in: "single" or "double"
Definition AMReX_ParticleHeader.H:42
int num_real
number of real components (pure SoA: excludes the AMREX_SPACEDIM positions)
Definition AMReX_ParticleHeader.H:48
Long num_particles
total number of particles in the file
Definition AMReX_ParticleHeader.H:58
std::string version
raw version string, e.g. "Version_Two_Dot_One_double"
Definition AMReX_ParticleHeader.H:40