WarpX
Functions
WarpXUtilIO Namespace Reference

Functions

bool WriteBinaryDataOnFile (std::string filename, const amrex::Vector< char > &data)
 
constexpr uint64_t localIDtoGlobal (int const id, int const cpu)
 

Function Documentation

◆ localIDtoGlobal()

constexpr uint64_t WarpXUtilIO::localIDtoGlobal ( int const  id,
int const  cpu 
)

A helper function to derive a globally unique particle ID

Parameters
[in]idAMReX particle ID (on local cpu/rank), AoS .id
[in]cpuAMReX particle CPU (rank) at creation of the particle, AoS .cpu
Returns
global particle ID that is unique and permanent in the whole simulation

◆ WriteBinaryDataOnFile()

bool WarpXUtilIO::WriteBinaryDataOnFile ( std::string  filename,
const amrex::Vector< char > &  data 
)

A helper function to write binary data on disk.

Parameters
[in]filenamewhere to write
[in]dataVector containing binary data to write on disk return true if it succeeds, false otherwise