16 #ifndef dealii_la_vector_h 17 #define dealii_la_vector_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/index_set.h> 24 #include <deal.II/base/logstream.h> 26 #include <deal.II/lac/read_write_vector.h> 27 #include <deal.II/lac/vector_operation.h> 28 #include <deal.II/lac/vector_space_vector.h> 29 #include <deal.II/lac/vector_type_traits.h> 33 #include <boost/version.hpp> 34 #if BOOST_VERSION >= 106400 35 # include <boost/serialization/array_wrapper.hpp> 37 # include <boost/serialization/array.hpp> 39 #include <boost/serialization/split_member.hpp> 47 DEAL_II_NAMESPACE_OPEN
78 template <
typename Number>
107 explicit Vector(
const size_type n);
113 template <
typename InputIterator>
114 Vector(
const InputIterator first,
const InputIterator last);
126 const bool omit_zeroing_entries =
false)
override;
136 template <
typename Number2>
139 const bool omit_zeroing_entries =
false);
152 const bool omit_zeroing_entries =
false)
override;
161 const bool omit_zeroing_entries =
false)
override;
172 template <
typename Number2>
219 std::shared_ptr<const CommunicationPatternBase> communication_pattern =
220 std::shared_ptr<const CommunicationPatternBase>())
override;
226 add(
const Number a)
override;
283 virtual typename VectorSpaceVector<Number>::real_type
290 virtual typename VectorSpaceVector<Number>::real_type
297 virtual typename VectorSpaceVector<Number>::real_type
330 size()
const override;
350 print(std::ostream & out,
351 const unsigned int precision = 3,
352 const bool scientific =
true,
353 const bool across =
true)
const override;
396 template <
typename Archive>
398 serialize(Archive &ar,
const unsigned int version);
400 friend class boost::serialization::access;
405 template <
typename Number2>
412 template <
typename Number>
419 template <
typename Number>
426 template <
typename Number>
427 template <
typename InputIterator>
429 const InputIterator last)
431 this->
reinit(complete_index_set(std::distance(first, last)),
true);
432 std::copy(first, last, this->
begin());
437 template <
typename Number>
446 template <
typename Number>
455 template <
typename Number>
458 const unsigned int precision,
459 const bool scientific,
467 template <
typename Number>
468 template <
typename Archive>
472 size_type current_size = this->
size();
474 ar & this->stored_elements;
476 if (this->
size() != current_size)
478 ar &boost::serialization::make_array(this->
values.get(), this->
size());
483 template <
typename Number>
497 template <
typename Number>
502 DEAL_II_NAMESPACE_CLOSE
505 # include <deal.II/lac/la_vector.templates.h> void block_write(std::ostream &out) const
virtual VectorSpaceVector< Number >::real_type linfty_norm() const override
virtual void add(const Number a) override
std::size_t memory_consumption() const
Vector< Number > & operator=(const Vector< Number > &in_vector)
virtual Vector< Number > & operator*=(const Number factor) override
virtual std::size_t memory_consumption() const override
virtual Number operator*(const VectorSpaceVector< Number > &V) const override
virtual Vector< Number > & operator+=(const VectorSpaceVector< Number > &V) override
static ::ExceptionBase & ExcVectorTypeNotCompatible()
LinearAlgebra::distributed::Vector< Number > Vector
virtual void equ(const Number a, const VectorSpaceVector< Number > &V) override
virtual ::IndexSet locally_owned_elements() const override
virtual Vector< Number > & operator-=(const VectorSpaceVector< Number > &V) override
virtual void sadd(const Number s, const Number a, const VectorSpaceVector< Number > &V) override
virtual void reinit(const size_type size, const bool omit_zeroing_entries=false) override
virtual void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const override
#define DeclException0(Exception0)
virtual Vector< Number > & operator/=(const Number factor) override
virtual void scale(const VectorSpaceVector< Number > &scaling_factors) override
virtual bool all_zero() const override
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true) const
virtual size_type size() const override
unsigned int global_dof_index
virtual VectorSpaceVector< Number >::real_type l1_norm() const override
virtual VectorSpaceVector< Number >::real_type l2_norm() const override
void block_read(std::istream &in)
virtual value_type mean_value() const override
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
AlignedVector< Number > values
virtual Number add_and_dot(const Number a, const VectorSpaceVector< Number > &V, const VectorSpaceVector< Number > &W) override
void serialize(Archive &ar, const unsigned int version)