ug4
|
Writes overlapping matrices and vectors. More...
#include <overlap_writer.h>
Public Types | |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
Public Member Functions | |
void | init (const AlgebraLayouts &layouts, IVectorDebugWriter< vector_type > &dbgWriter, size_t overlapVecSize) |
template<class vector_t > | |
void | init (const AlgebraLayouts &layouts, size_t nonOverlapVecSize, vector_t *nonOverlapPositions, size_t overlapVecSize) |
OverlapWriter () | |
template<class T > | |
void | write (const T &t, std::string name) |
Private Member Functions | |
std::vector< MathVector< 1 > > & | get_pos (Int2Type< 1 >) |
std::vector< MathVector< 2 > > & | get_pos (Int2Type< 2 >) |
std::vector< MathVector< 3 > > & | get_pos (Int2Type< 3 >) |
template<int dim> | |
void | write_dim_ (const matrix_type &A, std::string name) |
template<int dim> | |
void | write_dim_ (const vector_type &v, std::string name) |
Private Attributes | |
int | m_dim |
std::vector< MathVector< 1 > > | m_pos1d |
std::vector< MathVector< 2 > > | m_pos2d |
std::vector< MathVector< 3 > > | m_pos3d |
Writes overlapping matrices and vectors.
Since local positions of overlapping matrices and vectors are not present in the DebugWriter, we have to first communicate missing positions and then use those positions to write the vectors and matrices.
typedef TAlgebra::matrix_type ug::OverlapWriter< TAlgebra >::matrix_type |
typedef TAlgebra::vector_type ug::OverlapWriter< TAlgebra >::vector_type |
|
inline |
|
inlineprivate |
References ug::OverlapWriter< TAlgebra >::m_pos1d.
Referenced by ug::OverlapWriter< TAlgebra >::init(), and ug::OverlapWriter< TAlgebra >::write_dim_().
|
inlineprivate |
References ug::OverlapWriter< TAlgebra >::m_pos2d.
|
inlineprivate |
References ug::OverlapWriter< TAlgebra >::m_pos3d.
|
inline |
dbgWriter | Used to extract position data. The size of the position data is assumed to be the size of the underlying non-overlapping vector. |
overlapVecSize | Size of the overlapping vector. |
References ug::IVectorDebugWriter< TVector >::get_dim(), ug::OverlapWriter< TAlgebra >::init(), ug::OverlapWriter< TAlgebra >::m_dim, and UG_THROW.
|
inline |
vector_t has to be a MathVector<dim> compatible type.
nonOverlapVecSize | Size of the underlying non-overlapping vector. |
nonOverlapPositions | Array of length 'nonOverlapVecSize' containing the positions of each vector entry in the underlying non-overlapping vector. |
overlapVecSize | Size of the overlapping vector. |
References ug::HorizontalAlgebraLayouts::comm(), ug::CopyValues(), ug::OverlapWriter< TAlgebra >::get_pos(), ug::OverlapWriter< TAlgebra >::m_dim, ug::HorizontalAlgebraLayouts::master_overlap(), ug::HorizontalAlgebraLayouts::slave_overlap(), and UG_COND_THROW.
Referenced by ug::OverlapWriter< TAlgebra >::init().
|
inline |
Writes a matrix or a vector to a connection viewer file. T has to be either of type TAlgebra::vector_type or TAlgebra::matrix_type.
References ug::OverlapWriter< TAlgebra >::m_dim, name, and UG_COND_THROW.
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
Referenced by ug::OverlapWriter< TAlgebra >::get_pos().
|
private |
Referenced by ug::OverlapWriter< TAlgebra >::get_pos().
|
private |
Referenced by ug::OverlapWriter< TAlgebra >::get_pos().