From d22e218017b8577437eb4fd36315dc6bf8653988 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 3 Jul 2023 11:13:50 -0400 Subject: [PATCH] Remove LA::Vector. We agreed to convert VectorSpaceVector a concept which makes this approach no longer relevant. --- cmake/config/template-arguments.in | 10 - .../configure_50_complex_values.cmake | 4 - .../incompatibilities/20230703DavidWells | 4 + include/deal.II/base/template_constraints.h | 4 - .../cell_data_transfer.templates.h | 1 - .../fe/fe_tools_extrapolate.templates.h | 1 - .../fe/fe_tools_interpolate.templates.h | 1 - include/deal.II/grid/grid_tools.h | 1 - .../lac/affine_constraints.templates.h | 1 - include/deal.II/lac/la_parallel_vector.h | 2 +- include/deal.II/lac/la_vector.h | 551 --------------- include/deal.II/lac/la_vector.templates.h | 633 ------------------ include/deal.II/lac/read_write_vector.h | 29 - .../deal.II/lac/read_write_vector.templates.h | 16 - .../numerics/error_estimator.templates.h | 1 - ...tor_tools_integrate_difference.templates.h | 1 - .../vector_tools_interpolate.templates.h | 1 - .../vector_tools_mean_value.templates.h | 1 - .../vector_tools_point_gradient.templates.h | 1 - .../vector_tools_point_value.templates.h | 1 - .../numerics/vector_tools_project.templates.h | 1 - .../numerics/vector_tools_rhs.templates.h | 1 - include/deal.II/sundials/n_vector.templates.h | 1 - source/algorithms/operator.cc | 1 - source/base/mpi_noncontiguous_partitioner.cc | 1 - source/dofs/dof_accessor_get.cc | 1 - source/dofs/dof_accessor_set.cc | 4 - source/fe/mapping_fe_field.cc | 1 - source/fe/mapping_q1_eulerian.cc | 1 - source/fe/mapping_q_cache.cc | 1 - source/fe/mapping_q_eulerian.cc | 1 - source/lac/CMakeLists.txt | 2 - source/lac/affine_constraints.inst.in | 13 - source/lac/la_vector.cc | 49 -- source/lac/la_vector.inst.in | 28 - source/lac/solver.cc | 1 - source/lac/vector_memory.cc | 1 - .../meshworker/mesh_worker_vector_selector.cc | 1 - source/multigrid/mg_base.cc | 1 - source/multigrid/multigrid.cc | 1 - source/non_matching/fe_values.cc | 1 - source/non_matching/mesh_classifier.cc | 1 - source/non_matching/quadrature_generator.cc | 1 - source/numerics/data_out_dof_data.cc | 1 - source/numerics/data_out_dof_data_codim.cc | 1 - source/numerics/data_out_dof_data_inst2.cc | 1 - source/numerics/derivative_approximation.cc | 1 - source/numerics/dof_output_operator.cc | 1 - source/numerics/error_estimator_1d.cc | 1 - source/numerics/fe_field_function.cc | 1 - source/numerics/point_value_history.cc | 1 - source/numerics/smoothness_estimator.cc | 1 - source/numerics/solution_transfer.cc | 1 - source/trilinos/nox.cc | 4 +- tests/lac/la_vector_accumulation_01.cc | 63 -- tests/lac/la_vector_accumulation_01.output | 2 - tests/lac/la_vector_add_and_dot.cc | 98 --- ...d_and_dot.with_complex_values=false.output | 15 - ...dd_and_dot.with_complex_values=true.output | 20 - tests/lac/la_vector_add_and_dot_complex.cc | 88 --- ..._dot_complex.with_complex_values=on.output | 52 -- tests/lac/la_vector_all_zero.cc | 44 -- tests/lac/la_vector_all_zero.output | 2 - tests/lac/la_vector_large_numbers.cc | 81 --- tests/lac/la_vector_large_numbers.output | 2 - tests/lac/la_vector_norms.cc | 119 ---- tests/lac/la_vector_norms.output | 2 - tests/lac/la_vector_output.cc | 90 --- tests/lac/la_vector_output.output | 2 - tests/lac/la_vector_print.cc | 44 -- tests/lac/la_vector_print.output | 3 - tests/lac/la_vector_vector.cc | 153 ----- tests/lac/la_vector_vector.output | 51 -- tests/lac/vector_type_traits_is_serial_01.cc | 20 - .../vector_type_traits_is_serial_01.output | 6 - tests/matrix_free/fe_evaluation_renumbered.cc | 4 +- tests/mpi/local_size.cc | 2 - ...th_tpetra=on.with_petsc=on.mpirun=4.output | 12 - tests/numerics/subtract_mean_value_01.cc | 11 - tests/numerics/subtract_mean_value_01.output | 2 - tests/remote_point_evaluation/mapping_01.cc | 2 - tests/remote_point_evaluation/mapping_02.cc | 2 - tests/remote_point_evaluation/mapping_03.cc | 2 - tests/remote_point_evaluation/mapping_04.cc | 2 - 84 files changed, 9 insertions(+), 2379 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20230703DavidWells delete mode 100644 include/deal.II/lac/la_vector.h delete mode 100644 include/deal.II/lac/la_vector.templates.h delete mode 100644 source/lac/la_vector.cc delete mode 100644 source/lac/la_vector.inst.in delete mode 100644 tests/lac/la_vector_accumulation_01.cc delete mode 100644 tests/lac/la_vector_accumulation_01.output delete mode 100644 tests/lac/la_vector_add_and_dot.cc delete mode 100644 tests/lac/la_vector_add_and_dot.with_complex_values=false.output delete mode 100644 tests/lac/la_vector_add_and_dot.with_complex_values=true.output delete mode 100644 tests/lac/la_vector_add_and_dot_complex.cc delete mode 100644 tests/lac/la_vector_add_and_dot_complex.with_complex_values=on.output delete mode 100644 tests/lac/la_vector_all_zero.cc delete mode 100644 tests/lac/la_vector_all_zero.output delete mode 100644 tests/lac/la_vector_large_numbers.cc delete mode 100644 tests/lac/la_vector_large_numbers.output delete mode 100644 tests/lac/la_vector_norms.cc delete mode 100644 tests/lac/la_vector_norms.output delete mode 100644 tests/lac/la_vector_output.cc delete mode 100644 tests/lac/la_vector_output.output delete mode 100644 tests/lac/la_vector_print.cc delete mode 100644 tests/lac/la_vector_print.output delete mode 100644 tests/lac/la_vector_vector.cc delete mode 100644 tests/lac/la_vector_vector.output diff --git a/cmake/config/template-arguments.in b/cmake/config/template-arguments.in index f7d58dec3d..f6181a592b 100644 --- a/cmake/config/template-arguments.in +++ b/cmake/config/template-arguments.in @@ -94,9 +94,6 @@ VECTOR_TYPES := { Vector; BlockVector; BlockVector; - LinearAlgebra::Vector; - LinearAlgebra::Vector ; - LinearAlgebra::distributed::Vector; LinearAlgebra::distributed::Vector ; @@ -105,7 +102,6 @@ VECTOR_TYPES := { Vector; @DEAL_II_EXPAND_COMPLEX_VECTORS@; @DEAL_II_EXPAND_COMPLEX_BLOCK_VECTORS@; - @DEAL_II_EXPAND_COMPLEX_LA_VECTORS@; @DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_VECTORS@; @DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_BLOCK_VECTORS@; @@ -129,9 +125,6 @@ REAL_VECTOR_TYPES := { Vector; BlockVector; BlockVector; - LinearAlgebra::Vector; - LinearAlgebra::Vector ; - LinearAlgebra::distributed::Vector; LinearAlgebra::distributed::Vector ; @@ -152,9 +145,6 @@ REAL_VECTOR_TYPES := { Vector; REAL_NONBLOCK_VECTORS := { Vector; Vector ; - LinearAlgebra::Vector; - LinearAlgebra::Vector ; - LinearAlgebra::distributed::Vector; LinearAlgebra::distributed::Vector ; diff --git a/cmake/configure/configure_50_complex_values.cmake b/cmake/configure/configure_50_complex_values.cmake index 0464640413..e5bf9d7fe4 100644 --- a/cmake/configure/configure_50_complex_values.cmake +++ b/cmake/configure/configure_50_complex_values.cmake @@ -30,10 +30,6 @@ if(${DEAL_II_WITH_COMPLEX_VALUES}) "BlockVector >" "BlockVector >" ) - set(DEAL_II_EXPAND_COMPLEX_LA_VECTORS - "LinearAlgebra::Vector >" - "LinearAlgebra::Vector >" - ) set(DEAL_II_EXPAND_COMPLEX_LA_PARALLEL_VECTORS "LinearAlgebra::distributed::Vector >" "LinearAlgebra::distributed::Vector >" diff --git a/doc/news/changes/incompatibilities/20230703DavidWells b/doc/news/changes/incompatibilities/20230703DavidWells new file mode 100644 index 0000000000..5af21ab838 --- /dev/null +++ b/doc/news/changes/incompatibilities/20230703DavidWells @@ -0,0 +1,4 @@ +Removed: The LinearAlgebra::Vector class has been removed without deprecation. +Users should use the standard Vector class instead. +
+(David Wells, 2023/07/03) diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index d298064240..b156ea15e7 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -738,10 +738,6 @@ namespace concepts inline constexpr bool is_dealii_vector_type> = true; - template - inline constexpr bool - is_dealii_vector_type> = true; - template inline constexpr bool is_dealii_vector_type> = true; diff --git a/include/deal.II/distributed/cell_data_transfer.templates.h b/include/deal.II/distributed/cell_data_transfer.templates.h index a9ca456325..16fc5d86cc 100644 --- a/include/deal.II/distributed/cell_data_transfer.templates.h +++ b/include/deal.II/distributed/cell_data_transfer.templates.h @@ -26,7 +26,6 @@ # include # include # include -# include # include # include # include diff --git a/include/deal.II/fe/fe_tools_extrapolate.templates.h b/include/deal.II/fe/fe_tools_extrapolate.templates.h index 02a4a3131a..301c195939 100644 --- a/include/deal.II/fe/fe_tools_extrapolate.templates.h +++ b/include/deal.II/fe/fe_tools_extrapolate.templates.h @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/fe/fe_tools_interpolate.templates.h b/include/deal.II/fe/fe_tools_interpolate.templates.h index 8110b58a96..5750e30611 100644 --- a/include/deal.II/fe/fe_tools_interpolate.templates.h +++ b/include/deal.II/fe/fe_tools_interpolate.templates.h @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index cbfa05a523..99146bf8b2 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -39,7 +39,6 @@ #include #include -#include #include #include #include diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index d951ddb6f4..65db1cda35 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index 1ff552f623..40a6af7301 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -1824,7 +1824,7 @@ swap(LinearAlgebra::distributed::Vector &u, /** - * Declare dealii::LinearAlgebra::Vector as distributed vector. + * Declare dealii::LinearAlgebra::distributed::Vector as distributed vector. */ template struct is_serial_vector> diff --git a/include/deal.II/lac/la_vector.h b/include/deal.II/lac/la_vector.h deleted file mode 100644 index 78476871f8..0000000000 --- a/include/deal.II/lac/la_vector.h +++ /dev/null @@ -1,551 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 - 2023 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#ifndef dealii_la_vector_h -#define dealii_la_vector_h - - -#include - -#include -#include -#include - -#include -#include -#include -#include - -// boost::serialization::make_array used to be in array.hpp, but was -// moved to a different file in BOOST 1.64 -#include -#if BOOST_VERSION >= 106400 -# include -#else -# include -#endif -#include - -#include -#include -#include -#include - - -DEAL_II_NAMESPACE_OPEN - -/** - * A namespace for vector classes. - * - * This namespace contains various classes that provide wrappers to vector - * classes from different external libraries like Trilinos (EPetra) or PETSc - * and native implementations like LinearAlgebra::distributed::Vector. - * - * The different vector classes are derived from VectorSpaceVector to provide - * a joint interface for vector space operations, are derived from - * ReadWriteVector (or ReadWriteVector itself), or both. The separation of - * vector space operations (like norms or vector additions) through - * VectorSpaceVector and element access through ReadWriteVector are by design - * and improve performance. - */ -namespace LinearAlgebra -{ - /** - * @addtogroup Vectors - * @{ - */ - - /** - * Numerical vector of data. This class derives from both - * ::dealii::LinearAlgebra::ReadWriteVector and - * ::dealii::LinearAlgebra::VectorSpaceVector. As opposed to the array of - * the C++ standard library, this class implements an element of a vector - * space suitable for numerical computations. - */ - template - class Vector : public ReadWriteVector, - public VectorSpaceVector - { - public: - using size_type = types::global_dof_index; - using value_type = typename ReadWriteVector::value_type; - - /** - * Constructor. Create a vector of dimension zero. - */ - Vector() = default; - - /** - * Copy constructor. Sets the dimension to that of the given vector and - * copies all elements. - */ - Vector(const Vector &V); - - /** - * Constructor. Set dimension to @p n and initialize all elements with - * zero. - * - * The constructor is made explicit to avoid accident like this: - * v=0;. Presumably, the user wants to set every element of the - * vector to zero, but instead, what happens is this call: - * v=Vector@(0);, i.e. the vector is replaced by one of - * length zero. - */ - explicit Vector(const size_type n); - - /** - * Initialize the vector with a given range of values pointed to by the - * iterators. This function exists in analogy to the @p std::vector class. - */ - template - Vector(const InputIterator first, const InputIterator last); - - /** - * Set the global size of the vector to @p size. The stored elements have - * their index in [0,size). - * - * If the flag @p omit_zeroing_entries is set to false, the memory will be - * initialized with zero, otherwise the memory will be untouched (and the - * user must make sure to fill it with reasonable data before using it). - */ - virtual void - reinit(const size_type size, - const bool omit_zeroing_entries = false) override; - - /** - * Uses the same IndexSet as the one of the input vector @p in_vector and - * allocates memory for this vector. - * - * If the flag @p omit_zeroing_entries is set to false, the memory will be - * initialized with zero, otherwise the memory will be untouched (and the - * user must make sure to fill it with reasonable data before using it). - */ - template - void - reinit(const ReadWriteVector &in_vector, - const bool omit_zeroing_entries = false); - - /** - * Initializes the vector. The indices are specified by @p - * locally_stored_indices. - * - * If the flag @p omit_zeroing_entries is set to false, the memory will be - * initialized with zero, otherwise the memory will be untouched (and the - * user must make sure to fill it with reasonable data before using it). - * locally_stored_indices. - */ - virtual void - reinit(const IndexSet &locally_stored_indices, - const bool omit_zeroing_entries = false) override; - - - /** - * Change the dimension to that of the vector V. The elements of V are not - * copied. - */ - virtual void - reinit(const VectorSpaceVector &V, - const bool omit_zeroing_entries = false) override; - - /** - * Returns `false` as this is a serial vector. - * - * This functionality only needs to be called if using MPI based vectors and - * exists in other objects for compatibility. - */ - bool - has_ghost_elements() const; - - /** - * Copies the data of the input vector @p in_vector. - */ - Vector & - operator=(const Vector &in_vector); - - /** - * Copies the data of the input vector @p in_vector. - */ - template - Vector & - operator=(const Vector &in_vector); - - /** - * Sets all elements of the vector to the scalar @p s. This operation is - * only allowed if @p s is equal to zero. - */ - virtual Vector & - operator=(const Number s) override; - - /** - * Multiply the entire vector by a fixed factor. - */ - virtual Vector & - operator*=(const Number factor) override; - - /** - * Divide the entire vector by a fixed factor. - */ - virtual Vector & - operator/=(const Number factor) override; - - /** - * Add the vector @p V to the present one. - */ - virtual Vector & - operator+=(const VectorSpaceVector &V) override; - - /** - * Subtract the vector @p V from the present one. - */ - virtual Vector & - operator-=(const VectorSpaceVector &V) override; - - /** - * Return the scalar product of two vectors. - */ - virtual Number - operator*(const VectorSpaceVector &V) const override; - - /** - * This function is not implemented and will throw an exception. - */ - virtual void - import_elements( - const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; - - /** - * @deprecated Use import_elements() instead. - */ - DEAL_II_DEPRECATED - virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override - { - import_elements(V, operation, communication_pattern); - } - - /** - * Add @p a to all components. Note that @p a is a scalar not a vector. - */ - virtual void - add(const Number a) override; - - /** - * Simple addition of a multiple of a vector, i.e. *this += a*V. - */ - virtual void - add(const Number a, const VectorSpaceVector &V) override; - - /** - * Multiple addition of a multiple of a vector, i.e. *this += - * a*V+b*W. - */ - virtual void - add(const Number a, - const VectorSpaceVector &V, - const Number b, - const VectorSpaceVector &W) override; - - /** - * Scaling and simple addition of a multiple of a vector, i.e. *this = - * s*(*this)+a*V. - */ - virtual void - sadd(const Number s, - const Number a, - const VectorSpaceVector &V) override; - - /** - * Scale each element of this vector by the corresponding element in the - * argument. This function is mostly meant to simulate multiplication (and - * immediate re-assignment) by a diagonal scaling matrix. - */ - virtual void - scale(const VectorSpaceVector &scaling_factors) override; - - /** - * Assignment *this = a*V. - */ - virtual void - equ(const Number a, const VectorSpaceVector &V) override; - - /** - * Return whether the vector contains only elements with value zero. - */ - virtual bool - all_zero() const override; - - /** - * Return the mean value of all the entries of this vector. - */ - virtual value_type - mean_value() const override; - - /** - * Return the l1 norm of the vector (i.e., the sum of the - * absolute values of all entries). - */ - virtual typename VectorSpaceVector::real_type - l1_norm() const override; - - /** - * Return the l2 norm of the vector (i.e., the square root of - * the sum of the square of all entries among all processors). - */ - virtual typename VectorSpaceVector::real_type - l2_norm() const override; - - /** - * Return the maximum norm of the vector (i.e., the maximum absolute value - * among all entries and among all processors). - */ - virtual typename VectorSpaceVector::real_type - linfty_norm() const override; - - /** - * Perform a combined operation of a vector addition and a subsequent - * inner product, returning the value of the inner product. In other - * words, the result of this function is the same as if the user called - * @code - * this->add(a, V); - * return_value = *this * W; - * @endcode - * - * The reason this function exists is that this operation involves less - * memory transfer than calling the two functions separately. This method - * only needs to load three vectors, @p this, @p V, @p W, whereas calling - * separate methods means to load the calling vector @p this twice. Since - * most vector operations are memory transfer limited, this reduces the time - * by 25\% (or 50\% if @p W equals @p this). - * - * For complex-valued vectors, the scalar product in the second step is - * implemented as - * $\left=\sum_i v_i \bar{w_i}$. - */ - virtual Number - add_and_dot(const Number a, - const VectorSpaceVector &V, - const VectorSpaceVector &W) override; - - /** - * Return the global size of the vector, equal to the sum of the number of - * locally owned indices among all processors. - */ - virtual size_type - size() const override; - - /** - * Return an index set that describes which elements of this vector are - * owned by the current processor. As a consequence, the index sets - * returned on different processors if this is a distributed vector will - * form disjoint sets that add up to the complete index set. Obviously, if - * a vector is created on only one processor, then the result would - * satisfy - * @code - * vec.locally_owned_elements() == complete_index_set(vec.size()) - * @endcode - */ - virtual dealii::IndexSet - locally_owned_elements() const override; - - /** - * Print the vector to the output stream @p out. - */ - virtual void - print(std::ostream & out, - const unsigned int precision = 3, - const bool scientific = true, - const bool across = true) const override; - - /** - * Print the vector to the output stream @p out in a format that can be - * read by numpy::readtxt(). Note that the IndexSet is not printed but only - * the values stored in the Vector. To load the vector in python just do - * - * vector = numpy.loadtxt('my_vector.txt') - * - */ - void - print_as_numpy_array(std::ostream & out, - const unsigned int precision = 9) const; - - /** - * Write the vector en bloc to a file. This is done in a binary mode, so - * the output is neither readable by humans nor (probably) by other - * computers using a different operating system or number format. - */ - void - block_write(std::ostream &out) const; - - /** - * Read a vector en block from a file. This is done using the inverse - * operations to the above function, so it is reasonably fast because the - * bitstream is not interpreted. - * - * The vector is resized if necessary. - * - * A primitive form of error checking is performed which will recognize - * the bluntest attempts to interpret some data as a vector stored bitwise - * to a file, but not more. - */ - void - block_read(std::istream &in); - - /** - * Return the memory consumption of this class in bytes. - */ - virtual std::size_t - memory_consumption() const override; - - /** - * Write and read the data of this object from a stream for the purpose - * of serialization using the [BOOST serialization - * library](https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/index.html). - */ - template - void - serialize(Archive &ar, const unsigned int version); - - /** - * Attempt to perform an operation between two incompatible vector types. - * - * @ingroup Exceptions - */ - DeclException0(ExcVectorTypeNotCompatible); - - private: - // Make all other ReadWriteVector types friends. - template - friend class Vector; - }; - - /** @} */ - /*--------------------------- Inline functions ----------------------------*/ - - template - inline Vector::Vector(const Vector &V) - : ReadWriteVector(V) - {} - - - - template - inline Vector::Vector(const size_type n) - : ReadWriteVector(n) - {} - - - - template - template - inline Vector::Vector(const InputIterator first, - const InputIterator last) - { - this->reinit(complete_index_set(std::distance(first, last)), true); - std::copy(first, last, this->begin()); - } - - - - template - inline typename Vector::size_type - Vector::size() const - { - return ReadWriteVector::size(); - } - - - - template - inline dealii::IndexSet - Vector::locally_owned_elements() const - { - return IndexSet(ReadWriteVector::get_stored_elements()); - } - - - - template - inline void - Vector::print(std::ostream & out, - const unsigned int precision, - const bool scientific, - const bool) const - { - ReadWriteVector::print(out, precision, scientific); - } - - - - template - template - inline void - Vector::serialize(Archive &ar, const unsigned int) - { - size_type current_size = this->size(); - ar &static_cast(*this); - ar &this->stored_elements; - // If necessary, resize the vector during a read operation - if (this->size() != current_size) - this->reinit(this->size()); - ar &boost::serialization::make_array(this->values.get(), this->size()); - } - - - - template - inline std::size_t - Vector::memory_consumption() const - { - return ReadWriteVector::memory_consumption(); - } -} // end of namespace LinearAlgebra - - -/** - * Declare dealii::LinearAlgebra::Vector as serial vector. - */ -template -struct is_serial_vector> : std::true_type -{}; - -#ifndef DOXYGEN -/*----------------------- Inline functions ----------------------------------*/ - -namespace LinearAlgebra -{ - template - inline bool - Vector::has_ghost_elements() const - { - return false; - } -} // namespace LinearAlgebra - -#endif - - -DEAL_II_NAMESPACE_CLOSE - -#ifdef DEAL_II_MSVC -# include -#endif - -#endif diff --git a/include/deal.II/lac/la_vector.templates.h b/include/deal.II/lac/la_vector.templates.h deleted file mode 100644 index e620d657ec..0000000000 --- a/include/deal.II/lac/la_vector.templates.h +++ /dev/null @@ -1,633 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 - 2023 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#ifndef dealii_la_vector_templates_h -#define dealii_la_vector_templates_h - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -DEAL_II_NAMESPACE_OPEN - -namespace LinearAlgebra -{ - template - void - Vector::reinit(const size_type size, const bool omit_zeroing_entries) - { - ReadWriteVector::reinit(size, omit_zeroing_entries); - } - - - - template - template - void - Vector::reinit(const ReadWriteVector &in_vector, - const bool omit_zeroing_entries) - { - ReadWriteVector::reinit(in_vector, omit_zeroing_entries); - } - - - - template - void - Vector::reinit(const IndexSet &locally_stored_indices, - const bool omit_zeroing_entries) - { - ReadWriteVector::reinit(locally_stored_indices, - omit_zeroing_entries); - } - - - - template - void - Vector::reinit(const VectorSpaceVector &V, - const bool omit_zeroing_entries) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - const Vector &down_V = dynamic_cast &>(V); - - ReadWriteVector::reinit(down_V, omit_zeroing_entries); - } - - - - template - Vector & - Vector::operator=(const Vector &in_vector) - { - if (PointerComparison::equal(this, &in_vector)) - return *this; - - this->thread_loop_partitioner = in_vector.thread_loop_partitioner; - if (this->size() != in_vector.size()) - this->reinit(in_vector, true); - - dealii::internal::VectorOperations::Vector_copy copier( - in_vector.values.get(), this->values.get()); - dealii::internal::VectorOperations::parallel_for( - copier, - static_cast(0), - this->size(), - this->thread_loop_partitioner); - - return *this; - } - - - - template - template - Vector & - Vector::operator=(const Vector &in_vector) - { - this->thread_loop_partitioner = in_vector.thread_loop_partitioner; - if (this->size() != in_vector.size()) - ReadWriteVector::reinit(in_vector, true); - - dealii::internal::VectorOperations::Vector_copy copier( - in_vector.values.get(), this->values.get()); - dealii::internal::VectorOperations::parallel_for( - copier, - static_cast(0), - this->size(), - this->thread_loop_partitioner); - - return *this; - } - - - - template - Vector & - Vector::operator=(const Number s) - { - Assert(s == static_cast(0), - ExcMessage("Only 0 can be assigned to a vector.")); - (void)s; - - dealii::internal::VectorOperations::Vector_set setter( - Number(), this->values.get()); - dealii::internal::VectorOperations::parallel_for( - setter, 0, this->size(), this->thread_loop_partitioner); - - return *this; - } - - - - template - Vector & - Vector::operator*=(const Number factor) - { - AssertIsFinite(factor); - - dealii::internal::VectorOperations::Vectorization_multiply_factor - vector_multiply(this->values.get(), factor); - dealii::internal::VectorOperations::parallel_for( - vector_multiply, - static_cast(0), - this->size(), - this->thread_loop_partitioner); - - return *this; - } - - - - template - Vector & - Vector::operator/=(const Number factor) - { - AssertIsFinite(factor); - Assert(factor != Number(0.), ExcZero()); - this->operator*=(Number(1.) / factor); - - return *this; - } - - - - template - Vector & - Vector::operator+=(const VectorSpaceVector &V) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - - dealii::internal::VectorOperations::Vectorization_add_v vector_add( - this->values.get(), down_V.values.get()); - dealii::internal::VectorOperations::parallel_for( - vector_add, 0, this->size(), this->thread_loop_partitioner); - - return *this; - } - - - - template - Vector & - Vector::operator-=(const VectorSpaceVector &V) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot subtract two vectors with different numbers of elements")); - dealii::internal::VectorOperations::Vectorization_subtract_v - vector_subtract(this->values.get(), down_V.values.get()); - dealii::internal::VectorOperations::parallel_for( - vector_subtract, 0, this->size(), this->thread_loop_partitioner); - - return *this; - } - - - - template - Number - Vector::operator*(const VectorSpaceVector &V) const - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - Assert(down_V.size() == this->size(), - ExcMessage("Cannot compute the scalar product " - "of two vectors with different numbers of elements")); - Number sum; - dealii::internal::VectorOperations::Dot dot( - this->values.get(), down_V.values.get()); - dealii::internal::VectorOperations::parallel_reduce( - dot, 0, this->size(), sum, this->thread_loop_partitioner); - - return sum; - } - - - - template - void - Vector::import_elements( - const ReadWriteVector &, - VectorOperation::values, - std::shared_ptr) - { - AssertThrow(false, ExcMessage("This function is not implemented.")); - } - - - - template - inline void - Vector::add(const Number a) - { - AssertIsFinite(a); - - dealii::internal::VectorOperations::Vectorization_add_factor - vector_add(this->values.get(), a); - dealii::internal::VectorOperations::parallel_for( - vector_add, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - void - Vector::add(const Number a, const VectorSpaceVector &V) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - AssertIsFinite(a); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - - dealii::internal::VectorOperations::Vectorization_add_av - vector_add_av(this->values.get(), down_V.values.get(), a); - dealii::internal::VectorOperations::parallel_for( - vector_add_av, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - void - Vector::add(const Number a, - const VectorSpaceVector &V, - const Number b, - const VectorSpaceVector &W) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - // Check that casting will work. - Assert(dynamic_cast *>(&W) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - // Downcast W. If fails, throws an exception. - const Vector &down_W = dynamic_cast &>(W); - AssertIsFinite(a); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - AssertIsFinite(b); - Assert(down_W.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - - dealii::internal::VectorOperations::Vectorization_add_avpbw - vector_add( - this->values.get(), down_V.values.get(), down_W.values.get(), a, b); - dealii::internal::VectorOperations::parallel_for( - vector_add, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - void - Vector::sadd(const Number s, - const Number a, - const VectorSpaceVector &V) - { - AssertIsFinite(s); - AssertIsFinite(a); - - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. It fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - dealii::internal::VectorOperations::Vectorization_sadd_xav - vector_sadd_xav(this->values.get(), down_V.values.get(), a, s); - dealii::internal::VectorOperations::parallel_for( - vector_sadd_xav, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - void - Vector::scale(const VectorSpaceVector &scaling_factors) - { - // Check that casting will work. - Assert(dynamic_cast *>(&scaling_factors) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast scaling_factors. If fails, throws an exception. - const Vector &down_scaling_factors = - dynamic_cast &>(scaling_factors); - Assert(down_scaling_factors.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - - dealii::internal::VectorOperations::Vectorization_scale - vector_scale(this->values.get(), down_scaling_factors.values.get()); - dealii::internal::VectorOperations::parallel_for( - vector_scale, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - void - Vector::equ(const Number a, const VectorSpaceVector &V) - { - AssertIsFinite(a); - - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - dealii::internal::VectorOperations::Vectorization_equ_au vector_equ( - this->values.get(), down_V.values.get(), a); - dealii::internal::VectorOperations::parallel_for( - vector_equ, 0, this->size(), this->thread_loop_partitioner); - } - - - - template - bool - Vector::all_zero() const - { - Assert(this->size(), ExcEmptyObject()); - - const size_type size = this->size(); - for (size_type i = 0; i < size; ++i) - if (this->values[i] != Number()) - return false; - - return true; - } - - - - template - typename Vector::value_type - Vector::mean_value() const - { - Assert(this->size(), ExcEmptyObject()); - - using real_type = typename VectorSpaceVector::real_type; - value_type sum; - dealii::internal::VectorOperations::MeanValue mean_value( - this->values.get()); - dealii::internal::VectorOperations::parallel_reduce( - mean_value, 0, this->size(), sum, this->thread_loop_partitioner); - - return sum / static_cast(this->size()); - } - - - - template - typename VectorSpaceVector::real_type - Vector::l1_norm() const - { - Assert(this->size(), ExcEmptyObject()); - - using real_type = typename VectorSpaceVector::real_type; - real_type sum; - dealii::internal::VectorOperations::Norm1 norm1( - this->values.get()); - dealii::internal::VectorOperations::parallel_reduce( - norm1, 0, this->size(), sum, this->thread_loop_partitioner); - - return sum; - } - - - - template - typename VectorSpaceVector::real_type - Vector::l2_norm() const - { - Assert(this->size(), ExcEmptyObject()); - - // if l2_norm()^2 is finite and non-zero, the answer is computed as - // std::sqrt(norm_sqr()). If norm_sqrt() is infinite or zero, the l2 norm - // might still be finite. In that case, recompute ig (this is a rare case, - // so working on the vector twice is uncritical and paid off by the extended - // precision) using the BLAS approach with a weight, see e.g. dnrm2.f. - using real_type = typename VectorSpaceVector::real_type; - real_type norm_square; - dealii::internal::VectorOperations::Norm2 norm2( - this->values.get()); - dealii::internal::VectorOperations::parallel_reduce( - norm2, 0, this->size(), norm_square, this->thread_loop_partitioner); - if (numbers::is_finite(norm_square) && - norm_square >= std::numeric_limits::min()) - return std::sqrt(norm_square); - else - { - real_type scale = 0.; - real_type sum = 1.; - const size_type size = this->size(); - for (size_type i = 0; i < size; ++i) - { - if (this->values[i] != Number()) - { - const real_type abs_x = - numbers::NumberTraits::abs(this->values[i]); - if (scale < abs_x) - { - sum = 1. + sum * (scale / abs_x) * (scale / abs_x); - scale = abs_x; - } - else - sum += (abs_x / scale) * (abs_x / scale); - } - } - AssertIsFinite(scale * std::sqrt(sum)); - return scale * std::sqrt(sum); - } - } - - - - template - typename VectorSpaceVector::real_type - Vector::linfty_norm() const - { - typename ReadWriteVector::real_type norm = 0.; - const size_type size = this->size(); - for (size_type i = 0; i < size; ++i) - norm = std::max(std::abs(this->values[i]), norm); - - return norm; - } - - - - template - Number - Vector::add_and_dot(const Number a, - const VectorSpaceVector &V, - const VectorSpaceVector &W) - { - // Check that casting will work. - Assert(dynamic_cast *>(&V) != nullptr, - ExcVectorTypeNotCompatible()); - // Check that casting will work. - Assert(dynamic_cast *>(&W) != nullptr, - ExcVectorTypeNotCompatible()); - - // Downcast V. If fails, throws an exception. - const Vector &down_V = dynamic_cast &>(V); - // Downcast W. If fails, throws an exception. - const Vector &down_W = dynamic_cast &>(W); - AssertIsFinite(a); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - Assert(down_W.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); - - Number sum; - dealii::internal::VectorOperations::AddAndDot adder( - this->values.get(), down_V.values.get(), down_W.values.get(), a); - dealii::internal::VectorOperations::parallel_reduce( - adder, 0, this->size(), sum, this->thread_loop_partitioner); - AssertIsFinite(sum); - - return sum; - } - - - - template - void - Vector::print_as_numpy_array(std::ostream & out, - const unsigned int precision) const - { - AssertThrow(out.fail() == false, ExcIO()); - boost::io::ios_flags_saver restore_flags(out); - - out.precision(precision); - - const unsigned int n_elements = this->locally_owned_size(); - for (unsigned int i = 0; i < n_elements; ++i) - out << this->values[i] << ' '; - out << '\n' << std::flush; - - AssertThrow(out.fail() == false, ExcIO()); - } - - - - template - void - Vector::block_write(std::ostream &out) const - { - AssertThrow(out.fail() == false, ExcIO()); - - // Other version of the following - // out << size() << std::endl << '['; - // Reason: operator<< seems to use some resources that lead to problems in - // a multithreaded environment. We convert the size index to - // unsigned long long int that is at least 64 bits to be able to output it - // on all platforms, since std::uint64_t is not in C. - const unsigned long long int sz = this->size(); - char buf[16]; - - std::sprintf(buf, "%llu", sz); - std::strcat(buf, "\n["); - - out.write(buf, std::strlen(buf)); - out.write(reinterpret_cast(this->begin()), - reinterpret_cast(this->end()) - - reinterpret_cast(this->begin())); - - // out << ']'; - const char outro = ']'; - out.write(&outro, 1); - - AssertThrow(out.fail() == false, ExcIO()); - } - - - - template - void - Vector::block_read(std::istream &in) - { - AssertThrow(in.fail() == false, ExcIO()); - - size_type sz; - - char buf[16]; - - in.getline(buf, 16, '\n'); - sz = std::atoi(buf); - ReadWriteVector::reinit(sz, true); - - char c; - // in >> c; - in.read(&c, 1); - AssertThrow(c == '[', ExcIO()); - - in.read(reinterpret_cast(this->begin()), - reinterpret_cast(this->end()) - - reinterpret_cast(this->begin())); - - // in >> c; - in.read(&c, 1); - AssertThrow(c == ']', ExcIO()); - } -} // namespace LinearAlgebra - -DEAL_II_NAMESPACE_CLOSE - -#endif diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index f25ddb3761..c1c9f7376c 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -318,35 +318,6 @@ namespace LinearAlgebra import_elements(V, operation, communication_pattern); } - /** - * Imports all the elements present in the vector's IndexSet from the - * input vector @p vec. VectorOperation::values @p operation - * is used to decide if the elements in @p V should be added to the - * current vector or replace the current elements. - * - * @note The parameter @p communication_pattern is ignored since we are - * dealing with a serial vector here. - */ - void - import_elements( - const LinearAlgebra::Vector &vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); - - /** - * @deprecated Use import_elements() instead. - */ - DEAL_II_DEPRECATED - void - import(const LinearAlgebra::Vector &V, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}) - { - import_elements(V, operation, communication_pattern); - } - /** * Imports all the elements present in the vector's IndexSet from the * input vector @p vec. VectorOperation::values @p operation diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 1115317bd8..95f71b0862 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -462,21 +461,6 @@ namespace LinearAlgebra - template - void - ReadWriteVector::import_elements( - const LinearAlgebra::Vector &vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern) - { - (void)communication_pattern; - - internal::import_serial_vector(vec, operation, *this); - } - - - template template void diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index 5e00839ce9..2b5e66c500 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_integrate_difference.templates.h b/include/deal.II/numerics/vector_tools_integrate_difference.templates.h index ef889cad47..9bc533ab82 100644 --- a/include/deal.II/numerics/vector_tools_integrate_difference.templates.h +++ b/include/deal.II/numerics/vector_tools_integrate_difference.templates.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_interpolate.templates.h b/include/deal.II/numerics/vector_tools_interpolate.templates.h index a141943d35..42e24dad1e 100644 --- a/include/deal.II/numerics/vector_tools_interpolate.templates.h +++ b/include/deal.II/numerics/vector_tools_interpolate.templates.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_mean_value.templates.h b/include/deal.II/numerics/vector_tools_mean_value.templates.h index 04c94d3b33..668258d07c 100644 --- a/include/deal.II/numerics/vector_tools_mean_value.templates.h +++ b/include/deal.II/numerics/vector_tools_mean_value.templates.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_point_gradient.templates.h b/include/deal.II/numerics/vector_tools_point_gradient.templates.h index 361c77f13c..e2e32ed693 100644 --- a/include/deal.II/numerics/vector_tools_point_gradient.templates.h +++ b/include/deal.II/numerics/vector_tools_point_gradient.templates.h @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_point_value.templates.h b/include/deal.II/numerics/vector_tools_point_value.templates.h index f2049e6616..2ed9a2fbb5 100644 --- a/include/deal.II/numerics/vector_tools_point_value.templates.h +++ b/include/deal.II/numerics/vector_tools_point_value.templates.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index ad5b43de6e..ff8cbd12ea 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/numerics/vector_tools_rhs.templates.h b/include/deal.II/numerics/vector_tools_rhs.templates.h index 3188043bdb..5aec03788e 100644 --- a/include/deal.II/numerics/vector_tools_rhs.templates.h +++ b/include/deal.II/numerics/vector_tools_rhs.templates.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h index ac417a848b..6f8e7dd791 100644 --- a/include/deal.II/sundials/n_vector.templates.h +++ b/include/deal.II/sundials/n_vector.templates.h @@ -28,7 +28,6 @@ # include # include # include -# include # include # include # include diff --git a/source/algorithms/operator.cc b/source/algorithms/operator.cc index c052a68248..378a9844b3 100644 --- a/source/algorithms/operator.cc +++ b/source/algorithms/operator.cc @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/source/base/mpi_noncontiguous_partitioner.cc b/source/base/mpi_noncontiguous_partitioner.cc index 3f4ba90765..2e83105836 100644 --- a/source/base/mpi_noncontiguous_partitioner.cc +++ b/source/base/mpi_noncontiguous_partitioner.cc @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/source/dofs/dof_accessor_get.cc b/source/dofs/dof_accessor_get.cc index a414969a05..7cba5ffc1a 100644 --- a/source/dofs/dof_accessor_get.cc +++ b/source/dofs/dof_accessor_get.cc @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/source/dofs/dof_accessor_set.cc b/source/dofs/dof_accessor_set.cc index d5396ae9e1..3ca8d4f04f 100644 --- a/source/dofs/dof_accessor_set.cc +++ b/source/dofs/dof_accessor_set.cc @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -81,9 +80,6 @@ namespace internal dealii::Vector>::value || std::is_same>::value || - std::is_same< - VectorType, - dealii::LinearAlgebra::Vector>::value || std::is_same>::value || diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 2de9bf96e8..86b90ae75c 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/source/fe/mapping_q1_eulerian.cc b/source/fe/mapping_q1_eulerian.cc index 4f24bec6bb..fa8e7dea27 100644 --- a/source/fe/mapping_q1_eulerian.cc +++ b/source/fe/mapping_q1_eulerian.cc @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/source/fe/mapping_q_cache.cc b/source/fe/mapping_q_cache.cc index 61aaf0b0c5..598fd70a74 100644 --- a/source/fe/mapping_q_cache.cc +++ b/source/fe/mapping_q_cache.cc @@ -27,7 +27,6 @@ #include #include -#include #include #include diff --git a/source/fe/mapping_q_eulerian.cc b/source/fe/mapping_q_eulerian.cc index b28588e378..9e3653d264 100644 --- a/source/fe/mapping_q_eulerian.cc +++ b/source/fe/mapping_q_eulerian.cc @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/source/lac/CMakeLists.txt b/source/lac/CMakeLists.txt index f376386727..a3a8a53315 100644 --- a/source/lac/CMakeLists.txt +++ b/source/lac/CMakeLists.txt @@ -24,7 +24,6 @@ set(_unity_include_src dynamic_sparsity_pattern.cc exceptions.cc scalapack.cc - la_vector.cc la_parallel_vector.cc la_parallel_block_vector.cc matrix_out.cc @@ -74,7 +73,6 @@ set(_inst chunk_sparse_matrix.inst.in full_matrix.inst.in lapack_full_matrix.inst.in - la_vector.inst.in la_parallel_vector.inst.in la_parallel_block_vector.inst.in precondition_block.inst.in diff --git a/source/lac/affine_constraints.inst.in b/source/lac/affine_constraints.inst.in index f3bf2a9365..855f4af5de 100644 --- a/source/lac/affine_constraints.inst.in +++ b/source/lac/affine_constraints.inst.in @@ -265,19 +265,6 @@ for (S : COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) const; } -for (S : REAL_AND_COMPLEX_SCALARS) - { - template void AffineConstraints::distribute>( - LinearAlgebra::Vector &) const; - } - -for (S : COMPLEX_SCALARS) - { - template void - AffineConstraints::distribute>( - LinearAlgebra::Vector &) const; - } - for (V : EXTERNAL_PARALLEL_VECTORS) { template void AffineConstraints::distribute(V &) const; diff --git a/source/lac/la_vector.cc b/source/lac/la_vector.cc deleted file mode 100644 index d677224ebc..0000000000 --- a/source/lac/la_vector.cc +++ /dev/null @@ -1,49 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#include - -DEAL_II_NAMESPACE_OPEN - -// disable instantiation for MSVC for now because of a compiler bug, -// see https://github.com/dealii/dealii/issues/2875 -#ifndef DEAL_II_MSVC - -namespace LinearAlgebra -{ -# include "la_vector.inst" - - // do a few functions that currently don't fit the scheme because they have - // two template arguments that need to be different (the case of same - // arguments is covered by the default copy constructor and copy operator that - // is declared separately) - -# define TEMPL_COPY_CONSTRUCTOR(S1, S2) \ - template Vector &Vector::operator=(const Vector &) - - TEMPL_COPY_CONSTRUCTOR(double, float); - TEMPL_COPY_CONSTRUCTOR(float, double); - -# ifdef DEAL_II_WITH_COMPLEX_VALUES - TEMPL_COPY_CONSTRUCTOR(std::complex, std::complex); - TEMPL_COPY_CONSTRUCTOR(std::complex, std::complex); -# endif - -# undef TEMPL_COPY_CONSTRUCTOR -} // namespace LinearAlgebra - -#endif // ! DEAL_II_MSVC - -DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/la_vector.inst.in b/source/lac/la_vector.inst.in deleted file mode 100644 index 96acaff24a..0000000000 --- a/source/lac/la_vector.inst.in +++ /dev/null @@ -1,28 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 1999 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - - -for (SCALAR : REAL_SCALARS) - { - template class Vector; - } - - - -for (SCALAR : COMPLEX_SCALARS) - { - template class Vector; - } diff --git a/source/lac/solver.cc b/source/lac/solver.cc index 4194163d9c..ad01d98aff 100644 --- a/source/lac/solver.cc +++ b/source/lac/solver.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/source/lac/vector_memory.cc b/source/lac/vector_memory.cc index d122574881..dd72832d50 100644 --- a/source/lac/vector_memory.cc +++ b/source/lac/vector_memory.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/source/meshworker/mesh_worker_vector_selector.cc b/source/meshworker/mesh_worker_vector_selector.cc index b2b444942c..ff2a946479 100644 --- a/source/meshworker/mesh_worker_vector_selector.cc +++ b/source/meshworker/mesh_worker_vector_selector.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/source/multigrid/mg_base.cc b/source/multigrid/mg_base.cc index 2cb5c6b3d0..ec5904ae3f 100644 --- a/source/multigrid/mg_base.cc +++ b/source/multigrid/mg_base.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/source/multigrid/multigrid.cc b/source/multigrid/multigrid.cc index 1e51506b17..52973d7601 100644 --- a/source/multigrid/multigrid.cc +++ b/source/multigrid/multigrid.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/source/non_matching/fe_values.cc b/source/non_matching/fe_values.cc index cfced4aa53..8ddf9bbe5a 100644 --- a/source/non_matching/fe_values.cc +++ b/source/non_matching/fe_values.cc @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/source/non_matching/mesh_classifier.cc b/source/non_matching/mesh_classifier.cc index b1b0edabb3..78b1dfb2ff 100644 --- a/source/non_matching/mesh_classifier.cc +++ b/source/non_matching/mesh_classifier.cc @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/source/non_matching/quadrature_generator.cc b/source/non_matching/quadrature_generator.cc index f0863b0189..ff4b2f7f2e 100644 --- a/source/non_matching/quadrature_generator.cc +++ b/source/non_matching/quadrature_generator.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/data_out_dof_data.cc b/source/numerics/data_out_dof_data.cc index 79b9a37ec8..d562e41a79 100644 --- a/source/numerics/data_out_dof_data.cc +++ b/source/numerics/data_out_dof_data.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/data_out_dof_data_codim.cc b/source/numerics/data_out_dof_data_codim.cc index 2c0b422197..4ce957b433 100644 --- a/source/numerics/data_out_dof_data_codim.cc +++ b/source/numerics/data_out_dof_data_codim.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/data_out_dof_data_inst2.cc b/source/numerics/data_out_dof_data_inst2.cc index a2a1311d6a..3dbf96334b 100644 --- a/source/numerics/data_out_dof_data_inst2.cc +++ b/source/numerics/data_out_dof_data_inst2.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/derivative_approximation.cc b/source/numerics/derivative_approximation.cc index 565a9284a8..691489c76d 100644 --- a/source/numerics/derivative_approximation.cc +++ b/source/numerics/derivative_approximation.cc @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/dof_output_operator.cc b/source/numerics/dof_output_operator.cc index ad37af9768..d8de292af5 100644 --- a/source/numerics/dof_output_operator.cc +++ b/source/numerics/dof_output_operator.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index ef13297851..f8bb40ab6f 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/fe_field_function.cc b/source/numerics/fe_field_function.cc index 1498019454..c645cc8d85 100644 --- a/source/numerics/fe_field_function.cc +++ b/source/numerics/fe_field_function.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index cbb5f92005..6c553644fa 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/smoothness_estimator.cc b/source/numerics/smoothness_estimator.cc index 8b484ba01e..7f4b22076f 100644 --- a/source/numerics/smoothness_estimator.cc +++ b/source/numerics/smoothness_estimator.cc @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 74bffa4ec3..fd34a4a954 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/source/trilinos/nox.cc b/source/trilinos/nox.cc index fecae8af5d..910bdbee91 100644 --- a/source/trilinos/nox.cc +++ b/source/trilinos/nox.cc @@ -22,11 +22,13 @@ # include # include # include -# include # include # include +# include # include +# include # include +# include # include # include diff --git a/tests/lac/la_vector_accumulation_01.cc b/tests/lac/la_vector_accumulation_01.cc deleted file mode 100644 index 135b187a14..0000000000 --- a/tests/lac/la_vector_accumulation_01.cc +++ /dev/null @@ -1,63 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// check that the l2 norm is exactly the same for many runs on random vector -// size with random vector entries. this is to ensure that the result is -// reproducible also when parallel evaluation is done - -#include - -#include "../tests.h" - - - -template -void -check_norms() -{ - for (unsigned int test = 0; test < 20; ++test) - { - const unsigned int size = Testing::rand() % 100000; - LinearAlgebra::Vector vec(size); - for (unsigned int i = 0; i < size; ++i) - vec(i) = random_value(); - const typename LinearAlgebra::ReadWriteVector::real_type norm = - vec.l2_norm(); - for (unsigned int i = 0; i < 30; ++i) - AssertThrow(vec.l2_norm() == norm, ExcInternalError()); - - LinearAlgebra::Vector vec2(vec); - for (unsigned int i = 0; i < 10; ++i) - AssertThrow(vec2.l2_norm() == norm, ExcInternalError()); - } -} - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(2); - deallog.attach(logfile); - - check_norms(); - check_norms(); -#ifdef DEAL_II_WITH_COMPLEX_VALUES - check_norms>(); -#endif - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_accumulation_01.output b/tests/lac/la_vector_accumulation_01.output deleted file mode 100644 index 0fd8fc12f0..0000000000 --- a/tests/lac/la_vector_accumulation_01.output +++ /dev/null @@ -1,2 +0,0 @@ - -DEAL::OK diff --git a/tests/lac/la_vector_add_and_dot.cc b/tests/lac/la_vector_add_and_dot.cc deleted file mode 100644 index 15e89e09e0..0000000000 --- a/tests/lac/la_vector_add_and_dot.cc +++ /dev/null @@ -1,98 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2022 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// check that LinearAlgebra::Vector::add_and_dot works correctly - -#include - -#include - -#include "../tests.h" - - - -template -void -check() -{ - for (unsigned int test = 0; test < 5; ++test) - { - const unsigned int size = 17 + test * 1101; - LinearAlgebra::Vector v1(size), v2(size), v3(size), check(size); - // Check that the assignment works - v1 = 0.; - for (unsigned int i = 0; i < size; ++i) - { - v1[i] = 0.1 + 0.005 * i; - v2[i] = -5.2 + 0.18 * i; - v3[i] = numbers::PI + numbers::E / (1. + i); - } - check = v1; - const number factor = 0.01432; - - v1.add(factor, v2); - const number prod = v1 * v3; - const number prod_check = check.add_and_dot(factor, v2, v3); - if (test == 0 && std::is_same::value) - { - deallog << "Vector add reference: "; - for (unsigned int i = 0; i < size; ++i) - deallog << v1[i] << ' '; - deallog << std::endl; - deallog << "Vector check reference: "; - for (unsigned int i = 0; i < size; ++i) - deallog << check[i] << ' '; - deallog << std::endl; - - const number constant = 1.; - v1.add(constant); - deallog << "Vector add constant: "; - for (unsigned int i = 0; i < size; ++i) - deallog << v1[i] << ' '; - deallog << std::endl; - } - - deallog << "Add and dot is "; - if (std::abs(prod - prod_check) < - 4. * - std::abs( - std::numeric_limits< - typename numbers::NumberTraits::real_type>::epsilon()) * - std::sqrt(static_cast(size)) * size) - deallog << "correct" << std::endl; - else - deallog << "wrong; should be " << prod / static_cast(size) - << ", is " << prod_check / static_cast(size) - << std::endl; - } -} - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(10); - deallog.attach(logfile); - - check(); - check(); -#ifdef DEAL_II_WITH_COMPLEX_VALUES - check>(); -#endif - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_add_and_dot.with_complex_values=false.output b/tests/lac/la_vector_add_and_dot.with_complex_values=false.output deleted file mode 100644 index 00200f3fa0..0000000000 --- a/tests/lac/la_vector_add_and_dot.with_complex_values=false.output +++ /dev/null @@ -1,15 +0,0 @@ - -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Vector add reference: 0.0255360000 0.0331136000 0.0406912000 0.0482688000 0.0558464000 0.0634240000 0.0710016000 0.0785792000 0.0861568000 0.0937344000 0.1013120000 0.1088896000 0.1164672000 0.1240448000 0.1316224000 0.1392000000 0.1467776000 -DEAL::Vector check reference: 0.0255360000 0.0331136000 0.0406912000 0.0482688000 0.0558464000 0.0634240000 0.0710016000 0.0785792000 0.0861568000 0.0937344000 0.1013120000 0.1088896000 0.1164672000 0.1240448000 0.1316224000 0.1392000000 0.1467776000 -DEAL::Vector add constant: 1.0255360000 1.0331136000 1.0406912000 1.0482688000 1.0558464000 1.0634240000 1.0710016000 1.0785792000 1.0861568000 1.0937344000 1.1013120000 1.1088896000 1.1164672000 1.1240448000 1.1316224000 1.1392000000 1.1467776000 -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::OK diff --git a/tests/lac/la_vector_add_and_dot.with_complex_values=true.output b/tests/lac/la_vector_add_and_dot.with_complex_values=true.output deleted file mode 100644 index 8ae2aba758..0000000000 --- a/tests/lac/la_vector_add_and_dot.with_complex_values=true.output +++ /dev/null @@ -1,20 +0,0 @@ - -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Vector add reference: 0.0255360000 0.0331136000 0.0406912000 0.0482688000 0.0558464000 0.0634240000 0.0710016000 0.0785792000 0.0861568000 0.0937344000 0.1013120000 0.1088896000 0.1164672000 0.1240448000 0.1316224000 0.1392000000 0.1467776000 -DEAL::Vector check reference: 0.0255360000 0.0331136000 0.0406912000 0.0482688000 0.0558464000 0.0634240000 0.0710016000 0.0785792000 0.0861568000 0.0937344000 0.1013120000 0.1088896000 0.1164672000 0.1240448000 0.1316224000 0.1392000000 0.1467776000 -DEAL::Vector add constant: 1.0255360000 1.0331136000 1.0406912000 1.0482688000 1.0558464000 1.0634240000 1.0710016000 1.0785792000 1.0861568000 1.0937344000 1.1013120000 1.1088896000 1.1164672000 1.1240448000 1.1316224000 1.1392000000 1.1467776000 -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::OK diff --git a/tests/lac/la_vector_add_and_dot_complex.cc b/tests/lac/la_vector_add_and_dot_complex.cc deleted file mode 100644 index f826c50cbe..0000000000 --- a/tests/lac/la_vector_add_and_dot_complex.cc +++ /dev/null @@ -1,88 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2021 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// check that LinearAlgebra::Vector::add_and_dot works correctly for -// complex-valued vectors - -#include - -#include - -#include "../tests.h" - - - -template -void -check() -{ - for (unsigned int test = 0; test < 5; ++test) - { - const unsigned int size = 17 + test * 1101; - LinearAlgebra::Vector> v1(size), v2(size), v3(size), - check(size); - for (unsigned int i = 0; i < size; ++i) - { - v1(i) = std::complex(0.1 + 0.005 * i, 1.234 + 12 * i); - v2(i) = std::complex(-5.2 + 0.18 * i, 42.4242 + 42 * i); - v3(i) = - std::complex(numbers::PI + numbers::E / (1. + i), 13.); - } - check = v1; - const std::complex factor = std::complex(0.01432); - - // do things by hand once - v1.add(factor, v2); - const std::complex prod = v1 * v3; - - // then do it a second time with the add_and_dot function - const std::complex prod_check = check.add_and_dot(factor, v2, v3); - if (test == 0 && std::is_same::value) - { - deallog << "Vector add reference: "; - v1.print(deallog.get_file_stream()); - deallog << std::endl; - deallog << "Vector check reference: "; - check.print(deallog.get_file_stream()); - deallog << std::endl; - } - - deallog << "Add and dot is "; - // check tolerance with respect to the expected size of result which is - // ~ size^2 including the roundoff error ~ sqrt(size) we expect - const number tolerance = 4. * std::numeric_limits::epsilon() * - std::sqrt(static_cast(size)) * size * - size; - if (std::abs(prod - prod_check) < tolerance) - deallog << "correct" << std::endl; - else - deallog << "wrong by " << std::abs(prod - prod_check) - << " with tolerance " << tolerance << "; should be " - << prod / static_cast(size) << ", is " - << prod_check / static_cast(size) << std::endl; - } -} - - -int -main() -{ - initlog(); - deallog << std::setprecision(8); - check(); - check(); - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_add_and_dot_complex.with_complex_values=on.output b/tests/lac/la_vector_add_and_dot_complex.with_complex_values=on.output deleted file mode 100644 index 4ce9557a2e..0000000000 --- a/tests/lac/la_vector_add_and_dot_complex.with_complex_values=on.output +++ /dev/null @@ -1,52 +0,0 @@ - -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -IndexSet: {[0,16]} - -[0]: (2.554e-02,1.842e+00) -[1]: (3.311e-02,1.444e+01) -[2]: (4.069e-02,2.704e+01) -[3]: (4.827e-02,3.965e+01) -[4]: (5.585e-02,5.225e+01) -[5]: (6.342e-02,6.485e+01) -[6]: (7.100e-02,7.745e+01) -[7]: (7.858e-02,9.005e+01) -[8]: (8.616e-02,1.027e+02) -[9]: (9.373e-02,1.153e+02) -[10]: (1.013e-01,1.279e+02) -[11]: (1.089e-01,1.405e+02) -[12]: (1.165e-01,1.531e+02) -[13]: (1.240e-01,1.657e+02) -[14]: (1.316e-01,1.783e+02) -[15]: (1.392e-01,1.909e+02) -[16]: (1.468e-01,2.035e+02) -DEAL::Vector add reference: -IndexSet: {[0,16]} - -[0]: (2.554e-02,1.842e+00) -[1]: (3.311e-02,1.444e+01) -[2]: (4.069e-02,2.704e+01) -[3]: (4.827e-02,3.965e+01) -[4]: (5.585e-02,5.225e+01) -[5]: (6.342e-02,6.485e+01) -[6]: (7.100e-02,7.745e+01) -[7]: (7.858e-02,9.005e+01) -[8]: (8.616e-02,1.027e+02) -[9]: (9.373e-02,1.153e+02) -[10]: (1.013e-01,1.279e+02) -[11]: (1.089e-01,1.405e+02) -[12]: (1.165e-01,1.531e+02) -[13]: (1.240e-01,1.657e+02) -[14]: (1.316e-01,1.783e+02) -[15]: (1.392e-01,1.909e+02) -[16]: (1.468e-01,2.035e+02) -DEAL::Vector check reference: -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::Add and dot is correct -DEAL::OK diff --git a/tests/lac/la_vector_all_zero.cc b/tests/lac/la_vector_all_zero.cc deleted file mode 100644 index 8493a3e530..0000000000 --- a/tests/lac/la_vector_all_zero.cc +++ /dev/null @@ -1,44 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2017 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -// Check the function all_zero - -#include - -#include "../tests.h" - - -template -void -check_all_zero() -{ - LinearAlgebra::Vector v(10); - - AssertThrow(v.all_zero() == true, ExcInternalError()); - - v[0] = 1.; - AssertThrow(v.all_zero() == false, ExcInternalError()); -} - -int -main() -{ - initlog(); - - check_all_zero(); - check_all_zero(); - - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_all_zero.output b/tests/lac/la_vector_all_zero.output deleted file mode 100644 index 0fd8fc12f0..0000000000 --- a/tests/lac/la_vector_all_zero.output +++ /dev/null @@ -1,2 +0,0 @@ - -DEAL::OK diff --git a/tests/lac/la_vector_large_numbers.cc b/tests/lac/la_vector_large_numbers.cc deleted file mode 100644 index 8f3fa318a9..0000000000 --- a/tests/lac/la_vector_large_numbers.cc +++ /dev/null @@ -1,81 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - - -#include - -#include - -#include "../tests.h" - - - -void -check_large_numbers() -{ - LinearAlgebra::Vector v(10); - v(0) = 1e13; - v(1) = 1e19; - v(2) = 1e21; - v(4) = 1.; - v(7) = 1e20; - - const double correct = std::sqrt(1e26 + 1e38 + 1e42 + 1e40 + 1.); - AssertThrow(std::abs(v.l2_norm() - correct) < 1e-6 * correct, - ExcInternalError()); - - for (unsigned int i = 0; i < v.size(); ++i) - v[i] = (float)0.; - v(5) = 1e-30; - v(9) = 1e-32; - const double correct2 = std::sqrt(1e-60 + 1e-64); - AssertThrow(std::abs(v.l2_norm() - correct2) < 1e-6 * correct2, - ExcInternalError()); - - LinearAlgebra::Vector w(7); - w(0) = 1e232; - w(6) = 1e231; - w(3) = 1e200; - const double correct3 = std::sqrt(100. + 1.) * 1e231; - AssertThrow(std::abs(w.l2_norm() - correct3) < 1e-13 * correct3, - ExcInternalError()); - - for (unsigned int i = 0; i < w.size(); ++i) - w[i] = (float)0.; - w(1) = 1e-302; - w(2) = 1e-303; - w(3) = 2e-303; - w(4) = 3e-303; - w(5) = -1e-303; - const double correct4 = std::sqrt(100. + 1. + 4. + 9 + 1.) * 1e-303; - AssertThrow(std::abs(w.l2_norm() - correct4) <= 1e-13 * correct4, - ExcInternalError()); - - deallog << "OK" << std::endl; -} - - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(2); - deallog.attach(logfile); - - check_large_numbers(); -} diff --git a/tests/lac/la_vector_large_numbers.output b/tests/lac/la_vector_large_numbers.output deleted file mode 100644 index 0fd8fc12f0..0000000000 --- a/tests/lac/la_vector_large_numbers.output +++ /dev/null @@ -1,2 +0,0 @@ - -DEAL::OK diff --git a/tests/lac/la_vector_norms.cc b/tests/lac/la_vector_norms.cc deleted file mode 100644 index de0e116b6c..0000000000 --- a/tests/lac/la_vector_norms.cc +++ /dev/null @@ -1,119 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2021 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// checks that the l1 and l2 norm are computed correctly for deal.II vectors -// (check the summation algorithm), including an accuracy test (should not -// lose more than 1 decimal also for 200000 vector entries) - -#include - -#include - -#include "../tests.h" - - - -template -void -check_norms() -{ - const number acc = 1e1 * std::numeric_limits::epsilon(); - unsigned int skip = 73; - for (unsigned int size = 1; size < 200000; size += skip) - { - // test correctness - if (size > 10000) - skip += 17; - LinearAlgebra::Vector vec(size); - for (unsigned int i = 0; i < size; ++i) - vec[i] = i + 1; - - const number l1_norm = vec.l1_norm(); - AssertThrow(std::abs(l1_norm - 0.5 * size * (size + 1)) < - acc * 0.5 * size * (size + 1), - ExcInternalError()); - - // test accuracy of summation - constexpr long double value = numbers::PI; - for (unsigned int i = 0; i < size; ++i) - vec[i] = (number)value; - const number l1_norma = vec.l1_norm(); - AssertThrow(std::abs(l1_norma - value * size) < acc * size * value, - ExcInternalError()); - const number l2_norma = vec.l2_norm(); - AssertThrow(std::abs(l2_norma - value * std::sqrt((number)size)) < - acc * std::sqrt(size) * value, - ExcInternalError()); - } -} - - -template -void -check_complex_norms() -{ - const number acc = 1e2 * std::numeric_limits::epsilon(); - unsigned int skip = 73; - for (unsigned int size = 1; size < 100000; size += skip) - { - // test correctness - if (size > 10000) - skip += 17; - LinearAlgebra::Vector> vec(size); - long double sum = 0.; - for (unsigned int i = 0; i < size; ++i) - { - vec(i) = std::complex(i + 1, i + 2); - sum += std::sqrt((long double)(i + 1) * (i + 1) + - (long double)(i + 2) * (i + 2)); - } - - const number l1_norm = vec.l1_norm(); - AssertThrow(std::abs(l1_norm - sum) < acc * sum, ExcInternalError()); - - // test accuracy of summation - constexpr std::complex value(numbers::PI, 0.1); - for (unsigned int i = 0; i < size; ++i) - vec[i] = std::complex(value); - const number l1_norma = vec.l1_norm(); - AssertThrow(std::abs(l1_norma - std::abs(value) * size) < - acc * size * std::abs(value), - ExcInternalError()); - const number l2_norma = vec.l2_norm(); - AssertThrow(std::abs(l2_norma - - std::abs(value) * std::sqrt((number)size)) < - acc * std::sqrt((number)size) * std::abs(value), - ExcInternalError()); - } -} - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(2); - deallog.attach(logfile); - - check_norms(); - check_norms(); -#ifdef DEAL_II_WITH_COMPLEX_VALUES - check_complex_norms(); - check_complex_norms(); -#endif - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_norms.output b/tests/lac/la_vector_norms.output deleted file mode 100644 index 0fd8fc12f0..0000000000 --- a/tests/lac/la_vector_norms.output +++ /dev/null @@ -1,2 +0,0 @@ - -DEAL::OK diff --git a/tests/lac/la_vector_output.cc b/tests/lac/la_vector_output.cc deleted file mode 100644 index 652b1acf09..0000000000 --- a/tests/lac/la_vector_output.cc +++ /dev/null @@ -1,90 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2012 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -#include - -#include -#include - -#include - -#include "../tests.h" - - -void -test() -{ - const char * filename = "test.txt"; - const unsigned int size(10); - LinearAlgebra::Vector vec(size); - for (unsigned int i = 0; i < size; ++i) - vec[i] = i; - - // Check block_write and block_read - std::ofstream file_out(filename); - // Write the vector in the file - vec.block_write(file_out); - file_out.close(); - // Clear the vector - vec.reinit(0); - // Load the vector form the file - std::ifstream file_in(filename); - vec.block_read(file_in); - file_in.close(); - // Check the vector - double eps = 1e-12; - for (unsigned int i = 0; i < size; ++i) - AssertThrow( - std::abs(vec[i] - (double)i) < eps, - ExcMessage( - "Value in the vector has been changed by block_write or block_read")); - - - // save data to archive - { - std::ofstream file_out2(filename); - boost::archive::text_oarchive oa(file_out2); - oa << vec; - // archive and stream closed when destructors are called - } - - // Clear the vector - vec.reinit(0); - { - std::ifstream file_in2(filename); - boost::archive::text_iarchive ia(file_in2); - ia >> vec; - } - // Check the vector - for (unsigned int i = 0; i < size; ++i) - AssertThrow(std::abs(vec[i] - (double)i) < eps, - ExcMessage( - "Value in the vector has been changed by boost archive")); -} - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(2); - deallog.attach(logfile); - - test(); - - deallog << "OK" << std::endl; -} diff --git a/tests/lac/la_vector_output.output b/tests/lac/la_vector_output.output deleted file mode 100644 index 0fd8fc12f0..0000000000 --- a/tests/lac/la_vector_output.output +++ /dev/null @@ -1,2 +0,0 @@ - -DEAL::OK diff --git a/tests/lac/la_vector_print.cc b/tests/lac/la_vector_print.cc deleted file mode 100644 index 0062327f3a..0000000000 --- a/tests/lac/la_vector_print.cc +++ /dev/null @@ -1,44 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2019 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// Check that print_as_numpy_array works - -#include - -#include "../tests.h" - - -template -void -print_vector() -{ - const unsigned int size = 20; - LinearAlgebra::Vector vec(size); - for (unsigned int i = 0; i < size; ++i) - vec(i) = static_cast(i); - - vec.print_as_numpy_array(deallog.get_file_stream()); -} - - -int -main() -{ - initlog(); - - print_vector(); - print_vector(); -} diff --git a/tests/lac/la_vector_print.output b/tests/lac/la_vector_print.output deleted file mode 100644 index 8468fc46eb..0000000000 --- a/tests/lac/la_vector_print.output +++ /dev/null @@ -1,3 +0,0 @@ - -0.00000000 1.00000000 2.00000000 3.00000000 4.00000000 5.00000000 6.00000000 7.00000000 8.00000000 9.00000000 10.0000000 11.0000000 12.0000000 13.0000000 14.0000000 15.0000000 16.0000000 17.0000000 18.0000000 19.0000000 -0.00000000 1.00000000 2.00000000 3.00000000 4.00000000 5.00000000 6.00000000 7.00000000 8.00000000 9.00000000 10.0000000 11.0000000 12.0000000 13.0000000 14.0000000 15.0000000 16.0000000 17.0000000 18.0000000 19.0000000 diff --git a/tests/lac/la_vector_vector.cc b/tests/lac/la_vector_vector.cc deleted file mode 100644 index 00306a9ddf..0000000000 --- a/tests/lac/la_vector_vector.cc +++ /dev/null @@ -1,153 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 1998 - 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - - -#include - -#include "../tests.h" - - - -const unsigned int N = 10; -unsigned int check_point = 0; - - - -template -void -print(const LinearAlgebra::Vector &v) -{ - for (unsigned int i = 0; i < v.size(); ++i) - deallog << v(i) << '\t'; - deallog << std::endl; -} - - - -template -void -check_vectors(LinearAlgebra::Vector &d1, - LinearAlgebra::Vector &d2) -{ - deallog << "Fill & Swap" << std::endl; - LinearAlgebra::Vector d3(d1.size()); - print(d3); - - for (unsigned int i = 0; i < N; ++i) - { - d1(i) = 2. * i; - d2(i) = .5 * d1(i) * d1(i); - d3(i) = 2. - .5 * i; - }; - - print(d1); - print(d2); - print(d3); - - swap(d1, d2); - print(d1); - - d1 = d2; - print(d1); - - for (unsigned int i = 0; i < N; ++i) - d1[i] = 2.5; - print(d1); - - // initialize with iterators - number1 array[] = {0.0, 1.1, 2.2, 3.3}; - LinearAlgebra::Vector d4(&array[0], &array[4]); - print(d4); - - deallog << "Extract number" << std::endl; - // Each line should contain two equal numbers - double sum = 0.; - for (unsigned int i = 0; i < N; ++i) - sum += 4. * i - i * i; - deallog << d3 * d2 << '\t' << sum << std::endl; - - sum = 0.; - for (unsigned int i = 0; i < N; ++i) - sum += 4. * i * i; - sum = std::sqrt(sum); - deallog << d2.l2_norm() << '\t' << sum << std::endl; - - sum = 0.; - for (unsigned int i = 0; i < N; ++i) - sum += std::fabs(2. - .5 * i); - deallog << d3.l1_norm() << '\t' << sum << std::endl; - - sum = 0.; - for (unsigned int i = 0; i < N; ++i) - { - double t = std::fabs(2. - .5 * i); - if (t > sum) - sum = t; - } - deallog << d3.linfty_norm() << '\t' << sum << std::endl; - - deallog << "add & sub" << std::endl; - - d1 += d2; - print(d1); - - d2 -= d1; - print(d2); - - d1.add(2, d3); - print(d1); - - d1.add(2., d2, .5, d3); - print(d1); - - deallog << "sadd & scale" << std::endl; - - d2.sadd(2., 1., d1); - print(d2); - - d2.sadd(2., .5, d1); - print(d2); - - d1 *= 4.; - print(d1); - - deallog << "equ" << std::endl; - - d2.equ(.25, d1); - print(d2); -} - - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(2); - deallog.attach(logfile); - - LinearAlgebra::Vector d1(N), d2(N); - LinearAlgebra::Vector f1(N), f2(N); - - // cross-tests with double/float - // vectors at the same time are not - // supported at present, - // unfortunately, as many functions - // don't accept other data types as - // arguments - check_vectors(d1, d2); - check_vectors(f1, f2); -} diff --git a/tests/lac/la_vector_vector.output b/tests/lac/la_vector_vector.output deleted file mode 100644 index 201372ce00..0000000000 --- a/tests/lac/la_vector_vector.output +++ /dev/null @@ -1,51 +0,0 @@ - -DEAL::Fill & Swap -DEAL::0 0 0 0 0 0 0 0 0 0 -DEAL::0 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::0 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::2.00 1.50 1.00 0.50 0 -0.50 -1.00 -1.50 -2.00 -2.50 -DEAL::0 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::0 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 -DEAL::0 1.10 2.20 3.30 -DEAL::Extract number -DEAL::-105.00 -105.00 -DEAL::33.76 33.76 -DEAL::12.50 12.50 -DEAL::2.50 2.50 -DEAL::add & sub -DEAL::2.50 4.50 6.50 8.50 10.50 12.50 14.50 16.50 18.50 20.50 -DEAL::-2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -DEAL::6.50 7.50 8.50 9.50 10.50 11.50 12.50 13.50 14.50 15.50 -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -DEAL::sadd & scale -DEAL::-2.50 -1.75 -1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 -DEAL::-3.75 -1.88 0 1.88 3.75 5.62 7.50 9.38 11.25 13.12 -DEAL::10.00 13.00 16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 -DEAL::equ -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -DEAL::Fill & Swap -DEAL::0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::0.00 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::2.00 1.50 1.00 0.50 0.00 -0.50 -1.00 -1.50 -2.00 -2.50 -DEAL::0.00 2.00 8.00 18.00 32.00 50.00 72.00 98.00 128.00 162.00 -DEAL::0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 -DEAL::2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 2.50 -DEAL::0.00 1.10 2.20 3.30 -DEAL::Extract number -DEAL::-105.00 -105.00 -DEAL::33.76 33.76 -DEAL::12.50 12.50 -DEAL::2.50 2.50 -DEAL::add & sub -DEAL::2.50 4.50 6.50 8.50 10.50 12.50 14.50 16.50 18.50 20.50 -DEAL::-2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -2.50 -DEAL::6.50 7.50 8.50 9.50 10.50 11.50 12.50 13.50 14.50 15.50 -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 -DEAL::sadd & scale -DEAL::-2.50 -1.75 -1.00 -0.25 0.50 1.25 2.00 2.75 3.50 4.25 -DEAL::-3.75 -1.88 0.00 1.88 3.75 5.62 7.50 9.38 11.25 13.12 -DEAL::10.00 13.00 16.00 19.00 22.00 25.00 28.00 31.00 34.00 37.00 -DEAL::equ -DEAL::2.50 3.25 4.00 4.75 5.50 6.25 7.00 7.75 8.50 9.25 diff --git a/tests/lac/vector_type_traits_is_serial_01.cc b/tests/lac/vector_type_traits_is_serial_01.cc index e620f34e55..6b32239a05 100644 --- a/tests/lac/vector_type_traits_is_serial_01.cc +++ b/tests/lac/vector_type_traits_is_serial_01.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "../tests.h" @@ -59,25 +58,6 @@ test() deallog << "OK" << std::endl << std::endl; - // make sure that is_serial_vector< dealii::LinearAlgebra::Vector > is - // working - Assert(is_serial_vector>::value == true, - ExcInternalError()); - - deallog << is_serial_vector>::value - << std::endl; - deallog << is_serial_vector>::value - << std::endl; - - deallog << is_serial_vector< - dealii::LinearAlgebra::Vector>>::value - << std::endl; - deallog << is_serial_vector< - dealii::LinearAlgebra::Vector>>::value - << std::endl; - - deallog << "OK" << std::endl << std::endl; - // make sure that dealii::LinearAlgebra::distributed::Vector > is // working Assert(is_serial_vector< diff --git a/tests/lac/vector_type_traits_is_serial_01.output b/tests/lac/vector_type_traits_is_serial_01.output index 9aaeb307e4..7af8a43f96 100644 --- a/tests/lac/vector_type_traits_is_serial_01.output +++ b/tests/lac/vector_type_traits_is_serial_01.output @@ -13,12 +13,6 @@ DEAL::1 DEAL::1 DEAL::OK DEAL:: -DEAL::1 -DEAL::1 -DEAL::1 -DEAL::1 -DEAL::OK -DEAL:: DEAL::0 DEAL::0 DEAL::0 diff --git a/tests/matrix_free/fe_evaluation_renumbered.cc b/tests/matrix_free/fe_evaluation_renumbered.cc index ea35366c19..902e540fff 100644 --- a/tests/matrix_free/fe_evaluation_renumbered.cc +++ b/tests/matrix_free/fe_evaluation_renumbered.cc @@ -22,8 +22,6 @@ #include -#include - #include #include @@ -59,7 +57,7 @@ test(const unsigned int n_refinements, const unsigned int geometry_type) { using VectorizedArrayType = VectorizedArray; - using VectorType = LinearAlgebra::Vector; + using VectorType = Vector; Triangulation tria; diff --git a/tests/mpi/local_size.cc b/tests/mpi/local_size.cc index 5606b61b39..aa0ba12f4c 100644 --- a/tests/mpi/local_size.cc +++ b/tests/mpi/local_size.cc @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -151,7 +150,6 @@ main(int argc, char *argv[]) // non-block vectors: check_serial>(); - check_serial>(); check_unghosted_parallel(); check_unghosted_parallel>(); diff --git a/tests/mpi/local_size.with_trilinos_with_tpetra=on.with_petsc=on.mpirun=4.output b/tests/mpi/local_size.with_trilinos_with_tpetra=on.with_petsc=on.mpirun=4.output index 91e505e0aa..0c169bf235 100644 --- a/tests/mpi/local_size.with_trilinos_with_tpetra=on.with_petsc=on.mpirun=4.output +++ b/tests/mpi/local_size.with_trilinos_with_tpetra=on.with_petsc=on.mpirun=4.output @@ -2,9 +2,6 @@ DEAL:0::type: dealii::Vector DEAL:0::local size: 4 DEAL:0::size: 4 -DEAL:0::type: dealii::LinearAlgebra::Vector -DEAL:0::local size: 4 -DEAL:0::size: 4 DEAL:0::type: dealii::LinearAlgebra::EpetraWrappers::Vector DEAL:0::index set size: 4 DEAL:0::local size: 4 @@ -38,9 +35,6 @@ DEAL:0::size: 32 DEAL:1::type: dealii::Vector DEAL:1::local size: 4 DEAL:1::size: 4 -DEAL:1::type: dealii::LinearAlgebra::Vector -DEAL:1::local size: 4 -DEAL:1::size: 4 DEAL:1::type: dealii::LinearAlgebra::EpetraWrappers::Vector DEAL:1::index set size: 4 DEAL:1::local size: 4 @@ -75,9 +69,6 @@ DEAL:1::size: 32 DEAL:2::type: dealii::Vector DEAL:2::local size: 4 DEAL:2::size: 4 -DEAL:2::type: dealii::LinearAlgebra::Vector -DEAL:2::local size: 4 -DEAL:2::size: 4 DEAL:2::type: dealii::LinearAlgebra::EpetraWrappers::Vector DEAL:2::index set size: 4 DEAL:2::local size: 4 @@ -112,9 +103,6 @@ DEAL:2::size: 32 DEAL:3::type: dealii::Vector DEAL:3::local size: 4 DEAL:3::size: 4 -DEAL:3::type: dealii::LinearAlgebra::Vector -DEAL:3::local size: 4 -DEAL:3::size: 4 DEAL:3::type: dealii::LinearAlgebra::EpetraWrappers::Vector DEAL:3::index set size: 4 DEAL:3::local size: 4 diff --git a/tests/numerics/subtract_mean_value_01.cc b/tests/numerics/subtract_mean_value_01.cc index ac92f0c703..9a32c328fa 100644 --- a/tests/numerics/subtract_mean_value_01.cc +++ b/tests/numerics/subtract_mean_value_01.cc @@ -18,7 +18,6 @@ // check VectorTools::subtract_mean_value() for deal.II serial vectors #include -#include #include #include @@ -75,16 +74,6 @@ main() BlockVector v(std::vector(1, 10)); test(v); } - - { - LinearAlgebra::Vector v(10); - test(v); - } - - { - LinearAlgebra::Vector v(10); - test(v); - } } catch (const std::exception &exc) { diff --git a/tests/numerics/subtract_mean_value_01.output b/tests/numerics/subtract_mean_value_01.output index 0aa61ff573..5f42bb230f 100644 --- a/tests/numerics/subtract_mean_value_01.output +++ b/tests/numerics/subtract_mean_value_01.output @@ -3,5 +3,3 @@ DEAL::OK DEAL::OK DEAL::OK DEAL::OK -DEAL::OK -DEAL::OK diff --git a/tests/remote_point_evaluation/mapping_01.cc b/tests/remote_point_evaluation/mapping_01.cc index 100bbdd553..9a65055679 100644 --- a/tests/remote_point_evaluation/mapping_01.cc +++ b/tests/remote_point_evaluation/mapping_01.cc @@ -25,8 +25,6 @@ #include #include -#include - #include #include "../tests.h" diff --git a/tests/remote_point_evaluation/mapping_02.cc b/tests/remote_point_evaluation/mapping_02.cc index d9f9b82f79..ea0b1bddaa 100644 --- a/tests/remote_point_evaluation/mapping_02.cc +++ b/tests/remote_point_evaluation/mapping_02.cc @@ -28,8 +28,6 @@ #include #include -#include - #include #include "../tests.h" diff --git a/tests/remote_point_evaluation/mapping_03.cc b/tests/remote_point_evaluation/mapping_03.cc index ee6c2865e7..589530a332 100644 --- a/tests/remote_point_evaluation/mapping_03.cc +++ b/tests/remote_point_evaluation/mapping_03.cc @@ -25,8 +25,6 @@ #include -#include - #include #include "../tests.h" diff --git a/tests/remote_point_evaluation/mapping_04.cc b/tests/remote_point_evaluation/mapping_04.cc index 3c99dc4b7b..f59431a2e5 100644 --- a/tests/remote_point_evaluation/mapping_04.cc +++ b/tests/remote_point_evaluation/mapping_04.cc @@ -25,8 +25,6 @@ #include -#include - #include #include "../tests.h" -- 2.39.5