From f34bcd1efaee9c8a6047fbf411fab47cb29bb955 Mon Sep 17 00:00:00 2001 From: Svenja Schoeder Date: Wed, 27 Jun 2018 13:00:33 +0200 Subject: [PATCH] addressed all raised points fixed exception message typo typo fixed typos changes due to indent --- include/deal.II/base/partitioner.templates.h | 12 ++++++------ include/deal.II/lac/la_parallel_vector.h | 16 ++++++++-------- .../deal.II/lac/read_write_vector.templates.h | 12 ++++++------ source/lac/trilinos_sparse_matrix.cc | 3 ++- source/lac/trilinos_vector.cc | 3 ++- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/deal.II/base/partitioner.templates.h b/include/deal.II/base/partitioner.templates.h index 87b5c601ff..09e9c73175 100644 --- a/include/deal.II/base/partitioner.templates.h +++ b/include/deal.II/base/partitioner.templates.h @@ -329,10 +329,10 @@ namespace Utilities return a; } - // In the import_from_ghosted_array_finish we need to calculate maximal - // and minimal value on number types, which is not straight forward for - // complex numbers. Therfore, comparison of complex numbers is - // prohibited and throw an assert. + // In the import_from_ghosted_array_finish we might need to calculate the + // maximal and minimal value for the given number type, which is not + // straight forward for complex numbers. Therefore, comparison of complex + // numbers is prohibited and throws an exception. template Number get_min(const Number a, const Number b) @@ -345,7 +345,7 @@ namespace Utilities get_min(const std::complex a, const std::complex) { AssertThrow(false, - ExcMessage("VectorOperation::min max not" + ExcMessage("VectorOperation::min not " "implemented for complex numbers")); return a; } @@ -362,7 +362,7 @@ namespace Utilities get_max(const std::complex a, const std::complex) { AssertThrow(false, - ExcMessage("VectorOperation::min max not " + ExcMessage("VectorOperation::max not " "implemented for complex numbers")); return a; } diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index 97c345574d..f3b113a9d1 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -416,18 +416,18 @@ namespace LinearAlgebra * actually consistent between processors, i.e., whenever a non-zero * ghost element is found, it is compared to the value on the owning * processor and an exception is thrown if these elements do not agree. - * If called with VectorOperation::min or VectorOperation::max the + * If called with VectorOperation::min or VectorOperation::max, the * minimum or maximum on all elements across the processors is set. * @note This vector class has a fixed set of ghost entries attached to * the local representation. As a consequence, all ghost entries are - * assumed to be valid and will be unconditionally exchanged according + * assumed to be valid and will be exchanged unconditionally according * to the given VectorOperation. Make sure to initialize all ghost - * entries with the neutral element of the given VectorOperation. The - * neutral element is zero for VectorOperation::add and - * VectorOperation::insert, `+inf` for VectorOperation::min, and `-inf` - * for VectorOperation::max or touch all ghost entries. If all values - * are initialized with values below zero and compress is called with - * VectorOperation::max two times subsequently, the maximal value + * entries with the neutral element of the given VectorOperation or + * touch all ghost entries. The neutral element is zero for + * VectorOperation::add and VectorOperation::insert, `+inf` for + * VectorOperation::min, and `-inf` for VectorOperation::max. If all + * values are initialized with values below zero and compress is called + * with VectorOperation::max two times subsequently, the maximal value * after the second calculation will be zero. */ virtual void diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 62608caf10..77af5dba36 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -252,10 +252,10 @@ namespace LinearAlgebra namespace internal { - // In the import_from_ghosted_array_finish we need to calculate maximal - // and minimal value on number types, which is not straight forward for - // complex numbers. Therfore, comparison of complex numbers is - // prohibited and throw an assert. + // In the import_from_ghosted_array_finish we need to calculate the maximal + // and minimal value for the given number type, which is not straight + // forward for complex numbers. Therefore, comparison of complex numbers is + // prohibited and throws an assert. template Number get_min(const Number a, const Number b) @@ -268,7 +268,7 @@ namespace LinearAlgebra get_min(const std::complex a, const std::complex) { AssertThrow(false, - ExcMessage("VectorOperation::min max not" + ExcMessage("VectorOperation::min not " "implemented for complex numbers")); return a; } @@ -285,7 +285,7 @@ namespace LinearAlgebra get_max(const std::complex a, const std::complex) { AssertThrow(false, - ExcMessage("VectorOperation::min max not " + ExcMessage("VectorOperation::max not " "implemented for complex numbers")); return a; } diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 1eee3a76cd..f67f12977e 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -1158,7 +1158,8 @@ namespace TrilinosWrappers else Assert( false, - "compress() can only be called with VectorOperation add, insert, or unknown"); + ExcMessage( + "compress() can only be called with VectorOperation add, insert, or unknown")); } else { diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index f143f26209..d0ac6a9b3d 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -563,7 +563,8 @@ namespace TrilinosWrappers else Assert( false, - "compress() can only be called with VectorOperation add, insert, or unknown"); + ExcMessage( + "compress() can only be called with VectorOperation add, insert, or unknown")); } else { -- 2.39.5