version 0.4.1
Ikarus::Vtk::Writer< AS, DC, Base > Struct Template Reference

Manages writing results using VTK, based on assembler and data collector. More...

#include <ikarus/io/vtkwriter.hh>

Inheritance diagram for Ikarus::Vtk::Writer< AS, DC, Base >:
[legend]

Public Types

using Assembler = AS
 
using GridView = typename Assembler::GridView
 
using FERequirement = typename Assembler::FERequirement
 
using FEContainer = typename Assembler::FEContainer
 
using FEType = typename std::remove_cvref_t< FEContainer >::value_type
 
using DataCollector = DC
 
using VTKWriter = Base
 

Public Member Functions

template<class... Args>
 Writer (std::shared_ptr< AS > assembler, Args... args)
 Constructor with assembler and additional arguments. More...
 
template<typename DC_ , class... Args>
requires Concepts::DataCollector<std::decay_t<DC_>>
 Writer (std::shared_ptr< AS > assembler, DC_ &&dc, Args... args)
 Constructor with assembler, data collector, and additional arguments. More...
 
template<typename RF >
void addResultFunction (RF &&resultFunction, DataTag dataTag)
 Adds a result function for the given data tag. More...
 
template<template< typename, int, int > class RT>
requires (Concepts::ResultType<RT>)
void addResult (DataTag dataTag=DataTag::asPointData)
 Adds a result for the given data tag. More...
 
void addAllResults (DataTag dataTag=DataTag::asPointData)
 Adds all results for the given data tag. More...
 
template<typename Basis , typename R >
void addInterpolation (R &&vals, const Basis &basis, const std::string &name, DataTag dataTag=DataTag::asPointData)
 Adds interpolation data for the given basis and container. More...
 

Detailed Description

template<typename AS, typename DC, typename Base>
requires (Concepts::FlatAssembler<AS> && Concepts::DataCollector<DC>)
struct Ikarus::Vtk::Writer< AS, DC, Base >
Template Parameters
ASType of the assembler.
DCType of the data collector.
BaseBase class for VTK writer.

Member Typedef Documentation

◆ Assembler

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::Assembler = AS

◆ DataCollector

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::DataCollector = DC

◆ FEContainer

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::FEContainer = typename Assembler::FEContainer

◆ FERequirement

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::FERequirement = typename Assembler::FERequirement

◆ FEType

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::FEType = typename std::remove_cvref_t<FEContainer>::value_type

◆ GridView

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::GridView = typename Assembler::GridView

◆ VTKWriter

template<typename AS , typename DC , typename Base >
using Ikarus::Vtk::Writer< AS, DC, Base >::VTKWriter = Base

Constructor & Destructor Documentation

◆ Writer() [1/2]

template<typename AS , typename DC , typename Base >
template<class... Args>
Ikarus::Vtk::Writer< AS, DC, Base >::Writer ( std::shared_ptr< AS >  assembler,
Args...  args 
)
inline
Parameters
assemblerShared pointer to assembler.
argsAdditional arguments.

◆ Writer() [2/2]

template<typename AS , typename DC , typename Base >
template<typename DC_ , class... Args>
requires Concepts::DataCollector<std::decay_t<DC_>>
Ikarus::Vtk::Writer< AS, DC, Base >::Writer ( std::shared_ptr< AS >  assembler,
DC_ &&  dc,
Args...  args 
)
inline
Parameters
assemblerShared pointer to assembler.
dcData collector
argsAdditional arguments.

Member Function Documentation

◆ addAllResults()

template<typename AS , typename DC , typename Base >
void Ikarus::Vtk::Writer< AS, DC, Base >::addAllResults ( DataTag  dataTag = DataTag::asPointData)
inline
Parameters
dataTagThe data tag (defaults to DataTag::asPointData).

◆ addInterpolation()

template<typename AS , typename DC , typename Base >
template<typename Basis , typename R >
void Ikarus::Vtk::Writer< AS, DC, Base >::addInterpolation ( R &&  vals,
const Basis &  basis,
const std::string &  name,
DataTag  dataTag = DataTag::asPointData 
)
inline
Template Parameters
ContainerType of the container used by the gridfunction. This can be deduced for power basis and scalarbasis, otherwise define a Dune::FieldVector<ctype, dim> yourself
This only works properly with scalar, power and scalar subspacebasis at the moment. If you need more granular control over your output format, create the gridFunction yourself and add it with writer.addPointData(gridFuntion, fieldInfo) manually
Parameters
valsCoefficient vector to be interpolated.
basisThe underlying basis, can be a subspacebasis
nameName of the field.
dataTagThe data tag.

◆ addResult()

template<typename AS , typename DC , typename Base >
template<template< typename, int, int > class RT>
requires (Concepts::ResultType<RT>)
void Ikarus::Vtk::Writer< AS, DC, Base >::addResult ( DataTag  dataTag = DataTag::asPointData)
inline
Template Parameters
RTResult type template.
Parameters
dataTagThe data tag (defaults to DataTag::asPointData).

◆ addResultFunction()

template<typename AS , typename DC , typename Base >
template<typename RF >
void Ikarus::Vtk::Writer< AS, DC, Base >::addResultFunction ( RF &&  resultFunction,
DataTag  dataTag 
)
inline
Template Parameters
RFType of the result function.
Parameters
resultFunctionThe Ikarus::ResultFunction.
dataTagThe data tag (defaults to DataTag::asPointData).

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