<code>.templates.h</code> files.
<li> Finally, if we can not assume in advance which values template arguments
-will take (e.g., any class derived from EnableRefCountingByObserverPointer can be used as an argument),
+will take (e.g., any class derived from EnableObserverPointer can be used as an argument),
the definitions of functions are provided at the bottom of the header
file with declarations. The definitions should be guarded with <code>\#ifndef
DOXYGEN ... \#endif</code> to prevent Doxygen from picking them up.</li>
* @defgroup memory Memory handling
*
* This group has some basic classes and namespaces for memory
- * handling. The EnableRefCountingByObserverPointer and ObserverPointer classes are used for
+ * handling. The EnableObserverPointer and ObserverPointer classes are used for
* counted memory handling, i.e. whenever a ObserverPointer is set to
* point to an object, it increases a counter in that object; when the
* pointer is set to point elsewhere, it decreases it again. This way,
// Based on the above description, the <code>SetUpBase</code> class then
// looks as follows. To allow using the <code>ObserverPointer</code> class
// with this class, we derived from the
- // <code>EnableRefCountingByObserverPointer</code> class.
+ // <code>EnableObserverPointer</code> class.
template <int dim>
- struct SetUpBase : public EnableRefCountingByObserverPointer
+ struct SetUpBase : public EnableObserverPointer
{
virtual const Function<dim> &get_boundary_values() const = 0;
// the right hand side, we only need to provide for a function that
// assembles the right hand side for a given discretization:
template <int dim>
- class DualFunctionalBase : public EnableRefCountingByObserverPointer
+ class DualFunctionalBase : public EnableObserverPointer
{
public:
virtual void assemble_rhs(const DoFHandler<dim> &dof_handler,
// maximum number of iterations equal to the maximum of the size of the linear
// system and 200.
template <class MatrixType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m)
- class SchurComplement : public EnableRefCountingByObserverPointer
+ class SchurComplement : public EnableObserverPointer
{
public:
SchurComplement(const BlockSparseMatrix<double> &A,
- class ApproximateSchurComplement : public EnableRefCountingByObserverPointer
+ class ApproximateSchurComplement : public EnableObserverPointer
{
public:
ApproximateSchurComplement(const BlockSparseMatrix<double> &A)
operations:
@code
template <class PreconditionerA, class PreconditionerMp>
-class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner (const BlockSparseMatrix<double> &S,
// <code>InverseMatrix</code> object is created. The member function
// <code>vmult</code> is obtained by solving a linear system:
template <class MatrixType, class PreconditionerType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m,
// a preconditioner class as above, which affects the
// <code>ObserverPointer</code> object <code>m_inverse</code> as well.
template <class PreconditionerType>
- class SchurComplement : public EnableRefCountingByObserverPointer
+ class SchurComplement : public EnableObserverPointer
{
public:
SchurComplement(
// <code>declare_parameters</code> that declares all the necessary
// parameters and a <code>read_parameters</code> function that is called
// from outside to initiate the parameter reading process.
- class ParameterReader : public EnableRefCountingByObserverPointer
+ class ParameterReader : public EnableObserverPointer
{
public:
ParameterReader(ParameterHandler &);
// we can abort the program preserving information about where the
// problem happened.
template <class MatrixType, class PreconditionerType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m,
// preconditioners in the constructor and that the matrices we use here
// are built upon Trilinos:
template <class PreconditionerTypeA, class PreconditionerTypeMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(
namespace LinearSolvers
{
template <class PreconditionerTypeA, class PreconditionerTypeMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(const TrilinosWrappers::BlockSparseMatrix &S,
// This is the constructor of the @p LaplaceOperator class. All it does is
// to call the default constructor of the base class
// MatrixFreeOperators::Base, which in turn is based on the
- // EnableRefCountingByObserverPointer class that asserts that this class is
+ // EnableObserverPointer class that asserts that this class is
// not accessed after going out of scope e.g. in a preconditioner.
template <int dim, int fe_degree, typename number>
LaplaceOperator<dim, fe_degree, number>::LaplaceOperator()
// It is important to update the sparsity patterns after <tt>clear()</tt>
// was called for the level matrices, since the matrices lock the sparsity
// pattern through the ObserverPointer and
- // EnableRefCountingByObserverPointer mechanism.
+ // EnableObserverPointer mechanism.
mg_sparsity.resize(0, n_levels - 1);
mg_sparsity_dg_interface.resize(0, n_levels - 1);
namespace LinearSolvers
{
template <class MatrixType, class PreconditionerType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m,
}
template <class PreconditionerTypeA, class PreconditionerTypeMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(
template <class MatrixType, class PreconditionerType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m,
// step-31 to convert a run-time exception into a failed assertion
// should the inner solver not converge.
template <class Matrix, class Preconditioner>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const Matrix &m, const Preconditioner &preconditioner);
// The class A template class for a simple block diagonal preconditioner
// for 2x2 matrices.
template <class PreconditionerA, class PreconditionerS>
- class BlockDiagonalPreconditioner
- : public EnableRefCountingByObserverPointer
+ class BlockDiagonalPreconditioner : public EnableObserverPointer
{
public:
BlockDiagonalPreconditioner(const PreconditionerA &preconditioner_A,
// Notice how we keep track of the sum of the inner iterations
// (preconditioner applications).
template <class PreconditionerAType, class PreconditionerSType>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(
// positive definite, we can use CG to solve the corresponding linear
// system.
template <class PreconditionerMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(double gamma,
// MatrixFreeOperators::Base because we want to present some additional
// features of MatrixFree::loop() that are not available in the
// general-purpose class MatrixFreeOperators::Base. We derive the class from
- // the EnableRefCountingByObserverPointer class to be able to use the operator
+ // the EnableObserverPointer class to be able to use the operator
// within the Chebyshev preconditioner because that preconditioner stores the
// underlying matrix via a ObserverPointer.
//
// step-39.
template <int dim, int fe_degree, typename number>
- class LaplaceOperator : public EnableRefCountingByObserverPointer
+ class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
// needs to have a `vmult()` function that performs the action of
// the linear operator on a source vector.
template <int dim, int fe_degree>
- class HelmholtzOperator : public EnableRefCountingByObserverPointer
+ class HelmholtzOperator : public EnableObserverPointer
{
public:
HelmholtzOperator(const DoFHandler<dim> &dof_handler,
// The constructor of the <code>JacobianOperator</code> just calls the
// constructor of the base class MatrixFreeOperators::Base, which is itself
- // derived from the EnableRefCountingByObserverPointer class.
+ // derived from the EnableObserverPointer class.
template <int dim, int fe_degree, typename number>
JacobianOperator<dim, fe_degree, number>::JacobianOperator()
: MatrixFreeOperators::Base<dim,
// from the point of view of a using object. Basically, the method is along
// the following line: all objects that are subject to such potentially
// dangerous pointers are derived from a class called
- // EnableRefCountingByObserverPointer. For example, the Triangulation,
+ // EnableObserverPointer. For example, the Triangulation,
// DoFHandler, and a base class of the FiniteElement class are derived from
- // EnableRefCountingByObserverPointer. This latter class does not offer much
+ // EnableObserverPointer. This latter class does not offer much
// functionality, but it has a built-in counter which we can subscribe to,
// thus the name of the class. Whenever we initialize a pointer to that
// object, we can increase its use counter, and when we move away our
// to tell the subscribing object about its invalidation.
//
// If an object of a class that is derived from the
- // EnableRefCountingByObserverPointer class is destroyed, it also has to
- // call the destructor of the EnableRefCountingByObserverPointer class. In
+ // EnableObserverPointer class is destroyed, it also has to
+ // call the destructor of the EnableObserverPointer class. In
// this destructor, we tell all the subscribing objects about the
// invalidation of the object using the stored pointers. The same happens
// when the object appears on the right hand side of a move expression,
// points. Here, we introduce an alias to FEEvaluation with the correct
// template parameters so that we do not have to worry about them later on.
template <int dim, typename number>
- class LaplaceOperator : public EnableRefCountingByObserverPointer
+ class LaplaceOperator : public EnableObserverPointer
{
public:
using VectorType = LinearAlgebra::distributed::Vector<number>;
variables, one would list them one after the other. The same is true
if a class has base classes. For example, here is the corresponding
function for the Quadrature class that stores quadrature points and
-weights, and is derived from the EnableRefCountingByObserverPointer base class:
+weights, and is derived from the EnableObserverPointer base class:
@code
template <int dim>
template <class Archive>
Quadrature<dim>::serialize(Archive &ar, const unsigned int)
{
// Forward to the (de)serialization function in the base class:
- ar & static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar & static_cast<EnableObserverPointer &>(*this);
// Then (de)serialize the member variables:
ar & quadrature_points & weights;
*
* @todo GK: Deprecate access to AnyData by index and change to a map.
*/
-class AnyData : public EnableRefCountingByObserverPointer
+class AnyData : public EnableObserverPointer
{
public:
/// Default constructor for empty object
*
* When using this class, please cite @cite SartoriGiulianiBardelloni-2018-a.
*/
-class GeneralDataStorage : public EnableRefCountingByObserverPointer
+class GeneralDataStorage : public EnableObserverPointer
{
public:
/**
* providing additional information and forwarded to the inner Operator
* objects of the nested iteration.
*/
- class OperatorBase : public EnableRefCountingByObserverPointer
+ class OperatorBase : public EnableObserverPointer
{
public:
/**
* in each step of an iteration.
*/
template <typename VectorType>
- class OutputOperator : public EnableRefCountingByObserverPointer
+ class OutputOperator : public EnableObserverPointer
{
public:
/**
* with a more modern interface and better programming guarantees. Consider
* using DiscreteTime instead of TimestepControl.
*/
- class TimestepControl : public EnableRefCountingByObserverPointer
+ class TimestepControl : public EnableObserverPointer
{
public:
/**
*
* 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
+ * a class derived from EnableObserverPointer 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
*
* @ingroup memory
*/
-class EnableRefCountingByObserverPointer
+class EnableObserverPointer
{
public:
/**
* Constructor setting the counter to zero.
*/
- EnableRefCountingByObserverPointer();
+ EnableObserverPointer();
/**
* Copy-constructor.
* The counter of the copy is zero, since references point to the original
* object.
*/
- EnableRefCountingByObserverPointer(
- const EnableRefCountingByObserverPointer &);
+ EnableObserverPointer(const EnableObserverPointer &);
/**
* Move constructor.
*
- * An object inheriting from EnableRefCountingByObserverPointer can only be
+ * An object inheriting from EnableObserverPointer can only be
* moved if no other objects are subscribing to it.
*/
- EnableRefCountingByObserverPointer(
- EnableRefCountingByObserverPointer &&) noexcept;
+ EnableObserverPointer(EnableObserverPointer &&) noexcept;
/**
* Destructor, asserting that the counter is zero.
*/
- virtual ~EnableRefCountingByObserverPointer();
+ virtual ~EnableObserverPointer();
/**
* 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 <tt>*this</tt>.
*/
- EnableRefCountingByObserverPointer &
- operator=(const EnableRefCountingByObserverPointer &);
+ EnableObserverPointer &
+ operator=(const EnableObserverPointer &);
/**
* Move assignment operator. Only invalidates the object moved from.
*/
- EnableRefCountingByObserverPointer &
- operator=(EnableRefCountingByObserverPointer &&) noexcept;
+ EnableObserverPointer &
+ operator=(EnableObserverPointer &&) noexcept;
/**
- * @name EnableRefCountingByObserverPointer functionality
+ * @name EnableObserverPointer functionality
*
- * Classes derived from EnableRefCountingByObserverPointer provide a facility
+ * Classes derived from EnableObserverPointer provide a facility
* to subscribe to this object. This is mostly used by the ObserverPointer
* class.
* @{
/**
* A subscriber with the identification string given to
- * EnableRefCountingByObserverPointer::unsubscribe() did not subscribe to the
+ * EnableObserverPointer::unsubscribe() did not subscribe to the
* object.
*/
DeclException2(ExcNoSubscriber,
/**
- * A type alias for the EnableRefCountingByObserverPointer class that makes sure
+ * A type alias for the EnableObserverPointer class that makes sure
* the previous name of the class, Subscriptor, continues to be available.
*
* @deprecated Use the new name of the class, ObserverPointer, instead.
*/
using Subscriptor DEAL_II_DEPRECATED_EARLY_WITH_COMMENT(
- "Use the new name of the class, EnableRefCountingByObserverPointer.") =
- EnableRefCountingByObserverPointer;
+ "Use the new name of the class, EnableObserverPointer.") =
+ EnableObserverPointer;
//---------------------------------------------------------------------------
-inline EnableRefCountingByObserverPointer::EnableRefCountingByObserverPointer()
+inline EnableObserverPointer::EnableObserverPointer()
: counter(0)
, object_info(nullptr)
{}
-inline EnableRefCountingByObserverPointer::EnableRefCountingByObserverPointer(
- const EnableRefCountingByObserverPointer &)
+inline EnableObserverPointer::EnableObserverPointer(
+ const EnableObserverPointer &)
: counter(0)
, object_info(nullptr)
{}
-inline EnableRefCountingByObserverPointer &
-EnableRefCountingByObserverPointer::operator=(
- const EnableRefCountingByObserverPointer &s)
+inline EnableObserverPointer &
+EnableObserverPointer::operator=(const EnableObserverPointer &s)
{
object_info = s.object_info;
return *this;
inline unsigned int
-EnableRefCountingByObserverPointer::n_subscriptions() const
+EnableObserverPointer::n_subscriptions() const
{
return counter;
}
template <class Archive>
inline void
-EnableRefCountingByObserverPointer::serialize(Archive &, const unsigned int)
+EnableObserverPointer::serialize(Archive &, const unsigned int)
{
// do nothing, as explained in the
// documentation of this function
template <typename StreamType>
inline void
-EnableRefCountingByObserverPointer::list_subscribers(StreamType &stream) const
+EnableObserverPointer::list_subscribers(StreamType &stream) const
{
std::lock_guard<std::mutex> lock(mutex);
template <int dim, typename RangeNumberType = double>
class Function : public FunctionTime<
typename numbers::NumberTraits<RangeNumberType>::real_type>,
- public EnableRefCountingByObserverPointer
+ public EnableObserverPointer
{
public:
/**
*
* @ingroup textoutput
*/
-class LogStream : public EnableRefCountingByObserverPointer
+class LogStream : public EnableObserverPointer
{
public:
/**
* @ingroup data
*/
template <class Object>
-class MGLevelObject : public EnableRefCountingByObserverPointer
+class MGLevelObject : public EnableObserverPointer
{
public:
/**
* deleted or moved from in the course of use of the pointer by signaling the
* pointee its use. This is achieved by keeping a use count for the pointed-to
* object (which for this purpose needs to be derived from the
- * EnableRefCountingByObserverPointer class), and ensuring that the pointed-to
+ * EnableObserverPointer class), and ensuring that the pointed-to
* object's destructor triggers an error if that use-count is larger than zero
* -- i.e., if there are still observing ObserverPointer objects pointing to it.
*
* to a constant object (disallowing write access when dereferenced), while
* `ObserverPointer<T>` is a mutable pointer.
*
- * @dealiiConceptRequires{std::is_base_of_v<EnableRefCountingByObserverPointer,
+ * @dealiiConceptRequires{std::is_base_of_v<EnableObserverPointer,
* T>}
*
* @ingroup memory
* lock it, i.e. to prevent its destruction before the end of its use.
*
* The <tt>id</tt> is used in the call to
- * EnableRefCountingByObserverPointer::subscribe(id) and by ~ObserverPointer()
- * in the call to EnableRefCountingByObserverPointer::unsubscribe().
+ * EnableObserverPointer::subscribe(id) and by ~ObserverPointer()
+ * in the call to EnableObserverPointer::unsubscribe().
*/
ObserverPointer(T *t, const std::string &id);
, id(typeid(P).name())
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
}
, id(typeid(P).name())
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (t != nullptr)
t->subscribe(&pointed_to_object_is_alive, id);
, id(id)
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (pointer != nullptr)
pointer->subscribe(&pointed_to_object_is_alive, id);
, id(other.id)
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (other != nullptr)
{
, id(other.id)
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (other != nullptr)
{
, id(other.id)
, pointed_to_object_is_alive(false)
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (other != nullptr)
{
template <typename T, typename P>
inline ObserverPointer<T, P>::~ObserverPointer()
{
- static_assert(
- std::is_base_of_v<EnableRefCountingByObserverPointer, T>,
- "This class can only be used if the first template argument "
- "is a class derived from 'EnableRefCountingByObserverPointer'.");
+ static_assert(std::is_base_of_v<EnableObserverPointer, T>,
+ "This class can only be used if the first template argument "
+ "is a class derived from 'EnableObserverPointer'.");
if (pointed_to_object_is_alive && pointer != nullptr)
pointer->unsubscribe(&pointed_to_object_is_alive, id);
*
* See the tutorial program step-60 for an example on how to use this class.
*/
-class ParameterAcceptor : public EnableRefCountingByObserverPointer
+class ParameterAcceptor : public EnableObserverPointer
{
public:
/**
*
* @ingroup input
*/
-class ParameterHandler : public EnableRefCountingByObserverPointer
+class ParameterHandler : public EnableObserverPointer
{
public:
/**
{
// Forward to serialization
// function in the base class.
- ar &static_cast<const EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<const EnableObserverPointer &>(*this);
ar &*entries.get();
{
// Forward to serialization
// function in the base class.
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &*entries.get();
* TensorProductPolynomials class.
*/
template <typename number>
- class Polynomial : public EnableRefCountingByObserverPointer
+ class Polynomial : public EnableObserverPointer
{
public:
/**
Polynomial<number>::serialize(Archive &ar, const unsigned int)
{
// forward to serialization function in the base class.
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &coefficients;
ar &in_lagrange_product_form;
ar &lagrange_support_points;
* @ingroup Polynomials
*/
template <typename number>
- class PiecewisePolynomial : public EnableRefCountingByObserverPointer
+ class PiecewisePolynomial : public EnableObserverPointer
{
public:
/**
PiecewisePolynomial<number>::serialize(Archive &ar, const unsigned int)
{
// forward to serialization function in the base class.
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &polynomial;
ar &n_intervals;
ar &interval;
* as "list of evaluation points".
*/
template <int dim>
-class Quadrature : public EnableRefCountingByObserverPointer
+class Quadrature : public EnableObserverPointer
{
public:
/**
{
// forward to serialization
// function in the base class.
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &quadrature_points &weights;
}
* for example, adopting a level-set approach to describe material behavior.
*/
template <typename CellIteratorType, typename DataType>
-class CellDataStorage : public EnableRefCountingByObserverPointer
+class CellDataStorage : public EnableObserverPointer
{
public:
/**
* @ingroup data
*/
template <int N, typename T>
-class TableBase : public EnableRefCountingByObserverPointer
+class TableBase : public EnableObserverPointer
{
public:
using value_type = T;
template <int N, typename T>
TableBase<N, T>::TableBase(const TableBase<N, T> &src)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, values(src.values)
, table_size(src.table_size)
{}
template <int N, typename T>
TableBase<N, T>::TableBase(TableBase<N, T> &&src) noexcept
- : EnableRefCountingByObserverPointer(std::move(src))
+ : EnableObserverPointer(std::move(src))
, values(std::move(src.values))
, table_size(src.table_size)
{
inline void
TableBase<N, T>::serialize(Archive &ar, const unsigned int)
{
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &values &table_size;
}
inline TableBase<N, T> &
TableBase<N, T>::operator=(TableBase<N, T> &&m) noexcept
{
- static_cast<EnableRefCountingByObserverPointer &>(*this) =
- std::move(static_cast<EnableRefCountingByObserverPointer &>(m));
+ static_cast<EnableObserverPointer &>(*this) =
+ std::move(static_cast<EnableObserverPointer &>(m));
values = std::move(m.values);
table_size = m.table_size;
m.table_size = TableIndices<N>();
template <int rank, int dim, typename Number = double>
class TensorFunction
: public FunctionTime<typename numbers::NumberTraits<Number>::real_type>,
- public EnableRefCountingByObserverPointer
+ public EnableObserverPointer
{
public:
/**
* See the description of RepartitioningPolicyTools for more information.
*/
template <int dim, int spacedim = dim>
- class Base : public EnableRefCountingByObserverPointer
+ class Base : public EnableObserverPointer
{
public:
/**
* for more information about artificial cells.
*/
template <int dim, int spacedim = dim>
- class TemporarilyRestoreSubdomainIds
- : public EnableRefCountingByObserverPointer
+ class TemporarilyRestoreSubdomainIds : public EnableObserverPointer
{
public:
/**
* The use of this class is demonstrated in step-75.
*/
template <int dim, int spacedim = dim>
- class TemporarilyMatchRefineFlags
- : public EnableRefCountingByObserverPointer
+ class TemporarilyMatchRefineFlags : public EnableObserverPointer
{
public:
/**
*
* @ingroup dofs
*/
-class BlockInfo : public EnableRefCountingByObserverPointer
+class BlockInfo : public EnableObserverPointer
{
public:
/**
*/
template <int dim, int spacedim = dim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
-class DoFHandler : public EnableRefCountingByObserverPointer
+class DoFHandler : public EnableObserverPointer
{
using ActiveSelector =
dealii::internal::DoFHandlerImplementation::Iterators<dim, spacedim, false>;
* @ingroup febase fe
*/
template <int dim, int spacedim = dim>
-class FiniteElement : public EnableRefCountingByObserverPointer,
+class FiniteElement : public EnableObserverPointer,
public FiniteElementData<dim>
{
public:
* $ \bf k $ .
*/
template <int dim, int spacedim = dim>
- class Fourier : public EnableRefCountingByObserverPointer
+ class Fourier : public EnableObserverPointer
{
public:
using CoefficientType = typename std::complex<double>;
* $ \widetilde P_m(x) $ using tensor product rule.
*/
template <int dim, int spacedim = dim>
- class Legendre : public EnableRefCountingByObserverPointer
+ class Legendre : public EnableObserverPointer
{
public:
using CoefficientType = double;
* FETools::add_fe_name() functions.
*/
template <int dim, int spacedim = dim>
- class FEFactoryBase : public EnableRefCountingByObserverPointer
+ class FEFactoryBase : public EnableObserverPointer
{
public:
/**
template <int dim>
void
fill_no_codim_fe_names(
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>
&result)
{
result["FE_Q_Hierarchical"] =
template <int dim, int spacedim>
void
fill_codim_fe_names(
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>
&result)
{
result["FE_Bernstein"] =
// by the functions above.
std::array<
std::array<
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>,
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>,
4>,
4> inline fill_default_map()
{
std::array<
std::array<
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>,
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>,
4>,
4>
result;
// each dimension and then separate between them further down
inline std::array<
std::array<
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>,
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>,
4>,
4> &
get_fe_name_map()
{
static std::array<
std::array<
- std::map<std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>,
+ std::map<std::string, std::unique_ptr<const EnableObserverPointer>>,
4>,
4>
fe_name_map = fill_default_map();
std::unique_lock<std::shared_mutex> lock(
internal::FEToolsAddFENameHelper::fe_name_map_lock);
internal::FEToolsAddFENameHelper::get_fe_name_map()[dim][spacedim].emplace(
- name, std::unique_ptr<const EnableRefCountingByObserverPointer>(factory));
+ name, std::unique_ptr<const EnableObserverPointer>(factory));
}
std::unique_ptr<FiniteElement<dim, spacedim>>
get_fe_by_name_ext(
std::string &name,
- const std::map<
- std::string,
- std::unique_ptr<const EnableRefCountingByObserverPointer>>
+ const std::map<std::string,
+ std::unique_ptr<const EnableObserverPointer>>
&fe_name_map)
{
// Extract the name of the
// argument, which defaults to 1,
// so this properly returns
// FE_Nothing()
- const EnableRefCountingByObserverPointer *ptr =
+ const EnableObserverPointer *ptr =
fe_name_map.find(name_part)->second.get();
const FETools::FEFactoryBase<dim, spacedim> *fef =
dynamic_cast<const FETools::FEFactoryBase<dim, spacedim> *>(ptr);
const std::pair<int, unsigned int> tmp =
Utilities::get_integer_at_position(name, 0);
name.erase(0, tmp.second + 1);
- const EnableRefCountingByObserverPointer *ptr =
+ const EnableObserverPointer *ptr =
fe_name_map.find(name_part)->second.get();
const FETools::FEFactoryBase<dim, spacedim> *fef =
dynamic_cast<const FETools::FEFactoryBase<dim, spacedim> *>(
Utilities::get_integer_at_position(name, 0);
// delete "))"
name.erase(0, tmp.second + 2);
- const EnableRefCountingByObserverPointer *ptr =
+ const EnableObserverPointer *ptr =
fe_name_map.find(name_part)->second.get();
const FETools::FEFactoryBase<dim, spacedim> *fef =
dynamic_cast<
Utilities::get_integer_at_position(name, 0);
// delete "))"
name.erase(0, tmp.second + 2);
- const EnableRefCountingByObserverPointer *ptr =
+ const EnableObserverPointer *ptr =
fe_name_map.find(name_part)->second.get();
const FETools::FEFactoryBase<dim, spacedim> *fef =
dynamic_cast<
Utilities::get_integer_at_position(name, 0);
// delete "))"
name.erase(0, tmp.second + 2);
- const EnableRefCountingByObserverPointer *ptr =
+ const EnableObserverPointer *ptr =
fe_name_map.find(name_part)->second.get();
const FETools::FEFactoryBase<dim, spacedim> *fef =
dynamic_cast<
* @ingroup feaccess
*/
template <int dim, int spacedim>
-class FEValuesBase : public EnableRefCountingByObserverPointer
+class FEValuesBase : public EnableObserverPointer
{
public:
/**
* @ingroup mapping
*/
template <int dim, int spacedim = dim>
-class Mapping : public EnableRefCountingByObserverPointer
+class Mapping : public EnableObserverPointer
{
public:
/**
* method mark_for_update() manually.
*/
template <int dim, int spacedim = dim>
- class Cache : public EnableRefCountingByObserverPointer
+ class Cache : public EnableObserverPointer
{
public:
/**
*/
template <typename MeshType>
DEAL_II_CXX20_REQUIRES(concepts::is_triangulation_or_dof_handler<MeshType>)
-class InterGridMap : public EnableRefCountingByObserverPointer
+class InterGridMap : public EnableObserverPointer
{
public:
/**
* @ingroup manifold
*/
template <int dim, int spacedim = dim>
-class Manifold : public EnableRefCountingByObserverPointer
+class Manifold : public EnableObserverPointer
{
public:
// explicitly check for sensible template arguments
*/
template <int dim, int spacedim = dim>
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
-class Triangulation : public EnableRefCountingByObserverPointer
+class Triangulation : public EnableObserverPointer
{
private:
/**
* @ingroup hp hpcollection
*/
template <typename T>
- class Collection : public EnableRefCountingByObserverPointer
+ class Collection : public EnableObserverPointer
{
public:
/**
* @ingroup hp
*/
template <int dim, int q_dim, typename FEValuesType>
- class FEValuesBase : public EnableRefCountingByObserverPointer
+ class FEValuesBase : public EnableObserverPointer
{
public:
/**
* @ingroup constraints
*/
template <typename number = double>
-class AffineConstraints : public EnableRefCountingByObserverPointer
+class AffineConstraints : public EnableObserverPointer
{
public:
/**
template <typename number>
inline AffineConstraints<number>::AffineConstraints(
const AffineConstraints &affine_constraints)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, lines(affine_constraints.lines)
, lines_cache(affine_constraints.lines_cache)
, locally_owned_dofs(affine_constraints.locally_owned_dofs)
* @ref step_36 "step-36"
* for an example.
*/
-class ArpackSolver : public EnableRefCountingByObserverPointer
+class ArpackSolver : public EnableObserverPointer
{
public:
/**
* @see
* @ref GlossBlockLA "Block (linear algebra)"
*/
-class BlockIndices : public EnableRefCountingByObserverPointer
+class BlockIndices : public EnableObserverPointer
{
public:
/**
* @ref GlossBlockLA "Block (linear algebra)"
*/
template <typename MatrixType>
-class BlockMatrixBase : public EnableRefCountingByObserverPointer
+class BlockMatrixBase : public EnableObserverPointer
{
public:
/**
* @ref GlossBlockLA "Block (linear algebra)"
*/
template <typename Number>
-class BlockSparseMatrixEZ : public EnableRefCountingByObserverPointer
+class BlockSparseMatrixEZ : public EnableObserverPointer
{
public:
/**
template <typename number>
BlockSparseMatrixEZ<number>::BlockSparseMatrixEZ(
const BlockSparseMatrixEZ<number> &m)
- : EnableRefCountingByObserverPointer(m)
+ : EnableObserverPointer(m)
, row_indices(m.row_indices)
, column_indices(m.column_indices)
, blocks(m.blocks)
* @ref GlossBlockLA "Block (linear algebra)"
*/
template <typename VectorType>
-class BlockVectorBase : public EnableRefCountingByObserverPointer,
+class BlockVectorBase : public EnableObserverPointer,
public ReadVector<typename VectorType::value_type>
{
public:
* in the manual).
*/
template <typename number>
-class ChunkSparseMatrix : public virtual EnableRefCountingByObserverPointer
+class ChunkSparseMatrix : public virtual EnableObserverPointer
{
public:
/**
template <typename number>
ChunkSparseMatrix<number>::ChunkSparseMatrix(const ChunkSparseMatrix &m)
- : EnableRefCountingByObserverPointer(m)
+ : EnableObserverPointer(m)
, cols(nullptr, "ChunkSparseMatrix")
, val(nullptr)
, max_len(0)
*
* The use of this class is demonstrated in step-51.
*/
-class ChunkSparsityPattern : public EnableRefCountingByObserverPointer
+class ChunkSparsityPattern : public EnableObserverPointer
{
public:
/**
* @endcode
*/
template <typename VectorType = Vector<double>>
-class DiagonalMatrix : public EnableRefCountingByObserverPointer
+class DiagonalMatrix : public EnableObserverPointer
{
public:
using value_type = typename VectorType::value_type;
*/
template <typename Number, typename MemorySpace = MemorySpace::Host>
class Vector : public ::dealii::ReadVector<Number>,
- public EnableRefCountingByObserverPointer
+ public EnableObserverPointer
{
public:
using memory_space = MemorySpace;
template <typename Number, typename MemorySpaceType>
Vector<Number, MemorySpaceType>::Vector(
const Vector<Number, MemorySpaceType> &v)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, allocated_size(0)
, vector_is_ghosted(false)
, comm_sm(MPI_COMM_SELF)
Vector<Number, MemorySpaceType> &&v)
: Vector()
{
- static_cast<EnableRefCountingByObserverPointer &>(*this) =
- static_cast<EnableRefCountingByObserverPointer &&>(v);
+ static_cast<EnableObserverPointer &>(*this) =
+ static_cast<EnableObserverPointer &&>(v);
this->swap(v);
}
Vector<Number, MemorySpaceType>::operator=( // NOLINT
Vector<Number, MemorySpaceType> &&v)
{
- static_cast<EnableRefCountingByObserverPointer &>(*this) =
- static_cast<EnableRefCountingByObserverPointer &&>(v);
+ static_cast<EnableObserverPointer &>(*this) =
+ static_cast<EnableObserverPointer &&>(v);
this->swap(v);
return *this;
}
* @ingroup Preconditioners
*/
template <typename number>
-class PreconditionLU : public EnableRefCountingByObserverPointer
+class PreconditionLU : public EnableObserverPointer
{
public:
void
* @ref GlossBlockLA "Block (linear algebra)"
*/
template <typename MatrixType>
-class MatrixBlock : public EnableRefCountingByObserverPointer
+class MatrixBlock : public EnableObserverPointer
{
public:
/**
* @ingroup vector_valued
*/
template <typename MatrixType>
-class MGMatrixBlockVector : public EnableRefCountingByObserverPointer
+class MGMatrixBlockVector : public EnableObserverPointer
{
public:
/**
* PARPACK manual.
*/
template <typename VectorType>
-class PArpackSolver : public EnableRefCountingByObserverPointer
+class PArpackSolver : public EnableObserverPointer
{
public:
/**
* @ingroup PETScWrappers
* @ingroup Matrix1
*/
- class MatrixBase : public EnableRefCountingByObserverPointer
+ class MatrixBase : public EnableObserverPointer
{
public:
/**
*
* @ingroup PETScWrappers
*/
- class PreconditionBase : public EnableRefCountingByObserverPointer
+ class PreconditionBase : public EnableObserverPointer
{
public:
/**
* methods:
*
* @code
- * class VectorType : public EnableRefCountingByObserverPointer
+ * class VectorType : public EnableObserverPointer
* ...
* explicit VectorType(Vec);
* ...
* @endcode
*
* @code
- * class MatrixType : public EnableRefCountingByObserverPointer
+ * class MatrixType : public EnableObserverPointer
* ...
* explicit MatrixType(Mat);
* ...
* methods:
*
* @code
- * class VectorType : public EnableRefCountingByObserverPointer
+ * class VectorType : public EnableObserverPointer
* ...
* explicit VectorType(Vec);
* ...
* @endcode
*
* @code
- * class MatrixType : public EnableRefCountingByObserverPointer
+ * class MatrixType : public EnableObserverPointer
* ...
* explicit MatrixType(Mat);
* ...
* @ingroup PETScWrappers
*/
class VectorBase : public ReadVector<PetscScalar>,
- public EnableRefCountingByObserverPointer
+ public EnableObserverPointer
{
public:
/**
VectorBase::save(Archive &ar, const unsigned int) const
{
// forward to serialization function in the base class.
- ar &static_cast<const EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<const EnableObserverPointer &>(*this);
ar &size();
ar &local_range();
inline void
VectorBase::load(Archive &ar, const unsigned int)
{
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
size_type size = 0;
std::pair<size_type, size_type> local_range;
* Alternatively, the IdentityMatrix class can be used to precondition in this
* way.
*/
-class PreconditionIdentity : public EnableRefCountingByObserverPointer
+class PreconditionIdentity : public EnableObserverPointer
{
public:
/**
* multiplied. Still, this class is useful in multigrid smoother objects
* (MGSmootherRelaxation).
*/
-class PreconditionRichardson : public EnableRefCountingByObserverPointer
+class PreconditionRichardson : public EnableObserverPointer
{
public:
/**
*/
template <typename MatrixType = SparseMatrix<double>,
typename VectorType = Vector<double>>
-class PreconditionUseMatrix : public EnableRefCountingByObserverPointer
+class PreconditionUseMatrix : public EnableObserverPointer
{
public:
/**
*/
template <typename MatrixType = SparseMatrix<double>,
typename PreconditionerType = IdentityMatrix>
-class PreconditionRelaxation : public EnableRefCountingByObserverPointer
+class PreconditionRelaxation : public EnableObserverPointer
{
public:
/**
* <h4>Requirements on the templated classes</h4>
*
* The class `MatrixType` must be derived from
- * EnableRefCountingByObserverPointer because a ObserverPointer to `MatrixType`
+ * EnableObserverPointer because a ObserverPointer to `MatrixType`
* is held in the class. In particular, this means that the matrix object needs
* to persist during the lifetime of PreconditionChebyshev. The preconditioner
* is held in a shared_ptr that is copied into the AdditionalData member
template <typename MatrixType = SparseMatrix<double>,
typename VectorType = Vector<double>,
typename PreconditionerType = DiagonalMatrix<VectorType>>
-class PreconditionChebyshev : public EnableRefCountingByObserverPointer
+class PreconditionChebyshev : public EnableObserverPointer
{
public:
/**
*/
template <typename MatrixType,
typename inverse_type = typename MatrixType::value_type>
-class PreconditionBlock : public virtual EnableRefCountingByObserverPointer,
+class PreconditionBlock : public virtual EnableObserverPointer,
protected PreconditionBlockBase<inverse_type>
{
private:
template <typename MatrixType,
typename inverse_type = typename MatrixType::value_type>
class PreconditionBlockJacobi
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
private PreconditionBlock<MatrixType, inverse_type>
{
private:
template <typename MatrixType,
typename inverse_type = typename MatrixType::value_type>
class PreconditionBlockSOR
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
protected PreconditionBlock<MatrixType, inverse_type>
{
public:
template <typename MatrixType,
typename inverse_type = typename MatrixType::value_type>
class PreconditionBlockSSOR
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
private PreconditionBlockSOR<MatrixType, inverse_type>
{
public:
*/
template <typename MatrixType = SparseMatrix<double>,
typename VectorType = dealii::Vector<double>>
-class PreconditionSelector : public EnableRefCountingByObserverPointer
+class PreconditionSelector : public EnableObserverPointer
{
public:
/**
* get the first index of the largest range.
*/
template <typename Number>
- class ReadWriteVector : public EnableRefCountingByObserverPointer,
+ class ReadWriteVector : public EnableObserverPointer,
public ReadVector<Number>
{
public:
template <typename Number>
inline ReadWriteVector<Number>::ReadWriteVector(
const ReadWriteVector<Number> &v)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{
this->operator=(v);
}
* structure in #block_list and an optional ordering of the blocks in
* #order.
*/
- class AdditionalData : public EnableRefCountingByObserverPointer
+ class AdditionalData : public EnableObserverPointer
{
public:
/**
typename InverseNumberType = typename MatrixType::value_type,
typename VectorType = Vector<double>>
class RelaxationBlockJacobi
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
protected RelaxationBlock<MatrixType, InverseNumberType, VectorType>
{
public:
typename InverseNumberType = typename MatrixType::value_type,
typename VectorType = Vector<double>>
class RelaxationBlockSOR
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
protected RelaxationBlock<MatrixType, InverseNumberType, VectorType>
{
public:
typename InverseNumberType = typename MatrixType::value_type,
typename VectorType = Vector<double>>
class RelaxationBlockSSOR
- : public virtual EnableRefCountingByObserverPointer,
+ : public virtual EnableObserverPointer,
protected RelaxationBlock<MatrixType, InverseNumberType, VectorType>
{
public:
*/
template <typename VectorType = Vector<double>>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
-class SolverBase : public EnableRefCountingByObserverPointer
+class SolverBase : public EnableObserverPointer
{
public:
/**
* number of iterations.
* </ul>
*/
-class SolverControl : public EnableRefCountingByObserverPointer
+class SolverControl : public EnableObserverPointer
{
public:
/**
*/
template <typename VectorType = Vector<double>>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
-class SolverSelector : public EnableRefCountingByObserverPointer
+class SolverSelector : public EnableObserverPointer
{
public:
/**
*/
template <typename number>
class SparseLUDecomposition : protected SparseMatrix<number>,
- public virtual EnableRefCountingByObserverPointer
+ public virtual EnableObserverPointer
{
protected:
/**
*
* @ingroup Solvers Preconditioners
*/
-class SparseDirectUMFPACK : public EnableRefCountingByObserverPointer
+class SparseDirectUMFPACK : public EnableObserverPointer
{
public:
/**
* @ingroup Matrix1
*/
template <typename number>
-class SparseMatrix : public virtual EnableRefCountingByObserverPointer
+class SparseMatrix : public virtual EnableObserverPointer
{
public:
/**
template <typename number>
SparseMatrix<number>::SparseMatrix(const SparseMatrix &m)
- : EnableRefCountingByObserverPointer(m)
+ : EnableObserverPointer(m)
, cols(nullptr, "SparseMatrix")
, val(nullptr)
, max_len(0)
template <typename number>
SparseMatrix<number>::SparseMatrix(SparseMatrix<number> &&m) noexcept
- : EnableRefCountingByObserverPointer(std::move(m))
+ : EnableObserverPointer(std::move(m))
, cols(std::move(m.cols))
, val(std::move(m.val))
, max_len(m.max_len)
* where "EZ" is pronounced the same way as the word "easy".
*/
template <typename number>
-class SparseMatrixEZ : public EnableRefCountingByObserverPointer
+class SparseMatrixEZ : public EnableObserverPointer
{
public:
/**
template <typename number>
SparseMatrixEZ<number>::SparseMatrixEZ(const SparseMatrixEZ<number> &m)
- : EnableRefCountingByObserverPointer(m)
+ : EnableObserverPointer(m)
, n_columns(0)
, increment(m.increment)
, saved_default_row_length(m.saved_default_row_length)
SparsityPattern::save(Archive &ar, const unsigned int) const
{
// forward to serialization function in the base class.
- ar &
- boost::serialization::base_object<const EnableRefCountingByObserverPointer>(
- *this);
+ ar &boost::serialization::base_object<const EnableObserverPointer>(*this);
ar &max_dim &rows &cols &max_vec_len &max_row_length &compressed;
SparsityPattern::load(Archive &ar, const unsigned int)
{
// forward to serialization function in the base class.
- ar &boost::serialization::base_object<EnableRefCountingByObserverPointer>(
- *this);
+ ar &boost::serialization::base_object<EnableObserverPointer>(*this);
ar &max_dim &rows &cols &max_vec_len &max_row_length &compressed;
* Base class for all sparsity patterns, defining a common interface by which
* new values can be added.
*/
-class SparsityPatternBase : public EnableRefCountingByObserverPointer
+class SparsityPatternBase : public EnableObserverPointer
{
public:
/**
* @ingroup Vectors
*/
class Vector : public ReadVector<VectorTraits::value_type>,
- public EnableRefCountingByObserverPointer
+ public EnableObserverPointer
{
public:
using value_type = VectorTraits::value_type;
* @ingroup TrilinosWrappers
* @ingroup Preconditioners
*/
- class PreconditionBase : public EnableRefCountingByObserverPointer
+ class PreconditionBase : public EnableObserverPointer
{
public:
/**
*
* @ingroup TrilinosWrappers
*/
- class SolverDirect : public EnableRefCountingByObserverPointer
+ class SolverDirect : public EnableObserverPointer
{
public:
/**
* @ingroup TrilinosWrappers
* @ingroup Matrix1
*/
- class SparseMatrix : public EnableRefCountingByObserverPointer
+ class SparseMatrix : public EnableObserverPointer
{
public:
/**
* @ingroup Preconditioners
*/
template <typename Number, typename MemorySpace = dealii::MemorySpace::Host>
- class PreconditionBase : public EnableRefCountingByObserverPointer
+ class PreconditionBase : public EnableObserverPointer
{
public:
/**
* the matrix, you must call SparseMatrix::compress() again.
*/
template <typename Number, typename MemorySpace = dealii::MemorySpace::Host>
- class SparseMatrix : public EnableRefCountingByObserverPointer
+ class SparseMatrix : public EnableObserverPointer
{
public:
/**
* @ingroup Vectors
*/
template <typename Number, typename MemorySpace = dealii::MemorySpace::Host>
- class Vector : public ReadVector<Number>,
- public EnableRefCountingByObserverPointer
+ class Vector : public ReadVector<Number>, public EnableObserverPointer
{
public:
/**
template <typename Number, typename MemorySpace>
Vector<Number, MemorySpace>::Vector()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, compressed(true)
, has_ghost(false)
, vector(Utilities::Trilinos::internal::make_rcp<
template <typename Number, typename MemorySpace>
Vector<Number, MemorySpace>::Vector(const Vector<Number, MemorySpace> &V)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, compressed(V.compressed)
, has_ghost(V.has_ghost)
, vector(Utilities::Trilinos::internal::make_rcp<
template <typename Number, typename MemorySpace>
Vector<Number, MemorySpace>::Vector(
const Teuchos::RCP<TpetraTypes::VectorType<Number, MemorySpace>> V)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, compressed(true)
, has_ghost(V->getMap()->isOneToOne() == false)
, vector(V)
template <typename Number, typename MemorySpace>
Vector<Number, MemorySpace>::Vector(const IndexSet ¶llel_partitioner,
const MPI_Comm communicator)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, compressed(true)
, has_ghost(false)
, vector(Utilities::Trilinos::internal::make_rcp<
const IndexSet &ghost_entries,
const MPI_Comm communicator,
const bool vector_writable)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{
if (!vector_writable)
{
* @ingroup TrilinosWrappers
* @ingroup Vectors
*/
- class Vector : public EnableRefCountingByObserverPointer,
+ class Vector : public EnableObserverPointer,
public ReadVector<TrilinosScalar>
{
public:
* in the manual).
*/
template <typename Number>
-class Vector : public EnableRefCountingByObserverPointer,
- public ReadVector<Number>
+class Vector : public EnableObserverPointer, public ReadVector<Number>
{
public:
/**
Vector<Number>::save(Archive &ar, const unsigned int) const
{
// forward to serialization function in the base class.
- ar &static_cast<const EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<const EnableObserverPointer &>(*this);
ar &values;
}
Vector<Number>::load(Archive &ar, const unsigned int)
{
// the load stuff again from the archive
- ar &static_cast<EnableRefCountingByObserverPointer &>(*this);
+ ar &static_cast<EnableObserverPointer &>(*this);
ar &values;
maybe_reset_thread_partitioner();
}
template <typename Number>
Vector<Number>::Vector(const Vector<Number> &v)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{
*this = v;
}
* <i>always</i> returned.
*/
template <typename VectorType = dealii::Vector<double>>
-class VectorMemory : public EnableRefCountingByObserverPointer
+class VectorMemory : public EnableObserverPointer
{
public:
/**
* A class to fill the fields in PrecomputedEvaluationData.
*/
template <int dim>
-class FERemoteEvaluationCommunicator : public EnableRefCountingByObserverPointer
+class FERemoteEvaluationCommunicator : public EnableObserverPointer
{
public:
/**
template <int dim,
typename Number = double,
typename VectorizedArrayType = VectorizedArray<Number>>
-class MatrixFree : public EnableRefCountingByObserverPointer
+class MatrixFree : public EnableObserverPointer
{
static_assert(
std::is_same_v<Number, typename VectorizedArrayType::value_type>,
template <int dim, typename Number, typename VectorizedArrayType>
MatrixFree<dim, Number, VectorizedArrayType>::MatrixFree()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, indices_are_initialized(false)
, mapping_is_initialized(false)
, mg_level(numbers::invalid_unsigned_int)
template <int dim, typename Number, typename VectorizedArrayType>
MatrixFree<dim, Number, VectorizedArrayType>::MatrixFree(
const MatrixFree<dim, Number, VectorizedArrayType> &other)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{
copy_from(other);
}
typename VectorType = LinearAlgebra::distributed::Vector<double>,
typename VectorizedArrayType =
VectorizedArray<typename VectorType::value_type>>
- class Base : public EnableRefCountingByObserverPointer
+ class Base : public EnableObserverPointer
{
public:
/**
* prolongation phase.
*/
template <typename OperatorType>
- class MGInterfaceOperator : public EnableRefCountingByObserverPointer
+ class MGInterfaceOperator : public EnableObserverPointer
{
public:
/**
//----------------- Base operator -----------------------------
template <int dim, typename VectorType, typename VectorizedArrayType>
Base<dim, VectorType, VectorizedArrayType>::Base()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, have_interface_matrices(false)
{}
template <typename OperatorType>
MGInterfaceOperator<OperatorType>::MGInterfaceOperator()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, mf_base_operator(nullptr)
{}
* @note Only float and double are supported.
*/
template <int dim, typename Number = double>
- class MatrixFree : public EnableRefCountingByObserverPointer
+ class MatrixFree : public EnableObserverPointer
{
public:
using jacobian_type = Tensor<2, dim, Tensor<1, dim, Number>>;
* @ingroup MeshWorker
*/
template <int dim, int spacedim = dim, typename number = double>
- class DEAL_II_DEPRECATED LocalIntegrator
- : public EnableRefCountingByObserverPointer
+ class DEAL_II_DEPRECATED LocalIntegrator : public EnableObserverPointer
{
public:
/**
*
* @ingroup MeshWorker
*/
- class VectorSelector : public EnableRefCountingByObserverPointer
+ class VectorSelector : public EnableObserverPointer
{
public:
/**
* of matrices, will be sufficient for applications.
*/
template <typename VectorType>
-class MGMatrixBase : public EnableRefCountingByObserverPointer
+class MGMatrixBase : public EnableObserverPointer
{
public:
/*
* will be done by derived classes.
*/
template <typename VectorType>
-class MGCoarseGridBase : public EnableRefCountingByObserverPointer
+class MGCoarseGridBase : public EnableObserverPointer
{
public:
/**
* needed.
*/
template <typename VectorType>
-class MGTransferBase : public EnableRefCountingByObserverPointer
+class MGTransferBase : public EnableObserverPointer
{
public:
/**
* in the vector @p u given the right hand side, which is done by smooth().
*/
template <typename VectorType>
-class MGSmootherBase : public EnableRefCountingByObserverPointer
+class MGSmootherBase : public EnableObserverPointer
{
public:
/**
*
* @ingroup mg
*/
-class MGConstrainedDoFs : public EnableRefCountingByObserverPointer
+class MGConstrainedDoFs : public EnableObserverPointer
{
public:
using size_dof = std::vector<std::set<types::global_dof_index>>::size_type;
* accordingly.
*/
template <typename VectorType>
-class MGTwoLevelTransferBase : public EnableRefCountingByObserverPointer
+class MGTwoLevelTransferBase : public EnableObserverPointer
{
public:
static_assert(
* MGTransferBase.
*/
template <typename VectorType>
-class Multigrid : public EnableRefCountingByObserverPointer
+class Multigrid : public EnableObserverPointer
{
public:
/**
* to be initialized with a separate DoFHandler for each block.
*/
template <int dim, typename VectorType, typename TransferType>
-class PreconditionMG : public EnableRefCountingByObserverPointer
+class PreconditionMG : public EnableObserverPointer
{
public:
/**
* multigrid with local refinement.
*/
template <typename number>
- class SparseMatrixCollection : public EnableRefCountingByObserverPointer
+ class SparseMatrixCollection : public EnableObserverPointer
{
public:
void
* held.
*/
template <int dim, int spacedim = dim, typename Number = double>
- class MappingInfo : public EnableRefCountingByObserverPointer
+ class MappingInfo : public EnableObserverPointer
{
public:
/**
* same way as for the discrete level set function.
*/
template <int dim>
- class MeshClassifier : public EnableRefCountingByObserverPointer
+ class MeshClassifier : public EnableObserverPointer
{
public:
/**
* @ingroup output
*/
template <int dim>
-class DataPostprocessor : public EnableRefCountingByObserverPointer
+class DataPostprocessor : public EnableObserverPointer
{
public:
/**
* following grids, and some functions to be called before a new loop over all
* time steps is started.
*/
-class TimeStepBase : public EnableRefCountingByObserverPointer
+class TimeStepBase : public EnableObserverPointer
{
public:
/**
* finite-element solution see step-19, step-68, step-70, and step-83.
*/
template <int dim, int spacedim = dim>
- class ParticleHandler : public EnableRefCountingByObserverPointer
+ class ParticleHandler : public EnableObserverPointer
{
public:
/**
static const char *unknown_subscriber = "unknown subscriber";
-std::mutex EnableRefCountingByObserverPointer::mutex;
+std::mutex EnableObserverPointer::mutex;
-EnableRefCountingByObserverPointer::EnableRefCountingByObserverPointer(
- EnableRefCountingByObserverPointer &&subscriptor) noexcept
+EnableObserverPointer::EnableObserverPointer(
+ EnableObserverPointer &&subscriptor) noexcept
: counter(0)
, object_info(subscriptor.object_info)
{
-EnableRefCountingByObserverPointer::~EnableRefCountingByObserverPointer()
+EnableObserverPointer::~EnableObserverPointer()
{
for (auto *const validity_ptr : validity_pointers)
*validity_ptr = false;
void
-EnableRefCountingByObserverPointer::check_no_subscribers() const noexcept
+EnableObserverPointer::check_no_subscribers() const noexcept
{
// Check whether there are still subscriptions to this object. If so, output
// the actual name of the class to which this object belongs, i.e. the most
-EnableRefCountingByObserverPointer &
-EnableRefCountingByObserverPointer::operator=(
- EnableRefCountingByObserverPointer &&s) noexcept
+EnableObserverPointer &
+EnableObserverPointer::operator=(EnableObserverPointer &&s) noexcept
{
for (auto *const validity_ptr : s.validity_pointers)
*validity_ptr = false;
void
-EnableRefCountingByObserverPointer::subscribe(std::atomic<bool> *const validity,
- const std::string &id) const
+EnableObserverPointer::subscribe(std::atomic<bool> *const validity,
+ const std::string &id) const
{
std::lock_guard<std::mutex> lock(mutex);
void
-EnableRefCountingByObserverPointer::unsubscribe(
- std::atomic<bool> *const validity,
- const std::string &id) const
+EnableObserverPointer::unsubscribe(std::atomic<bool> *const validity,
+ const std::string &id) const
{
const std::string &name = id.empty() ? unknown_subscriber : id;
AssertNothrow(
validity_ptr_it != validity_pointers.end(),
ExcMessage(
- "This EnableRefCountingByObserverPointer object does not know anything about the supplied pointer!"));
+ "This EnableObserverPointer object does not know anything about the supplied pointer!"));
return;
}
void
-EnableRefCountingByObserverPointer::list_subscribers() const
+EnableObserverPointer::list_subscribers() const
{
list_subscribers(deallog);
}
template <>
Quadrature<0>::Quadrature(const Quadrature<1> &)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, quadrature_points(1)
, weights(1, 1.)
, is_tensor_product_flag(false)
template <>
Quadrature<1>::Quadrature(const Quadrature<0> &)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{
// this function should never be called -- this should be the copy constructor
// in 1d...
template <int dim>
Quadrature<dim>::Quadrature(const Quadrature<dim != 1 ? 1 : 0> &q)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, quadrature_points(Utilities::fixed_power<dim>(q.size()))
, weights(Utilities::fixed_power<dim>(q.size()))
, is_tensor_product_flag(true)
template <int dim>
Quadrature<dim>::Quadrature(const Quadrature<dim> &q)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, quadrature_points(q.quadrature_points)
, weights(q.weights)
, is_tensor_product_flag(q.is_tensor_product_flag)
DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
Triangulation<dim, spacedim>::Triangulation(
Triangulation<dim, spacedim> &&tria) noexcept
- : EnableRefCountingByObserverPointer(std::move(tria))
+ : EnableObserverPointer(std::move(tria))
, smooth_grid(tria.smooth_grid)
, reference_cells(std::move(tria.reference_cells))
, periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0))
Triangulation<dim, spacedim> &Triangulation<dim, spacedim>::operator=(
Triangulation<dim, spacedim> &&tria) noexcept
{
- EnableRefCountingByObserverPointer::operator=(std::move(tria));
+ EnableObserverPointer::operator=(std::move(tria));
smooth_grid = tria.smooth_grid;
reference_cells = std::move(tria.reference_cells);
template <int dim, int q_dim, typename FEValuesType>
FEValuesBase<dim, q_dim, FEValuesType>::FEValuesBase(
const FEValuesBase<dim, q_dim, FEValuesType> &other)
- : EnableRefCountingByObserverPointer(other)
+ : EnableObserverPointer(other)
, fe_collection(other.fe_collection)
, mapping_collection(other.mapping_collection)
, q_collection(other.q_collection)
ChunkSparsityPattern::ChunkSparsityPattern(const ChunkSparsityPattern &s)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, chunk_size(s.chunk_size)
, sparsity_pattern(s.sparsity_pattern)
{
VectorBase::VectorBase(const VectorBase &v)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, ghosted(v.ghosted)
, ghost_indices(v.ghost_indices)
, last_action(VectorOperation::unknown)
VectorBase::VectorBase(const Vec &v)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, vector(v)
, ghosted(false)
, last_action(VectorOperation::unknown)
# endif
Vector::Vector()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, vector(new Epetra_FEVector(
Epetra_Map(0, 0, 0, Utilities::Trilinos::comm_self())))
{}
Vector::Vector(const Vector &V)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, vector(new Epetra_FEVector(V.trilinos_vector()))
{}
Vector::Vector(const IndexSet ¶llel_partitioner,
const MPI_Comm communicator)
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, vector(new Epetra_FEVector(
parallel_partitioner.make_trilinos_map(communicator, false)))
{}
namespace MPI
{
Vector::Vector()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
, last_action(Zero)
, compressed(true)
, has_ghosts(false)
: Vector()
{
// initialize a minimal, valid object and swap
- static_cast<EnableRefCountingByObserverPointer &>(*this) =
- static_cast<EnableRefCountingByObserverPointer &&>(v);
+ static_cast<EnableObserverPointer &>(*this) =
+ static_cast<EnableObserverPointer &&>(v);
swap(v);
}
Vector &
Vector::operator=(Vector &&v) noexcept
{
- static_cast<EnableRefCountingByObserverPointer &>(*this) =
- static_cast<EnableRefCountingByObserverPointer &&>(v);
+ static_cast<EnableObserverPointer &>(*this) =
+ static_cast<EnableObserverPointer &&>(v);
swap(v);
return *this;
}
// test computing square root of 2 with newton's method
-class SquareRoot : public EnableRefCountingByObserverPointer
+class SquareRoot : public EnableObserverPointer
{
public:
void
-// Check the behavior of the ObserverPointer-EnableRefCountingByObserverPointer
+// Check the behavior of the ObserverPointer-EnableObserverPointer
// pair for copy and move semantics.
#include "../tests.h"
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{};
int
{
deallog << "Checking copy assignment" << std::endl;
- EnableRefCountingByObserverPointer subscriptor_1;
- EnableRefCountingByObserverPointer subscriptor_2;
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_1(
- &subscriptor_1);
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_2(
- &subscriptor_2);
+ EnableObserverPointer subscriptor_1;
+ EnableObserverPointer subscriptor_2;
+ ObserverPointer<EnableObserverPointer> smart_pointer_1(&subscriptor_1);
+ ObserverPointer<EnableObserverPointer> smart_pointer_2(&subscriptor_2);
subscriptor_2 = subscriptor_1;
{
deallog << "Checking copy construction" << std::endl;
- EnableRefCountingByObserverPointer subscriptor_1;
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_1(
- &subscriptor_1);
+ EnableObserverPointer subscriptor_1;
+ ObserverPointer<EnableObserverPointer> smart_pointer_1(&subscriptor_1);
- EnableRefCountingByObserverPointer subscriptor_2(subscriptor_1);
+ EnableObserverPointer subscriptor_2(subscriptor_1);
deallog << "Checking smart_pointer_1" << std::endl;
try
{
deallog << "Checking move assignment" << std::endl;
- EnableRefCountingByObserverPointer subscriptor_1;
- EnableRefCountingByObserverPointer subscriptor_2;
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_1(
- &subscriptor_1);
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_2(
- &subscriptor_2);
+ EnableObserverPointer subscriptor_1;
+ EnableObserverPointer subscriptor_2;
+ ObserverPointer<EnableObserverPointer> smart_pointer_1(&subscriptor_1);
+ ObserverPointer<EnableObserverPointer> smart_pointer_2(&subscriptor_2);
subscriptor_2 = std::move(subscriptor_1);
{
deallog << "Checking move construction" << std::endl;
- EnableRefCountingByObserverPointer subscriptor_1;
- ObserverPointer<EnableRefCountingByObserverPointer> smart_pointer_1(
- &subscriptor_1);
+ EnableObserverPointer subscriptor_1;
+ ObserverPointer<EnableObserverPointer> smart_pointer_1(&subscriptor_1);
- EnableRefCountingByObserverPointer subscriptor_2(std::move(subscriptor_1));
+ EnableObserverPointer subscriptor_2(std::move(subscriptor_1));
deallog << "Checking smart_pointer_1" << std::endl;
try
std::vector<char> memory(10000);
int next = 0;
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{
const char *name;
#include "../tests.h"
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{};
#include "../tests.h"
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{};
#include "../tests.h"
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{};
int
initlog();
- EnableRefCountingByObserverPointer subscriptor;
- std::atomic<bool> dummy_a;
- const char *foo_a = "a";
- const char *foo_b = "b";
+ EnableObserverPointer subscriptor;
+ std::atomic<bool> dummy_a;
+ const char *foo_a = "a";
+ const char *foo_b = "b";
subscriptor.subscribe(&dummy_a, foo_a);
subscriptor.unsubscribe(&dummy_a, foo_b);
std::atomic<bool> dummy_b;
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
The violated condition was:
it != counter_map.end()
Additional information:
No subscriber with identifier <b> subscribes to this object of class
- N6dealii34EnableRefCountingByObserverPointerE. Consequently, it cannot
- be unsubscribed.
+ N6dealii21EnableObserverPointerE. Consequently, it cannot be
+ unsubscribed.
--------------------------------------------------------
-DEAL::Exception: ExcMessage( "This EnableRefCountingByObserverPointer object does not know anything about the supplied pointer!")
+DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
The violated condition was:
validity_ptr_it != validity_pointers.end()
Additional information:
- This EnableRefCountingByObserverPointer object does not know anything
- about the supplied pointer!
+ This EnableObserverPointer object does not know anything about the
+ supplied pointer!
--------------------------------------------------------
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
The violated condition was:
it != counter_map.end()
Additional information:
No subscriber with identifier <b> subscribes to this object of class
- N6dealii34EnableRefCountingByObserverPointerE. Consequently, it cannot
- be unsubscribed.
+ N6dealii21EnableObserverPointerE. Consequently, it cannot be
+ unsubscribed.
--------------------------------------------------------
-DEAL::Exception: ExcMessage( "This EnableRefCountingByObserverPointer object does not know anything about the supplied pointer!")
+DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
The violated condition was:
validity_ptr_it != validity_pointers.end()
Additional information:
- This EnableRefCountingByObserverPointer object does not know anything
- about the supplied pointer!
+ This EnableObserverPointer object does not know anything about the
+ supplied pointer!
--------------------------------------------------------
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
The violated condition was:
it != counter_map.end()
Additional information:
No subscriber with identifier <b> subscribes to this object of class
- N6dealii34EnableRefCountingByObserverPointerE. Consequently, it cannot
- be unsubscribed.
+ N6dealii21EnableObserverPointerE. Consequently, it cannot be
+ unsubscribed.
--------------------------------------------------------
-DEAL::Exception: ExcMessage( "This EnableRefCountingByObserverPointer object does not know anything about the supplied pointer!")
+DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
The violated condition was:
validity_ptr_it != validity_pointers.end()
Additional information:
- This EnableRefCountingByObserverPointer object does not know anything
- about the supplied pointer!
+ This EnableObserverPointer object does not know anything about the
+ supplied pointer!
--------------------------------------------------------
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
The violated condition was:
it != counter_map.end()
Additional information:
No subscriber with identifier <b> subscribes to this object of class
- N6dealii34EnableRefCountingByObserverPointerE. Consequently, it cannot
- be unsubscribed.
+ N6dealii21EnableObserverPointerE. Consequently, it cannot be
+ unsubscribed.
--------------------------------------------------------
-DEAL::Exception: ExcMessage( "This EnableRefCountingByObserverPointer object does not know anything about the supplied pointer!")
+DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
DEAL::
--------------------------------------------------------
An error occurred in file <enable_ref_counting_by_observer.cc> in function
- void dealii::EnableRefCountingByObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
+ void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
The violated condition was:
validity_ptr_it != validity_pointers.end()
Additional information:
- This EnableRefCountingByObserverPointer object does not know anything
- about the supplied pointer!
+ This EnableObserverPointer object does not know anything about the
+ supplied pointer!
--------------------------------------------------------
#include "../tests.h"
-class Test : public EnableRefCountingByObserverPointer
+class Test : public EnableObserverPointer
{};
int
initlog();
- EnableRefCountingByObserverPointer subscriptor;
- std::atomic<bool> dummy_a;
- const char *foo = "a";
- const std::string foo_string = "a";
+ EnableObserverPointer subscriptor;
+ std::atomic<bool> dummy_a;
+ const char *foo = "a";
+ const std::string foo_string = "a";
subscriptor.subscribe(&dummy_a, foo);
subscriptor.unsubscribe(&dummy_a, foo_string.c_str());
// finite element object which counts
// how many objects use that finite
// element (this is what the
-// <code>EnableRefCountingByObserverPointer</code>/<code>ObserverPointer</code>
+// <code>EnableObserverPointer</code>/<code>ObserverPointer</code>
// class pair is used for, in case
// you want something like this for
// your own programs; see step-7 for
// this file didn't compile at one point in time due to the private
// inheritance of SparseMatrix by SparseLUDecomposition, and the
-// associated lack of accessibility of the EnableRefCountingByObserverPointer
+// associated lack of accessibility of the EnableObserverPointer
// functions to the ObserverPointer
//
// it was fixed around 2003-05-22
namespace Data
{
template <int dim>
- struct SetUpBase : public EnableRefCountingByObserverPointer
+ struct SetUpBase : public EnableObserverPointer
{
virtual const Function<dim> &
get_boundary_values() const = 0;
namespace DualFunctional
{
template <int dim>
- class DualFunctionalBase : public EnableRefCountingByObserverPointer
+ class DualFunctionalBase : public EnableObserverPointer
{
public:
virtual void
template <class Matrix, class Preconditioner>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const Matrix &m, const Preconditioner &preconditioner);
}
template <class Preconditioner>
- class SchurComplement : public EnableRefCountingByObserverPointer
+ class SchurComplement : public EnableObserverPointer
{
public:
SchurComplement(
namespace Step
{
template <int dim>
- class Problem : public EnableRefCountingByObserverPointer
+ class Problem : public EnableObserverPointer
{
public:
Problem();
const unsigned int n_functionals = 3;
template <int dim>
-class Local : public EnableRefCountingByObserverPointer
+class Local : public EnableObserverPointer
{
public:
using CellInfo = EmptyInfo;
const unsigned int n_functionals = 3;
template <int dim>
-class Local : public EnableRefCountingByObserverPointer
+class Local : public EnableObserverPointer
{
public:
using CellInfo = EmptyInfo;
// Define a class that fills all available entries in the info objects
// with recognizable numbers.
template <int dim>
-class Local : public EnableRefCountingByObserverPointer
+class Local : public EnableObserverPointer
{
public:
using CellInfo = MeshWorker::IntegrationInfo<dim>;
// Use local matrices for Laplacian / interior penalty DG
template <int dim>
-class MatrixIntegrator : public EnableRefCountingByObserverPointer
+class MatrixIntegrator : public EnableObserverPointer
{
public:
static void
// Local integrators fill every matrix entry with 10*block_row + block_col
template <int dim>
-class MatrixIntegrator : public EnableRefCountingByObserverPointer
+class MatrixIntegrator : public EnableObserverPointer
{
public:
static void
// Define a class that fills all available entries in the info objects
// with recognizable numbers.
template <int dim>
-class Local : public EnableRefCountingByObserverPointer
+class Local : public EnableObserverPointer
{
public:
using CellInfo = MeshWorker::IntegrationInfo<dim>;
};
template <typename SparseMatrixType>
-class MySparseMatrix : public EnableRefCountingByObserverPointer
+class MySparseMatrix : public EnableObserverPointer
{
public:
MySparseMatrix(const SparseMatrixType &sparse_matrix)
};
template <typename SparseMatrixType>
-class MySparseMatrix : public EnableRefCountingByObserverPointer
+class MySparseMatrix : public EnableObserverPointer
{
public:
MySparseMatrix(const SparseMatrixType &sparse_matrix)
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
LaplaceOperator(){};
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
LaplaceOperator(){};
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int n_q_points_1d = fe_degree + 1,
typename BlockVectorType =
LinearAlgebra::distributed::BlockVector<double>>
-class BlockLaplace : public EnableRefCountingByObserverPointer
+class BlockLaplace : public EnableObserverPointer
{
public:
using value_type = typename BlockVectorType::value_type;
using size_type = typename BlockVectorType::size_type;
BlockLaplace()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{}
void
int n_q_points_1d,
typename BlockVectorType =
LinearAlgebra::distributed::BlockVector<double>>
-class BlockLaplace : public EnableRefCountingByObserverPointer
+class BlockLaplace : public EnableObserverPointer
{
public:
using value_type = typename BlockVectorType::value_type;
using size_type = typename BlockVectorType::size_type;
BlockLaplace()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{}
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class HelmholtzOperator : public EnableRefCountingByObserverPointer
+class HelmholtzOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, int fe_degree, typename number>
- class LaplaceOperator : public EnableRefCountingByObserverPointer
+ class LaplaceOperator : public EnableObserverPointer
{
public:
LaplaceOperator();
template <int dim, int fe_degree, typename number>
LaplaceOperator<dim, fe_degree, number>::LaplaceOperator()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{}
class MassMatrixType,
class PreconditionerA,
class PreconditionerMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
/**
template <int dim, int fe_degree>
-class DummyMatrixFree : public EnableRefCountingByObserverPointer
+class DummyMatrixFree : public EnableObserverPointer
{
public:
DummyMatrixFree(const Portable::MatrixFree<dim, double> &data_in,
typename VectorType =
LinearAlgebra::distributed::Vector<double, MemorySpace::Default>,
int n_q_points_1d = fe_degree + 1>
-class MatrixFreeTest : public EnableRefCountingByObserverPointer
+class MatrixFreeTest : public EnableObserverPointer
{
public:
MatrixFreeTest(const Portable::MatrixFree<dim, Number> &data_in,
// Define a class that fills all available entries in the info objects
// with recognizable numbers.
template <int dim>
-class Local : public EnableRefCountingByObserverPointer
+class Local : public EnableObserverPointer
{
public:
using CellInfo = MeshWorker::IntegrationInfo<dim>;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
#include "../tests.h"
template <int dim_, int n_components = dim_, typename Number = double>
-class Operator : public EnableRefCountingByObserverPointer
+class Operator : public EnableObserverPointer
{
public:
using value_type = Number;
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
LaplaceOperator(){};
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
LaplaceOperator(){};
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <typename LAPLACEOPERATOR>
-class MGInterfaceMatrix : public EnableRefCountingByObserverPointer
+class MGInterfaceMatrix : public EnableObserverPointer
{
public:
void
int n_q_points_1d = fe_degree + 1,
typename BlockVectorType =
LinearAlgebra::distributed::BlockVector<double>>
-class BlockLaplace : public EnableRefCountingByObserverPointer
+class BlockLaplace : public EnableObserverPointer
{
public:
using value_type = typename BlockVectorType::value_type;
using size_type = typename BlockVectorType::size_type;
BlockLaplace()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{}
void
int n_q_points_1d,
typename BlockVectorType =
LinearAlgebra::distributed::BlockVector<double>>
-class BlockLaplace : public EnableRefCountingByObserverPointer
+class BlockLaplace : public EnableObserverPointer
{
public:
using value_type = typename BlockVectorType::value_type;
using size_type = typename BlockVectorType::size_type;
BlockLaplace()
- : EnableRefCountingByObserverPointer()
+ : EnableObserverPointer()
{}
void
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
int fe_degree,
int n_q_points_1d = fe_degree + 1,
typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
class MassMatrixType,
class PreconditionerA,
class PreconditionerMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
/**
template <int dim>
-class OutputCreator : public EnableRefCountingByObserverPointer
+class OutputCreator : public EnableObserverPointer
{
public:
void
}
template <int dim>
-class OutputCreator : public EnableRefCountingByObserverPointer
+class OutputCreator : public EnableObserverPointer
{
public:
void
class MassMatrixType,
class PreconditionerA,
class PreconditionerMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
/**
template <class MatrixType, class PreconditionerType>
-class InverseMatrix : public EnableRefCountingByObserverPointer
+class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner);
template <class PreconditionerType>
-class SchurComplement : public EnableRefCountingByObserverPointer
+class SchurComplement : public EnableObserverPointer
{
public:
SchurComplement(
template <int dim, typename number = double>
-class LaplaceOperator : public EnableRefCountingByObserverPointer
+class LaplaceOperator : public EnableObserverPointer
{
public:
using value_type = number;
template <class MatrixType, class PreconditionerType>
-class InverseMatrix : public EnableRefCountingByObserverPointer
+class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m, const PreconditionerType &preconditioner);
template <class PreconditionerType>
-class SchurComplement : public EnableRefCountingByObserverPointer
+class SchurComplement : public EnableObserverPointer
{
public:
SchurComplement(
* and exceptions handling for PETSCWrappers::NonlinearSolver.
*/
-class VectorType : public EnableRefCountingByObserverPointer
+class VectorType : public EnableObserverPointer
{
public:
explicit VectorType(Vec v)
Vec v;
};
-class MatrixType : public EnableRefCountingByObserverPointer
+class MatrixType : public EnableObserverPointer
{
public:
explicit MatrixType(Mat A)
* and exceptions handling for PETSCWrappers::TimeStepper.
*/
-class VectorType : public EnableRefCountingByObserverPointer
+class VectorType : public EnableObserverPointer
{
public:
explicit VectorType(Vec v)
Vec v;
};
-class MatrixType : public EnableRefCountingByObserverPointer
+class MatrixType : public EnableObserverPointer
{
public:
explicit MatrixType(Mat A)
namespace LinearSolvers
{
template <class MatrixType, class PreconditionerType>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const MatrixType &m,
}
}
template <class PreconditionerTypeA, class PreconditionerTypeMp>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(
// with an option to specify a preconditioner, and to allow for different
// vector types in the vmult function.
template <class Matrix, class Preconditioner>
- class InverseMatrix : public EnableRefCountingByObserverPointer
+ class InverseMatrix : public EnableObserverPointer
{
public:
InverseMatrix(const Matrix &m, const Preconditioner &preconditioner);
// The class A template class for a simple block diagonal preconditioner
// for 2x2 matrices.
template <class PreconditionerA, class PreconditionerS>
- class BlockDiagonalPreconditioner
- : public EnableRefCountingByObserverPointer
+ class BlockDiagonalPreconditioner : public EnableObserverPointer
{
public:
BlockDiagonalPreconditioner(const PreconditionerA &preconditioner_A,
}
template <class PreconditionerAType, class PreconditionerSType>
- class BlockSchurPreconditioner : public EnableRefCountingByObserverPointer
+ class BlockSchurPreconditioner : public EnableObserverPointer
{
public:
BlockSchurPreconditioner(