libMesh
distributed_vector.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #include "libmesh/libmesh_common.h"
21 
22 
23 
24 #ifndef LIBMESH_DISTRIBUTED_VECTOR_H
25 #define LIBMESH_DISTRIBUTED_VECTOR_H
26 
27 // Local includes
28 #include "libmesh/int_range.h"
29 #include "libmesh/numeric_vector.h"
30 #include "libmesh/parallel.h"
31 
32 // C++ includes
33 #include <vector>
34 #include <algorithm>
35 #include <limits>
36 
37 namespace libMesh
38 {
39 
52 template <typename T>
53 class DistributedVector final : public NumericVector<T>
54 {
55 public:
56 
60  explicit
61  DistributedVector (const Parallel::Communicator & comm,
62  const ParallelType = AUTOMATIC);
63 
67  explicit
68  DistributedVector (const Parallel::Communicator & comm,
69  const numeric_index_type n,
70  const ParallelType ptype = AUTOMATIC);
71 
76  DistributedVector (const Parallel::Communicator & comm,
77  const numeric_index_type n,
78  const numeric_index_type n_local,
79  const ParallelType ptype = AUTOMATIC);
80 
86  DistributedVector (const Parallel::Communicator & comm,
87  const numeric_index_type N,
88  const numeric_index_type n_local,
89  const std::vector<numeric_index_type> & ghost,
90  const ParallelType ptype = AUTOMATIC);
91 
100 
105  DistributedVector (DistributedVector &&) = default;
106  DistributedVector (const DistributedVector &) = default;
108  virtual ~DistributedVector () = default;
109 
110  virtual void close () override;
111 
112  virtual void clear () override;
113 
114  virtual void zero () override;
115 
116  virtual std::unique_ptr<NumericVector<T>> zero_clone () const override;
117 
118  virtual std::unique_ptr<NumericVector<T>> clone () const override;
119 
120  virtual void init (const numeric_index_type N,
121  const numeric_index_type n_local,
122  const bool fast=false,
123  const ParallelType ptype=AUTOMATIC) override;
124 
125  virtual void init (const numeric_index_type N,
126  const bool fast=false,
127  const ParallelType ptype=AUTOMATIC) override;
128 
129  virtual void init (const numeric_index_type N,
130  const numeric_index_type n_local,
131  const std::vector<numeric_index_type> & ghost,
132  const bool fast = false,
133  const ParallelType = AUTOMATIC) override;
134 
135  virtual void init (const NumericVector<T> & other,
136  const bool fast = false) override;
137 
138  virtual NumericVector<T> & operator= (const T s) override;
139 
140  virtual NumericVector<T> & operator= (const NumericVector<T> & v) override;
141 
142  virtual NumericVector<T> & operator= (const std::vector<T> & v) override;
143 
144  virtual Real min () const override;
145 
146  virtual Real max () const override;
147 
148  virtual T sum() const override;
149 
150  virtual Real l1_norm () const override;
151 
152  virtual Real l2_norm () const override;
153 
154  virtual Real linfty_norm () const override;
155 
156  virtual numeric_index_type size () const override;
157 
158  virtual numeric_index_type local_size() const override;
159 
160  virtual numeric_index_type first_local_index() const override;
161 
162  virtual numeric_index_type last_local_index() const override;
163 
164  virtual T operator() (const numeric_index_type i) const override;
165 
166  virtual NumericVector<T> & operator += (const NumericVector<T> & v) override;
167 
168  virtual NumericVector<T> & operator -= (const NumericVector<T> & v) override;
169 
170  virtual NumericVector<T> & operator *= (const NumericVector<T> & v) override;
171 
172  virtual NumericVector<T> & operator /= (const NumericVector<T> & v) override;
173 
174  virtual void reciprocal() override;
175 
176  virtual void conjugate() override;
177 
178  virtual void set (const numeric_index_type i, const T value) override;
179 
180  virtual void add (const numeric_index_type i, const T value) override;
181 
182  virtual void add (const T s) override;
183 
184  virtual void add (const NumericVector<T> & V) override;
185 
186  virtual void add (const T a, const NumericVector<T> & v) override;
187 
193 
194  virtual void add_vector (const NumericVector<T> &,
195  const SparseMatrix<T> &) override
196  { libmesh_not_implemented(); }
197 
198  virtual void add_vector_transpose (const NumericVector<T> &,
199  const SparseMatrix<T> &) override
200  { libmesh_not_implemented(); }
201 
202  virtual void scale (const T factor) override;
203 
204  virtual void abs() override;
205 
206  virtual T dot(const NumericVector<T> & V) const override;
207 
208  virtual void localize (std::vector<T> & v_local) const override;
209 
210  virtual void localize (NumericVector<T> & v_local) const override;
211 
212  virtual void localize (NumericVector<T> & v_local,
213  const std::vector<numeric_index_type> & send_list) const override;
214 
215  virtual void localize (std::vector<T> & v_local,
216  const std::vector<numeric_index_type> & indices) const override;
217 
218  virtual void localize (const numeric_index_type first_local_idx,
219  const numeric_index_type last_local_idx,
220  const std::vector<numeric_index_type> & send_list) override;
221 
222  virtual void localize_to_one (std::vector<T> & v_local,
223  const processor_id_type proc_id=0) const override;
224 
225  virtual void pointwise_mult (const NumericVector<T> & vec1,
226  const NumericVector<T> & vec2) override;
227 
228  virtual void swap (NumericVector<T> & v) override;
229 
230 private:
231 
235  std::vector<T> _values;
236 
241 
246 
251 
256 };
257 
258 
259 //--------------------------------------------------------------------------
260 // DistributedVector inline methods
261 template <typename T>
262 inline
263 DistributedVector<T>::DistributedVector (const Parallel::Communicator & comm_in,
264  const ParallelType ptype) :
265  NumericVector<T>(comm_in, ptype),
266  _global_size (0),
267  _local_size (0),
268  _first_local_index(0),
269  _last_local_index (0)
270 {
271  this->_type = ptype;
272 }
273 
274 
275 
276 template <typename T>
277 inline
278 DistributedVector<T>::DistributedVector (const Parallel::Communicator & comm_in,
279  const numeric_index_type n,
280  const ParallelType ptype)
281  : NumericVector<T>(comm_in, ptype)
282 {
283  this->init(n, n, false, ptype);
284 }
285 
286 
287 
288 template <typename T>
289 inline
290 DistributedVector<T>::DistributedVector (const Parallel::Communicator & comm_in,
291  const numeric_index_type n,
292  const numeric_index_type n_local,
293  const ParallelType ptype)
294  : NumericVector<T>(comm_in, ptype)
295 {
296  this->init(n, n_local, false, ptype);
297 }
298 
299 
300 
301 template <typename T>
302 inline
303 DistributedVector<T>::DistributedVector (const Parallel::Communicator & comm_in,
304  const numeric_index_type n,
305  const numeric_index_type n_local,
306  const std::vector<numeric_index_type> & ghost,
307  const ParallelType ptype)
308  : NumericVector<T>(comm_in, ptype)
309 {
310  this->init(n, n_local, ghost, false, ptype);
311 }
312 
313 
314 
315 template <typename T>
316 inline
318  const numeric_index_type n_local,
319  const bool fast,
320  const ParallelType ptype)
321 {
322  // This function must be run on all processors at once
323  parallel_object_only();
324 
325  libmesh_assert_less_equal (n_local, n);
326 
327  if (ptype == AUTOMATIC)
328  {
329  if (n == n_local)
330  this->_type = SERIAL;
331  else
332  this->_type = PARALLEL;
333  }
334  else
335  this->_type = ptype;
336 
337  libmesh_assert ((this->_type==SERIAL && n==n_local) ||
338  this->_type==PARALLEL);
339 
340  // Clear the data structures if already initialized
341  if (this->initialized())
342  this->clear();
343 
344  // Initialize data structures
345  _values.resize(n_local);
346  _local_size = n_local;
347  _global_size = n;
348 
349  _first_local_index = 0;
350 
351 #ifdef LIBMESH_HAVE_MPI
352 
353  std::vector<numeric_index_type> local_sizes (this->n_processors(), 0);
354 
355  local_sizes[this->processor_id()] = n_local;
356 
357  this->comm().sum(local_sizes);
358 
359  // _first_local_index is the sum of _local_size
360  // for all processor ids less than ours
361  for (auto p : IntRange<processor_id_type>(0, this->processor_id()))
362  _first_local_index += local_sizes[p];
363 
364 
365 # ifdef DEBUG
366  // Make sure all the local sizes sum up to the global
367  // size, otherwise there is big trouble!
368  numeric_index_type dbg_sum=0;
369 
370  for (auto p : IntRange<processor_id_type>(0, this->n_processors()))
371  dbg_sum += local_sizes[p];
372 
373  libmesh_assert_equal_to (dbg_sum, n);
374 
375 # endif
376 
377 #else
378 
379  // No other options without MPI!
380  if (n != n_local)
381  libmesh_error_msg("ERROR: MPI is required for n != n_local!");
382 
383 #endif
384 
385  _last_local_index = _first_local_index + n_local;
386 
387  // Set the initialized flag
388  this->_is_initialized = true;
389 
390  // Zero the components unless directed otherwise
391  if (!fast)
392  this->zero();
393 }
394 
395 
396 template <typename T>
397 inline
399  const numeric_index_type n_local,
400  const std::vector<numeric_index_type> & /*ghost*/,
401  const bool fast,
402  const ParallelType ptype)
403 {
404  // TODO: we shouldn't ignore the ghost sparsity pattern
405  this->init(n, n_local, fast, ptype);
406 }
407 
408 
409 
410 /* Default implementation for solver packages for which ghosted
411  vectors are not yet implemented. */
412 template <class T>
414  const bool fast)
415 {
416  this->init(other.size(),other.local_size(),fast,other.type());
417 }
418 
419 
420 
421 template <typename T>
422 inline
424  const bool fast,
425  const ParallelType ptype)
426 {
427  this->init(n,n,fast,ptype);
428 }
429 
430 
431 
432 template <typename T>
433 inline
435 {
436  libmesh_assert (this->initialized());
437 
438  this->_is_closed = true;
439 }
440 
441 
442 
443 template <typename T>
444 inline
446 {
447  _values.clear();
448 
449  _global_size =
450  _local_size =
451  _first_local_index =
452  _last_local_index = 0;
453 
454 
455  this->_is_closed = this->_is_initialized = false;
456 }
457 
458 
459 
460 template <typename T>
461 inline
463 {
464  libmesh_assert (this->initialized());
465  libmesh_assert_equal_to (_values.size(), _local_size);
466  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
467 
468  std::fill (_values.begin(),
469  _values.end(),
470  0.);
471 }
472 
473 
474 
475 template <typename T>
476 inline
477 std::unique_ptr<NumericVector<T>> DistributedVector<T>::zero_clone () const
478 {
479  NumericVector<T> * cloned_vector = new DistributedVector<T>(this->comm());
480  cloned_vector->init(*this);
481  return std::unique_ptr<NumericVector<T>>(cloned_vector);
482 }
483 
484 
485 
486 template <typename T>
487 inline
488 std::unique_ptr<NumericVector<T>> DistributedVector<T>::clone () const
489 {
490  NumericVector<T> * cloned_vector = new DistributedVector<T>(this->comm());
491  cloned_vector->init(*this, true);
492  *cloned_vector = *this;
493  return std::unique_ptr<NumericVector<T>>(cloned_vector);
494 }
495 
496 
497 
498 template <typename T>
499 inline
501 {
502  libmesh_assert (this->initialized());
503  libmesh_assert_equal_to (_values.size(), _local_size);
504  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
505 
506  return _global_size;
507 }
508 
509 
510 
511 template <typename T>
512 inline
514 {
515  libmesh_assert (this->initialized());
516  libmesh_assert_equal_to (_values.size(), _local_size);
517  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
518 
519  return _local_size;
520 }
521 
522 
523 
524 template <typename T>
525 inline
527 {
528  libmesh_assert (this->initialized());
529  libmesh_assert_equal_to (_values.size(), _local_size);
530  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
531 
532  return _first_local_index;
533 }
534 
535 
536 
537 template <typename T>
538 inline
540 {
541  libmesh_assert (this->initialized());
542  libmesh_assert_equal_to (_values.size(), _local_size);
543  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
544 
545  return _last_local_index;
546 }
547 
548 
549 
550 template <typename T>
551 inline
553 {
554  libmesh_assert (this->initialized());
555  libmesh_assert_equal_to (_values.size(), _local_size);
556  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
557  libmesh_assert ( ((i >= first_local_index()) &&
558  (i < last_local_index())) );
559 
560  return _values[i - _first_local_index];
561 }
562 
563 
564 
565 template <typename T>
566 inline
568 {
569  libmesh_assert (this->initialized());
570  libmesh_assert_equal_to (_values.size(), _local_size);
571  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
572  libmesh_assert_less (i, size());
573  libmesh_assert_less (i-first_local_index(), local_size());
574 
575  _values[i - _first_local_index] = value;
576 }
577 
578 
579 
580 template <typename T>
581 inline
583 {
584  libmesh_assert (this->initialized());
585  libmesh_assert_equal_to (_values.size(), _local_size);
586  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
587  libmesh_assert_less (i, size());
588  libmesh_assert_less (i-first_local_index(), local_size());
589 
590  _values[i - _first_local_index] += value;
591 }
592 
593 
594 
595 template <typename T>
596 inline
598 {
599  // This function must be run on all processors at once
600  parallel_object_only();
601 
602  libmesh_assert (this->initialized());
603  libmesh_assert_equal_to (_values.size(), _local_size);
604  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
605 
606  Real local_min = std::numeric_limits<Real>::max();
607  for (auto v : _values)
608  local_min = std::min(libmesh_real(v), local_min);
609 
610  this->comm().min(local_min);
611 
612  return local_min;
613 }
614 
615 
616 
617 template <typename T>
618 inline
620 {
621  // This function must be run on all processors at once
622  parallel_object_only();
623 
624  libmesh_assert (this->initialized());
625  libmesh_assert_equal_to (_values.size(), _local_size);
626  libmesh_assert_equal_to ((_last_local_index - _first_local_index), _local_size);
627 
628  Real local_max = -std::numeric_limits<Real>::max();
629  for (auto v : _values)
630  local_max = std::max(libmesh_real(v), local_max);
631 
632  this->comm().max(local_max);
633 
634  return local_max;
635 }
636 
637 
638 template <typename T>
639 inline
641 {
642  DistributedVector<T> & v = cast_ref<DistributedVector<T> &>(other);
643 
644  std::swap(_global_size, v._global_size);
645  std::swap(_local_size, v._local_size);
646  std::swap(_first_local_index, v._first_local_index);
647  std::swap(_last_local_index, v._last_local_index);
648 
649  // This should be O(1) with any reasonable STL implementation
650  std::swap(_values, v._values);
651 }
652 
653 } // namespace libMesh
654 
655 
656 #endif // LIBMESH_DISTRIBUTED_VECTOR_H
libMesh::DistributedVector::size
virtual numeric_index_type size() const override
Definition: distributed_vector.h:500
libMesh::DistributedVector::~DistributedVector
virtual ~DistributedVector()=default
libMesh::DistributedVector::clone
virtual std::unique_ptr< NumericVector< T > > clone() const override
Definition: distributed_vector.h:488
libMesh::PARALLEL
Definition: enum_parallel_type.h:36
libMesh::libmesh_real
T libmesh_real(T a)
Definition: libmesh_common.h:166
libMesh::DistributedVector::operator*=
virtual NumericVector< T > & operator*=(const NumericVector< T > &v) override
Computes the component-wise multiplication of this vector's entries by another's, .
Definition: distributed_vector.C:170
libMesh::DistributedVector::conjugate
virtual void conjugate() override
Negates the imaginary component of each entry in the vector.
Definition: distributed_vector.C:216
libMesh::SERIAL
Definition: enum_parallel_type.h:35
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::NumericVector::init
virtual void init(const numeric_index_type n, const numeric_index_type n_local, const bool fast=false, const ParallelType ptype=AUTOMATIC)=0
Change the dimension of the vector to n.
libMesh::DistributedVector::pointwise_mult
virtual void pointwise_mult(const NumericVector< T > &vec1, const NumericVector< T > &vec2) override
Computes (summation not implied) i.e.
Definition: distributed_vector.C:615
libMesh::ParallelObject::comm
const Parallel::Communicator & comm() const
Definition: parallel_object.h:94
libMesh::DistributedVector::localize
virtual void localize(std::vector< T > &v_local) const override
Creates a copy of the global vector in the local vector v_local.
Definition: distributed_vector.C:572
libMesh::DistributedVector::_local_size
numeric_index_type _local_size
The local vector size.
Definition: distributed_vector.h:245
libMesh::DistributedVector::_values
std::vector< T > _values
Actual vector datatype to hold vector entries.
Definition: distributed_vector.h:235
libMesh::DistributedVector::localize_to_one
virtual void localize_to_one(std::vector< T > &v_local, const processor_id_type proc_id=0) const override
Creates a local copy of the global vector in v_local only on processor proc_id.
Definition: distributed_vector.C:593
libMesh::DistributedVector::first_local_index
virtual numeric_index_type first_local_index() const override
Definition: distributed_vector.h:526
libMesh::DistributedVector::clear
virtual void clear() override
Restores the NumericVector<T> to a pristine state.
Definition: distributed_vector.h:445
libMesh::DistributedVector::init
virtual void init(const numeric_index_type N, const numeric_index_type n_local, const bool fast=false, const ParallelType ptype=AUTOMATIC) override
Change the dimension of the vector to n.
Definition: distributed_vector.h:317
libMesh::DistributedVector::l2_norm
virtual Real l2_norm() const override
Definition: distributed_vector.C:92
libMesh::SparseMatrix
Generic sparse matrix.
Definition: vector_fe_ex5.C:45
libMesh::DistributedVector::abs
virtual void abs() override
Sets for each entry in the vector.
Definition: distributed_vector.C:282
libMesh::NumericVector::size
virtual numeric_index_type size() const =0
libMesh::DistributedVector::swap
virtual void swap(NumericVector< T > &v) override
Swaps the contents of this with v.
Definition: distributed_vector.h:640
libMesh::NumericVector
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Definition: vector_fe_ex5.C:43
libMesh::zero
const Number zero
.
Definition: libmesh.h:243
libMesh::DistributedVector::DistributedVector
DistributedVector(const Parallel::Communicator &comm, const ParallelType=AUTOMATIC)
Dummy-Constructor.
Definition: distributed_vector.h:263
libMesh::TriangleWrapper::init
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
libMesh::NumericVector::_type
ParallelType _type
Type of vector.
Definition: numeric_vector.h:737
libMesh::DistributedVector::min
virtual Real min() const override
Definition: distributed_vector.h:597
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::IntRange
The IntRange templated class is intended to make it easy to loop over integers which are indices of a...
Definition: int_range.h:53
libMesh::DistributedVector::sum
virtual T sum() const override
Definition: distributed_vector.C:48
libMesh::DistributedVector::_first_local_index
numeric_index_type _first_local_index
The first component stored locally.
Definition: distributed_vector.h:250
libMesh::processor_id_type
uint8_t processor_id_type
Definition: id_types.h:104
libMesh::DistributedVector::add_vector_transpose
virtual void add_vector_transpose(const NumericVector< T > &, const SparseMatrix< T > &) override
Computes , i.e.
Definition: distributed_vector.h:198
libMesh::DistributedVector::max
virtual Real max() const override
Definition: distributed_vector.h:619
libMesh::NumericVector::local_size
virtual numeric_index_type local_size() const =0
libMesh::DistributedVector::operator()
virtual T operator()(const numeric_index_type i) const override
Definition: distributed_vector.h:552
libMesh::DistributedVector::last_local_index
virtual numeric_index_type last_local_index() const override
Definition: distributed_vector.h:539
libMesh::numeric_index_type
dof_id_type numeric_index_type
Definition: id_types.h:99
libMesh::initialized
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:265
libMesh::DistributedVector::_last_local_index
numeric_index_type _last_local_index
The last component (+1) stored locally.
Definition: distributed_vector.h:255
libMesh::DistributedVector::dot
virtual T dot(const NumericVector< T > &V) const override
Definition: distributed_vector.C:296
libMesh::DistributedVector::scale
virtual void scale(const T factor) override
Scale each element of the vector by the given factor.
Definition: distributed_vector.C:271
libMesh::DistributedVector::add_vector
virtual void add_vector(const NumericVector< T > &, const SparseMatrix< T > &) override
Computes , i.e.
Definition: distributed_vector.h:194
swap
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
Definition: variant_filter_iterator.h:478
libMesh::DistributedVector
This class provides a simple parallel, distributed vector datatype which is specific to libmesh.
Definition: distributed_vector.h:53
libMesh::DistributedVector::operator/=
virtual NumericVector< T > & operator/=(const NumericVector< T > &v) override
Computes the component-wise division of this vector's entries by another's, .
Definition: distributed_vector.C:185
libMesh::libMeshPrivateData::_is_initialized
bool _is_initialized
Flag that tells if init() has been called.
Definition: libmesh.C:246
libMesh::DistributedVector::operator=
DistributedVector & operator=(const DistributedVector &)
Copy assignment operator.
Definition: distributed_vector.C:354
value
static const bool value
Definition: xdr_io.C:56
libMesh::DistributedVector::add
virtual void add(const numeric_index_type i, const T value) override
Adds value to each entry of the vector.
Definition: distributed_vector.h:582
libMesh::DistributedVector::close
virtual void close() override
Calls the NumericVector's internal assembly routines, ensuring that the values are consistent across ...
Definition: distributed_vector.h:434
libMesh::DistributedVector::linfty_norm
virtual Real linfty_norm() const override
Definition: distributed_vector.C:114
libMesh::DistributedVector::set
virtual void set(const numeric_index_type i, const T value) override
Sets v(i) = value.
Definition: distributed_vector.h:567
libMesh::DistributedVector::_global_size
numeric_index_type _global_size
The global vector size.
Definition: distributed_vector.h:240
libMesh::DistributedVector::operator-=
virtual NumericVector< T > & operator-=(const NumericVector< T > &v) override
Subtracts v from *this, .
Definition: distributed_vector.C:155
libMesh::DistributedVector::local_size
virtual numeric_index_type local_size() const override
Definition: distributed_vector.h:513
libMesh::AUTOMATIC
Definition: enum_parallel_type.h:34
libMesh::ParallelType
ParallelType
Defines an enum for parallel data structure types.
Definition: enum_parallel_type.h:33
libMesh::DistributedVector::operator+=
virtual NumericVector< T > & operator+=(const NumericVector< T > &v) override
Adds v to *this, .
Definition: distributed_vector.C:140
libMesh::DistributedVector::zero
virtual void zero() override
Set all entries to zero.
Definition: distributed_vector.h:462
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::DistributedVector::reciprocal
virtual void reciprocal() override
Computes the component-wise reciprocal, .
Definition: distributed_vector.C:201
libMesh::DistributedVector::zero_clone
virtual std::unique_ptr< NumericVector< T > > zero_clone() const override
Definition: distributed_vector.h:477
libMesh::DistributedVector::l1_norm
virtual Real l1_norm() const override
Definition: distributed_vector.C:70
libMesh::NumericVector::type
ParallelType type() const
Definition: numeric_vector.h:160