walberla::lbm::VTKOutput< LatticeModel, FlagFieldT > Class Template Reference

Detailed Description

template<typename LatticeModel, typename FlagFieldT>
class walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >

Default setup for VTK in LBM simulations.

This functor is to be used with vtk::initializeVTKOutput. It adds five VTK writers: "Velocity", "VelocityMagnitude", and "Density" which write the respective quantities in lattice units, and "FlagField" and "MappedFlagField" which can be used to visualize the flag field. Additionally, it adds the cell filter "DomainFilter" which can be used to write only the domain (a.k.a. fluid) parts of the simulation. It is also possible to add a vtk::VTKOutput::BeforeFunction to synchronize the ghost layers before writing VTK output. This before function will be registered as "PDFGhostLayerSync".

Template Parameters
LatticeModelThe lattice model used for the simulation
FlagFieldTType of the used flag field

#include <VTKOutput.h>

Public Types

using flag_t = typename FlagFieldT::flag_t
 
using FlagMap = std::map< FlagUID, flag_t >
 

Public Member Functions

 VTKOutput (const ConstBlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const vtk::VTKOutput::BeforeFunction &ghostLayerSyncFunction, const FlagMap &flagFieldMapping=FlagMap())
 
 VTKOutput (const ConstBlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 
virtual ~VTKOutput ()=default
 
virtual void operator() (std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &writers, std::map< std::string, vtk::VTKOutput::CellFilter > &filters, std::map< std::string, vtk::VTKOutput::BeforeFunction > &beforeFunctions) const
 see vtk::initializeVTKOutput for details More...
 

Static Public Member Functions

static void addToTimeloop (Timeloop &timeloop, const shared_ptr< blockforest::StructuredBlockForest > &blocks, const shared_ptr< Config > &config, const std::string &configBlockName, const BlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 
static void addToTimeloop (Timeloop &timeloop, const shared_ptr< blockforest::StructuredBlockForest > &blocks, const shared_ptr< Config > &config, const BlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 

Protected Member Functions

virtual void addWriters (std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &writers) const
 
virtual void addFilters (std::map< std::string, vtk::VTKOutput::CellFilter > &filters) const
 
virtual void addBeforeFunctions (std::map< std::string, vtk::VTKOutput::BeforeFunction > &beforeFunctions) const
 

Protected Attributes

BlockDataID pdfField_
 
ConstBlockDataID flagField_
 
FlagUID domainFlagUID_
 
vtk::VTKOutput::BeforeFunction ghostLayerSyncFunction_
 
FlagMap flagFieldMapping_
 

Member Typedef Documentation

◆ flag_t

template<typename LatticeModel , typename FlagFieldT >
using walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flag_t = typename FlagFieldT::flag_t

◆ FlagMap

template<typename LatticeModel , typename FlagFieldT >
using walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::FlagMap = std::map<FlagUID, flag_t>

Constructor & Destructor Documentation

◆ VTKOutput() [1/2]

template<typename LatticeModel , typename FlagFieldT >
walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::VTKOutput ( const ConstBlockDataID pdfField,
const ConstBlockDataID flagField,
const FlagUID &  domainFlagUID,
const vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction ghostLayerSyncFunction,
const FlagMap flagFieldMapping = FlagMap() 
)
Parameters
pdfFieldBlockDataID of the PDF field used in the simulation
flagFieldBlockDataID of the flag field used in the simulation
domainFlagUIDFlagUID of the domain (a.k.a fluid) flag
ghostLayerSyncFunctionA function used to synchronize the ghost layers before the VTK output. It will be called once every time step, before the output is written.
flagFieldMappingA mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available.

◆ VTKOutput() [2/2]

template<typename LatticeModel , typename FlagFieldT >
walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::VTKOutput ( const ConstBlockDataID pdfField,
const ConstBlockDataID flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
Parameters
pdfFieldBlockDataID of the PDF field used in the simulation
flagFieldBlockDataID of the flag field used in the simulation
domainFlagUIDFlagUID of the domain (a.k.a fluid) flag
flagFieldMappingA mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available.

◆ ~VTKOutput()

template<typename LatticeModel , typename FlagFieldT >
virtual walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::~VTKOutput ( )
virtualdefault

Member Function Documentation

◆ addBeforeFunctions()

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addBeforeFunctions ( std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction > &  beforeFunctions) const
protectedvirtual

◆ addFilters()

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addFilters ( std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::CellFilter > &  filters) const
protectedvirtual

◆ addToTimeloop() [1/2]

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addToTimeloop ( Timeloop timeloop,
const shared_ptr< blockforest::StructuredBlockForest > &  blocks,
const shared_ptr< Config > &  config,
const BlockDataID pdfField,
const ConstBlockDataID flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
static

◆ addToTimeloop() [2/2]

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addToTimeloop ( Timeloop timeloop,
const shared_ptr< blockforest::StructuredBlockForest > &  blocks,
const shared_ptr< Config > &  config,
const std::string &  configBlockName,
const BlockDataID pdfField,
const ConstBlockDataID flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
static

◆ addWriters()

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addWriters ( std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &  writers) const
protectedvirtual

◆ operator()()

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::operator() ( std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &  writers,
std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::CellFilter > &  filters,
std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction > &  beforeFunctions 
) const
virtual

see vtk::initializeVTKOutput for details

Member Data Documentation

◆ domainFlagUID_

template<typename LatticeModel , typename FlagFieldT >
FlagUID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::domainFlagUID_
protected

◆ flagField_

template<typename LatticeModel , typename FlagFieldT >
ConstBlockDataID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flagField_
protected

◆ flagFieldMapping_

template<typename LatticeModel , typename FlagFieldT >
FlagMap walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flagFieldMapping_
protected

◆ ghostLayerSyncFunction_

template<typename LatticeModel , typename FlagFieldT >
vtk::VTKOutput::BeforeFunction walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::ghostLayerSyncFunction_
protected

◆ pdfField_

template<typename LatticeModel , typename FlagFieldT >
BlockDataID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::pdfField_
protected

The documentation for this class was generated from the following file: