ug4
|
#include <grid_function_util.h>
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< DebugWriterContext > | get_context () |
get the debugging writer context More... | |
ConstSmartPtr< DebugWriterContext > | get_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_type > | m_spApproxSpace |
Protected Attributes inherited from ug::IVectorDebugWriter< TAlgebra::vector_type > | |
int | m_currentDim |
current dimension More... | |
SmartPtr< DebugWriterContext > | m_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... | |
typedef TAlgebra ug::GridFunctionDebugWriter< TDomain, TAlgebra >::algebra_type |
type of matrix
typedef ApproximationSpace<TDomain> ug::GridFunctionDebugWriter< TDomain, TAlgebra >::approximation_space_type |
type of approximation space
typedef algebra_type::matrix_type ug::GridFunctionDebugWriter< TDomain, TAlgebra >::matrix_type |
type of matrix
typedef IDebugWriter<TAlgebra> ug::GridFunctionDebugWriter< TDomain, TAlgebra >::super |
typedef algebra_type::vector_type ug::GridFunctionDebugWriter< TDomain, TAlgebra >::vector_type |
type of vector
|
inline |
Constructor.
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::dim, and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::reset().
|
inlinevirtual |
|
inlineprotected |
reads the positions
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_spApproxSpace.
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::update_positions().
|
inline |
returns current grid level
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom.
|
inline |
sets to toplevel on surface
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_grid_level(), ug::GridLevel::SURFACE, and ug::GridLevel::TOP.
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::GridFunctionDebugWriter().
|
inline |
sets if .indices file is written or conn viewer
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerIndices.
|
inline |
sets if writing to conn viewer
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerOut.
|
inline |
sets the grid level
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom, and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glTo.
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::reset().
|
inline |
sets the grid level
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom, and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glTo.
|
inline |
sets if data shall be made consistent before printing
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_printConsistent.
|
inline |
sets if writing to vtk
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bVTKOut.
|
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().
|
inlineprotected |
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerIndices, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_spApproxSpace, and name.
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_matrix(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_conn_viewer().
|
inlinevirtual |
write matrix
Implements ug::IDebugWriter< TAlgebra >.
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerOut, ug::IVectorDebugWriter< TAlgebra::vector_type >::compose_file_path(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::dim, ug::FileTypeIs(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glTo, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_spApproxSpace, name, PROFILE_FUNC_GROUP, UG_THROW, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::update_positions(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_algebra_indices_CV(), and ug::ConnectionViewer::WriteMatrixPar().
|
inlinevirtual |
write vector
Implements ug::IDebugWriter< TAlgebra >.
References ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bConnViewerOut, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::bVTKOut, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_conn_viewer(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_vtk().
|
inlineprotectedvirtual |
write vector
References ug::IVectorDebugWriter< TAlgebra::vector_type >::compose_file_path(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::dim, ug::FileTypeIs(), name, PROFILE_FUNC_GROUP, UG_THROW, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::update_positions(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_algebra_indices_CV(), and ug::ConnectionViewer::WriteVectorPar().
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector().
|
inlineprotected |
References ug::IVectorDebugWriter< TAlgebra::vector_type >::compose_file_path(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_glFrom, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_printConsistent, ug::GridFunctionDebugWriter< TDomain, TAlgebra >::m_spApproxSpace, name, ug::VTKOutput< TDim >::print(), and PROFILE_FUNC_GROUP.
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector().
|
protected |
|
protected |
|
protected |
|
staticprivate |
|
protected |
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::grid_level(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_grid_level(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::set_grid_levels(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::update_positions(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_algebra_indices_CV(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_matrix(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_vtk().
|
protected |
|
protected |
|
protected |
Referenced by ug::GridFunctionDebugWriter< TDomain, TAlgebra >::extract_positions(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_algebra_indices_CV(), ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_matrix(), and ug::GridFunctionDebugWriter< TDomain, TAlgebra >::write_vector_to_vtk().