an efficient C++ finite element environment
|
|
Go to the documentation of this file. 1 # ifndef _RHEO_NEW_ASR_H
2 # define _RHEO_NEW_ASR_H
23 #include "rheolef/disarray.h"
24 #include "rheolef/pair_set.h"
25 #include "rheolef/diststream.h"
31 template<
class T,
class M>
class csr;
32 template<
class T,
class M>
class csr_rep;
48 template<
class T,
class M = rheo_default_memory_model,
class A = std::allocator<T> >
72 asr (
const A& alloc = A())
91 const communicator&
comm()
const {
return base::comm(); }
116 idiststream&
get (idiststream& ips);
134 template <
class T,
class M,
class A>
138 _col_ownership(
a.col_ownership()),
140 _dis_nnz(
a.dis_nnz())
144 template <
class T,
class M,
class A>
148 _col_ownership(
a.col_ownership()),
150 _dis_nnz(
a.dis_nnz())
154 template <
class T,
class M,
class A>
161 template <
class T,
class M,
class A>
168 template <
class T,
class M,
class A>
174 if (pos_aij != base::operator[](i).end()) {
175 return (*pos_aij).second;
180 template <
class T,
class M,
class A>
185 row_type& row_i = base::operator[](i);
186 std::pair<typename row_type::iterator,bool>
status
187 = row_i.insert (std::pair<size_type,T>(dis_j,
T(0)));
188 return (*(
status.first)).second;
190 template <
class T,
class M,
class A>
196 "indexes ("<<dis_i<<
" "<<dis_j<<
") out of range [0:"
197 << dis_nrow() <<
"[x[0:" << dis_ncol() <<
"[");
202 # endif // _RHEO_NEW_ASR_H
asr(const distributor &row_ownership, const distributor &col_ownership, const A &alloc=A())
size_type dis_ncol() const
odiststream & put_seq_matrix_market(odiststream &ops, size_type first_dis_i=0) const
void build_from_csr(const csr_rep< T, M > &)
odiststream & put_seq_sparse_matlab(odiststream &ops, size_type first_dis_i=0) const
void dis_entry_assembly_begin()
disarray< row_type, M, A > base
dis_reference dis_entry(size_type dis_i, size_type dis_j)
see the distributor page for the full documentation
idiststream & get(idiststream &ips)
void dis_entry_assembly_end()
base::size_type size_type
base::dis_reference _row_dis_i
dis_reference & operator+=(const T &value)
rep::base::size_type size_type
void dis_entry_assembly()
#define assert_macro(ok_condition, message)
odiststream & put(odiststream &ops) const
T & semi_dis_entry(size_type i, size_type dis_j)
pair_set< T, A > row_type
distributor _col_ownership
const distributor & row_ownership() const
see the csr page for the full documentation
std::istream & operator>>(std::istream &is, const catchmark &m)
This file is part of Rheolef.
size_type dis_size() const
global and local sizes
const distributor & col_ownership() const
odiststream: see the diststream page for the full documentation
see the disarray page for the full documentation
base::const_iterator const_iterator
void resize(const distributor &row_ownership, const distributor &col_ownership)
size_type dis_nnz() const
odiststream & put_mpi(odiststream &ops) const
size_type dis_nrow() const
dis_reference(typename base::dis_reference row_dis_i, size_type dis_j)
field::size_type size_type
odiststream & put_seq(odiststream &ops, size_type first_dis_i=0) const
const communicator & comm() const
std::ostream & operator<<(std::ostream &os, const catchmark &m)
size_type size(size_type iproc) const
T operator()(size_type i, size_type dis_j) const