45class VTKWriter :
public vtk::BlockCellDataWriter<OutputType, F_SIZE_ARG> {
63template <
typename FloatType,
typename PdfField,
typename OutputType =
float>
80template <
typename FloatType,
typename VectorField,
typename OutputType =
float>
82 :
public VTKWriter<FloatType, VectorField, 3u, OutputType> {
97template <
typename FloatType,
typename PdfField,
typename OutputType =
float>
99 :
public VTKWriter<FloatType, PdfField, 9u, OutputType> {
103 using Base::evaluate;
125template <
typename FloatType, lbmpy::Arch Architecture>
129#if defined(__CUDACC__) and defined(WALBERLA_BUILD_WITH_CUDA)
131 [&]<
typename Field>(
auto const &
blocks, std::string name,
135 blocks, name, FloatType{0}, field::fzyx,
142 FloatType_c(zero_centered_to_md(
units.at(
"density")));
143#if defined(__CUDACC__) and defined(WALBERLA_BUILD_WITH_CUDA)
145 auto const &
blocks = m_lattice->get_blocks();
148 vtk_obj.addBeforeFunction(gpu::fieldCpyFunctor<PdfFieldCpu, PdfField>(
158#if defined(__CUDACC__) and defined(WALBERLA_BUILD_WITH_CUDA)
160 auto const &
blocks = m_lattice->get_blocks();
164 gpu::fieldCpyFunctor<VectorFieldCpu, VectorField>(
174 FloatType_c(zero_centered_to_md(
units.at(
"pressure")));
175#if defined(__CUDACC__) and defined(WALBERLA_BUILD_WITH_CUDA)
177 auto const &
blocks = m_lattice->get_blocks();
180 vtk_obj.addBeforeFunction(gpu::fieldCpyFunctor<PdfFieldCpu, PdfField>(
187 pressure_tensor_correction_factor()));
std::unordered_map< std::string, double > units_map
OutputType evaluate(cell_idx_t const x, cell_idx_t const y, cell_idx_t const z, cell_idx_t const) override
void register_vtk_field_writers(walberla::vtk::VTKOutput &vtk_obj, LatticeModel::units_map const &units, int flag_observables) override
FloatType const m_off_diag_factor
OutputType evaluate(cell_idx_t const x, cell_idx_t const y, cell_idx_t const z, cell_idx_t const f) override
PressureTensorVTKWriter(ConstBlockDataID const &block_id, std::string const &id, FloatType unit_conversion, FloatType off_diag_factor)
Base class for LB field VTK writers.
ConstBlockDataID const m_block_id
FloatType const m_conversion
void configure() override
VTKWriter(ConstBlockDataID const &block_id, std::string const &id, FloatType unit_conversion)
OutputType evaluate(cell_idx_t const x, cell_idx_t const y, cell_idx_t const z, cell_idx_t const f) override
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
double get(GhostLayerField< double, uint_t{19u}> const *pdf_field, double const density, Cell const &cell)
auto get(GhostLayerField< double, uint_t{19u}> const *pdf_field, double const density, Cell const &cell)
auto get(GhostLayerField< double, uint_t{3u}> const *vec_field, Cell const &cell)
\file PackInfoPdfDoublePrecision.cpp \author pystencils
static Utils::Vector3d velocity(Particle const &p_ref, Particle const &p_vs)
Velocity of the virtual site.