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_operation.h> 26 #include <deal.II/lac/vector_space_vector.h> 27 #include <deal.II/lac/vector_type_traits.h> 31 #include <boost/version.hpp> 32 #if BOOST_VERSION >= 106400 33 # include <boost/serialization/array_wrapper.hpp> 35 # include <boost/serialization/array.hpp> 37 #include <boost/serialization/split_member.hpp> 45 DEAL_II_NAMESPACE_OPEN
62 template <
typename Number>
90 explicit Vector(
const size_type n);
96 template <
typename InputIterator>
97 Vector(
const InputIterator first,
const InputIterator last);
108 const bool omit_zeroing_entries =
false)
override;
118 template <
typename Number2>
120 const bool omit_zeroing_entries =
false);
132 const bool omit_zeroing_entries =
false)
override;
140 const bool omit_zeroing_entries =
false)
override;
150 template <
typename Number2>
189 std::shared_ptr<const CommunicationPatternBase>
190 communication_pattern =
191 std::shared_ptr<const CommunicationPatternBase>())
override;
196 virtual void add(
const Number a)
override;
214 virtual void sadd(
const Number s,
const Number a,
232 virtual bool all_zero()
const override;
237 virtual value_type
mean_value()
const override;
243 virtual typename VectorSpaceVector<Number>::real_type
l1_norm()
const override;
249 virtual typename VectorSpaceVector<Number>::real_type
l2_norm()
const override;
255 virtual typename VectorSpaceVector<Number>::real_type
linfty_norm()
const override;
284 virtual size_type
size()
const override;
302 virtual void print(std::ostream &out,
303 const unsigned int precision=3,
304 const bool scientific=
true,
305 const bool across=
true)
const override;
345 template <
typename Archive>
346 void serialize(Archive &ar,
const unsigned int version);
348 friend class boost::serialization::access;
353 template <
typename Number2>
friend class Vector;
359 template <
typename Number>
368 template <
typename Number>
377 template <
typename Number>
378 template <
typename InputIterator>
382 this->
reinit(complete_index_set(std::distance (first, last)),
true);
383 std::copy(first, last, this->
begin());
388 template <
typename Number>
397 template <
typename Number>
406 template <
typename Number>
409 const unsigned int precision,
410 const bool scientific,
418 template <
typename Number>
419 template <
typename Archive>
423 size_type current_size = this->
size();
425 ar &this->stored_elements;
427 if (this->
size()!=current_size)
429 ar &boost::serialization::make_array(this->
values.get(),this->
size());
434 template <
typename Number>
448 template <
typename Number>
454 DEAL_II_NAMESPACE_CLOSE
457 #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()
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
unsigned int global_dof_index
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
std::unique_ptr< Number[], decltype(&free)> values
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)
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)