From a54b082f4029c50dc65d671a048c98b571aecb6b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 7 Apr 2018 19:54:23 +0200 Subject: [PATCH] make zero_out_ghosts() const --- include/deal.II/lac/la_parallel_block_vector.h | 2 +- include/deal.II/lac/la_parallel_block_vector.templates.h | 2 +- include/deal.II/lac/la_parallel_vector.h | 2 +- include/deal.II/lac/la_parallel_vector.templates.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/deal.II/lac/la_parallel_block_vector.h b/include/deal.II/lac/la_parallel_block_vector.h index f9f20a82fe..3a46a9fe45 100644 --- a/include/deal.II/lac/la_parallel_block_vector.h +++ b/include/deal.II/lac/la_parallel_block_vector.h @@ -331,7 +331,7 @@ namespace LinearAlgebra * vector is forbidden and an exception is thrown. Only write access to * ghost elements is allowed in this state. */ - void zero_out_ghosts (); + void zero_out_ghosts () const; /** * Return if this Vector contains ghost elements. diff --git a/include/deal.II/lac/la_parallel_block_vector.templates.h b/include/deal.II/lac/la_parallel_block_vector.templates.h index 368b9b0d13..ef82385da7 100644 --- a/include/deal.II/lac/la_parallel_block_vector.templates.h +++ b/include/deal.II/lac/la_parallel_block_vector.templates.h @@ -285,7 +285,7 @@ namespace LinearAlgebra template void - BlockVector::zero_out_ghosts () + BlockVector::zero_out_ghosts () const { for (unsigned int block=0; blockn_blocks(); ++block) this->block(block).zero_out_ghosts(); diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index 00179449cf..fa34a73175 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -501,7 +501,7 @@ namespace LinearAlgebra * vector is forbidden and an exception is thrown. Only write access to * ghost elements is allowed in this state. */ - void zero_out_ghosts (); + void zero_out_ghosts () const; /** * Return whether the vector currently is in a state where ghost values diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index d9ba0a6621..9bf8c0afa4 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -515,7 +515,7 @@ namespace LinearAlgebra template void - Vector::zero_out_ghosts () + Vector::zero_out_ghosts () const { std::fill_n (&values[partitioner->local_size()], partitioner->n_ghost_indices(), -- 2.39.5