version 0.4.1
Ikarus::ControlSubsamplingVertexVTKWriter< B > Class Template Reference

ControlSubsamplingVertexVTKWriter class for writing VTK files with subsampling based on control messages. More...

#include <ikarus/utils/observer/controlvtkwriter.hh>

Inheritance diagram for Ikarus::ControlSubsamplingVertexVTKWriter< B >:
[legend]

Public Types

using MessageType = ControlMessages
 

Public Member Functions

 ControlSubsamplingVertexVTKWriter (const Basis &basis, const Eigen::VectorXd &sol, int refinementLevels=0)
 Constructor for ControlSubsamplingVertexVTKWriter. More...
 
auto setFieldInfo (std::string &&name, Dune::VTK::FieldInfo::Type type, std::size_t size, Dune::VTK::Precision prec=Dune::VTK::Precision::float32)
 Set field information for the VTK file. More...
 
auto setFileNamePrefix (std::string &&name)
 Set the file name prefix for VTK files. More...
 
void updateImpl (ControlMessages message) final
 Implementation of the update method. More...
 
void update (MessageType message)
 Update method for receiving notifications with a message. More...
 
void update (MessageType message, double val)
 Update method for receiving notifications with a message and a double value. More...
 
void update (MessageType message, int val)
 Update method for receiving notifications with a message and an integer value. More...
 
void update (MessageType message, const std::string &val)
 Update method for receiving notifications with a message and a string value. More...
 
void update (MessageType message, int val1, double val2)
 Update method for receiving notifications with a message and two values (integer and double). More...
 
void update (MessageType message, int val1, const std::string &val2)
 Update method for receiving notifications with a message, an integer value, and a string value. More...
 
void update (MessageType message, const Eigen::VectorXd &vec)
 Update method for receiving notifications with a message and an Eigen::VectorXd. More...
 

Protected Member Functions

virtual void updateImpl (MessageType message, double val)
 
virtual void updateImpl (MessageType message, int val)
 
virtual void updateImpl (MessageType message, const std::string &val)
 
virtual void updateImpl (MessageType message, int val1, const std::string &val2)
 
virtual void updateImpl (MessageType message, int val1, double val2)
 
virtual void updateImpl (MessageType message, const Eigen::VectorXd &vec)
 

Detailed Description

template<typename B>
class Ikarus::ControlSubsamplingVertexVTKWriter< B >

It inherits from the IObserver class and is specifically designed for handling SOLUTION_CHANGED messages.

Template Parameters
BThe type of the grid basis.

Member Typedef Documentation

◆ MessageType

using Ikarus::IObserver< ControlMessages >::MessageType = ControlMessages
inherited

Constructor & Destructor Documentation

◆ ControlSubsamplingVertexVTKWriter()

template<typename B >
Ikarus::ControlSubsamplingVertexVTKWriter< B >::ControlSubsamplingVertexVTKWriter ( const Basis &  basis,
const Eigen::VectorXd &  sol,
int  refinementLevels = 0 
)
inline

Initializes the VTK writer with the provided basis, solution, and refinement levels.

Parameters
basisThe grid basis.
solThe solution vector.
refinementLevelsThe refinement levels for subsampling.

Member Function Documentation

◆ setFieldInfo()

template<typename B >
auto Ikarus::ControlSubsamplingVertexVTKWriter< B >::setFieldInfo ( std::string &&  name,
Dune::VTK::FieldInfo::Type  type,
std::size_t  size,
Dune::VTK::Precision  prec = Dune::VTK::Precision::float32 
)
inline
Parameters
nameThe name of the field.
typeThe type of the field.
sizeThe size of the field.
precThe precision of the field.
Returns
The field information.

◆ setFileNamePrefix()

template<typename B >
auto Ikarus::ControlSubsamplingVertexVTKWriter< B >::setFileNamePrefix ( std::string &&  name)
inline
Parameters
p_nameThe file name prefix.

◆ update() [1/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message)
inlineinherited
Parameters
messageThe message to be received.

◆ update() [2/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
const Eigen::VectorXd &  vec 
)
inlineinherited
Parameters
messageThe message to be received.
vecThe Eigen::VectorXd associated with the message.

◆ update() [3/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
const std::string &  val 
)
inlineinherited
Parameters
messageThe message to be received.
valThe string value associated with the message.

◆ update() [4/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
double  val 
)
inlineinherited
Parameters
messageThe message to be received.
valThe double value associated with the message.

◆ update() [5/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
int  val 
)
inlineinherited
Parameters
messageThe message to be received.
valThe integer value associated with the message.

◆ update() [6/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
int  val1,
const std::string &  val2 
)
inlineinherited
Parameters
messageThe message to be received.
val1The integer value associated with the message.
val2The string value associated with the message.

◆ update() [7/7]

void Ikarus::IObserver< ControlMessages >::update ( MessageType  message,
int  val1,
double  val2 
)
inlineinherited
Parameters
messageThe message to be received.
val1The integer value associated with the message.
val2The double value associated with the message.

◆ updateImpl() [1/7]

template<typename B >
void Ikarus::ControlSubsamplingVertexVTKWriter< B >::updateImpl ( ControlMessages  message)
inlinefinalvirtual

This method is called upon receiving a SOLUTION_CHANGED control message. It writes VTK files with subsampling based on the provided field information.

Parameters
messageThe received control message.

Reimplemented from Ikarus::IObserver< ControlMessages >.

◆ updateImpl() [2/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
const Eigen::VectorXd &  vec 
)
inlineprotectedvirtualinherited

◆ updateImpl() [3/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
const std::string &  val 
)
inlineprotectedvirtualinherited

Reimplemented in Ikarus::ControlLogger.

◆ updateImpl() [4/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
double  val 
)
inlineprotectedvirtualinherited

◆ updateImpl() [5/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
int  val 
)
inlineprotectedvirtualinherited

◆ updateImpl() [6/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
int  val1,
const std::string &  val2 
)
inlineprotectedvirtualinherited

Reimplemented in Ikarus::ControlLogger.

◆ updateImpl() [7/7]

virtual void Ikarus::IObserver< ControlMessages >::updateImpl ( MessageType  message,
int  val1,
double  val2 
)
inlineprotectedvirtualinherited

Reimplemented in Ikarus::ControlLogger.


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