Builds and writes distributed curvilinear diagnostic meshes. More...
#include "vis3d.hpp"
Public Member Functions | |
| Vis3d () | |
| Reset the process-wide visualization state to its default configuration. | |
Static Public Member Functions | |
| static void | checkout3dfile (const std::string &out_field) |
Close the temporal collection in an XDMF_one metadata file. | |
| static void | cleanup () |
| Close the open HDF5 file and release all static Kokkos Views. | |
| static void | get3dmeshgrid (Kokkos::View< Real * > *sgrid_ptr, Kokkos::View< Real * > *chigrid_ptr, Kokkos::View< Real * > *phigrid_ptr) |
| Return shallow handles to the diagnostic coordinate arrays. | |
| static void | get3dmeshinfo (Real *zdsgrid=nullptr, Real *zdchigrid=nullptr, Real *zdphigrid=nullptr, Real *zsmin=nullptr, Real *zchimin=nullptr, Real *zphimin=nullptr, int *zsbin=nullptr, int *zchibin=nullptr, int *zphibin=nullptr, bool *zlocalgrid=nullptr) |
| Query optional scalar mesh metadata without exposing internal state. | |
| static void | init3Ddiagnostics (const Diag3dParameters ¶meters) |
| Configure the grid, MPI decomposition, mesh coordinates, and writer. | |
| static void | write3D (const std::string &out_field, int ztime, const Kokkos::View< Real *** > *field_array_3d=nullptr, FieldFunc *field_function_ptr=nullptr, std::string *filename=nullptr, bool lclose_file=true, const std::string &filename_suffix="") |
| Sample or accept a scalar field and write the configured 3-D format. | |
Builds and writes distributed curvilinear diagnostic meshes.
Vis3d owns process-wide static grid, staging, file, and communicator state. Initialization constructs a cell-centred (s,chi,phi) mesh, optionally maps it to Cartesian coordinates, and chooses either PIXIE-compatible HDF5 or HDF5 plus XDMF metadata. Field callbacks are sampled on the host and results are copied into Kokkos Views before output.
Call cleanup() before Kokkos::finalize() so the static Views are released. The class is not re-entrant and separate instances do not own separate state.
vis3d.F90, module vis3d. The C++ implementation retains its file-layout and MPI-distribution conventions, with explicit Kokkos host staging.
|
inline |
Reset the process-wide visualization state to its default configuration.
|
static |
Close the temporal collection in an XDMF_one metadata file.
| [in] | out_field | Field name used to derive output_3d_<field>.xmf. |
vis3d.F90: checkout3dfile.
|
static |
Close the open HDF5 file and release all static Kokkos Views.
Kokkos::finalize(). Any derived MPI communicator is intentionally left to MPI_Finalize() because HDF5 may retain a duplicate.
|
static |
Return shallow handles to the diagnostic coordinate arrays.
| [out] | sgrid_ptr | Optional radial grid handle of extent mesh_size[0]. |
| [out] | chigrid_ptr | Optional poloidal grid handle of extent mesh_size[1]. |
| [out] | phigrid_ptr | Optional global toroidal grid handle of extent mesh_size[2]. |
vis3d.F90: get3dmeshgrid.
|
static |
Query optional scalar mesh metadata without exposing internal state.
| [out] | zdsgrid | Optional normalized-radial cell width. |
| [out] | zdchigrid | Optional poloidal angular width, in radians. |
| [out] | zdphigrid | Optional toroidal angular width, in radians. |
| [out] | zsmin | Optional configured lower radial bound (cell edge). |
| [out] | zchimin | Optional configured lower poloidal bound, in radians. |
| [out] | zphimin | Optional lower bound of this rank's toroidal slab, in radians. |
| [out] | zsbin | Optional global radial point count. |
| [out] | zchibin | Optional global poloidal point count. |
| [out] | zphibin | Optional local toroidal point count. |
| [out] | zlocalgrid | Optional flag indicating a toroidally distributed mesh. |
vis3d.F90: get3dmeshinfo.
|
static |
Configure the grid, MPI decomposition, mesh coordinates, and writer.
| [in] | parameters | Complete diagnostic configuration; its communicator is borrowed. |
vis3d.F90: init3Ddiagnostics.
|
static |
Sample or accept a scalar field and write the configured 3-D format.
| [in] | out_field | Dataset name used in HDF5/XDMF metadata and filenames. |
| [in] | ztime | Integer diagnostic time index. |
| [in] | field_array_3d | Optional source [s][chi][local phi]. |
| [in] | field_function_ptr | Optional callback sampled at each local (s,chi,phi) point. |
| [out] | filename | Optional generated HDF5 filename, including .h5. |
| [in] | lclose_file | Close the PIXIE HDF5 handle after this write. |
| [in] | filename_suffix | Text appended to the generated basename. |
field_array_3d staging is currently a reported compatibility placeholder. vis3d.F90: write3D.