ug4
ug::IVectorDebugWriter< TVector > Class Template Referenceabstract

base class for all vector debug writer More...

#include <debug_writer.h>

Public Types

typedef TVector vector_type
 type of vector More...
 

Public Member Functions

int current_dimension () const
 returns the current dimension More...
 
void enter_section (const char *secDir)
 enter a new debugging section More...
 
std::string get_base_dir ()
 
SmartPtr< DebugWriterContextget_context ()
 get the debugging writer context More...
 
ConstSmartPtr< DebugWriterContextget_context () const
 get the debugging writer context More...
 
int get_dim () const
 get the dimensionality More...
 
template<int dim>
const std::vector< MathVector< dim > > & get_positions () const
 returns the positions (only available for current dimension) More...
 
 IVectorDebugWriter ()
 Constructor. More...
 
void leave_section ()
 leave the current debugging section More...
 
virtual void print_message (const char *msg)
 prints a message More...
 
void set_base_dir (const char *const baseDir)
 set the base directory for output files (.vec and .mat) More...
 
void set_context (SmartPtr< DebugWriterContext > context)
 set the debugging writer context More...
 
template<int dim>
void set_positions (const std::vector< MathVector< dim > > &vPos)
 sets the current positions More...
 
template<int dim>
void set_positions (IPositionProvider< dim > &provider)
 employs a position provider to set the current positions More...
 
virtual void update_positions ()
 
virtual void write_vector (const vector_type &vec, const char *name)=0
 write vector More...
 
virtual ~IVectorDebugWriter ()
 virtual destructor More...
 

Protected Member Functions

void compose_file_path (std::string &path)
 composes the path for the files and creates the intermediate directories (up to the base one): More...
 
std::vector< MathVector< 1 > > & get_pos (Int2Type< 1 >)
 help function to get local ips More...
 
const std::vector< MathVector< 1 > > & get_pos (Int2Type< 1 >) const
 
std::vector< MathVector< 2 > > & get_pos (Int2Type< 2 >)
 
const std::vector< MathVector< 2 > > & get_pos (Int2Type< 2 >) const
 
std::vector< MathVector< 3 > > & get_pos (Int2Type< 3 >)
 
const std::vector< MathVector< 3 > > & get_pos (Int2Type< 3 >) const
 
template<int dim>
std::vector< MathVector< dim > > & positions ()
 returns the positions and sets the current dim More...
 

Protected Attributes

int m_currentDim
 current dimension More...
 
SmartPtr< DebugWriterContextm_spContext
 debugging writer context More...
 
std::vector< MathVector< 1 > > m_vPos1d
 vectors of positions More...
 
std::vector< MathVector< 2 > > m_vPos2d
 
std::vector< MathVector< 3 > > m_vPos3d
 

Detailed Description

template<typename TVector>
class ug::IVectorDebugWriter< TVector >

base class for all vector debug writer

This is the base class for debug output of algebraic vectors

Member Typedef Documentation

◆ vector_type

template<typename TVector >
typedef TVector ug::IVectorDebugWriter< TVector >::vector_type

type of vector

Constructor & Destructor Documentation

◆ IVectorDebugWriter()

template<typename TVector >
ug::IVectorDebugWriter< TVector >::IVectorDebugWriter ( )
inline

Constructor.

◆ ~IVectorDebugWriter()

template<typename TVector >
virtual ug::IVectorDebugWriter< TVector >::~IVectorDebugWriter ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ compose_file_path()

template<typename TVector >
void ug::IVectorDebugWriter< TVector >::compose_file_path ( std::string &  path)
inlineprotected

composes the path for the files and creates the intermediate directories (up to the base one):

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ current_dimension()

template<typename TVector >
int ug::IVectorDebugWriter< TVector >::current_dimension ( ) const
inline

returns the current dimension

References ug::IVectorDebugWriter< TVector >::m_currentDim.

◆ enter_section()

template<typename TVector >
void ug::IVectorDebugWriter< TVector >::enter_section ( const char *  secDir)
inline

enter a new debugging section

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ get_base_dir()

template<typename TVector >
std::string ug::IVectorDebugWriter< TVector >::get_base_dir ( )
inline

◆ get_context() [1/2]

template<typename TVector >
SmartPtr<DebugWriterContext> ug::IVectorDebugWriter< TVector >::get_context ( )
inline

get the debugging writer context

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ get_context() [2/2]

template<typename TVector >
ConstSmartPtr<DebugWriterContext> ug::IVectorDebugWriter< TVector >::get_context ( ) const
inline

get the debugging writer context

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ get_dim()

template<typename TVector >
int ug::IVectorDebugWriter< TVector >::get_dim ( ) const
inline

◆ get_pos() [1/6]

template<typename TVector >
std::vector<MathVector<1> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 1 >  )
inlineprotected

◆ get_pos() [2/6]

template<typename TVector >
const std::vector<MathVector<1> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 1 >  ) const
inlineprotected

◆ get_pos() [3/6]

template<typename TVector >
std::vector<MathVector<2> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 2 >  )
inlineprotected

◆ get_pos() [4/6]

template<typename TVector >
const std::vector<MathVector<2> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 2 >  ) const
inlineprotected

◆ get_pos() [5/6]

template<typename TVector >
std::vector<MathVector<3> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 3 >  )
inlineprotected

◆ get_pos() [6/6]

template<typename TVector >
const std::vector<MathVector<3> >& ug::IVectorDebugWriter< TVector >::get_pos ( Int2Type< 3 >  ) const
inlineprotected

◆ get_positions()

template<typename TVector >
template<int dim>
const std::vector<MathVector<dim> >& ug::IVectorDebugWriter< TVector >::get_positions ( ) const
inline

returns the positions (only available for current dimension)

References dim, ug::IVectorDebugWriter< TVector >::get_pos(), and ug::IVectorDebugWriter< TVector >::m_currentDim.

◆ leave_section()

template<typename TVector >
void ug::IVectorDebugWriter< TVector >::leave_section ( )
inline

leave the current debugging section

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ positions()

template<typename TVector >
template<int dim>
std::vector<MathVector<dim> >& ug::IVectorDebugWriter< TVector >::positions ( )
inlineprotected

returns the positions and sets the current dim

References dim, ug::IVectorDebugWriter< TVector >::get_pos(), and ug::IVectorDebugWriter< TVector >::m_currentDim.

◆ print_message()

template<typename TVector >
virtual void ug::IVectorDebugWriter< TVector >::print_message ( const char *  msg)
inlinevirtual

prints a message

References ug::IVectorDebugWriter< TVector >::m_spContext.

◆ set_base_dir()

template<typename TVector >
void ug::IVectorDebugWriter< TVector >::set_base_dir ( const char *const  baseDir)
inline

set the base directory for output files (.vec and .mat)

References ug::IVectorDebugWriter< TVector >::m_spContext, and ug::IVectorDebugWriter< TVector >::set_context().

◆ set_context()

template<typename TVector >
void ug::IVectorDebugWriter< TVector >::set_context ( SmartPtr< DebugWriterContext context)
inline

◆ set_positions() [1/2]

template<typename TVector >
template<int dim>
void ug::IVectorDebugWriter< TVector >::set_positions ( const std::vector< MathVector< dim > > &  vPos)
inline

◆ set_positions() [2/2]

template<typename TVector >
template<int dim>
void ug::IVectorDebugWriter< TVector >::set_positions ( IPositionProvider< dim > &  provider)
inline

◆ update_positions()

template<typename TVector >
virtual void ug::IVectorDebugWriter< TVector >::update_positions ( )
inlinevirtual

gives subclasses the oportunity to calculate the positions this is used e.g. in GridFunctionDebugWriter after this has been called, get_positions gives valid positions those positions are used e.g. in AMG or Schur methods.

Reimplemented in ug::GridFunctionDebugWriter< TDomain, TAlgebra >.

◆ write_vector()

template<typename TVector >
virtual void ug::IVectorDebugWriter< TVector >::write_vector ( const vector_type vec,
const char *  name 
)
pure virtual

Member Data Documentation

◆ m_currentDim

◆ m_spContext

◆ m_vPos1d

template<typename TVector >
std::vector<MathVector<1> > ug::IVectorDebugWriter< TVector >::m_vPos1d
protected

vectors of positions

Referenced by ug::IVectorDebugWriter< TVector >::get_pos().

◆ m_vPos2d

template<typename TVector >
std::vector<MathVector<2> > ug::IVectorDebugWriter< TVector >::m_vPos2d
protected

◆ m_vPos3d

template<typename TVector >
std::vector<MathVector<3> > ug::IVectorDebugWriter< TVector >::m_vPos3d
protected

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