31 #ifdef LIBMESH_HAVE_EIGEN 39 libmesh_assert (this->
closed());
50 libmesh_assert (this->
closed());
53 return _vec.lpNorm<1>();
61 libmesh_assert (this->
closed());
64 return _vec.lpNorm<2>();
72 libmesh_assert (this->
closed());
75 return _vec.lpNorm<Eigen::Infinity>();
83 libmesh_assert (this->
closed());
98 libmesh_assert (this->
closed());
109 template <
typename T>
112 libmesh_assert (this->
closed());
113 libmesh_assert_equal_to(size(), v_in.
size());
117 _vec = _vec.cwiseQuotient(v._vec);
125 template <
typename T>
133 libmesh_assert_not_equal_to ((*
this)(i), T(0));
136 _vec = _vec.cwiseInverse();
141 template <
typename T>
144 _vec = _vec.conjugate();
149 template <
typename T>
152 _vec += EigenSV::Constant(this->size(), v);
155 this->_is_closed =
false;
162 template <
typename T>
174 template <
typename T>
186 template <
typename T>
194 libmesh_assert(e_vec);
197 _vec += mat->_mat*e_vec->
_vec;
202 template <
typename T>
210 libmesh_assert(e_vec);
213 _vec += mat->_mat.transpose()*e_vec->
_vec;
218 template <
typename T>
228 template <
typename T>
241 template <
typename T>
250 return _vec.dot(v->
_vec);
255 template <
typename T>
260 libmesh_assert (this->
closed());
269 template <
typename T>
275 cast_ptr<const EigenSparseVector<T> *>(&v_in);
286 template <
typename T>
291 libmesh_assert (v.
closed());
292 libmesh_assert_equal_to (this->size(), v.
size());
297 this->_is_closed =
true;
305 template <
typename T>
313 if (this->size() == v.size())
318 libmesh_error_msg(
"this->size() = " << this->size() <<
" must be equal to v.size() = " << v.size());
324 template <
typename T>
329 cast_ptr<EigenSparseVector<T> *>(&v_local_in);
331 libmesh_assert(v_local);
338 template <
typename T>
340 const std::vector<numeric_index_type> & libmesh_dbg_var(send_list))
const 344 cast_ptr<EigenSparseVector<T> *>(&v_local_in);
346 libmesh_assert(v_local);
347 libmesh_assert_less_equal (send_list.size(), v_local->
size());
354 template <
typename T>
356 const std::vector<numeric_index_type> & indices)
const 359 v_local.resize(indices.size());
362 v_local[i] = (*
this)(indices[i]);
367 template <
typename T>
370 const std::vector<numeric_index_type> & libmesh_dbg_var(send_list))
372 libmesh_assert_equal_to (first_local_idx, 0);
373 libmesh_assert_equal_to (last_local_idx+1, this->size());
375 libmesh_assert_less_equal (send_list.size(), this->size());
378 this->_is_closed =
true;
384 template <
typename T>
388 v_local.resize(this->size());
391 v_local[i] = (*
this)(i);
396 template <
typename T>
400 libmesh_assert_equal_to (pid, 0);
402 this->localize (v_local);
407 template <
typename T>
411 libmesh_not_implemented();
416 template <
typename T>
423 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 439 template <
typename T>
446 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 468 #endif // #ifdef LIBMESH_HAVE_EIGEN
virtual Real linfty_norm() const override
virtual void localize(std::vector< T > &v_local) const override
virtual void conjugate() override
virtual void pointwise_mult(const NumericVector< T > &vec1, const NumericVector< T > &vec2) override
virtual T sum() const override
virtual void add_vector(const NumericVector< T > &v, const SparseMatrix< T > &A) override
virtual void reciprocal() override
virtual numeric_index_type size() const =0
virtual NumericVector< T > & operator-=(const NumericVector< T > &v) override
virtual Real min() const override
uint8_t processor_id_type
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
long double max(long double a, double b)
virtual Real l2_norm() const override
dof_id_type numeric_index_type
virtual Real max() const override
virtual NumericVector< T > & operator/=(const NumericVector< T > &v_in) override
virtual numeric_index_type size() const override
EigenSparseVector< T > & operator=(const EigenSparseVector< T > &v)
virtual void add_vector_transpose(const NumericVector< T > &v, const SparseMatrix< T > &A) override
virtual void abs() override
virtual void localize_to_one(std::vector< T > &v_local, const processor_id_type proc_id=0) const override
virtual bool closed() const
virtual void scale(const T factor) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real l1_norm() const override
virtual void add(const numeric_index_type i, const T value) override
virtual T dot(const NumericVector< T > &v) const override
virtual NumericVector< T > & operator+=(const NumericVector< T > &v) override
long double min(long double a, double b)