|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Writes dirichlet-plane potential snapshots to ASCII files. More...
#include <DirichletPlaneWriter.h>

Classes | |
| struct | PlaneDiagnostics |
Public Member Functions | |
| DirichletPlaneWriter (const std::string &outputDirectory) | |
Create a writer that emits files into outputDirectory. | |
| void | writePlane (long long step, double time, double zPlane, const std::vector< double > &xCoords, const std::vector< double > &yCoords, const std::vector< double > &phiValues, std::size_t nx, std::size_t ny, const std::string &solveTag) |
| Write one plane snapshot. | |
| template<typename FieldType > | |
| PlaneDiagnostics | dumpInterpolatedPlane (long long step, double time, double zPlane, const FieldType &field, const std::string &solveTag) |
| Interpolate a z-plane from a 3D field on device and write it to disk. | |
Private Attributes | |
| std::filesystem::path | outputDirectory_m |
Writes dirichlet-plane potential snapshots to ASCII files.
One file is generated per dump call inside a configured output directory. Each file stores metadata and one row per sampled (x, y) point.
Definition at line 39 of file DirichletPlaneWriter.h.
| struct DirichletPlaneWriter::PlaneDiagnostics |
Definition at line 41 of file DirichletPlaneWriter.h.

| Class Members | ||
|---|---|---|
| double | mean = 0.0 | |
| size_t | sampleCount = 0 | |
| double | variance = 0.0 | |
|
explicit |
Create a writer that emits files into outputDirectory.
Definition at line 29 of file DirichletPlaneWriter.cpp.
References outputDirectory_m.
| DirichletPlaneWriter::PlaneDiagnostics DirichletPlaneWriter::dumpInterpolatedPlane | ( | long long | step, |
| double | time, | ||
| double | zPlane, | ||
| const FieldType & | field, | ||
| const std::string & | solveTag | ||
| ) |
Interpolate a z-plane from a 3D field on device and write it to disk.
The interpolation follows IPPL's cell-centered convention used by scatter/gather, i.e. cell center coordinates are origin + (i + 0.5) * dx.
| FieldType | IPPL field type with getView(), getLayout(), getNghost(), and mesh accessors. |
| step | Global tracking step. |
| time | Absolute simulation time (seconds). |
| zPlane | Physical z position to sample (meters). |
| field | Input scalar field to interpolate from. |
| solveTag | Label for output file naming. |
Definition at line 82 of file DirichletPlaneWriter.h.
References DirichletPlaneWriter::PlaneDiagnostics::mean, DirichletPlaneWriter::PlaneDiagnostics::sampleCount, DirichletPlaneWriter::PlaneDiagnostics::variance, and writePlane().

| void DirichletPlaneWriter::writePlane | ( | long long | step, |
| double | time, | ||
| double | zPlane, | ||
| const std::vector< double > & | xCoords, | ||
| const std::vector< double > & | yCoords, | ||
| const std::vector< double > & | phiValues, | ||
| std::size_t | nx, | ||
| std::size_t | ny, | ||
| const std::string & | solveTag | ||
| ) |
Write one plane snapshot.
Definition at line 45 of file DirichletPlaneWriter.cpp.
References outputDirectory_m.
Referenced by dumpInterpolatedPlane(), TEST_F(), and TEST_F().
|
private |
Definition at line 78 of file DirichletPlaneWriter.h.
Referenced by DirichletPlaneWriter(), and writePlane().