1#ifndef _RHEOLEF_CSR_CONCAT_H
2#define _RHEOLEF_CSR_CONCAT_H
25#include "rheolef/csr.h"
26#include "rheolef/vec_concat.h"
28namespace rheolef {
namespace details {
39template <
class T,
class M>
44template <
class T,
class M>
46 std::vector<vec<T,M> >
v;
50template <
class T,
class M>
70 =
typename std::enable_if<
87 std::vector<vec<T,M> >
vv;
92template <
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;
174template <
class T,
class M>
195 typedef typename std::initializer_list<line_type>::const_iterator
const_iterator;
207 std::list<line_type>
_l;
216template <
class T,
class M>
222template <
class T,
class M>
224details::vector_vec_trans<T,M>
231#define RHEOLEF_csr_cstor(M) \
235csr<T,M>::constraint_process_rank() const \
237 return details::constraint_process_rank (row_ownership().comm()); \
241csr<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()); \
248csr<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
260#undef RHEOLEF_csr_cstor
see the csr page for the full documentation
csr< T, M > build_csr() const
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
static constexpr size_type zero
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
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)
std::list< value_type > _l
csr_concat_value< T, M >::size_type size_type
csr_concat_value< T, M >::sizes_type sizes_type
csr_concat_line(const std::initializer_list< value_type > &il)
void push_back(const value_type &x)
csr_concat_value< T, M >::sizes_pair_type sizes_pair_type
friend std::ostream & operator<<(std::ostream &o, const csr_concat_line< T, M > &x)
csr_concat_value< T, M > value_type
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
static void finalize_sizes(std::pair< size_type, size_type > &sizes, const communicator &comm)
static constexpr size_type undef
std::pair< sizes_type, sizes_type > sizes_pair_type
csr_concat_value(const std::vector< vec< T, M > > &x)
static constexpr size_type zero
csr_concat_value(const csr< T, M > &x)
csr_concat_value(const vec_trans< T, M > &vt)
std::vector< vec< T, M > > vv
csr_concat_value(const sizes_pair_type &x)
csr_concat_value(const vec< T, M > &x)
csr< T, M >::size_type size_type
csr_concat_value(const vector_vec_trans< T, M > &vt)
static constexpr size_type undef
csr_concat_value(const U &x)
std::pair< size_type, size_type > sizes_type
csr< T, M > build_csr() const
static constexpr size_type zero
csr_concat_value< T, M >::size_type size_type
csr_concat_line< T, M > line_type
csr_concat_value< T, M >::sizes_type sizes_type
void push_back(const line_type &line)
std::list< line_type > _l
csr_concat_value< T, M >::sizes_pair_type sizes_pair_type
csr_concat_value< T, M > value_type
static constexpr size_type undef
csr_concat(const std::initializer_list< line_type > &il)
see the distributor page for the full documentation
see the vec page for the full documentation
#define RHEOLEF_csr_cstor(M)
This file is part of Rheolef.
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
vec_trans(const vec< T, M > &w)
std::vector< vec< T, M > > v
vector_vec_trans(const std::vector< vec< T, M > > &w)