16 #ifndef dealii__la_vector_h 17 #define dealii__la_vector_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/logstream.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/index_set.h> 24 #include <deal.II/lac/read_write_vector.h> 25 #include <deal.II/lac/vector_space_vector.h> 26 #include <deal.II/lac/vector_type_traits.h> 30 #include <boost/version.hpp> 31 #if BOOST_VERSION >= 106400 32 # include <boost/serialization/array_wrapper.hpp> 34 # include <boost/serialization/array.hpp> 36 #include <boost/serialization/split_member.hpp> 44 DEAL_II_NAMESPACE_OPEN
61 template <
typename Number>
89 explicit Vector(
const size_type n);
95 template <
typename InputIterator>
96 Vector(
const InputIterator first,
const InputIterator last);
106 template <
typename Number2>
145 std_cxx11::shared_ptr<const CommunicationPatternBase>
146 communication_pattern =
147 std_cxx11::shared_ptr<const CommunicationPatternBase>());
152 virtual void add(
const Number a);
170 virtual void sadd(
const Number s,
const Number a,
194 virtual typename VectorSpaceVector<Number>::real_type
l1_norm()
const;
200 virtual typename VectorSpaceVector<Number>::real_type
l2_norm()
const;
206 virtual typename VectorSpaceVector<Number>::real_type
linfty_norm()
const;
225 virtual size_type
size()
const;
243 virtual void print(std::ostream &out,
244 const unsigned int precision=3,
245 const bool scientific=
true,
246 const bool across=
true)
const;
285 template <
typename Archive>
286 void serialize(Archive &ar,
const unsigned int version);
288 friend class boost::serialization::access;
293 template <
typename Number2>
friend class Vector;
299 template <
typename Number>
305 template <
typename Number>
314 template <
typename Number>
323 template <
typename Number>
324 template <
typename InputIterator>
328 this->
reinit(complete_index_set(std::distance (first, last)),
true);
329 std::copy(first, last, this->
begin());
334 template <
typename Number>
343 template <
typename Number>
352 template <
typename Number>
355 const unsigned int precision,
356 const bool scientific,
364 template <
typename Number>
365 template <
typename Archive>
369 size_type current_size = this->
size();
371 ar &this->stored_elements;
373 if (this->
size()!=current_size)
375 ar &boost::serialization::make_array(this->
val,this->
size());
380 template <
typename Number>
394 template <
typename Number>
400 DEAL_II_NAMESPACE_CLOSE
403 #include <deal.II/lac/la_vector.templates.h> void block_write(std::ostream &out) const
virtual Vector< Number > & operator*=(const Number factor)
std::size_t memory_consumption() const
virtual void scale(const VectorSpaceVector< Number > &scaling_factors)
Vector< Number > & operator=(const Vector< Number > &in_vector)
static ::ExceptionBase & ExcVectorTypeNotCompatible()
virtual size_type size() const
virtual VectorSpaceVector< Number >::real_type linfty_norm() const
virtual Number operator*(const VectorSpaceVector< Number > &V) const
unsigned int global_dof_index
virtual void equ(const Number a, const VectorSpaceVector< Number > &V)
#define DeclException0(Exception0)
virtual Number add_and_dot(const Number a, const VectorSpaceVector< Number > &V, const VectorSpaceVector< Number > &W)
virtual Vector< Number > & operator/=(const Number factor)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true) const
virtual Vector< Number > & operator+=(const VectorSpaceVector< Number > &V)
virtual value_type mean_value() const
virtual void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
virtual Vector< Number > & operator-=(const VectorSpaceVector< Number > &V)
virtual VectorSpaceVector< Number >::real_type l1_norm() const
void block_read(std::istream &in)
virtual ::IndexSet locally_owned_elements() const
virtual void add(const Number a)
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
virtual std::size_t memory_consumption() const
virtual void sadd(const Number s, const Number a, const VectorSpaceVector< Number > &V)
virtual VectorSpaceVector< Number >::real_type l2_norm() const
void serialize(Archive &ar, const unsigned int version)