31 #ifdef LIBMESH_HAVE_LASPACK 39 libmesh_assert (this->
closed());
56 libmesh_assert (this->
closed());
58 return static_cast<Real>(l1Norm_V(const_cast<QVector*>(&_vec)));
66 libmesh_assert (this->
closed());
68 return static_cast<Real>(l2Norm_V(const_cast<QVector*>(&_vec)));
76 libmesh_assert (this->
closed());
78 return static_cast<Real>(MaxNorm_V(const_cast<QVector*>(&_vec)));
86 libmesh_assert (this->
closed());
99 libmesh_assert (this->
closed());
108 template <
typename T>
111 libmesh_assert_equal_to(size(), v.
size());
116 this->
set(i, (*
this)(i) / v(i));
123 template <
typename T>
133 libmesh_assert_not_equal_to (v, T(0));
135 this->
set(i, 1. / v);
141 template <
typename T>
155 template <
typename T>
164 this->_is_closed =
false;
171 template <
typename T>
179 template <
typename T>
183 const LaspackVector * v = cast_ptr<const LaspackVector *>(&v_in);
186 const bool was_closed = this->_is_closed;
190 libmesh_assert_equal_to (this->size(), v->
size());
193 this->add (i, a*(*v)(i));
196 this->_is_closed = was_closed;
202 template <
typename T>
214 AddAsgn_VV (&_vec, Mul_QV(const_cast<QMatrix*>(&mat->_QMat),
215 const_cast<QVector*>(&vec->
_vec)));
219 template <
typename T>
223 libmesh_not_implemented();
228 template <
typename T>
233 Asgn_VV(&_vec, Mul_SV (factor, &_vec));
236 template <
typename T>
247 template <
typename T>
256 return Mul_VV (const_cast<QVector*>(&(this->_vec)),
257 const_cast<QVector*>(&(v->
_vec)));
262 template <
typename T>
267 libmesh_assert (this->
closed());
269 V_SetAllCmp (&_vec, s);
276 template <
typename T>
282 cast_ptr<const LaspackVector<T> *>(&v_in);
293 template <
typename T>
298 libmesh_assert (v.
closed());
299 libmesh_assert_equal_to (this->size(), v.
size());
302 Asgn_VV (const_cast<QVector*>(&_vec),
303 const_cast<QVector*
>(&v.
_vec)
307 this->_is_closed =
true;
315 template <
typename T>
323 if (this->size() == v.size())
328 libmesh_error_msg(
"this->size() = " << this->size() <<
" must be equal to v.size() = " << v.size());
334 template <
typename T>
339 cast_ptr<LaspackVector<T> *>(&v_local_in);
341 libmesh_assert(v_local);
348 template <
typename T>
350 const std::vector<numeric_index_type> & libmesh_dbg_var(send_list))
const 354 cast_ptr<LaspackVector<T> *>(&v_local_in);
356 libmesh_assert(v_local);
357 libmesh_assert_less_equal (send_list.size(), v_local->
size());
364 template <
typename T>
366 const std::vector<numeric_index_type> & indices)
const 369 v_local.resize(indices.size());
372 v_local[i] = (*
this)(indices[i]);
377 template <
typename T>
380 const std::vector<numeric_index_type> & libmesh_dbg_var(send_list))
382 libmesh_assert_equal_to (first_local_idx, 0);
383 libmesh_assert_equal_to (last_local_idx+1, this->size());
385 libmesh_assert_less_equal (send_list.size(), this->size());
388 this->_is_closed =
true;
394 template <
typename T>
398 v_local.resize(this->size());
401 v_local[i] = (*
this)(i);
406 template <
typename T>
410 libmesh_assert_equal_to (pid, 0);
412 this->localize (v_local);
417 template <
typename T>
421 libmesh_not_implemented();
426 template <
typename T>
445 template <
typename T>
470 #endif // #ifdef LIBMESH_HAVE_LASPACK
virtual void add_vector(const NumericVector< T > &v, const SparseMatrix< T > &A) override
virtual numeric_index_type size() const override
virtual NumericVector< T > & operator-=(const NumericVector< T > &v) override
virtual void abs() override
virtual void scale(const T factor) override
virtual void add_vector_transpose(const NumericVector< T > &v, const SparseMatrix< T > &A) override
virtual T dot(const NumericVector< T > &v) const override
virtual numeric_index_type size() const =0
LaspackVector< T > & operator=(const LaspackVector< T > &v)
virtual void pointwise_mult(const NumericVector< T > &vec1, const NumericVector< T > &vec2) override
uint8_t processor_id_type
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
virtual NumericVector< T > & operator+=(const NumericVector< T > &v) override
long double max(long double a, double b)
virtual Real max() const override
virtual Real l2_norm() const override
dof_id_type numeric_index_type
virtual void add(const numeric_index_type i, const T value) override
virtual Real min() const override
virtual void localize(std::vector< T > &v_local) const override
virtual void localize_to_one(std::vector< T > &v_local, const processor_id_type proc_id=0) const override
virtual bool closed() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void conjugate() override
virtual Real linfty_norm() const override
virtual NumericVector< T > & operator/=(const NumericVector< T > &v) override
virtual T sum() const override
virtual void reciprocal() override
virtual Real l1_norm() const override
long double min(long double a, double b)