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".
LatticeModel | The lattice model used for the simulation |
FlagFieldT | Type 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_ |
using walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flag_t = typename FlagFieldT::flag_t |
using walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::FlagMap = std::map<FlagUID, flag_t> |
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() |
||
) |
pdfField | BlockDataID of the PDF field used in the simulation |
flagField | BlockDataID of the flag field used in the simulation |
domainFlagUID | FlagUID of the domain (a.k.a fluid) flag |
ghostLayerSyncFunction | A function used to synchronize the ghost layers before the VTK output. It will be called once every time step, before the output is written. |
flagFieldMapping | A mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available. |
walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::VTKOutput | ( | const ConstBlockDataID & | pdfField, |
const ConstBlockDataID & | flagField, | ||
const FlagUID & | domainFlagUID, | ||
const FlagMap & | flagFieldMapping = FlagMap() |
||
) |
pdfField | BlockDataID of the PDF field used in the simulation |
flagField | BlockDataID of the flag field used in the simulation |
domainFlagUID | FlagUID of the domain (a.k.a fluid) flag |
flagFieldMapping | A mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available. |
|
virtualdefault |
|
protectedvirtual |
|
protectedvirtual |
|
static |
|
static |
|
protectedvirtual |
|
virtual |
see vtk::initializeVTKOutput for details
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |