ug4
ug::GridFunctionDebugWriter< TDomain, TAlgebra > Class Template Reference

#include <grid_function_util.h>

+ Inheritance diagram for ug::GridFunctionDebugWriter< TDomain, TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 type of matrix More...
 
typedef ApproximationSpace< TDomain > approximation_space_type
 type of approximation space More...
 
typedef algebra_type::matrix_type matrix_type
 type of matrix More...
 
typedef IDebugWriter< TAlgebra > super
 
typedef algebra_type::vector_type vector_type
 type of vector More...
 
- Public Types inherited from ug::IDebugWriter< TAlgebra >
typedef TAlgebra algebra_type
 type of algebra More...
 
typedef TAlgebra::matrix_type matrix_type
 type of matrix More...
 
typedef TAlgebra::vector_type vector_type
 type of vector More...
 
- Public Types inherited from ug::IVectorDebugWriter< TAlgebra::vector_type >
typedef TAlgebra::vector_type vector_type
 type of vector More...
 

Public Member Functions

GridLevel grid_level () const
 returns current grid level More...
 
 GridFunctionDebugWriter (SmartPtr< ApproximationSpace< TDomain > > spApproxSpace)
 Constructor. More...
 
void reset ()
 sets to toplevel on surface More...
 
void set_conn_viewer_indices (bool b)
 sets if .indices file is written or conn viewer More...
 
void set_conn_viewer_output (bool b)
 sets if writing to conn viewer More...
 
void set_grid_level (const GridLevel &gridLevel)
 sets the grid level More...
 
void set_grid_levels (const GridLevel &glFrom, const GridLevel &glTo)
 sets the grid level More...
 
void set_print_consistent (bool b)
 sets if data shall be made consistent before printing More...
 
void set_vtk_output (bool b)
 sets if writing to vtk More...
 
virtual void update_positions ()
 
virtual void write_matrix (const matrix_type &mat, const char *filename)
 write matrix More...
 
virtual void write_vector (const vector_type &vec, const char *filename)
 write vector More...
 
virtual ~GridFunctionDebugWriter ()
 
- Public Member Functions inherited from ug::IVectorDebugWriter< TAlgebra::vector_type >
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...
 
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...
 
void set_positions (const std::vector< MathVector< dim > > &vPos)
 sets the current positions More...
 
void set_positions (IPositionProvider< dim > &provider)
 employs a position provider to set the current positions More...
 
virtual ~IVectorDebugWriter ()
 virtual destructor More...
 

Protected Member Functions

void extract_positions (const GridLevel &gridLevel)
 reads the positions More...
 
void write_algebra_indices_CV (std::string name)
 
virtual void write_vector_to_conn_viewer (const vector_type &vec, const char *filename)
 write vector More...
 
void write_vector_to_vtk (const vector_type &vec, const char *filename)
 
- Protected Member Functions inherited from ug::IVectorDebugWriter< TAlgebra::vector_type >
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
 
std::vector< MathVector< dim > > & positions ()
 returns the positions and sets the current dim More...
 

Protected Attributes

bool bConnViewerIndices
 
bool bConnViewerOut
 
bool bVTKOut
 
GridLevel m_glFrom
 
GridLevel m_glTo
 
bool m_printConsistent
 
SmartPtr< approximation_space_typem_spApproxSpace
 
- Protected Attributes inherited from ug::IVectorDebugWriter< TAlgebra::vector_type >
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
 

Static Private Attributes

static const int dim = TDomain::dim
 dimension More...
 

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra ug::GridFunctionDebugWriter< TDomain, TAlgebra >::algebra_type

type of matrix

◆ approximation_space_type

template<typename TDomain , typename TAlgebra >
typedef ApproximationSpace<TDomain> ug::GridFunctionDebugWriter< TDomain, TAlgebra >::approximation_space_type

type of approximation space

◆ matrix_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::matrix_type ug::GridFunctionDebugWriter< TDomain, TAlgebra >::matrix_type

type of matrix

◆ super

template<typename TDomain , typename TAlgebra >
typedef IDebugWriter<TAlgebra> ug::GridFunctionDebugWriter< TDomain, TAlgebra >::super

◆ vector_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::vector_type ug::GridFunctionDebugWriter< TDomain, TAlgebra >::vector_type

type of vector

Constructor & Destructor Documentation

◆ GridFunctionDebugWriter()

template<typename TDomain , typename TAlgebra >
ug::GridFunctionDebugWriter< TDomain, TAlgebra >::GridFunctionDebugWriter ( SmartPtr< ApproximationSpace< TDomain > >  spApproxSpace)
inline

◆ ~GridFunctionDebugWriter()

template<typename TDomain , typename TAlgebra >
virtual ug::GridFunctionDebugWriter< TDomain, TAlgebra >::~GridFunctionDebugWriter ( )
inlinevirtual

Member Function Documentation

◆ extract_positions()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::extract_positions ( const GridLevel gridLevel)
inlineprotected

◆ grid_level()

template<typename TDomain , typename TAlgebra >
GridLevel ug::GridFunctionDebugWriter< TDomain, TAlgebra >::grid_level ( ) const
inline

returns current grid level

References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom.

◆ reset()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::reset ( )
inline

◆ set_conn_viewer_indices()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_conn_viewer_indices ( bool  b)
inline

sets if .indices file is written or conn viewer

References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerIndices.

◆ set_conn_viewer_output()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_conn_viewer_output ( bool  b)
inline

sets if writing to conn viewer

References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerOut.

◆ set_grid_level()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_grid_level ( const GridLevel gridLevel)
inline

◆ set_grid_levels()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_grid_levels ( const GridLevel glFrom,
const GridLevel glTo 
)
inline

◆ set_print_consistent()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_print_consistent ( bool  b)
inline

sets if data shall be made consistent before printing

References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_printConsistent.

◆ set_vtk_output()

template<typename TDomain , typename TAlgebra >
void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_vtk_output ( bool  b)
inline

◆ update_positions()

template<typename TDomain , typename TAlgebra >
virtual void ug::GridFunctionDebugWriter< TDomain, TAlgebra >::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 from ug::IVectorDebugWriter< TAlgebra::vector_type >.

References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::extract_positions(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom.

Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_matrix(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_conn_viewer().

◆ write_algebra_indices_CV()

◆ write_matrix()

◆ write_vector()

◆ write_vector_to_conn_viewer()

◆ write_vector_to_vtk()

Member Data Documentation

◆ bConnViewerIndices

template<typename TDomain , typename TAlgebra >
bool ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerIndices
protected

◆ bConnViewerOut

◆ bVTKOut

template<typename TDomain , typename TAlgebra >
bool ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bVTKOut
protected

◆ dim

◆ m_glFrom

◆ m_glTo

◆ m_printConsistent

template<typename TDomain , typename TAlgebra >
bool ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_printConsistent
protected

◆ m_spApproxSpace


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