an efficient C++ finite element environment
|
|
Go to the documentation of this file. 1 #ifndef _RHEOLEF_CSR_CONCAT_H
2 #define _RHEOLEF_CSR_CONCAT_H
25 #include "rheolef/csr.h"
26 #include "rheolef/vec_concat.h"
28 namespace rheolef {
namespace details {
39 template <
class T,
class M>
44 template <
class T,
class M>
46 std::vector<vec<T,M> >
v;
50 template <
class T,
class M>
70 =
typename std::enable_if<
87 std::vector<vec<T,M> >
vv;
92 template <
class T,
class M>
112 typedef typename std::initializer_list<value_type>::const_iterator
const_iterator;
113 for (
const_iterator iter = il.begin(); iter != il.end(); ++iter) {
121 for(
typename std::list<value_type>::const_iterator iter = x.
_l.begin(); iter != x.
_l.end(); ++iter) {
122 std::cout << *iter <<
" ";
124 return std::cout <<
"}";
128 std::pair<size_type,size_type>& row_sizes,
129 std::pair<size_type,size_type>& col_sizes,
130 const std::pair<size_type,size_type>& new_row_sizes,
131 const std::pair<size_type,size_type>& new_col_sizes);
134 std::pair<size_type,size_type>& sizes,
135 const communicator& comm);
138 std::vector<std::pair<size_type,size_type> >& sizes,
139 const communicator& comm);
142 std::pair<size_type,size_type>& row_sizes,
143 std::vector<std::pair<size_type,size_type> >& col_sizes,
144 communicator& comm)
const;
147 const std::pair<size_type,size_type>& row_sizes,
148 const std::vector<std::pair<size_type,size_type> >& col_sizes,
149 const communicator& comm,
152 std::vector<distributor>& col_start_by_component)
const;
156 const std::pair<size_type,size_type>& row_sizes,
158 const std::vector<std::pair<size_type,size_type> >& col_sizes,
159 const std::vector<distributor>& col_start_by_component)
const;
165 std::list<value_type>
_l;
174 template <
class T,
class M>
195 typedef typename std::initializer_list<line_type>::const_iterator
const_iterator;
207 std::list<line_type>
_l;
216 template <
class T,
class M>
222 template <
class T,
class M>
224 details::vector_vec_trans<T,M>
231 #define RHEOLEF_csr_cstor(M) \
235 csr<T,M>::constraint_process_rank() const \
237 return details::constraint_process_rank (row_ownership().comm()); \
241 csr<T,M>::csr (const std::initializer_list<details::csr_concat_value<T,M> >& init_list) \
243 details::csr_concat_line<T,M> cc (init_list); \
244 csr<T,M>::operator= (cc.build_csr()); \
248 csr<T,M>::csr (const std::initializer_list<details::csr_concat_line<T,M> >& init_list) \
250 details::csr_concat<T,M> cc (init_list); \
251 csr<T,M>::operator= (cc.build_csr()); \
256 #ifdef _RHEOLEF_HAVE_MPI
258 #endif // _RHEOLEF_HAVE_MPI
260 #undef RHEOLEF_csr_cstor
263 #endif // _RHEOLEF_CSR_CONCAT_H
csr< T, M > build_csr() const
void push_back(const value_type &x)
std::pair< size_type, size_type > sizes_type
static constexpr size_type undef
csr< T, M >::size_type size_type
void build_csr_pass0(std::pair< size_type, size_type > &row_sizes, std::vector< std::pair< size_type, size_type > > &col_sizes, communicator &comm) const
csr_concat_line(const std::initializer_list< value_type > &il)
std::list< value_type > _l
csr_concat_value< T, M >::size_type size_type
#define RHEOLEF_csr_cstor(M)
static constexpr size_type zero
std::vector< vec< T, M > > vv
friend std::ostream & operator<<(std::ostream &o, const csr_concat_line< T, M > &x)
see the distributor page for the full documentation
csr< T, M > build_csr() const
csr_concat_value(const sizes_pair_type &x)
void build_csr_pass2(asr< T, M > &a, const std::pair< size_type, size_type > &row_sizes, const distributor &row_start_by_component, const std::vector< std::pair< size_type, size_type > > &col_sizes, const std::vector< distributor > &col_start_by_component) const
csr_concat_value(const vec_trans< T, M > &vt)
csr_concat_value(const U &x)
see the vec page for the full documentation
csr_concat(const std::initializer_list< line_type > &il)
static constexpr size_type undef
csr_concat_value(const vec< T, M > &x)
vec_trans(const vec< T, M > &w)
csr_concat_value< T, M > value_type
vector_vec_trans(const std::vector< vec< T, M > > &w)
csr_concat_value< T, M >::sizes_type sizes_type
see the csr page for the full documentation
csr_concat_value(const csr< T, M > &x)
This file is part of Rheolef.
csr_concat_value< T, M > value_type
std::vector< vec< T, M > > v
static void set_sizes(std::pair< size_type, size_type > &row_sizes, std::pair< size_type, size_type > &col_sizes, const std::pair< size_type, size_type > &new_row_sizes, const std::pair< size_type, size_type > &new_col_sizes)
csr_concat_value< T, M >::sizes_pair_type sizes_pair_type
static constexpr size_type zero
csr_concat_value(const vector_vec_trans< T, M > &vt)
csr_concat_line< T, M > line_type
csr_concat_value< T, M >::sizes_type sizes_type
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
std::pair< sizes_type, sizes_type > sizes_pair_type
static void finalize_sizes(std::pair< size_type, size_type > &sizes, const communicator &comm)
csr_concat_value(const std::vector< vec< T, M > > &x)
static constexpr size_type zero
void build_csr_pass1(const std::pair< size_type, size_type > &row_sizes, const std::vector< std::pair< size_type, size_type > > &col_sizes, const communicator &comm, distributor &row_ownership, distributor &col_ownership, std::vector< distributor > &col_start_by_component) const
csr_concat_value< T, M >::size_type size_type
std::list< line_type > _l
static constexpr size_type undef
csr_concat_value< T, M >::sizes_pair_type sizes_pair_type
void push_back(const line_type &line)