From: Wolfgang Bangerth Date: Wed, 11 Sep 2024 22:45:04 +0000 (-0600) Subject: Rename the corresponding header file. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b14a3678948a0f1857888e499445f1c68ba009e;p=dealii.git Rename the corresponding header file. --- diff --git a/include/deal.II/algorithms/any_data.h b/include/deal.II/algorithms/any_data.h index 05a1409c02..a6680df6d9 100644 --- a/include/deal.II/algorithms/any_data.h +++ b/include/deal.II/algorithms/any_data.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/algorithms/general_data_storage.h b/include/deal.II/algorithms/general_data_storage.h index ac00548887..8cfda5419e 100644 --- a/include/deal.II/algorithms/general_data_storage.h +++ b/include/deal.II/algorithms/general_data_storage.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/algorithms/timestep_control.h b/include/deal.II/algorithms/timestep_control.h index 8cd5fbbdb6..2021095e3c 100644 --- a/include/deal.II/algorithms/timestep_control.h +++ b/include/deal.II/algorithms/timestep_control.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/base/enable_ref_counting_by_observer_pointer.h b/include/deal.II/base/enable_ref_counting_by_observer_pointer.h new file mode 100644 index 0000000000..38e19dc88c --- /dev/null +++ b/include/deal.II/base/enable_ref_counting_by_observer_pointer.h @@ -0,0 +1,334 @@ +// ------------------------------------------------------------------------ +// +// SPDX-License-Identifier: LGPL-2.1-or-later +// Copyright (C) 1998 - 2023 by the deal.II authors +// +// This file is part of the deal.II library. +// +// Part of the source code is dual licensed under Apache-2.0 WITH +// LLVM-exception OR LGPL-2.1-or-later. Detailed license information +// governing the source code and code contributions can be found in +// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. +// +// ------------------------------------------------------------------------ + +#ifndef dealii_enable_ref_counting_by_observer_h +#define dealii_enable_ref_counting_by_observer_h + + +#include + +#include + +#include +#include +#include +#include +#include +#include + +DEAL_II_NAMESPACE_OPEN + +/** + * Handling of subscriptions. + * + * This class, as a base class, allows to keep track of other objects using a + * specific object. It is used to avoid that pointers that point to an object of + * a class derived from EnableRefCountingByObserverPointer are referenced after + * that object has been invalidated. Here, invalidation is assumed to happen + * when the object is moved from or destroyed. The mechanism works as follows: + * The member function subscribe() accepts a pointer to a boolean that is + * modified on invalidation. The object that owns this pointer (usually an + * object of class type ObserverPointer) is then expected to check the state of + * the boolean before trying to access this class. + * + * The utility of this class is even enhanced by providing identifying strings + * to the functions subscribe() and unsubscribe(). These strings are represented + * as const char pointers since the underlying buffer comes from + * (and is managed by) the run-time type information system: more exactly, these + * pointers are the result the function call typeid(x).name() where + * x is some object. Therefore, the pointers provided to + * subscribe() and to unsubscribe() must be the same. Strings with equal + * contents will not be recognized to be the same. The handling in + * ObserverPointer will take care of this. + * The current subscribers to this class can be obtained by calling + * list_subscribers(). + * + * @ingroup memory + */ +class EnableRefCountingByObserverPointer +{ +public: + /** + * Constructor setting the counter to zero. + */ + EnableRefCountingByObserverPointer(); + + /** + * Copy-constructor. + * + * The counter of the copy is zero, since references point to the original + * object. + */ + EnableRefCountingByObserverPointer( + const EnableRefCountingByObserverPointer &); + + /** + * Move constructor. + * + * An object inheriting from EnableRefCountingByObserverPointer can only be + * moved if no other objects are subscribing to it. + */ + EnableRefCountingByObserverPointer( + EnableRefCountingByObserverPointer &&) noexcept; + + /** + * Destructor, asserting that the counter is zero. + */ + virtual ~EnableRefCountingByObserverPointer(); + + /** + * Assignment operator. + * + * This has to be handled with care, too, because the counter has to remain + * the same. It therefore does nothing more than returning *this. + */ + EnableRefCountingByObserverPointer & + operator=(const EnableRefCountingByObserverPointer &); + + /** + * Move assignment operator. Only invalidates the object moved from. + */ + EnableRefCountingByObserverPointer & + operator=(EnableRefCountingByObserverPointer &&) noexcept; + + /** + * @name EnableRefCountingByObserverPointer functionality + * + * Classes derived from EnableRefCountingByObserverPointer provide a facility + * to subscribe to this object. This is mostly used by the ObserverPointer + * class. + * @{ + */ + + /** + * Subscribes a user of the object by storing the pointer @p validity. The + * subscriber may be identified by text supplied as @p identifier. + */ + void + subscribe(std::atomic *const validity, + const std::string &identifier = "") const; + + /** + * Unsubscribes a user from the object. + * + * @note The @p identifier and the @p validity pointer must be the same as + * the one supplied to subscribe(). + */ + void + unsubscribe(std::atomic *const validity, + const std::string &identifier = "") const; + + /** + * Return the present number of subscriptions to this object. This allows to + * use this class for reference counted lifetime determination where the + * last one to unsubscribe also deletes the object. + */ + unsigned int + n_subscriptions() const; + + /** + * List the subscribers to the input @p stream. + */ + template + void + list_subscribers(StreamType &stream) const; + + /** + * List the subscribers to @p deallog. + */ + void + list_subscribers() const; + + /** @} */ + + /** + * @addtogroup Exceptions + * @{ + */ + + /** + * Exception: Object may not be deleted, since it is used. + */ + DeclException3(ExcInUse, + int, + std::string, + std::string, + << "Object of class " << arg2 << " is still used by " << arg1 + << " other objects." + << "\n\n" + << "(Additional information: " << arg3 << ")\n\n" + << "See the entry in the Frequently Asked Questions of " + << "deal.II (linked to from http://www.dealii.org/) for " + << "a lot more information on what this error means and " + << "how to fix programs in which it happens."); + + /** + * A subscriber with the identification string given to + * EnableRefCountingByObserverPointer::unsubscribe() did not subscribe to the + * object. + */ + DeclException2(ExcNoSubscriber, + std::string, + std::string, + << "No subscriber with identifier <" << arg2 + << "> subscribes to this object of class " << arg1 + << ". Consequently, it cannot be unsubscribed."); + /** @} */ + + /** + * Read or write the data of this object to or 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). + * + * This function does not actually serialize any of the member variables of + * this class. The reason is that what this class stores is only who + * subscribes to this object, but who does so at the time of storing the + * contents of this object does not necessarily have anything to do with who + * subscribes to the object when it is restored. Consequently, we do not + * want to overwrite the subscribers at the time of restoring, and then + * there is no reason to write the subscribers out in the first place. + */ + template + void + serialize(Archive &ar, const unsigned int version); + +private: + /** + * Store the number of objects which subscribed to this object. Initially, + * this number is zero, and upon destruction it shall be zero again (i.e. + * all objects which subscribed should have unsubscribed again). + * + * The creator (and owner) of an object is counted in the map below if HE + * manages to supply identification. + * + * We use the mutable keyword in order to allow subscription to + * constant objects also. + * + * This counter may be read from and written to concurrently in + * multithreaded code: hence we use the std::atomic class + * template. + */ + mutable std::atomic counter; + + /** + * In this map, we count subscriptions for each different identification + * string supplied to subscribe(). + */ + mutable std::map counter_map; + + /** + * The data type used in #counter_map. + */ + using map_value_type = decltype(counter_map)::value_type; + + /** + * The iterator type used in #counter_map. + */ + using map_iterator = decltype(counter_map)::iterator; + + /** + * In this vector, we store pointers to the validity bool in the + * ObserverPointer objects that subscribe to this class. + */ + mutable std::vector *> validity_pointers; + + /** + * Pointer to the typeinfo object of this object, from which we can later + * deduce the class name. Since this information on the derived class is + * neither available in the destructor, nor in the constructor, we obtain it + * in between and store it here. + */ + mutable const std::type_info *object_info; + + /** + * Check that there are no objects subscribing to this object. If this check + * passes then it is safe to destroy the current object. It this check fails + * then this function will either abort or print an error message to deallog + * (by using the AssertNothrow mechanism), but will not throw an exception. + * + * @note Since this function is just a consistency check it does nothing in + * release mode. + * + * @note If this function is called when there is an uncaught exception + * then, rather than aborting, this function prints an error message to the + * standard error stream and returns. + */ + void + check_no_subscribers() const noexcept; + + /** + * A mutex used to ensure data consistency when accessing the `mutable` + * members of this class. This lock is used in the subscribe() and + * unsubscribe() functions, as well as in `list_subscribers()`. + */ + static std::mutex mutex; +}; + +//--------------------------------------------------------------------------- + +inline EnableRefCountingByObserverPointer::EnableRefCountingByObserverPointer() + : counter(0) + , object_info(nullptr) +{} + + + +inline EnableRefCountingByObserverPointer::EnableRefCountingByObserverPointer( + const EnableRefCountingByObserverPointer &) + : counter(0) + , object_info(nullptr) +{} + + + +inline EnableRefCountingByObserverPointer & +EnableRefCountingByObserverPointer::operator=( + const EnableRefCountingByObserverPointer &s) +{ + object_info = s.object_info; + return *this; +} + + + +inline unsigned int +EnableRefCountingByObserverPointer::n_subscriptions() const +{ + return counter; +} + + + +template +inline void +EnableRefCountingByObserverPointer::serialize(Archive &, const unsigned int) +{ + // do nothing, as explained in the + // documentation of this function +} + +template +inline void +EnableRefCountingByObserverPointer::list_subscribers(StreamType &stream) const +{ + std::lock_guard lock(mutex); + + for (const auto &it : counter_map) + stream << it.second << '/' << counter << " subscriptions from \"" + << it.first << '\"' << std::endl; +} + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/include/deal.II/base/function.h b/include/deal.II/base/function.h index 7ee925649a..5cafbaa951 100644 --- a/include/deal.II/base/function.h +++ b/include/deal.II/base/function.h @@ -18,10 +18,10 @@ #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/base/logstream.h b/include/deal.II/base/logstream.h index 69c77f1e53..b80dae2822 100644 --- a/include/deal.II/base/logstream.h +++ b/include/deal.II/base/logstream.h @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/base/mg_level_object.h b/include/deal.II/base/mg_level_object.h index 356ab00922..6a76af25e7 100644 --- a/include/deal.II/base/mg_level_object.h +++ b/include/deal.II/base/mg_level_object.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/include/deal.II/base/observer_pointer.h b/include/deal.II/base/observer_pointer.h index 9cf0290d58..4ed8c8fa73 100644 --- a/include/deal.II/base/observer_pointer.h +++ b/include/deal.II/base/observer_pointer.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index c373a702b5..2bdf932c80 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index 4ccb8de0a7..228b6e237a 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/base/polynomial.h b/include/deal.II/base/polynomial.h index 58464995b9..dcbfd148b6 100644 --- a/include/deal.II/base/polynomial.h +++ b/include/deal.II/base/polynomial.h @@ -19,9 +19,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/base/polynomials_hermite.h b/include/deal.II/base/polynomials_hermite.h index 08733aa816..bdf36583be 100644 --- a/include/deal.II/base/polynomials_hermite.h +++ b/include/deal.II/base/polynomials_hermite.h @@ -19,10 +19,10 @@ #include +#include #include #include #include -#include #include diff --git a/include/deal.II/base/polynomials_piecewise.h b/include/deal.II/base/polynomials_piecewise.h index 828d53b0ac..ea7a4ca633 100644 --- a/include/deal.II/base/polynomials_piecewise.h +++ b/include/deal.II/base/polynomials_piecewise.h @@ -19,10 +19,10 @@ #include +#include #include #include #include -#include #include diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 470153ac11..a5343b7cfa 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -19,8 +19,8 @@ #include #include +#include #include -#include #include #include diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index 1a93dcaa24..97ed456a92 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/base/symbolic_function.h b/include/deal.II/base/symbolic_function.h index f5034da938..b4d42f6bbb 100644 --- a/include/deal.II/base/symbolic_function.h +++ b/include/deal.II/base/symbolic_function.h @@ -17,10 +17,10 @@ #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 5336ec6e30..4aa281b424 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -18,10 +18,10 @@ #include #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/base/tensor_function.h b/include/deal.II/base/tensor_function.h index 3e4dfda8e6..63d1f68db4 100644 --- a/include/deal.II/base/tensor_function.h +++ b/include/deal.II/base/tensor_function.h @@ -18,12 +18,12 @@ #include +#include #include #include #include #include #include -#include #include diff --git a/include/deal.II/distributed/shared_tria.h b/include/deal.II/distributed/shared_tria.h index 0e5c040063..b33ea27ab7 100644 --- a/include/deal.II/distributed/shared_tria.h +++ b/include/deal.II/distributed/shared_tria.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index 854b2be01a..59b47fa1d9 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/distributed/tria_base.h b/include/deal.II/distributed/tria_base.h index 63cd62f9d2..238fdb0a8e 100644 --- a/include/deal.II/distributed/tria_base.h +++ b/include/deal.II/distributed/tria_base.h @@ -18,10 +18,10 @@ #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/dofs/block_info.h b/include/deal.II/dofs/block_info.h index 27c598712b..ba6f869921 100644 --- a/include/deal.II/dofs/block_info.h +++ b/include/deal.II/dofs/block_info.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/fe/fe_coupling_values.h b/include/deal.II/fe/fe_coupling_values.h index 6336361d55..53520d5980 100644 --- a/include/deal.II/fe/fe_coupling_values.h +++ b/include/deal.II/fe/fe_coupling_values.h @@ -20,8 +20,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/fe/fe_series.h b/include/deal.II/fe/fe_series.h index 9502429dcc..d6e407123b 100644 --- a/include/deal.II/fe/fe_series.h +++ b/include/deal.II/fe/fe_series.h @@ -19,8 +19,8 @@ #include +#include #include -#include #include #include #include diff --git a/include/deal.II/fe/fe_tools.h b/include/deal.II/fe/fe_tools.h index 86722d9f86..c1c99d6b1a 100644 --- a/include/deal.II/fe/fe_tools.h +++ b/include/deal.II/fe/fe_tools.h @@ -19,9 +19,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 7a4829b9d3..9a77d94f3a 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -19,11 +19,11 @@ #include #include +#include #include #include #include #include -#include #include #include diff --git a/include/deal.II/fe/fe_values_base.h b/include/deal.II/fe/fe_values_base.h index d62f9b3834..81f57f762b 100644 --- a/include/deal.II/fe/fe_values_base.h +++ b/include/deal.II/fe/fe_values_base.h @@ -19,11 +19,11 @@ #include #include +#include #include #include #include #include -#include #include #include diff --git a/include/deal.II/grid/composition_manifold.h b/include/deal.II/grid/composition_manifold.h index e32943e07d..e20427a68f 100644 --- a/include/deal.II/grid/composition_manifold.h +++ b/include/deal.II/grid/composition_manifold.h @@ -21,9 +21,9 @@ #include #include +#include #include #include -#include #include #include diff --git a/include/deal.II/grid/grid_tools_cache.h b/include/deal.II/grid/grid_tools_cache.h index 76601ae89a..c3ee8e0a47 100644 --- a/include/deal.II/grid/grid_tools_cache.h +++ b/include/deal.II/grid/grid_tools_cache.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include diff --git a/include/deal.II/grid/manifold.h b/include/deal.II/grid/manifold.h index e4ef3851a0..68a519715b 100644 --- a/include/deal.II/grid/manifold.h +++ b/include/deal.II/grid/manifold.h @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include diff --git a/include/deal.II/grid/tensor_product_manifold.h b/include/deal.II/grid/tensor_product_manifold.h index 033912c678..eb08d7e58e 100644 --- a/include/deal.II/grid/tensor_product_manifold.h +++ b/include/deal.II/grid/tensor_product_manifold.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index be1d29e246..c2ad135c40 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -18,12 +18,12 @@ #include +#include #include #include #include #include #include -#include #include #include diff --git a/include/deal.II/hp/collection.h b/include/deal.II/hp/collection.h index ecf5960c89..fcd1cb939b 100644 --- a/include/deal.II/hp/collection.h +++ b/include/deal.II/hp/collection.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/hp/mapping_collection.h b/include/deal.II/hp/mapping_collection.h index c62852a589..67d853ec10 100644 --- a/include/deal.II/hp/mapping_collection.h +++ b/include/deal.II/hp/mapping_collection.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/include/deal.II/hp/q_collection.h b/include/deal.II/hp/q_collection.h index 5f0fa855c3..f4c5c01a0d 100644 --- a/include/deal.II/hp/q_collection.h +++ b/include/deal.II/hp/q_collection.h @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index 1c01e178b4..4a2f6614be 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include #include #include diff --git a/include/deal.II/lac/block_indices.h b/include/deal.II/lac/block_indices.h index 59903b54e9..6eae92a4d1 100644 --- a/include/deal.II/lac/block_indices.h +++ b/include/deal.II/lac/block_indices.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/block_sparse_matrix_ez.h b/include/deal.II/lac/block_sparse_matrix_ez.h index 90f5a0045d..d0be4a1d0d 100644 --- a/include/deal.II/lac/block_sparse_matrix_ez.h +++ b/include/deal.II/lac/block_sparse_matrix_ez.h @@ -23,9 +23,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/block_sparsity_pattern.h b/include/deal.II/lac/block_sparsity_pattern.h index 650c0312a9..55c6b37bb7 100644 --- a/include/deal.II/lac/block_sparsity_pattern.h +++ b/include/deal.II/lac/block_sparsity_pattern.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/block_vector_base.h b/include/deal.II/lac/block_vector_base.h index cc6a9eae3a..2e912f16eb 100644 --- a/include/deal.II/lac/block_vector_base.h +++ b/include/deal.II/lac/block_vector_base.h @@ -18,10 +18,10 @@ #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/lac/chunk_sparse_matrix.h b/include/deal.II/lac/chunk_sparse_matrix.h index 4fa5e1bbd9..6d8ab9cde1 100644 --- a/include/deal.II/lac/chunk_sparse_matrix.h +++ b/include/deal.II/lac/chunk_sparse_matrix.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/chunk_sparsity_pattern.h b/include/deal.II/lac/chunk_sparsity_pattern.h index 04398886da..6391260d64 100644 --- a/include/deal.II/lac/chunk_sparsity_pattern.h +++ b/include/deal.II/lac/chunk_sparsity_pattern.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/lac/dynamic_sparsity_pattern.h b/include/deal.II/lac/dynamic_sparsity_pattern.h index 5222b2954c..908ed30ff9 100644 --- a/include/deal.II/lac/dynamic_sparsity_pattern.h +++ b/include/deal.II/lac/dynamic_sparsity_pattern.h @@ -18,8 +18,8 @@ #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 4237eab256..1ad5ce9297 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -18,13 +18,13 @@ #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/include/deal.II/lac/petsc_matrix_base.h b/include/deal.II/lac/petsc_matrix_base.h index bc49ceb788..66bfed4e46 100644 --- a/include/deal.II/lac/petsc_matrix_base.h +++ b/include/deal.II/lac/petsc_matrix_base.h @@ -20,7 +20,7 @@ #ifdef DEAL_II_WITH_PETSC -# include +# include # include # include diff --git a/include/deal.II/lac/petsc_precondition.h b/include/deal.II/lac/petsc_precondition.h index 6869f16419..556e0caae3 100644 --- a/include/deal.II/lac/petsc_precondition.h +++ b/include/deal.II/lac/petsc_precondition.h @@ -18,8 +18,8 @@ #include +#include #include -#include #ifdef DEAL_II_WITH_PETSC diff --git a/include/deal.II/lac/petsc_vector.h b/include/deal.II/lac/petsc_vector.h index 6974d44a67..591f04b3ac 100644 --- a/include/deal.II/lac/petsc_vector.h +++ b/include/deal.II/lac/petsc_vector.h @@ -20,9 +20,9 @@ #ifdef DEAL_II_WITH_PETSC +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/petsc_vector_base.h b/include/deal.II/lac/petsc_vector_base.h index e94d47cdcd..1ecd48c048 100644 --- a/include/deal.II/lac/petsc_vector_base.h +++ b/include/deal.II/lac/petsc_vector_base.h @@ -20,8 +20,8 @@ #ifdef DEAL_II_WITH_PETSC +# include # include -# include # include # include diff --git a/include/deal.II/lac/precondition_block.h b/include/deal.II/lac/precondition_block.h index 045b3e0cba..6f00384432 100644 --- a/include/deal.II/lac/precondition_block.h +++ b/include/deal.II/lac/precondition_block.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include diff --git a/include/deal.II/lac/precondition_block_base.h b/include/deal.II/lac/precondition_block_base.h index b2f7095611..5e89816e72 100644 --- a/include/deal.II/lac/precondition_block_base.h +++ b/include/deal.II/lac/precondition_block_base.h @@ -18,11 +18,11 @@ #include +#include #include #include #include #include -#include #include #include diff --git a/include/deal.II/lac/precondition_selector.h b/include/deal.II/lac/precondition_selector.h index b172d731f4..ccb982aae2 100644 --- a/include/deal.II/lac/precondition_selector.h +++ b/include/deal.II/lac/precondition_selector.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index d43ae09a32..b49fbcc7e5 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -19,11 +19,11 @@ #include #include +#include #include #include #include #include -#include #include #include diff --git a/include/deal.II/lac/relaxation_block.h b/include/deal.II/lac/relaxation_block.h index 15c8d3262d..3be4b073c8 100644 --- a/include/deal.II/lac/relaxation_block.h +++ b/include/deal.II/lac/relaxation_block.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/solver.h b/include/deal.II/lac/solver.h index 6f06437025..21f8b7a7b3 100644 --- a/include/deal.II/lac/solver.h +++ b/include/deal.II/lac/solver.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/include/deal.II/lac/solver_bicgstab.h b/include/deal.II/lac/solver_bicgstab.h index fbfc74aef7..32093f9765 100644 --- a/include/deal.II/lac/solver_bicgstab.h +++ b/include/deal.II/lac/solver_bicgstab.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/solver_cg.h b/include/deal.II/lac/solver_cg.h index 9c2d48d8af..d92619dc7b 100644 --- a/include/deal.II/lac/solver_cg.h +++ b/include/deal.II/lac/solver_cg.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/solver_control.h b/include/deal.II/lac/solver_control.h index 847b7c7b40..79214b2277 100644 --- a/include/deal.II/lac/solver_control.h +++ b/include/deal.II/lac/solver_control.h @@ -18,7 +18,7 @@ #include -#include +#include #include diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 0d3632a729..f1d0e5a89f 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -19,8 +19,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/solver_idr.h b/include/deal.II/lac/solver_idr.h index 48698e6754..f6ce9af1c1 100644 --- a/include/deal.II/lac/solver_idr.h +++ b/include/deal.II/lac/solver_idr.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/solver_minres.h b/include/deal.II/lac/solver_minres.h index 0359e70e7c..2ae06d072d 100644 --- a/include/deal.II/lac/solver_minres.h +++ b/include/deal.II/lac/solver_minres.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/solver_qmrs.h b/include/deal.II/lac/solver_qmrs.h index 1eab3ca3e6..121ac0db2e 100644 --- a/include/deal.II/lac/solver_qmrs.h +++ b/include/deal.II/lac/solver_qmrs.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/solver_relaxation.h b/include/deal.II/lac/solver_relaxation.h index d4147f8d3b..20b2e33733 100644 --- a/include/deal.II/lac/solver_relaxation.h +++ b/include/deal.II/lac/solver_relaxation.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/sparse_direct.h b/include/deal.II/lac/sparse_direct.h index e962a21505..4ad3c80ce3 100644 --- a/include/deal.II/lac/sparse_direct.h +++ b/include/deal.II/lac/sparse_direct.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index 73b65537d5..91b230357a 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/lac/sparse_matrix_ez.h b/include/deal.II/lac/sparse_matrix_ez.h index b0a977f923..068a9ab940 100644 --- a/include/deal.II/lac/sparse_matrix_ez.h +++ b/include/deal.II/lac/sparse_matrix_ez.h @@ -18,8 +18,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/lac/sparsity_pattern.h b/include/deal.II/lac/sparsity_pattern.h index 4f5d405e18..251c6d9d35 100644 --- a/include/deal.II/lac/sparsity_pattern.h +++ b/include/deal.II/lac/sparsity_pattern.h @@ -19,9 +19,9 @@ #include #include +#include #include #include -#include #include diff --git a/include/deal.II/lac/sparsity_pattern_base.h b/include/deal.II/lac/sparsity_pattern_base.h index 28b8cf02df..aa4a73b182 100644 --- a/include/deal.II/lac/sparsity_pattern_base.h +++ b/include/deal.II/lac/sparsity_pattern_base.h @@ -19,8 +19,8 @@ #include #include +#include #include -#include #include diff --git a/include/deal.II/lac/tridiagonal_matrix.h b/include/deal.II/lac/tridiagonal_matrix.h index 1851a15da5..d52098f204 100644 --- a/include/deal.II/lac/tridiagonal_matrix.h +++ b/include/deal.II/lac/tridiagonal_matrix.h @@ -17,7 +17,7 @@ #include -#include +#include #include diff --git a/include/deal.II/lac/trilinos_epetra_vector.h b/include/deal.II/lac/trilinos_epetra_vector.h index 23a2e510e1..96991c9948 100644 --- a/include/deal.II/lac/trilinos_epetra_vector.h +++ b/include/deal.II/lac/trilinos_epetra_vector.h @@ -20,9 +20,9 @@ #ifdef DEAL_II_WITH_TRILINOS +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index a262b35651..a0e3f085bb 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -20,7 +20,7 @@ #ifdef DEAL_II_WITH_TRILINOS -# include +# include # include # include diff --git a/include/deal.II/lac/trilinos_sparse_matrix.h b/include/deal.II/lac/trilinos_sparse_matrix.h index 2b7454702e..d56ad06519 100644 --- a/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_sparse_matrix.h @@ -20,9 +20,9 @@ # ifdef DEAL_II_WITH_TRILINOS +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_sparsity_pattern.h b/include/deal.II/lac/trilinos_sparsity_pattern.h index 65bc3ad3cb..2809ad980e 100644 --- a/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -19,9 +19,9 @@ #ifdef DEAL_II_WITH_TRILINOS +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_tpetra_precondition.h b/include/deal.II/lac/trilinos_tpetra_precondition.h index 9e8544b942..af702dfd97 100644 --- a/include/deal.II/lac/trilinos_tpetra_precondition.h +++ b/include/deal.II/lac/trilinos_tpetra_precondition.h @@ -28,7 +28,7 @@ #ifdef DEAL_II_TRILINOS_WITH_TPETRA -# include +# include # include # include diff --git a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.h b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.h index d6f0c55dec..791138c572 100644 --- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.h @@ -19,8 +19,8 @@ #ifdef DEAL_II_TRILINOS_WITH_TPETRA +# include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_tpetra_sparsity_pattern.h b/include/deal.II/lac/trilinos_tpetra_sparsity_pattern.h index 7d6a4dcd10..18a84c1a86 100644 --- a/include/deal.II/lac/trilinos_tpetra_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_tpetra_sparsity_pattern.h @@ -23,9 +23,9 @@ #ifdef DEAL_II_TRILINOS_WITH_TPETRA +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_tpetra_vector.h b/include/deal.II/lac/trilinos_tpetra_vector.h index 8631a6f533..13d4c819e6 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.h @@ -24,9 +24,9 @@ #ifdef DEAL_II_TRILINOS_WITH_TPETRA +# include # include # include -# include # include # include diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index 0f092a0ef3..e38a07dd13 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -19,10 +19,10 @@ #include #ifdef DEAL_II_WITH_TRILINOS +# include # include # include # include -# include # include # include diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index 219dd68594..7ec3e32c07 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -19,10 +19,10 @@ #include #include +#include #include #include #include -#include #include #include diff --git a/include/deal.II/matrix_free/mapping_data_on_the_fly.h b/include/deal.II/matrix_free/mapping_data_on_the_fly.h index 3883d5bee2..54ef0833f5 100644 --- a/include/deal.II/matrix_free/mapping_data_on_the_fly.h +++ b/include/deal.II/matrix_free/mapping_data_on_the_fly.h @@ -20,8 +20,8 @@ #include #include +#include #include -#include #include #include diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 5991e00c44..e5b6d7fab3 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -19,8 +19,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/meshworker/local_integrator.h b/include/deal.II/meshworker/local_integrator.h index ed5fafe313..75c544944f 100644 --- a/include/deal.II/meshworker/local_integrator.h +++ b/include/deal.II/meshworker/local_integrator.h @@ -18,7 +18,7 @@ #include -#include +#include #include #include diff --git a/include/deal.II/multigrid/mg_base.h b/include/deal.II/multigrid/mg_base.h index d0b9c42989..711849aa46 100644 --- a/include/deal.II/multigrid/mg_base.h +++ b/include/deal.II/multigrid/mg_base.h @@ -22,8 +22,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index 9807712554..30e5c82851 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -17,8 +17,8 @@ #include +#include #include -#include #include diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index 89923df899..6a91501034 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include diff --git a/include/deal.II/non_matching/immersed_surface_quadrature.h b/include/deal.II/non_matching/immersed_surface_quadrature.h index 23229e0db8..4983f70765 100644 --- a/include/deal.II/non_matching/immersed_surface_quadrature.h +++ b/include/deal.II/non_matching/immersed_surface_quadrature.h @@ -17,9 +17,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/numerics/data_postprocessor.h b/include/deal.II/numerics/data_postprocessor.h index 2b1d4ce027..67270b9e7e 100644 --- a/include/deal.II/numerics/data_postprocessor.h +++ b/include/deal.II/numerics/data_postprocessor.h @@ -19,8 +19,8 @@ #include +#include #include -#include #include #include diff --git a/include/deal.II/numerics/time_dependent.h b/include/deal.II/numerics/time_dependent.h index 04fadcef15..ccab37a762 100644 --- a/include/deal.II/numerics/time_dependent.h +++ b/include/deal.II/numerics/time_dependent.h @@ -18,9 +18,9 @@ #include +#include #include #include -#include #include #include diff --git a/include/deal.II/particles/particle_handler.h b/include/deal.II/particles/particle_handler.h index 96aa1bd648..33ce0d3a64 100644 --- a/include/deal.II/particles/particle_handler.h +++ b/include/deal.II/particles/particle_handler.h @@ -19,9 +19,9 @@ #include #include +#include #include #include -#include #include diff --git a/source/base/subscriptor.cc b/source/base/subscriptor.cc index 18a03f9875..265ec521df 100644 --- a/source/base/subscriptor.cc +++ b/source/base/subscriptor.cc @@ -12,8 +12,8 @@ // // ------------------------------------------------------------------------ +#include #include -#include #include #include diff --git a/tests/base/assign_subscriptor.cc b/tests/base/assign_subscriptor.cc index 2643a4d089..994fe0b669 100644 --- a/tests/base/assign_subscriptor.cc +++ b/tests/base/assign_subscriptor.cc @@ -18,8 +18,8 @@ // pair for copy and move semantics. +#include #include -#include #include #include diff --git a/tests/base/reference.cc b/tests/base/reference.cc index 7b6644354d..36fde02d78 100644 --- a/tests/base/reference.cc +++ b/tests/base/reference.cc @@ -19,8 +19,8 @@ // other tests. +#include #include -#include #include #include diff --git a/tests/base/smart_pointer_01.cc b/tests/base/smart_pointer_01.cc index 0a368162b3..b57800ac1a 100644 --- a/tests/base/smart_pointer_01.cc +++ b/tests/base/smart_pointer_01.cc @@ -18,8 +18,8 @@ // std::any object. +#include #include -#include #include #include diff --git a/tests/base/smart_pointer_02.cc b/tests/base/smart_pointer_02.cc index b67da69023..377fdebf27 100644 --- a/tests/base/smart_pointer_02.cc +++ b/tests/base/smart_pointer_02.cc @@ -18,9 +18,9 @@ // available after the renaming to ObserverPointer. +#include #include #include -#include #include #include diff --git a/tests/base/unsubscribe_subscriptor.cc b/tests/base/unsubscribe_subscriptor.cc index 98dfd66046..46b319aa35 100644 --- a/tests/base/unsubscribe_subscriptor.cc +++ b/tests/base/unsubscribe_subscriptor.cc @@ -17,8 +17,8 @@ // check that unsubscribing with a wrong id is handled correctly +#include #include -#include #include #include diff --git a/tests/base/unsubscribe_subscriptor_01.cc b/tests/base/unsubscribe_subscriptor_01.cc index 2eb1eab55e..f122783f4b 100644 --- a/tests/base/unsubscribe_subscriptor_01.cc +++ b/tests/base/unsubscribe_subscriptor_01.cc @@ -19,8 +19,8 @@ // works as well +#include #include -#include #include #include