Rheolef  7.1
an efficient C++ finite element environment
vec

distributed vector

Description

This vector class supports both the sequential and the distributed memory model. In addition, standard linear algebra is supported.

Example

    vec<double> x (100, 3.14);
    vec<double> y (100, 6.28);
    vec<double> z = 2.5*x + y;
    dout << x << endl;

Implementation

This documentation has been generated from file linalg/lib/vec.h

The vec class is a template class with both the floating type and the memory model as parameters. The implementation bases on the disarray container.

template <class T, class M = rheo_default_memory_model>
class vec : public disarray<T, M> {
public:
// typedef:
typedef disarray<T, M> base;
typedef T value_type;
typedef typename base::size_type size_type;
typedef std::ptrdiff_t difference_type;
typedef range range_type;
typedef typename base::reference reference;
typedef typename base::const_reference const_reference;
typedef typename base::iterator iterator;
// allocator/deallocator:
vec (const vec<T,M>&);
vec<T,M>& operator= (const vec<T,M>& x);
vec (const distributor& ownership,
const T& init_val = std::numeric_limits<T>::max());
vec (const std::initializer_list<details::vec_concat_value<T,M> >& init_list);
vec<T,M>& operator= (const std::initializer_list<details::vec_concat_value<T,M> >& init_list);
vec(size_type dis_size = 0,
const T& init_val = std::numeric_limits<T>::max());
void resize (
const distributor& ownership,
const T& init_val = std::numeric_limits<T>::max());
void resize (
size_type size = 0,
const T& init_val = std::numeric_limits<T>::max());
// accessors:
T min () const;
T max () const;
T max_abs () const;
// range:
vec(const vec_range<T,M>& vr);
vec(const vec_range_const<T,M>& vr);
vec<T,M>& operator= (const vec_range<T,M>& vr);
vec<T,M>& operator= (const vec_range_const<T,M>& vr);
vec_range_const<T,M> operator[] (const range_type& r) const;
vec_range<T,M> operator[] (const range_type& r);
// assignment to a constant:
vec<T,M>& operator= (const int& expr);
vec<T,M>& operator= (const T& expr);
// expression template:
template <class Expr,
class Sfinae
= typename std::enable_if<
details::is_vec_expr_v2_arg<Expr>::value
&& ! details::is_vec<Expr>::value
vec (const Expr& expr);
template <class Expr,
class Sfinae
= typename std::enable_if<
details::is_vec_expr_v2_arg<Expr>::value
&& ! details::is_vec<Expr>::value
vec<T, M>& operator= (const Expr& expr);
};
rheolef::vec::min
T min() const
Definition: vec.h:293
rheolef::vec::max_abs
T max_abs() const
Definition: vec.h:319
rheolef::vec::operator=
vec< T, M > & operator=(const vec< T, M > &x)
Definition: vec.h:175
rheolef::vec::reference
base::reference reference
Definition: vec.h:89
mkgeo_ball.expr
expr
Definition: mkgeo_ball.sh:361
rheolef::vec::const_iterator
base::const_iterator const_iterator
Definition: vec.h:92
rheolef::disarray< T, M >::const_iterator
rep::base::const_iterator const_iterator
Definition: disarray.h:465
rheolef::type
rheolef::std type
rheolef::disarray< T, M >::size_type
rep::base::size_type size_type
Definition: disarray.h:463
rheolef::vec::iterator
base::iterator iterator
Definition: vec.h:91
rheolef::disarray< T, M >::iterator
rep::base::iterator iterator
Definition: disarray.h:464
rheolef::vec::range_type
range range_type
Definition: vec.h:88
rheolef::float_traits::type
T type
Definition: Float.h:94
rheolef::vec::value_type
T value_type
Definition: vec.h:85
rheolef::vec::difference_type
std::ptrdiff_t difference_type
Definition: vec.h:87
rheolef::vec::vec
vec(const vec< T, M > &)
Definition: vec.h:168
rheolef::vec::max
T max() const
Definition: vec.h:306
rheolef::vec::const_reference
base::const_reference const_reference
Definition: vec.h:90
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::vec::constraint_process_rank
int constraint_process_rank() const
Definition: vec_concat.h:91
rheolef::vec::resize
void resize(const distributor &ownership, const T &init_val=std::numeric_limits< T >::max())
Definition: vec.h:199
rheolef::vec::float_type
float_traits< value_type >::type float_type
Definition: vec.h:93
rheolef::vec::operator[]
const_reference operator[](size_type i) const
Definition: vec.h:266
rheolef::vec::base
disarray< T, M > base
Definition: vec.h:84
rheolef::vec::size_type
base::size_type size_type
Definition: vec.h:86
T
Expr1::float_type T
Definition: field_expr.h:218