Namespace which encapsulates chombo-discharge IO functionality.
More...
|
| std::string | gitHash () noexcept |
| | Get the git description of the source tree that this executable was compiled from.
|
| |
| std::string | numberFmt (long long n, char a_sep=',') noexcept |
| | Number formatting method – writes big numbers using an input separator. E.g. the number 123456 is written as 123,456.
|
| |
| Vector< std::string > | numberFmt (const Vector< long long > &a_numbers, char a_sep=',') noexcept |
| | Number formatting game. This just prints the number 123456 as 123,456.
|
| |
| template<typename P , typename Traits > |
| void | writeH5Part (std::string a_filename, const ParticleContainer< P, Traits > &a_particles, RealVect a_shift, Real a_time) noexcept |
| | Write an SoA particle container to an H5Part file (quick visualization).
|
| |
Namespace which encapsulates chombo-discharge IO functionality.
◆ gitHash()
| std::string DischargeIO::gitHash |
( |
| ) |
|
|
noexcept |
Get the git description of the source tree that this executable was compiled from.
The string is stamped into the library at compile time by Lib/GenerateGitHash.sh, and is the output of 'git describe –tags –always –dirty' – e.g. "v26.08-26-ge5f3ef39d" or, if the working tree had uncommitted changes, "v26.08-26-ge5f3ef39d-dirty". It is the string "unknown" if the source tree was not a git repository when it was compiled, or if git was not available.
- Returns
- Git description of the compiled source tree.
◆ numberFmt() [1/2]
| Vector< std::string > DischargeIO::numberFmt |
( |
const Vector< long long > & |
a_numbers, |
|
|
char |
a_sep = ',' |
|
) |
| |
|
noexcept |
Number formatting game. This just prints the number 123456 as 123,456.
- Parameters
-
| [in] | a_numbers | Numbers to format as string with separator |
| [in] | a_sep | Separator |
- Returns
- Return value
◆ numberFmt() [2/2]
| std::string DischargeIO::numberFmt |
( |
long long |
n, |
|
|
char |
a_sep = ',' |
|
) |
| |
|
noexcept |
Number formatting method – writes big numbers using an input separator. E.g. the number 123456 is written as 123,456.
- Parameters
-
| [in] | n | Number to format as string with separator |
| [in] | a_sep | Separator |
- Returns
- Return value
◆ writeH5Part()
template<typename P , typename Traits >
| void DischargeIO::writeH5Part |
( |
std::string |
a_filename, |
|
|
const ParticleContainer< P, Traits > & |
a_particles, |
|
|
RealVect |
a_shift, |
|
|
Real |
a_time |
|
) |
| |
|
noexcept |
Write an SoA particle container to an H5Part file (quick visualization).
Position, id and weight are taken from the container-owned columns and written automatically. The payload datasets are derived declaratively from the optional Traits::h5PartColumns tuple (a list of H5Part::Scalar / H5Part::Vector descriptors pairing a dataset name with the selecting payload member pointer(s)); if Traits::h5PartColumns is not declared, only id/position/weight are written. Each vector descriptor is written as name-x/name-y/name-z.
- Parameters
-
| [in] | a_filename | File name. |
| [in] | a_particles | SoA particle container. |
| [in] | a_shift | Particle position shift (subtracted from the written positions). |
| [in] | a_time | Physical time. |
- Template Parameters
-
| P | Payload type of the container. |
| Traits | Column descriptor for the payload. |