Skip to content

Commit

Permalink
Merge pull request dealii#14109 from peterrum/vector_zero_out_ghost_v…
Browse files Browse the repository at this point in the history
…alues

Add Vector::zero_out_ghost_values
  • Loading branch information
drwells committed Jul 10, 2022
2 parents d5ccd7f + 03a1d5d commit 273bf37
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions include/deal.II/lac/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,19 @@ class Vector : public Subscriptor

/**
* This function exists for compatibility with the @p
* parallel vector classes (e.g., LinearAlgebra::distributed::Vector class).
* Always returns false since this implementation is serial.
* parallel vector classes (e.g., LinearAlgebra::distributed::Vector class)
* and always returns false since this implementation is serial.
*/
bool
has_ghost_elements() const;

/**
* This function exists for compatibility with the @p
* parallel vector classes (e.g., LinearAlgebra::distributed::Vector class)
* and does nothing since this implementation is serial.
*/
void
zero_out_ghost_values() const;
//@}

private:
Expand Down Expand Up @@ -1315,13 +1323,23 @@ inline void Vector<Number>::compress(::dealii::VectorOperation::values) const
{}



template <typename Number>
inline bool
Vector<Number>::has_ghost_elements() const
{
return false;
}



template <typename Number>
inline void
Vector<Number>::zero_out_ghost_values() const
{}



template <typename Number>
inline void
Vector<Number>::update_ghost_values() const
Expand Down

0 comments on commit 273bf37

Please sign in to comment.