33#ifndef __H__UG__LIB_ALGEBRA__INDEX_VIEW_H__
34#define __H__UG__LIB_ALGEBRA__INDEX_VIEW_H__
40template<
typename index_type>
53 for(
size_t i=0; i<size; i++)
91template<
typename index_type>
149template<typename vector_t>
150inline void VecScaleAssign(vector_t &dest, double alpha1, const vector_t &v1)
152 for(dest::index_iterator it = dest.begin(); it != view.end(); ++it)
156 VecScaleAssign(dest[i], alpha1, v1[i]);
158 VecScaleAssign(dest[it], alpha1, v1[it]);
164template<typename vector_t, typename view_t>
165inline void VecScaleAssign(vector_t &dest, double alpha1, const vector_t &v1, const view_t &view)
167 for(view_t::index_iterator it = view.begin(); it != view.end(); ++it)
170 VecScaleAssign(dest[i], alpha1, v1[i]);
176template<
typename index_type>
Definition index_view.h:178
BlockSliceIndexView(index_type from, index_type to, index_type block)
Definition index_view.h:180
index_type m_from
Definition index_view.h:216
iterator end()
Definition index_view.h:201
bool is_in_view(const iterator &i)
Definition index_view.h:206
iterator begin()
Definition index_view.h:196
index_type m_to
Definition index_view.h:217
bool is_in_view(index_type i)
Definition index_view.h:210
Definition index_view.h:42
std::vector< bool > is_in_locals
Definition index_view.h:88
IndexView(index_type *indices, size_t size)
Definition index_view.h:50
iterator begin()
Definition index_view.h:60
IndexView(const std::vector< index_type > &indices)
Definition index_view.h:44
std::vector< index_type > iterator
Definition index_view.h:58
std::vector< index_type > local_to_global
Definition index_view.h:87
iterator end()
Definition index_view.h:65
bool is_in_view(index_type i)
Definition index_view.h:70
void init()
Definition index_view.h:79
Definition index_view.h:93
iterator end()
Definition index_view.h:114
bool is_in_view(index_type i)
Definition index_view.h:119
iterator begin()
Definition index_view.h:109
SliceIndexView(index_type from, index_type to)
Definition index_view.h:95
index_type m_from
Definition index_view.h:125
index_type m_to
Definition index_view.h:126
Definition index_view.h:183
iterator(index_type from, index_type block)
Definition index_view.h:184
int block() const
Definition index_view.h:193
index_type i
Definition index_view.h:185
bool operator==(const iterator &other) const
Definition index_view.h:189
void operator++()
Definition index_view.h:191
index_type m_block
Definition index_view.h:186
bool operator!=(const iterator &other) const
Definition index_view.h:188
int index() const
Definition index_view.h:192
Definition index_view.h:98
index_type i
Definition index_view.h:100
iterator(index_type from)
Definition index_view.h:99
void operator++()
Definition index_view.h:105
bool operator==(const iterator &other) const
Definition index_view.h:103
bool operator!=(const iterator &other) const
Definition index_view.h:102
int operator*() const
Definition index_view.h:106