33 #ifndef __H__UG_overlap_writer
34 #define __H__UG_overlap_writer
51 template <
class TAlgebra>
66 template <
class vector_t>
68 size_t nonOverlapVecSize,
69 vector_t* nonOverlapPositions,
70 size_t overlapVecSize)
75 "nonOverlapVecSize > overlapVecSize. "
76 "This should not be the case!");
78 m_dim = vector_t::Size;
81 pos.resize(overlapVecSize);
82 for(
size_t i = 0; i < nonOverlapVecSize; ++i){
83 pos[i] = nonOverlapPositions[i];
100 size_t overlapVecSize)
105 case 1:
init(layouts, dbgWriter.template get_positions<1>().size(),
106 &dbgWriter.template get_positions<1>().front(),
109 case 2:
init(layouts, dbgWriter.template get_positions<2>().size(),
110 &dbgWriter.template get_positions<2>().front(),
113 case 3:
init(layouts, dbgWriter.template get_positions<3>().size(),
114 &dbgWriter.template get_positions<3>().front(),
117 default:
UG_THROW(
"Unsupported dimension: " <<
m_dim);
break;
128 "OverlapWriter::write");
131 case 1: write_dim_<1>(t,
name);
break;
132 case 2: write_dim_<2>(t,
name);
break;
133 case 3: write_dim_<3>(t,
name);
break;
location name
Definition: checkpoint_util.lua:128
Extends the HorizontalAlgebraLayouts by vertical layouts.
Definition: algebra_layouts.h:121
const IndexLayout & master_overlap() const
Definition: algebra_layouts.h:62
pcl::InterfaceCommunicator< IndexLayout > & comm() const
returns (non-const !!!) communicator
Definition: algebra_layouts.h:78
const IndexLayout & slave_overlap() const
Definition: algebra_layouts.h:64
base class for all vector debug writer
Definition: debug_writer.h:118
int get_dim() const
get the dimensionality
Definition: debug_writer.h:167
Writes overlapping matrices and vectors.
Definition: overlap_writer.h:52
std::vector< MathVector< 1 > > & get_pos(Int2Type< 1 >)
Definition: overlap_writer.h:153
std::vector< MathVector< 3 > > m_pos3d
Definition: overlap_writer.h:162
int m_dim
Definition: overlap_writer.h:158
OverlapWriter()
Definition: overlap_writer.h:57
void init(const AlgebraLayouts &layouts, IVectorDebugWriter< vector_type > &dbgWriter, size_t overlapVecSize)
Definition: overlap_writer.h:98
TAlgebra::vector_type vector_type
Definition: overlap_writer.h:54
void write(const T &t, std::string name)
Definition: overlap_writer.h:125
TAlgebra::matrix_type matrix_type
Definition: overlap_writer.h:55
std::vector< MathVector< 2 > > m_pos2d
Definition: overlap_writer.h:161
void write_dim_(const vector_type &v, std::string name)
Definition: overlap_writer.h:140
std::vector< MathVector< 2 > > & get_pos(Int2Type< 2 >)
Definition: overlap_writer.h:154
std::vector< MathVector< 3 > > & get_pos(Int2Type< 3 >)
Definition: overlap_writer.h:155
void init(const AlgebraLayouts &layouts, size_t nonOverlapVecSize, vector_t *nonOverlapPositions, size_t overlapVecSize)
Definition: overlap_writer.h:67
std::vector< MathVector< 1 > > m_pos1d
Definition: overlap_writer.h:160
void write_dim_(const matrix_type &A, std::string name)
Definition: overlap_writer.h:147
void CopyValues(TVector *pVec, const IndexLayout &sourceLayout, const IndexLayout &targetLayout, pcl::InterfaceCommunicator< IndexLayout > *pCom=NULL)
Copies values from the source to the target layout.
Definition: parallelization_util.h:228
#define UG_THROW(msg)
Definition: error.h:57
#define UG_COND_THROW(cond, msg)
UG_COND_THROW(cond, msg) : performs a UG_THROW(msg) if cond == true.
Definition: error.h:61
Definition: smart_pointer.h:814
void WriteVectorPar(std::string filename, const Vector_type &b, const postype *positions, int dimensions, const Vector_type *compareVec=NULL)
Definition: connection_viewer_output.h:425
void WriteMatrixPar(std::string name, const Matrix_type &A, const postype *positions, int dimensions)
Definition: connection_viewer_output.h:153
Definition: metaprogramming_util.h:42