Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
VTKDumpUtils.hpp File Reference

Shared VTK dump utilities for SPH-based models. More...

#include "shambase/stacktrace.hpp"
#include "shamalgs/memory.hpp"
#include "shamcomm/logs.hpp"
#include "shamcomm/worldInfo.hpp"
#include "shamrock/io/LegacyVtkWriter.hpp"
#include "shamrock/scheduler/ComputeField.hpp"
#include "shamrock/scheduler/PatchScheduler.hpp"
#include "shamsys/NodeInstance.hpp"
+ Include dependency graph for VTKDumpUtils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shammodels
 namespace for models
 

Functions

template<class Tvec >
shamrock::LegacyVtkWriter shammodels::common::io::start_dump (PatchScheduler &sched, const std::string &dump_name)
 Start a VTK dump by writing particle positions.
 
void shammodels::common::io::vtk_dump_add_patch_id (PatchScheduler &sched, shamrock::LegacyVtkWriter &writer)
 Add patch ID field to VTK dump.
 
void shammodels::common::io::vtk_dump_add_worldrank (PatchScheduler &sched, shamrock::LegacyVtkWriter &writer)
 Add world rank field to VTK dump.
 
template<class T >
void shammodels::common::io::vtk_dump_add_compute_field (PatchScheduler &sched, shamrock::LegacyVtkWriter &writer, shamrock::ComputeField< T > &field, const std::string &field_dump_name)
 Add a compute field to VTK dump.
 
template<class T >
void shammodels::common::io::vtk_dump_add_field (PatchScheduler &sched, shamrock::LegacyVtkWriter &writer, u32 field_idx, const std::string &field_dump_name)
 Add a data field to VTK dump.
 

Detailed Description

Shared VTK dump utilities for SPH-based models.

Author
Guo Yansong (guo.y.nosp@m.anso.nosp@m.ng.ng.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om)
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Contains common helper functions for VTK output that are shared between SPH and GSPH models.

Definition in file VTKDumpUtils.hpp.

Function Documentation

◆ start_dump()

template<class Tvec >
shamrock::LegacyVtkWriter shammodels::common::io::start_dump ( PatchScheduler sched,
const std::string &  dump_name 
)
inline

Start a VTK dump by writing particle positions.

Template Parameters
TvecVector type (e.g., f64_3)
Parameters
schedPatch scheduler
dump_nameOutput filename
Returns
VTK writer ready for additional fields

Definition at line 42 of file VTKDumpUtils.hpp.

+ Here is the call graph for this function:

◆ vtk_dump_add_compute_field()

template<class T >
void shammodels::common::io::vtk_dump_add_compute_field ( PatchScheduler sched,
shamrock::LegacyVtkWriter writer,
shamrock::ComputeField< T > &  field,
const std::string &  field_dump_name 
)
inline

Add a compute field to VTK dump.

Template Parameters
TField type (scalar or vector)
Parameters
schedPatch scheduler
writerVTK writer
fieldCompute field to write
field_dump_nameName of the field in VTK output

Definition at line 143 of file VTKDumpUtils.hpp.

+ Here is the call graph for this function:

◆ vtk_dump_add_field()

template<class T >
void shammodels::common::io::vtk_dump_add_field ( PatchScheduler sched,
shamrock::LegacyVtkWriter writer,
u32  field_idx,
const std::string &  field_dump_name 
)
inline

Add a data field to VTK dump.

Template Parameters
TField type (scalar or vector)
Parameters
schedPatch scheduler
writerVTK writer
field_idxField index in patch data
field_dump_nameName of the field in VTK output

Definition at line 172 of file VTKDumpUtils.hpp.

+ Here is the call graph for this function:

◆ vtk_dump_add_patch_id()

void shammodels::common::io::vtk_dump_add_patch_id ( PatchScheduler sched,
shamrock::LegacyVtkWriter writer 
)
inline

Add patch ID field to VTK dump.

Parameters
schedPatch scheduler
writerVTK writer

Definition at line 66 of file VTKDumpUtils.hpp.

+ Here is the call graph for this function:

◆ vtk_dump_add_worldrank()

void shammodels::common::io::vtk_dump_add_worldrank ( PatchScheduler sched,
shamrock::LegacyVtkWriter writer 
)
inline

Add world rank field to VTK dump.

Parameters
schedPatch scheduler
writerVTK writer

Definition at line 103 of file VTKDumpUtils.hpp.

+ Here is the call graph for this function: