* Declare standard types used in all containers. These types parallel those
* in the <tt>C++</tt> standard libraries <tt>vector<...></tt> class.
*/
- typedef T value_type;
- typedef value_type * pointer;
- typedef const value_type *const_pointer;
- typedef value_type * iterator;
- typedef const value_type *const_iterator;
- typedef value_type & reference;
- typedef const value_type &const_reference;
- typedef std::size_t size_type;
+ using value_type = T;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using iterator = value_type *;
+ using const_iterator = const value_type *;
+ using reference = value_type &;
+ using const_reference = const value_type &;
+ using size_type = std::size_t;
/**
* Empty constructor. Sets the vector size to zero.
{
public:
/**
- * A typedef that denotes the "value_type" of this container-like class,
+ * An alias that denotes the "value_type" of this container-like class,
* i.e., the type of the element it "stores" or points to.
*/
- typedef ElementType value_type;
+ using value_type = ElementType;
/**
- * A typedef for iterators pointing into the array.
+ * An alias for iterators pointing into the array.
*/
- typedef value_type *iterator;
+ using iterator = value_type *;
/**
- * A typedef for const iterators pointing into the array.
+ * An alias for const iterators pointing into the array.
*/
- typedef const ElementType *const_iterator;
+ using const_iterator = const ElementType *;
/**
* Constructor.
typename ProductType<std::complex<T>, std::complex<U>>::type inline
operator*(const std::complex<T> &left, const std::complex<U> &right)
{
- typedef
- typename ProductType<std::complex<T>, std::complex<U>>::type result_type;
+ using result_type =
+ typename ProductType<std::complex<T>, std::complex<U>>::type;
return static_cast<result_type>(left) * static_cast<result_type>(right);
}
typename EnableIfScalar<U>::type>::type inline
operator*(const std::complex<T> &left, const U &right)
{
- typedef typename ProductType<std::complex<T>, U>::type result_type;
+ using result_type = typename ProductType<std::complex<T>, U>::type;
return static_cast<result_type>(left) * static_cast<result_type>(right);
}
std::complex<U>>::type inline
operator*(const T &left, const std::complex<U> &right)
{
- typedef typename ProductType<std::complex<T>, U>::type result_type;
+ using result_type = typename ProductType<std::complex<T>, U>::type;
return static_cast<result_type>(left) * static_cast<result_type>(right);
}
#endif /* DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
* Besides the actual value by which the color is to be computed, min and
* max values of the data to be colorized are given as well.
*/
- typedef RgbValues (*ColorFunction)(const double value,
- const double min_value,
- const double max_value);
+ using ColorFunction = RgbValues (*)(const double value,
+ const double min_value,
+ const double max_value);
/**
* This is a pointer to the function which is used to colorize the cells.
}
};
- typedef std::multimap<Point<3>, unsigned int, Point3Comp> Map3DPoint;
+ using Map3DPoint = std::multimap<Point<3>, unsigned int, Point3Comp>;
/**
* Flags used to specify filtering behavior.
template <typename T, typename U>
struct argument_type<T(U)>
{
- typedef U type;
+ using type = U;
};
} // namespace internal
/**
* Type for the constant map. Used by the initialize() method.
*/
- typedef std::map<std::string, double> ConstMap;
+ using ConstMap = std::map<std::string, double>;
/**
* Iterator for the constants map. Used by the initialize() method.
*/
- typedef ConstMap::iterator ConstMapIterator;
+ using ConstMapIterator = ConstMap::iterator;
/**
* Initialize the function. This methods accepts the following parameters:
#if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
# include <mpi.h>
#else
-typedef int MPI_Comm;
+using MPI_Comm = int;
# ifndef MPI_COMM_WORLD
# define MPI_COMM_WORLD 0
# endif
* @p size_type is the type used for storing the size and the individual
* entries in the IndexSet.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* One can see an IndexSet as a container of size size(), where the elements
* of the containers are bool values that are either false or true,
* depending on whether a particular index is an element of the IndexSet or
* not. In other words, an IndexSet is a bit like a vector in which the
- * elements we store are booleans. In this view, the correct local typedef
+ * elements we store are booleans. In this view, the correct local alias
* indicating the type of the elements of the vector would then be @p bool.
*
* On the other hand, @p bool has the disadvantage that it is not a
* other words, declaring the type of the elements of the vector as a signed
* integer is only a small lie, but it is a useful one.
*/
- typedef signed int value_type;
+ using value_type = signed int;
/**
operator-(const IntervalIterator &p) const;
/**
- * Mark the class as forward iterator and declare some typedefs which are
+ * Mark the class as forward iterator and declare some alias which are
* standard for iterators and are used by algorithms to enquire about the
* specifics of the iterators they work on.
*/
- typedef std::forward_iterator_tag iterator_category;
- typedef IntervalAccessor value_type;
- typedef std::ptrdiff_t difference_type;
- typedef IntervalAccessor * pointer;
- typedef IntervalAccessor & reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = IntervalAccessor;
+ using difference_type = std::ptrdiff_t;
+ using pointer = IntervalAccessor *;
+ using reference = IntervalAccessor &;
private:
/**
operator-(const ElementIterator &p) const;
/**
- * Mark the class as forward iterator and declare some typedefs which are
+ * Mark the class as forward iterator and declare some alias which are
* standard for iterators and are used by algorithms to enquire about the
* specifics of the iterators they work on.
*/
- typedef std::forward_iterator_tag iterator_category;
- typedef size_type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef size_type * pointer;
- typedef size_type & reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = size_type;
+ using difference_type = std::ptrdiff_t;
+ using pointer = size_type *;
+ using reference = size_type &;
private:
/**
* Typedef the elements of the collection to give them a name that is more
* distinct.
*/
- typedef Iterator BaseIterator;
+ using BaseIterator = Iterator;
/**
* Constructor. Initialize this iterator-over-iterator in such a way that
operator!=(const IteratorOverIterators &i_o_i);
/**
- * Mark the class as forward iterator and declare some typedefs which are
+ * Mark the class as forward iterator and declare some alias which are
* standard for iterators and are used by algorithms to enquire about the
* specifics of the iterators they work on.
*/
- typedef std::forward_iterator_tag iterator_category;
- typedef Iterator value_type;
- typedef typename Iterator::difference_type difference_type;
- typedef Iterator * pointer;
- typedef Iterator & reference;
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = Iterator;
+ using difference_type = typename Iterator::difference_type;
+ using pointer = Iterator *;
+ using reference = Iterator &;
private:
/**
/**
* Typedef for the iterator type represent by this class.
*/
- typedef Iterator iterator;
+ using iterator = Iterator;
/**
* Default constructor. Create a range represented by two default
* {
* public:
* // const iterators store a const pointer
- * typedef typename std::conditional<Constness, const Container<T>*,
- * Container<T>*>::type
- * container_pointer_type;
+ * using container_pointer_type
+ * = typename std::conditional<Constness,
+ * const Container<T>*,
+ * Container<T>*>::type;
*
- * // This typedef is assumed to exist.
- * typedef std::size_t size_type;
+ * // This alias is assumed to exist.
+ * using size_type = std::size_t;
*
* // constructor.
* Accessor(const container_pointer_type container,
* };
*
* public:
- * typedef std::size_t size_type;
- * typedef Iterator<true> const_iterator;
- * typedef Iterator<false> iterator;
+ * using size_type = std::size_t;
+ * using const_iterator = Iterator<true>;
+ * using iterator = Iterator<false>;
*
* iterator begin ();
* iterator end ();
/**
* Iterator category.
*/
- typedef std::random_access_iterator_tag iterator_category;
+ using iterator_category = std::random_access_iterator_tag;
/**
- * A typedef for the type you get when you dereference an iterator of the
+ * An alias for the type you get when you dereference an iterator of the
* current kind.
*/
- typedef AccessorType value_type;
+ using value_type = AccessorType;
/**
* Difference type.
*/
- typedef std::ptrdiff_t difference_type;
+ using difference_type = std::ptrdiff_t;
/**
* Reference type.
*/
- typedef const value_type &reference;
+ using reference = const value_type &;
/**
* Pointer type.
*/
- typedef const value_type *pointer;
+ using pointer = const value_type *;
/**
* Size type used by the underlying container.
*/
- typedef typename value_type::size_type size_type;
+ using size_type = typename value_type::size_type;
/**
* Copy operator.
MGLevelObject<Object>::memory_consumption() const
{
std::size_t result = sizeof(*this);
- typedef typename std::vector<std::shared_ptr<Object>>::const_iterator Iter;
+ using Iter = typename std::vector<std::shared_ptr<Object>>::const_iterator;
const Iter end = objects.end();
for (Iter o = objects.begin(); o != end; ++o)
result += (*o)->memory_consumption();
// without MPI, we would still like to use
// some constructs with MPI data
// types. Therefore, create some dummies
-typedef int MPI_Comm;
-typedef int MPI_Datatype;
-typedef int MPI_Op;
+using MPI_Comm = int;
+using MPI_Datatype = int;
+using MPI_Op = int;
# ifndef MPI_COMM_WORLD
# define MPI_COMM_WORLD 0
# endif
static const bool is_complex = false;
/**
- * For this data type, typedef the corresponding real type. Since the
+ * For this data type, alias the corresponding real type. Since the
* general template is selected for all data types that are not
* specializations of std::complex<T>, the underlying type must be real-
* values, so the real_type is equal to the underlying type.
*/
- typedef number real_type;
+ using real_type = number;
/**
* Return the complex-conjugate of the given number. Since the general
static const bool is_complex = true;
/**
- * For this data type, typedef the corresponding real type. Since this
+ * For this data type, alias the corresponding real type. Since this
* specialization of the template is selected for number types
* std::complex<T>, the real type is equal to the type used to store the
* two components of the complex number.
*/
- typedef number real_type;
+ using real_type = number;
/**
* Return the complex-conjugate of the given number.
for (OutputIterator in = begin_in; in != end_in;)
*out++ = predicate(*in++);
#else
- typedef std::tuple<InputIterator, OutputIterator> Iterators;
- typedef SynchronousIterators<Iterators> SyncIterators;
- Iterators x_begin(begin_in, out);
+ using Iterators = std::tuple<InputIterator, OutputIterator>;
+ using SyncIterators = SynchronousIterators<Iterators>;
+ Iterators x_begin(begin_in, out);
Iterators x_end(end_in, OutputIterator());
tbb::parallel_for(tbb::blocked_range<SyncIterators>(x_begin,
x_end,
for (OutputIterator in1 = begin_in1; in1 != end_in1;)
*out++ = predicate(*in1++, *in2++);
#else
- typedef std::tuple<InputIterator1, InputIterator2, OutputIterator>
- Iterators;
- typedef SynchronousIterators<Iterators> SyncIterators;
- Iterators x_begin(begin_in1, in2, out);
+ using Iterators =
+ std::tuple<InputIterator1, InputIterator2, OutputIterator>;
+ using SyncIterators = SynchronousIterators<Iterators>;
+ Iterators x_begin(begin_in1, in2, out);
Iterators x_end(end_in1, InputIterator2(), OutputIterator());
tbb::parallel_for(tbb::blocked_range<SyncIterators>(x_begin,
x_end,
for (OutputIterator in1 = begin_in1; in1 != end_in1;)
*out++ = predicate(*in1++, *in2++, *in3++);
#else
- typedef std::
- tuple<InputIterator1, InputIterator2, InputIterator3, OutputIterator>
- Iterators;
- typedef SynchronousIterators<Iterators> SyncIterators;
- Iterators x_begin(begin_in1, in2, in3, out);
- Iterators x_end(end_in1,
+ using Iterators = std::
+ tuple<InputIterator1, InputIterator2, InputIterator3, OutputIterator>;
+ using SyncIterators = SynchronousIterators<Iterators>;
+ Iterators x_begin(begin_in1, in2, in3, out);
+ Iterators x_end(end_in1,
InputIterator2(),
InputIterator3(),
OutputIterator());
*
* @code
*
- * set Function expression = cos(pi*x) ; cos(pi*y)
+ * set Function expression = cos(pi*x); cos(pi*y)
*
* @endcode
*
/**
* Type of values in the class maps.
*/
- typedef std::map<std::string, std::vector<std::string>>::value_type map_type;
+ using map_type = std::map<std::string, std::vector<std::string>>::value_type;
/**
* Initialize the static list objects for further use.
* or, if you want to exploit ParameterHandler::add_parameter():
*
* @code
- * typedef std::tuple<std::string, Point<3>, unsigned int> T;
+ * using T = std::tuple<std::string, Point<3>, unsigned int>;
*
* T a = Patterns::Tools::Convert<T>::to_value("Ciao : 1.0, 2.0, 3.0 : 33");
*
* A typical usage of these tools is in the following example:
*
* @code
- * typedef std::vector<unsigned int> T;
+ * using T = std::vector<unsigned int>;
*
* T vec(3);
* vec[0] = 1;
template <int rank, int dim, class Number>
struct Convert<Tensor<rank, dim, Number>>
{
- typedef Tensor<rank, dim, Number> T;
+ using T = Tensor<rank, dim, Number>;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
{
template <int dim, class Number>
struct Convert<Point<dim, Number>>
{
- typedef Point<dim, Number> T;
+ using T = Point<dim, Number>;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
template <class Number>
struct Convert<std::complex<Number>>
{
- typedef std::complex<Number> T;
+ using T = std::complex<Number>;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
template <>
struct Convert<std::string>
{
- typedef std::string T;
+ using T = std::string;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
template <class Key, class Value>
struct Convert<std::pair<Key, Value>>
{
- typedef std::pair<Key, Value> T;
+ using T = std::pair<Key, Value>;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
template <class... Args>
struct Convert<std::tuple<Args...>>
{
- typedef std::tuple<Args...> T;
+ using T = std::tuple<Args...>;
static std::unique_ptr<Patterns::PatternBase>
to_pattern()
{
public:
/**
- * Define a typedef for a quadrature that acts on an object of one dimension
+ * Define an alias for a quadrature that acts on an object of one dimension
* less. For cells, this would then be a face quadrature.
*/
- typedef Quadrature<dim - 1> SubQuadrature;
+ using SubQuadrature = Quadrature<dim - 1>;
/**
* Compute the quadrature points on the cell if the given quadrature formula
{
public:
/**
- * Define a typedef for a quadrature that acts on an object of one dimension
+ * Define an alias for a quadrature that acts on an object of one dimension
* less. For cells, this would then be a face quadrature.
*/
- typedef Quadrature<dim - 1> SubQuadrature;
+ using SubQuadrature = Quadrature<dim - 1>;
/**
* Constructor.
"User's DataType class should be derived from TransferableQuadraturePointData");
/**
- * A typedef for a cell.
+ * An alias for a cell.
*/
- typedef typename parallel::distributed::Triangulation<dim>::cell_iterator
- CellIteratorType;
+ using CellIteratorType =
+ typename parallel::distributed::Triangulation<dim>::cell_iterator;
/**
* Constructor which takes the FiniteElement @p projection_fe , the quadrature
/**
* The data type used in #counter_map.
*/
- typedef std::map<const char *, unsigned int>::value_type map_value_type;
+ using map_value_type = std::map<const char *, unsigned int>::value_type;
/**
* The iterator type used in #counter_map.
*/
- typedef std::map<const char *, unsigned int>::iterator map_iterator;
+ using map_iterator = std::map<const char *, unsigned int>::iterator;
/**
* Store the number of objects which subscribed to this object. Initially,
typename OtherNumber = Number>
struct double_contraction_result
{
- typedef typename ProductType<Number, OtherNumber>::type value_type;
- typedef ::dealii::SymmetricTensor<rank1 + rank2 - 4, dim, value_type>
- type;
+ using value_type = typename ProductType<Number, OtherNumber>::type;
+ using type =
+ ::dealii::SymmetricTensor<rank1 + rank2 - 4, dim, value_type>;
};
template <int dim, typename Number, typename OtherNumber>
struct double_contraction_result<2, 2, dim, Number, OtherNumber>
{
- typedef typename ProductType<Number, OtherNumber>::type type;
+ using type = typename ProductType<Number, OtherNumber>::type;
};
/**
- * Declaration of typedefs for the type of data structures which are used
+ * Declaration of alias for the type of data structures which are used
* to store symmetric tensors. For example, for rank-2 symmetric tensors,
* we use a flat vector to store all the elements. On the other hand,
* symmetric rank-4 tensors are mappings from symmetric rank-2 tensors
/**
* Declare the type in which we actually store the data.
*/
- typedef Tensor<1, n_independent_components, Number> base_tensor_type;
+ using base_tensor_type = Tensor<1, n_independent_components, Number>;
};
* can represent the data as a matrix if we represent the rank-2 tensors
* as vectors.
*/
- typedef Tensor<2, n_rank2_components, Number> base_tensor_type;
+ using base_tensor_type = Tensor<2, n_rank2_components, Number>;
};
template <int rank, int dim, typename Number>
struct AccessorTypes<rank, dim, true, Number>
{
- typedef const ::dealii::SymmetricTensor<rank, dim, Number> tensor_type;
+ using tensor_type = const ::dealii::SymmetricTensor<rank, dim, Number>;
- typedef Number reference;
+ using reference = Number;
};
/**
template <int rank, int dim, typename Number>
struct AccessorTypes<rank, dim, false, Number>
{
- typedef ::dealii::SymmetricTensor<rank, dim, Number> tensor_type;
+ using tensor_type = ::dealii::SymmetricTensor<rank, dim, Number>;
- typedef Number &reference;
+ using reference = Number &;
};
{
public:
/**
- * Import two typedefs from the switch class above.
+ * Import two alias from the switch class above.
*/
- typedef typename AccessorTypes<rank, dim, constness, Number>::reference
- reference;
- typedef typename AccessorTypes<rank, dim, constness, Number>::tensor_type
- tensor_type;
+ using reference =
+ typename AccessorTypes<rank, dim, constness, Number>::reference;
+ using tensor_type =
+ typename AccessorTypes<rank, dim, constness, Number>::tensor_type;
private:
/**
{
public:
/**
- * Import two typedefs from the switch class above.
+ * Import two alias from the switch class above.
*/
- typedef typename AccessorTypes<rank, dim, constness, Number>::reference
- reference;
- typedef typename AccessorTypes<rank, dim, constness, Number>::tensor_type
- tensor_type;
+ using reference =
+ typename AccessorTypes<rank, dim, constness, Number>::reference;
+ using tensor_type =
+ typename AccessorTypes<rank, dim, constness, Number>::tensor_type;
private:
/**
/**
* A structure that describes properties of the base tensor.
*/
- typedef internal::SymmetricTensorAccessors::StorageType<rank_, dim, Number>
- base_tensor_descriptor;
+ using base_tensor_descriptor =
+ internal::SymmetricTensorAccessors::StorageType<rank_, dim, Number>;
/**
* Data storage type for a symmetric tensor.
*/
- typedef typename base_tensor_descriptor::base_tensor_type base_tensor_type;
+ using base_tensor_type = typename base_tensor_descriptor::base_tensor_type;
/**
* The place where we store the data of the tensor.
const typename SymmetricTensorAccessors::
StorageType<2, dim, OtherNumber>::base_tensor_type &sdata)
{
- typedef typename SymmetricTensorAccessors::
- double_contraction_result<2, 2, dim, Number, OtherNumber>::type
- result_type;
+ using result_type = typename SymmetricTensorAccessors::
+ double_contraction_result<2, 2, dim, Number, OtherNumber>::type;
switch (dim)
{
const typename SymmetricTensorAccessors::
StorageType<2, dim, OtherNumber>::base_tensor_type &sdata)
{
- typedef typename SymmetricTensorAccessors::
- double_contraction_result<4, 2, dim, Number, OtherNumber>::type
- result_type;
- typedef typename SymmetricTensorAccessors::
- double_contraction_result<4, 2, dim, Number, OtherNumber>::value_type
- value_type;
+ using result_type = typename SymmetricTensorAccessors::
+ double_contraction_result<4, 2, dim, Number, OtherNumber>::type;
+ using value_type = typename SymmetricTensorAccessors::
+ double_contraction_result<4, 2, dim, Number, OtherNumber>::value_type;
const unsigned int data_dim = SymmetricTensorAccessors::
StorageType<2, dim, value_type>::n_independent_components;
const typename SymmetricTensorAccessors::
StorageType<4, dim, OtherNumber>::base_tensor_type &sdata)
{
- typedef typename SymmetricTensorAccessors::
- double_contraction_result<2, 4, dim, Number, OtherNumber>::value_type
- value_type;
- typedef typename SymmetricTensorAccessors::StorageType<2, dim, value_type>::
- base_tensor_type base_tensor_type;
+ using value_type = typename SymmetricTensorAccessors::
+ double_contraction_result<2, 4, dim, Number, OtherNumber>::value_type;
+ using base_tensor_type = typename SymmetricTensorAccessors::
+ StorageType<2, dim, value_type>::base_tensor_type;
base_tensor_type tmp;
for (unsigned int i = 0; i < tmp.dimension; ++i)
const typename SymmetricTensorAccessors::
StorageType<4, dim, OtherNumber>::base_tensor_type &sdata)
{
- typedef typename SymmetricTensorAccessors::
- double_contraction_result<4, 4, dim, Number, OtherNumber>::value_type
- value_type;
- typedef typename SymmetricTensorAccessors::StorageType<4, dim, value_type>::
- base_tensor_type base_tensor_type;
+ using value_type = typename SymmetricTensorAccessors::
+ double_contraction_result<4, 4, dim, Number, OtherNumber>::value_type;
+ using base_tensor_type = typename SymmetricTensorAccessors::
+ StorageType<4, dim, value_type>::base_tensor_type;
const unsigned int data_dim = SymmetricTensorAccessors::
StorageType<2, dim, value_type>::n_independent_components;
template <int dim, typename Number>
struct SortEigenValuesVectors
{
- typedef std::pair<Number, Tensor<1, dim, Number>> EigValsVecs;
+ using EigValsVecs = std::pair<Number, Tensor<1, dim, Number>>;
bool
operator()(const EigValsVecs &lhs, const EigValsVecs &rhs)
{
// standard committee saw it fit to not define an
// operator*(float,std::complex<double>)
// (as well as with switched arguments and double<->float).
- typedef typename ProductType<Number, OtherNumber>::type product_type;
- SymmetricTensor<rank_, dim, product_type> tt(t);
+ using product_type = typename ProductType<Number, OtherNumber>::type;
+ SymmetricTensor<rank_, dim, product_type> tt(t);
// we used to shorten the following by 'tt *= product_type(factor);'
// which requires that a converting constructor
// 'product_type::product_type(const OtherNumber) is defined.
// and p = (tr((T - q.I)^{2})/6)^{1/2} . Then solve the equation
// 0 = det(\lambda*I - B) = \lambda^{3} - 3*\lambda - det(B)
// which has the solution
- // \lambda = 2*cos(1/3 * acos(det(B)/2) +2/3*pi*k ) ; k = 0,1,2
+ // \lambda = 2*cos(1/3 * acos(det(B)/2) +2/3*pi*k ); k = 0,1,2
// when substituting \lambda = 2.cos(theta) and using trig identities.
const Number tr_T = trace(T);
const Number q = tr_T / 3.0;
AssertThrow(false, ExcNotImplemented());
}
- typedef
- typename Differentiation::AD::ADNumberTraits<Number>::scalar_type
- scalar_type;
+ using scalar_type =
+ typename Differentiation::AD::ADNumberTraits<Number>::scalar_type;
const double delta = sf * std::numeric_limits<scalar_type>::epsilon();
const double rotation_angle = delta * numbers::PI / 180.0;
namespace TableBaseAccessors
{
/**
- * @internal Have a class which declares some nested typedefs, depending
+ * @internal Have a class which declares some nested alias, depending
* on its template parameters. The general template declares nothing, but
* there are more useful specializations regarding the last parameter
* indicating constness of the table for which accessor objects are to be
{};
/**
- * @internal Have a class which declares some nested typedefs, depending
+ * @internal Have a class which declares some nested alias, depending
* on its template parameters. Specialization for accessors to constant
* objects.
*/
template <int N, typename T>
struct Types<N, T, true>
{
- typedef const T value_type;
- typedef const TableBase<N, T> TableType;
+ using value_type = const T;
+ using TableType = const TableBase<N, T>;
- typedef typename AlignedVector<T>::const_iterator iterator;
- typedef typename AlignedVector<T>::const_iterator const_iterator;
+ using iterator = typename AlignedVector<T>::const_iterator;
+ using const_iterator = typename AlignedVector<T>::const_iterator;
- typedef typename AlignedVector<T>::const_reference reference;
- typedef typename AlignedVector<T>::const_reference const_reference;
+ using reference = typename AlignedVector<T>::const_reference;
+ using const_reference = typename AlignedVector<T>::const_reference;
};
/**
- * @internal Have a class which declares some nested typedefs, depending
+ * @internal Have a class which declares some nested alias, depending
* on its template parameters. Specialization for accessors to non-
* constant objects.
*/
template <int N, typename T>
struct Types<N, T, false>
{
- typedef T value_type;
- typedef TableBase<N, T> TableType;
+ using value_type = T;
+ using TableType = TableBase<N, T>;
- typedef typename AlignedVector<T>::iterator iterator;
- typedef typename AlignedVector<T>::const_iterator const_iterator;
+ using iterator = typename AlignedVector<T>::iterator;
+ using const_iterator = typename AlignedVector<T>::const_iterator;
- typedef typename AlignedVector<T>::reference reference;
- typedef typename AlignedVector<T>::const_reference const_reference;
+ using reference = typename AlignedVector<T>::reference;
+ using const_reference = typename AlignedVector<T>::const_reference;
};
class Accessor
{
public:
- typedef typename Types<N, T, C>::TableType TableType;
+ using TableType = typename Types<N, T, C>::TableType;
- typedef typename Types<N, T, C>::iterator iterator;
- typedef typename Types<N, T, C>::const_iterator const_iterator;
+ using iterator = typename Types<N, T, C>::iterator;
+ using const_iterator = typename Types<N, T, C>::const_iterator;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
private:
/**
* this row, as well as all the other types usually required for the
* standard library algorithms.
*/
- typedef typename Types<N, T, C>::value_type value_type;
+ using value_type = typename Types<N, T, C>::value_type;
- typedef typename Types<N, T, C>::iterator iterator;
- typedef typename Types<N, T, C>::const_iterator const_iterator;
+ using iterator = typename Types<N, T, C>::iterator;
+ using const_iterator = typename Types<N, T, C>::const_iterator;
- typedef typename Types<N, T, C>::reference reference;
- typedef typename Types<N, T, C>::const_reference const_reference;
+ using reference = typename Types<N, T, C>::reference;
+ using const_reference = typename Types<N, T, C>::const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
/**
- * Import a typedef from the switch class above.
+ * Import an alias from the switch class above.
*/
- typedef typename Types<N, T, C>::TableType TableType;
+ using TableType = typename Types<N, T, C>::TableType;
private:
/**
class TableBase : public Subscriptor
{
public:
- typedef T value_type;
+ using value_type = T;
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename AlignedVector<T>::size_type size_type;
+ using size_type = typename AlignedVector<T>::size_type;
/**
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<1, T>::size_type size_type;
+ using size_type = typename TableBase<1, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<2, T>::size_type size_type;
+ using size_type = typename TableBase<2, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<3, T>::size_type size_type;
+ using size_type = typename TableBase<3, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<4, T>::size_type size_type;
+ using size_type = typename TableBase<4, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<5, T>::size_type size_type;
+ using size_type = typename TableBase<5, T>::size_type;
/**
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<6, T>::size_type size_type;
+ using size_type = typename TableBase<6, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<7, T>::size_type size_type;
+ using size_type = typename TableBase<7, T>::size_type;
/**
* Default constructor. Set all dimensions to zero.
/**
* Type of the stored pointer to the TransposeTable.
*/
- typedef typename std::conditional<Constness,
- const TransposeTable<T> *,
- TransposeTable<T> *>::type
- container_pointer_type;
+ using container_pointer_type =
+ typename std::conditional<Constness,
+ const TransposeTable<T> *,
+ TransposeTable<T> *>::type;
/**
* Default constructor.
/**
* Numerical type of the row and column indices of the TransposeTable.
*/
- typedef typename TransposeTable<T>::size_type size_type;
+ using size_type = typename TransposeTable<T>::size_type;
/**
* Access the row of the current entry.
/**
* Size type used by TransposeTable.
*/
- typedef typename TransposeTable<T>::size_type size_type;
+ using size_type = typename TransposeTable<T>::size_type;
/**
* Type of the stored pointer to the TransposeTable.
*/
- typedef typename std::conditional<Constness,
- const TransposeTable<T> *,
- TransposeTable<T> *>::type
- container_pointer_type;
+ using container_pointer_type =
+ typename std::conditional<Constness,
+ const TransposeTable<T> *,
+ TransposeTable<T> *>::type;
/**
* Constructor from an accessor.
/**
* Integer type used to count the number of elements in this container.
*/
- typedef typename TableBase<2, T>::size_type size_type;
+ using size_type = typename TableBase<2, T>::size_type;
/**
* Typedef for the values in the table.
*/
- typedef typename AlignedVector<T>::value_type value_type;
+ using value_type = typename AlignedVector<T>::value_type;
/**
* Typedef for the references in the table.
*/
- typedef typename AlignedVector<T>::reference reference;
+ using reference = typename AlignedVector<T>::reference;
/**
* Typedef for the constant references in the table.
*/
- typedef typename AlignedVector<T>::const_reference const_reference;
+ using const_reference = typename AlignedVector<T>::const_reference;
/**
* Typedef for a constant iterator that traverses the table in column-major
* order.
*/
- typedef TransposeTableIterators::Iterator<T, true> const_iterator;
+ using const_iterator = TransposeTableIterators::Iterator<T, true>;
/**
* Typedef for an iterator that traverses the table in column-major order.
*/
- typedef TransposeTableIterators::Iterator<T, false> iterator;
+ using iterator = TransposeTableIterators::Iterator<T, false>;
/**
* Default constructor. Set all dimensions to zero.
/**
* Abbreviation for the data type stored by this object.
*/
- typedef boost::
- variant<int, unsigned int, unsigned long long int, double, std::string>
- value_type;
+ using value_type = boost::
+ variant<int, unsigned int, unsigned long long int, double, std::string>;
/**
* Stored value.
/**
* This specialization of the general template for the case of a <tt>true</tt>
- * first template argument declares a local typedef <tt>type</tt> to the
+ * first template argument declares a local alias <tt>type</tt> to the
* second template argument. It is used in order to construct constraints on
* template arguments in template (and member template) functions. The
* negative specialization is missing.
* @code
* template <bool, typename> struct constraint_and_return_value;
* template <typename T> struct constraint_and_return_value<true,T> {
- * typedef T type;
+ * using type = T;
* };
* @endcode
* constraint_and_return_value<false,T> is not defined. Given something like
template <typename T>
struct DEAL_II_DEPRECATED constraint_and_return_value<true, T>
{
- typedef T type;
+ using type = T;
};
/**
* A template class that simply exports its template argument as a local
- * typedef. This class, while at first appearing useless, makes sense in the
+ * alias. This class, while at first appearing useless, makes sense in the
* following context: if you have a function template as follows:
* @code
* template <typename T> void f(T, T);
template <typename T>
struct identity
{
- typedef T type;
+ using type = T;
};
template <typename T, typename U>
struct ProductTypeImpl
{
- typedef decltype(std::declval<T>() * std::declval<U>()) type;
+ using type = decltype(std::declval<T>() * std::declval<U>());
};
} // namespace internal
/**
- * A class with a local typedef that represents the type that results from the
+ * A class with a local alias that represents the type that results from the
* product of two variables of type @p T and @p U. In other words, we would
* like to infer the type of the <code>product</code> variable in code like
* this:
* U u;
* auto product = t*u;
* @endcode
- * The local typedef of this structure represents the type the variable
+ * The local alias of this structure represents the type the variable
* <code>product</code> would have.
*
*
template <typename T, typename U>
struct ProductType
{
- typedef
+ using type =
typename internal::ProductTypeImpl<typename std::decay<T>::type,
- typename std::decay<U>::type>::type type;
+ typename std::decay<U>::type>::type;
};
namespace internal
template <typename T>
struct ProductTypeImpl<std::complex<T>, std::complex<T>>
{
- typedef std::complex<T> type;
+ using type = std::complex<T>;
};
template <typename T, typename U>
struct ProductTypeImpl<std::complex<T>, std::complex<U>>
{
- typedef std::complex<typename ProductType<T, U>::type> type;
+ using type = std::complex<typename ProductType<T, U>::type>;
};
template <typename U>
struct ProductTypeImpl<double, std::complex<U>>
{
- typedef std::complex<typename ProductType<double, U>::type> type;
+ using type = std::complex<typename ProductType<double, U>::type>;
};
template <typename T>
struct ProductTypeImpl<std::complex<T>, double>
{
- typedef std::complex<typename ProductType<T, double>::type> type;
+ using type = std::complex<typename ProductType<T, double>::type>;
};
template <typename U>
struct ProductTypeImpl<float, std::complex<U>>
{
- typedef std::complex<typename ProductType<float, U>::type> type;
+ using type = std::complex<typename ProductType<float, U>::type>;
};
template <typename T>
struct ProductTypeImpl<std::complex<T>, float>
{
- typedef std::complex<typename ProductType<T, float>::type> type;
+ using type = std::complex<typename ProductType<T, float>::type>;
};
} // namespace internal
/**
- * This class provides a local typedef @p type that is equal to the template
+ * This class provides a local alias @p type that is equal to the template
* argument but only if the template argument corresponds to a scalar type
* (i.e., one of the floating point types, signed or unsigned integer, or a
* complex number). If the template type @p T is not a scalar, then no class
* <code>EnableIfScalar@<T@></code> is declared and, consequently, no local
- * typedef is available.
+ * alias is available.
*
* The purpose of the class is to disable certain template functions if one of
* the arguments is not a scalar number. By way of (nonsensical) example,
template <>
struct EnableIfScalar<double>
{
- typedef double type;
+ using type = double;
};
template <>
struct EnableIfScalar<float>
{
- typedef float type;
+ using type = float;
};
template <>
struct EnableIfScalar<long double>
{
- typedef long double type;
+ using type = long double;
};
template <>
struct EnableIfScalar<int>
{
- typedef int type;
+ using type = int;
};
template <>
struct EnableIfScalar<unsigned int>
{
- typedef unsigned int type;
+ using type = unsigned int;
};
template <typename T>
struct EnableIfScalar<std::complex<T>>
{
- typedef std::complex<T> type;
+ using type = std::complex<T>;
};
* corresponds to type number, and it is equal to Number for all other
* cases. See also the respective field in Vector<Number>.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename numbers::NumberTraits<Number>::real_type real_type;
+ using real_type = typename numbers::NumberTraits<Number>::real_type;
/**
* Type of objects encapsulated by this container and returned by
* operator[](). This is a scalar number type for a rank 0 tensor.
*/
- typedef Number value_type;
+ using value_type = Number;
/**
* Declare an array type which can be used to initialize an object of this
* type statically. In case of a tensor of rank 0 this is just the scalar
* number type Number.
*/
- typedef Number array_type;
+ using array_type = Number;
/**
* Constructor. Set to zero.
* Internal type declaration that is used to specialize the return type of
* operator[]() for Tensor<1,dim,Number>
*/
- typedef Number tensor_type;
+ using tensor_type = Number;
private:
/**
* operator[](). This is a tensor of lower rank for a general tensor, and a
* scalar number type for Tensor<1,dim,Number>.
*/
- typedef typename Tensor<rank_ - 1, dim, Number>::tensor_type value_type;
+ using value_type = typename Tensor<rank_ - 1, dim, Number>::tensor_type;
/**
* Declare an array type which can be used to initialize an object of this
- * type statically.
+ * type statically. For `dim == 0`, its size is 1. Otherwise, it is `dim`.
*/
- typedef typename Tensor<rank_ - 1, dim, Number>::array_type
- array_type[(dim != 0) ? dim : 1];
- // ... avoid a compiler warning in case of dim == 0 and ensure that the
- // array always has positive size.
+ using array_type =
+ typename Tensor<rank_ - 1, dim, Number>::array_type[(dim != 0) ? dim : 1];
/**
* Constructor. Initialize all entries to zero.
* Internal type declaration that is used to specialize the return type of
* operator[]() for Tensor<1,dim,Number>
*/
- typedef Tensor<rank_, dim, Number> tensor_type;
+ using tensor_type = Tensor<rank_, dim, Number>;
private:
/**
const TensorT2<rank_1 + rank_2, dim, T2> &middle,
const TensorT3<rank_2, dim, T3> & right)
{
- typedef typename ProductType<T1, typename ProductType<T2, T3>::type>::type
- return_type;
+ using return_type =
+ typename ProductType<T1, typename ProductType<T2, T3>::type>::type;
return TensorAccessors::contract3<rank_1, rank_2, dim, return_type>(left,
middle,
right);
* The methods and algorithms implemented in this namespace, however, are
* fully generic. More precisely, it can operate on nested c-style arrays, or
* on class types <code>T</code> with a minimal interface that provides a
- * local typedef <code>value_type</code> and an index operator
+ * local alias <code>value_type</code> and an index operator
* <code>operator[](unsigned int)</code> that returns a (const or non-const)
* reference of <code>value_type</code>:
* @code
* template <...>
* class T
* {
- * typedef ... value_type;
+ * using value_type = ...;
* value_type & operator[](unsigned int);
* const value_type & operator[](unsigned int) const;
* };
/**
- * This class provides a local typedef @p value_type denoting the resulting
+ * This class provides a local alias @p value_type denoting the resulting
* type of an access with operator[](unsigned int). More precisely, @p
* value_type will be
- * - <code>T::value_type</code> if T is a tensorial class providing a
- * typedef <code>value_type</code> and does not have a const qualifier.
+ * - <code>T::value_type</code> if T is a tensorial class providing an
+ * alias <code>value_type</code> and does not have a const qualifier.
* - <code>const T::value_type</code> if T is a tensorial class
- * providing a typedef <code>value_type</code> and does have a const
+ * providing an alias <code>value_type</code> and does have a const
* qualifier.
* - <code>const T::value_type</code> if T is a tensorial class
- * providing a typedef <code>value_type</code> and does have a const
+ * providing an alias <code>value_type</code> and does have a const
* qualifier.
* - <code>A</code> if T is of array type <code>A[...]</code>
* - <code>const A</code> if T is of array type <code>A[...]</code> and
template <typename T>
struct ValueType
{
- typedef typename T::value_type value_type;
+ using value_type = typename T::value_type;
};
template <typename T>
struct ValueType<const T>
{
- typedef const typename T::value_type value_type;
+ using value_type = const typename T::value_type;
};
template <typename T, std::size_t N>
struct ValueType<T[N]>
{
- typedef T value_type;
+ using value_type = T;
};
template <typename T, std::size_t N>
struct ValueType<const T[N]>
{
- typedef const T value_type;
+ using value_type = const T;
};
/**
- * This class provides a local typedef @p value_type that is equal to the
- * typedef <code>value_type</code> after @p deref_steps recursive
+ * This class provides a local alias @p value_type that is equal to the
+ * alias <code>value_type</code> after @p deref_steps recursive
* dereferences via ```operator[](unsigned int)```. Further, constness is
* preserved via the ValueType type trait, i.e., if T is const,
* ReturnType<rank, T>::value_type will also be const.
template <int deref_steps, typename T>
struct ReturnType
{
- typedef typename ReturnType<deref_steps - 1,
- typename ValueType<T>::value_type>::value_type
- value_type;
+ using value_type =
+ typename ReturnType<deref_steps - 1,
+ typename ValueType<T>::value_type>::value_type;
};
template <typename T>
struct ReturnType<0, T>
{
- typedef T value_type;
+ using value_type = T;
};
* tensors.
*
* @note This function returns an internal class object consisting of an
- * array subscript operator <code>operator[](unsigned int)</code> and a
- * typedef <code>value_type</code> describing its return value.
+ * array subscript operator <code>operator[](unsigned int)</code> and an
+ * alias <code>value_type</code> describing its return value.
*
* @tparam index The index to be shifted to the end. Indices are counted
* from 0, thus the valid range is $0\le\text{index}<\text{rank}$.
* @tparam rank Rank of the tensorial object @p t
* @tparam T A tensorial object of rank @p rank. @p T must provide a local
- * typedef <code>value_type</code> and an index operator
+ * alias <code>value_type</code> and an index operator
* <code>operator[]()</code> that returns a (const or non-const) reference
* of <code>value_type</code>.
*
* This is equivalent to <code>tensor[0][1][2][3][4] = 42.</code>.
*
* @tparam T A tensorial object of rank @p rank. @p T must provide a local
- * typedef <code>value_type</code> and an index operator
+ * alias <code>value_type</code> and an index operator
* <code>operator[]()</code> that returns a (const or non-const) reference
* of <code>value_type</code>. Further, its tensorial rank must be equal or
* greater than @p rank.
template <typename T>
struct ReferenceType
{
- typedef T &type;
+ using type = T &;
};
template <int rank, typename S>
struct ReferenceType<StoreIndex<rank, S>>
{
- typedef StoreIndex<rank, S> type;
+ using type = StoreIndex<rank, S>;
};
template <int index, int rank, typename T>
struct ReferenceType<ReorderedIndexView<index, rank, T>>
{
- typedef ReorderedIndexView<index, rank, T> type;
+ using type = ReorderedIndexView<index, rank, T>;
};
: t_(t)
{}
- typedef ReorderedIndexView<index - 1,
- rank - 1,
- typename ValueType<T>::value_type>
- value_type;
+ using value_type = ReorderedIndexView<index - 1,
+ rank - 1,
+ typename ValueType<T>::value_type>;
// Recurse by applying index j directly:
inline DEAL_II_ALWAYS_INLINE value_type operator[](unsigned int j) const
: t_(t)
{}
- typedef StoreIndex<rank - 1, internal::Identity<T>> value_type;
+ using value_type = StoreIndex<rank - 1, internal::Identity<T>>;
inline DEAL_II_ALWAYS_INLINE value_type operator[](unsigned int j) const
{
: t_(t)
{}
- typedef typename ReferenceType<typename ValueType<T>::value_type>::type
- value_type;
+ using value_type =
+ typename ReferenceType<typename ValueType<T>::value_type>::type;
inline DEAL_II_ALWAYS_INLINE value_type operator[](unsigned int j) const
{
: t_(t)
{}
- typedef typename ValueType<T>::value_type return_type;
+ using return_type = typename ValueType<T>::value_type;
inline DEAL_II_ALWAYS_INLINE typename ReferenceType<return_type>::type
apply(unsigned int j) const
, i_(i)
{}
- typedef StoreIndex<rank - 1, StoreIndex<rank, S>> value_type;
+ using value_type = StoreIndex<rank - 1, StoreIndex<rank, S>>;
inline DEAL_II_ALWAYS_INLINE value_type operator[](unsigned int j) const
{
return value_type(*this, j);
}
- typedef
- typename ValueType<typename S::return_type>::value_type return_type;
+ using return_type =
+ typename ValueType<typename S::return_type>::value_type;
inline typename ReferenceType<return_type>::type
apply(unsigned int j) const
, i_(i)
{}
- typedef
- typename ValueType<typename S::return_type>::value_type return_type;
- typedef return_type value_type;
+ using return_type =
+ typename ValueType<typename S::return_type>::value_type;
+ using value_type = return_type;
inline DEAL_II_ALWAYS_INLINE return_type &operator[](unsigned int j) const
{
{
public:
/**
- * Define typedefs for the return types of the <tt>value</tt> functions.
+ * Define alias for the return types of the <tt>value</tt> functions.
*/
- typedef Tensor<rank, dim, Number> value_type;
+ using value_type = Tensor<rank, dim, Number>;
- typedef Tensor<rank + 1, dim, Number> gradient_type;
+ using gradient_type = Tensor<rank + 1, dim, Number>;
/**
* Constructor. May take an initial value for the time variable, which
* If using POSIX functions, then alias the POSIX wrapper classes to the
* names we use throughout the library.
*/
- typedef PosixThreadBarrier Barrier;
+ using Barrier = PosixThreadBarrier;
# else
/**
* aliased to dummy classes that actually do nothing, in particular not lock
* objects. Likewise for the barrier class.
*/
- typedef DummyThreadMutex Mutex;
+ using Mutex = DummyThreadMutex;
/**
* In non-multithread mode, the mutex and thread management classes are
* aliased to dummy classes that actually do nothing, in particular not lock
* objects. Likewise for the barrier class.
*/
- typedef DummyThreadCondition ConditionVariable;
+ using ConditionVariable = DummyThreadCondition;
/**
* In non-multithread mode, the mutex and thread management classes are
* aliased to dummy classes that actually do nothing, in particular not lock
* objects. Likewise for the barrier class.
*/
- typedef DummyBarrier Barrier;
+ using Barrier = DummyBarrier;
# endif
} // namespace Threads
const ForwardIterator &end,
const unsigned int n_intervals)
{
- typedef std::pair<ForwardIterator, ForwardIterator> IteratorPair;
+ using IteratorPair = std::pair<ForwardIterator, ForwardIterator>;
// in non-multithreaded mode, we often have the case that this
// function is called with n_intervals==1, so have a shortcut here
RT value;
public:
- typedef RT &reference_type;
+ using reference_type = RT &;
inline return_value()
: value()
RT *value;
public:
- typedef RT &reference_type;
+ using reference_type = RT &;
inline return_value()
: value(nullptr)
template <>
struct return_value<void>
{
- typedef void reference_type;
+ using reference_type = void;
static inline void
get()
new_thread(FunctionObjectType function_object)
-> Thread<decltype(function_object())>
{
- typedef decltype(function_object()) return_type;
+ using return_type = decltype(function_object());
return Thread<return_type>(std::function<return_type()>(function_object));
}
new_task(FunctionObjectType function_object)
-> Task<decltype(function_object())>
{
- typedef decltype(function_object()) return_type;
+ using return_type = decltype(function_object());
dealii::MultithreadInfo::initialize_multithreading();
return Task<return_type>(std::function<return_type()>(function_object));
}
* 1/64th of a second and POSIX uses microseconds, so go with microseconds
* for uniformity.
*/
- typedef std::chrono::microseconds duration;
+ using duration = std::chrono::microseconds;
/**
* Signed integral type used to store the value returned by count().
*/
- typedef duration::rep rep;
+ using rep = duration::rep;
/**
* Ratio representing the length of a period (in seconds).
*/
- typedef duration::period period;
+ using period = duration::period;
/**
* Time point type.
*/
- typedef std::chrono::time_point<CPUClock, duration> time_point;
+ using time_point = std::chrono::time_point<CPUClock, duration>;
/**
* Boolean indicating that the clock monotonically increases.
*
* @tparam clock_type_ The type of the clock whose measurements are being
* stored. This class should conform to the usual clock interface expected
- * by <code>std::chrono</code> (i.e., the correct <code>typedef</code>s and
- * a static <code>now()</code> method).
+ * by <code>std::chrono</code> (i.e., the correct alias and a static
+ * <code>now()</code> method).
*/
template <class clock_type_>
struct ClockMeasurements
/**
* Store the clock type.
*/
- typedef clock_type_ clock_type;
+ using clock_type = clock_type_;
/**
* The time point type of the provided clock.
*/
- typedef typename clock_type::time_point time_point_type;
+ using time_point_type = typename clock_type::time_point;
/**
* The duration type of the provided clock.
*/
- typedef typename clock_type::duration duration_type;
+ using duration_type = typename clock_type::duration;
/**
* The time point corresponding to the start of the current lap. This is
};
/**
- * typedef for the wall clock.
+ * Alias for the wall clock.
*/
- typedef std::chrono::steady_clock wall_clock_type;
+ using wall_clock_type = std::chrono::steady_clock;
/**
- * typedef for the CPU clock.
+ * Alias for the CPU clock.
*/
- typedef CPUClock cpu_clock_type;
+ using cpu_clock_type = CPUClock;
/**
* Collection of wall time measurements.
DEAL_II_NAMESPACE_OPEN
/**
- * A namespace in which we declare typedefs for types used in deal.II, as well
+ * A namespace in which we declare alias for types used in deal.II, as well
* as special values for these types.
*/
namespace types
* There is a special value, numbers::invalid_subdomain_id that is used to
* indicate an invalid value of this type.
*/
- typedef unsigned int subdomain_id;
+ using subdomain_id = unsigned int;
/**
* The type used for global indices of vertices.
*/
- typedef unsigned long long int global_vertex_index;
+ using global_vertex_index = unsigned long long int;
/**
* An identifier that denotes the MPI type associated with
*/
// TODO: we should check that unsigned long long int
// has the same size as uint64_t
- typedef unsigned long long int global_dof_index;
+ using global_dof_index = unsigned long long int;
/**
* An identifier that denotes the MPI type associated with
*
* The data type always indicates an unsigned integer type.
*/
- typedef unsigned int global_dof_index;
+ using global_dof_index = unsigned int;
/**
* An identifier that denotes the MPI type associated with
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- typedef unsigned int boundary_id;
+ using boundary_id = unsigned int;
/**
* The type used to denote manifold indicators associated with every object
* @see
* @ref GlossManifoldIndicator "Glossary entry on manifold indicators"
*/
- typedef unsigned int manifold_id;
+ using manifold_id = unsigned int;
/**
* The type used to denote material indicators associated with every cell.
* @see
* @ref GlossMaterialId "Glossary entry on material indicators"
*/
- typedef unsigned int material_id;
+ using material_id = unsigned int;
} // namespace types
/**
* Declare type used in Epetra.
*/
-typedef double TrilinosScalar;
+using TrilinosScalar = double;
namespace TrilinosWrappers
/**
* Declare type of integer used in the Epetra package of Trilinos.
*/
- typedef long long int_type;
+ using int_type = long long;
#else
/**
* Declare type of integer used in the Epetra package of Trilinos.
*/
- typedef int int_type;
+ using int_type = int;
#endif
} // namespace types
} // namespace TrilinosWrappers
template <typename Number>
struct EnableIfScalar<VectorizedArray<Number>>
{
- typedef VectorizedArray<typename EnableIfScalar<Number>::type> type;
+ using type = VectorizedArray<typename EnableIfScalar<Number>::type>;
};
* Typedef to a list of scratch data objects. The rationale for this
* list is provided in the variables that use these lists.
*/
- typedef std::list<ScratchDataObject> ScratchDataList;
+ using ScratchDataList = std::list<ScratchDataObject>;
/**
* A list of iterators that need to be worked on. Only the first
operator()(void *item) override
{
// first unpack the current item
- typedef
+ using ItemType =
typename IteratorRangeToItemStream<Iterator,
ScratchData,
- CopyData>::ItemType ItemType;
+ CopyData>::ItemType;
ItemType *current_item = static_cast<ItemType *>(item);
operator()(void *item) override
{
// first unpack the current item
- typedef
+ using ItemType =
typename IteratorRangeToItemStream<Iterator,
ScratchData,
- CopyData>::ItemType ItemType;
+ CopyData>::ItemType;
ItemType *current_item = static_cast<ItemType *>(item);
}
private:
- typedef typename Implementation3::
- ScratchAndCopyDataObjects<Iterator, ScratchData, CopyData>
- ScratchAndCopyDataObjects;
+ using ScratchAndCopyDataObjects = typename Implementation3::
+ ScratchAndCopyDataObjects<Iterator, ScratchData, CopyData>;
/**
* Typedef to a list of scratch data objects. The rationale for this
* list is provided in the variables that use these lists.
*/
- typedef std::list<ScratchAndCopyDataObjects> ScratchAndCopyDataList;
+ using ScratchAndCopyDataList = std::list<ScratchAndCopyDataObjects>;
Threads::ThreadLocalStorage<ScratchAndCopyDataList> data;
for (unsigned int color = 0; color < colored_iterators.size(); ++color)
if (colored_iterators[color].size() > 0)
{
- typedef internal::Implementation3::
- WorkerAndCopier<Iterator, ScratchData, CopyData>
- WorkerAndCopier;
+ using WorkerAndCopier = internal::Implementation3::
+ WorkerAndCopier<Iterator, ScratchData, CopyData>;
- typedef typename std::vector<Iterator>::const_iterator RangeType;
+ using RangeType = typename std::vector<Iterator>::const_iterator;
WorkerAndCopier worker_and_copier(worker,
copier,
* // State whether the auto-differentiable number uses taping or not.
* static const bool is_taped;
* // The real-type for the auto-differentiable number
- * typedef <ADNumberType> real_type;
+ * using real_type = <ADNumberType>;
* // The type of number returned when taking the first derivative of the @p real_type.
- * typedef <Scalar/ADNumberType> derivative_type;
+ * using derivative_type = <Scalar/ADNumberType>;
* // The number of derivative levels computable from the @p real_type.
* static const unsigned int n_supported_derivative_levels;
*
template <typename Number>
struct RemoveComplexWrapper
{
- typedef Number type;
+ using type = Number;
};
template <typename Number>
struct RemoveComplexWrapper<std::complex<Number>>
{
- typedef typename RemoveComplexWrapper<Number>::type type;
+ using type = typename RemoveComplexWrapper<Number>::type;
};
* internal::ADNumberInfoFromEnum is to be defined, from which we require
* the following basic information determine all of the required information
* and type traits for our helper classes:
- * - A typedef called @p scalar_type, which defines the scalar or
+ * - An alias called @p scalar_type, which defines the scalar or
* floating-point valued counterpart to the auto-differentiable number
* type. This can be real or complex valued.
- * - A typedef called @p derivative_type, which defines the
+ * - An alias called @p derivative_type, which defines the
* number type for directional derivatives.
* - A boolean called @p is_taped, which defines whether the auto-differentiable
* number is a taped number or not.
* Underlying floating point value type.
* This could real-valued or complex-valued.
*/
- typedef ScalarType scalar_type;
+ using scalar_type = ScalarType;
/**
* Type for real numbers
*/
- typedef typename internal::ADNumberInfoFromEnum<
+ using real_type = typename internal::ADNumberInfoFromEnum<
typename internal::RemoveComplexWrapper<ScalarType>::type,
- ADNumberTypeCode>::real_type real_type;
+ ADNumberTypeCode>::real_type;
/**
* Type for complex numbers
*/
- typedef std::complex<real_type> complex_type;
+ using complex_type = std::complex<real_type>;
/**
* The actual auto-differentiable number type
*/
- typedef
- typename std::conditional<is_real_valued, real_type, complex_type>::type
- ad_type;
+ using ad_type = typename std::
+ conditional<is_real_valued, real_type, complex_type>::type;
/**
* The actual auto-differentiable number directional derivative type
*/
- typedef typename std::conditional<
+ using derivative_type = typename std::conditional<
is_real_valued,
typename internal::ADNumberInfoFromEnum<
typename internal::RemoveComplexWrapper<ScalarType>::type,
ADNumberTypeCode>::derivative_type,
std::complex<typename internal::ADNumberInfoFromEnum<
typename internal::RemoveComplexWrapper<ScalarType>::type,
- ADNumberTypeCode>::derivative_type>>::type derivative_type;
+ ADNumberTypeCode>::derivative_type>>::type;
/**
* Underlying floating point value type.
* This could real-valued or complex-valued.
*/
- typedef ScalarType scalar_type;
+ using scalar_type = ScalarType;
static ScalarType
get_directional_derivative(const ScalarType & /*x*/,
typename std::enable_if<
std::is_floating_point<ScalarType>::value>::type>
{
- static const bool is_taped = true;
- typedef adouble real_type;
- typedef double derivative_type;
+ static const bool is_taped = true;
+ using real_type = adouble;
+ using derivative_type = double;
static const unsigned int n_supported_derivative_levels =
std::numeric_limits<unsigned int>::max();
};
typename std::enable_if<
std::is_floating_point<ScalarType>::value>::type>
{
- static const bool is_taped = false;
- typedef adtl::adouble real_type;
- typedef double derivative_type;
+ static const bool is_taped = false;
+ using real_type = adtl::adouble;
+ using derivative_type = double;
static const unsigned int n_supported_derivative_levels = 1;
};
ADNumberTraits<ADNumberType>::type_code == NumberTypes::adolc_taped &&
ADNumberTraits<ADNumberType>::is_real_valued>::type>
{
- typedef typename ADNumberTraits<ADNumberType>::scalar_type scalar_type;
+ using scalar_type = typename ADNumberTraits<ADNumberType>::scalar_type;
/*
* Initialize the state of an independent variable.
NumberTypes::adolc_tapeless &&
ADNumberTraits<ADNumberType>::is_real_valued>::type>
{
- typedef typename ADNumberTraits<ADNumberType>::scalar_type scalar_type;
+ using scalar_type = typename ADNumberTraits<ADNumberType>::scalar_type;
/*
* Initialize the state of an independent variable.
template <>
struct ProductTypeImpl<adouble, adouble>
{
- typedef adouble type;
+ using type = adouble;
};
// Typedefs for "adub"s are all that's necessary to ensure that no temporary
template <>
struct ProductTypeImpl<adub, adouble>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<adouble, adub>
{
- typedef adouble type;
+ using type = adouble;
};
/* --- Double --- */
template <>
struct ProductTypeImpl<double, adouble>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<adouble, double>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<double, adub>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<adub, double>
{
- typedef adouble type;
+ using type = adouble;
};
/* --- Float --- */
template <>
struct ProductTypeImpl<float, adouble>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<adouble, float>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<float, adub>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct ProductTypeImpl<adub, float>
{
- typedef adouble type;
+ using type = adouble;
};
/* --- Complex double --- */
template <>
struct ProductTypeImpl<std::complex<double>, std::complex<adouble>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adouble>, std::complex<double>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adouble>, std::complex<adouble>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adub>, std::complex<adouble>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adouble>, std::complex<adub>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
/* --- Complex float --- */
template <>
struct ProductTypeImpl<std::complex<float>, std::complex<adouble>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adouble>, std::complex<float>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
} // namespace internal
template <>
struct EnableIfScalar<adouble>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct EnableIfScalar<std::complex<adouble>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct EnableIfScalar<adub>
{
- typedef adouble type;
+ using type = adouble;
};
template <>
struct EnableIfScalar<std::complex<adub>>
{
- typedef std::complex<adouble> type;
+ using type = std::complex<adouble>;
};
template <>
struct ProductTypeImpl<double, adtl::adouble>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
template <>
struct ProductTypeImpl<adtl::adouble, double>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
template <>
struct ProductTypeImpl<adtl::adouble, adtl::adouble>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
/* --- Float --- */
template <>
struct ProductTypeImpl<float, adtl::adouble>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
template <>
struct ProductTypeImpl<adtl::adouble, float>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
/* --- Complex double --- */
template <>
struct ProductTypeImpl<std::complex<double>, std::complex<adtl::adouble>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adtl::adouble>, std::complex<double>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adtl::adouble>,
std::complex<adtl::adouble>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
/* --- Complex float --- */
template <>
struct ProductTypeImpl<std::complex<float>, std::complex<adtl::adouble>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
template <>
struct ProductTypeImpl<std::complex<adtl::adouble>, std::complex<float>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
} // namespace internal
template <>
struct EnableIfScalar<adtl::adouble>
{
- typedef adtl::adouble type;
+ using type = adtl::adouble;
};
template <>
struct EnableIfScalar<std::complex<adtl::adouble>>
{
- typedef std::complex<adtl::adouble> type;
+ using type = std::complex<adtl::adouble>;
};
SacadoNumber,
Sacado::Fad::DFad<typename SacadoNumber::value_type>>::value>::type>
{
- typedef SacadoNumber ad_type;
- typedef typename ad_type::scalar_type scalar_type;
- typedef typename ad_type::value_type value_type;
- typedef typename ad_type::value_type derivative_type;
+ using ad_type = SacadoNumber;
+ using scalar_type = typename ad_type::scalar_type;
+ using value_type = typename ad_type::value_type;
+ using derivative_type = typename ad_type::value_type;
static const unsigned int n_supported_derivative_levels =
1 + SacadoNumberInfo<derivative_type>::n_supported_derivative_levels;
SacadoNumber,
Sacado::Rad::ADvar<typename SacadoNumber::value_type>>::value>::type>
{
- typedef SacadoNumber ad_type;
- typedef typename ad_type::ADVari::scalar_type scalar_type;
- typedef typename ad_type::ADVari::value_type value_type;
- typedef typename ad_type::ADVari::value_type derivative_type;
+ using ad_type = SacadoNumber;
+ using scalar_type = typename ad_type::ADVari::scalar_type;
+ using value_type = typename ad_type::ADVari::value_type;
+ using derivative_type = typename ad_type::ADVari::value_type;
static const unsigned int n_supported_derivative_levels =
1 + SacadoNumberInfo<derivative_type>::n_supported_derivative_levels;
typename std::enable_if<
std::is_floating_point<ScalarType>::value>::type>
{
- static const bool is_taped = false;
- typedef Sacado::Fad::DFad<ScalarType> real_type;
- typedef
- typename SacadoNumberInfo<real_type>::derivative_type derivative_type;
+ static const bool is_taped = false;
+ using real_type = Sacado::Fad::DFad<ScalarType>;
+ using derivative_type =
+ typename SacadoNumberInfo<real_type>::derivative_type;
static const unsigned int n_supported_derivative_levels =
SacadoNumberInfo<real_type>::n_supported_derivative_levels;
};
std::is_floating_point<ScalarType>::value>::type>
{
static const bool is_taped = false;
- typedef Sacado::Fad::DFad<Sacado::Fad::DFad<ScalarType>> real_type;
- typedef
- typename SacadoNumberInfo<real_type>::derivative_type derivative_type;
+ using real_type = Sacado::Fad::DFad<Sacado::Fad::DFad<ScalarType>>;
+ using derivative_type =
+ typename SacadoNumberInfo<real_type>::derivative_type;
static const unsigned int n_supported_derivative_levels =
SacadoNumberInfo<real_type>::n_supported_derivative_levels;
};
typename std::enable_if<
std::is_floating_point<ScalarType>::value>::type>
{
- static const bool is_taped = false;
- typedef Sacado::Rad::ADvar<ScalarType> real_type;
- typedef
- typename SacadoNumberInfo<real_type>::derivative_type derivative_type;
+ static const bool is_taped = false;
+ using real_type = Sacado::Rad::ADvar<ScalarType>;
+ using derivative_type =
+ typename SacadoNumberInfo<real_type>::derivative_type;
static const unsigned int n_supported_derivative_levels =
SacadoNumberInfo<real_type>::n_supported_derivative_levels;
};
std::is_floating_point<ScalarType>::value>::type>
{
static const bool is_taped = false;
- typedef Sacado::Rad::ADvar<Sacado::Fad::DFad<ScalarType>> real_type;
- typedef
- typename SacadoNumberInfo<real_type>::derivative_type derivative_type;
+ using real_type = Sacado::Rad::ADvar<Sacado::Fad::DFad<ScalarType>>;
+ using derivative_type =
+ typename SacadoNumberInfo<real_type>::derivative_type;
static const unsigned int n_supported_derivative_levels =
SacadoNumberInfo<real_type>::n_supported_derivative_levels;
};
template <typename NumberType>
struct Marking<Sacado::Fad::DFad<NumberType>>
{
- typedef
- typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::ad_type
- ad_type;
- typedef typename SacadoNumberInfo<
- Sacado::Fad::DFad<NumberType>>::derivative_type derivative_type;
- typedef
- typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::scalar_type
- scalar_type;
+ using ad_type =
+ typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::ad_type;
+ using derivative_type = typename SacadoNumberInfo<
+ Sacado::Fad::DFad<NumberType>>::derivative_type;
+ using scalar_type =
+ typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::scalar_type;
/*
* Initialize the state of an independent variable.
template <typename NumberType>
struct Marking<Sacado::Rad::ADvar<NumberType>>
{
- typedef
- typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::ad_type
- ad_type;
- typedef typename SacadoNumberInfo<
- Sacado::Rad::ADvar<NumberType>>::derivative_type derivative_type;
- typedef
- typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::scalar_type
- scalar_type;
+ using ad_type =
+ typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::ad_type;
+ using derivative_type = typename SacadoNumberInfo<
+ Sacado::Rad::ADvar<NumberType>>::derivative_type;
+ using scalar_type = typename SacadoNumberInfo<
+ Sacado::Rad::ADvar<NumberType>>::scalar_type;
/*
* Initialize the state of an independent variable.
template <typename NumberType>
struct ExtractData<Sacado::Fad::DFad<NumberType>>
{
- typedef typename SacadoNumberInfo<
- Sacado::Fad::DFad<NumberType>>::derivative_type derivative_type;
- typedef
- typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::scalar_type
- scalar_type;
- typedef
- typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::value_type
- value_type;
+ using derivative_type = typename SacadoNumberInfo<
+ Sacado::Fad::DFad<NumberType>>::derivative_type;
+ using scalar_type =
+ typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::scalar_type;
+ using value_type =
+ typename SacadoNumberInfo<Sacado::Fad::DFad<NumberType>>::value_type;
/**
* Extract the real scalar value.
template <typename NumberType>
struct ExtractData<Sacado::Rad::ADvar<NumberType>>
{
- typedef typename SacadoNumberInfo<
- Sacado::Rad::ADvar<NumberType>>::derivative_type derivative_type;
- typedef
- typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::scalar_type
- scalar_type;
- typedef
- typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::value_type
- value_type;
+ using derivative_type = typename SacadoNumberInfo<
+ Sacado::Rad::ADvar<NumberType>>::derivative_type;
+ using scalar_type = typename SacadoNumberInfo<
+ Sacado::Rad::ADvar<NumberType>>::scalar_type;
+ using value_type =
+ typename SacadoNumberInfo<Sacado::Rad::ADvar<NumberType>>::value_type;
/**
* Extract the real scalar value.
template <typename T>
struct ProductTypeImpl<Sacado::Fad::DFad<T>, float>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct ProductTypeImpl<float, Sacado::Fad::DFad<T>>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Fad::DFad<T>, double>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct ProductTypeImpl<double, Sacado::Fad::DFad<T>>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Fad::DFad<T>, int>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct ProductTypeImpl<int, Sacado::Fad::DFad<T>>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Fad::DFad<T>, Sacado::Fad::DFad<U>>
{
- typedef Sacado::Fad::DFad<typename ProductType<T, U>::type> type;
+ using type = Sacado::Fad::DFad<typename ProductType<T, U>::type>;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Fad::Expr<T>, U>
{
- typedef
- typename ProductType<typename Sacado::Fad::Expr<T>::value_type, U>::type
- type;
+ using type =
+ typename ProductType<typename Sacado::Fad::Expr<T>::value_type, U>::type;
};
template <typename T, typename U>
struct ProductTypeImpl<T, Sacado::Fad::Expr<U>>
{
- typedef
- typename ProductType<T, typename Sacado::Fad::Expr<U>::value_type>::type
- type;
+ using type =
+ typename ProductType<T, typename Sacado::Fad::Expr<U>::value_type>::type;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Fad::Expr<T>, Sacado::Fad::Expr<U>>
{
- typedef
+ using type =
typename ProductType<typename Sacado::Fad::Expr<T>::value_type,
- typename Sacado::Fad::Expr<U>::value_type>::type
- type;
+ typename Sacado::Fad::Expr<U>::value_type>::type;
};
} // namespace internal
template <typename T>
struct EnableIfScalar<Sacado::Fad::DFad<T>>
{
- typedef Sacado::Fad::DFad<T> type;
+ using type = Sacado::Fad::DFad<T>;
};
template <typename T>
struct EnableIfScalar<Sacado::Fad::Expr<T>>
{
- typedef typename Sacado::Fad::Expr<T>::value_type type;
+ using type = typename Sacado::Fad::Expr<T>::value_type;
};
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvar<T>, float>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct ProductTypeImpl<float, Sacado::Rad::ADvar<T>>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvar<T>, double>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct ProductTypeImpl<double, Sacado::Rad::ADvar<T>>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvar<T>, int>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct ProductTypeImpl<int, Sacado::Rad::ADvar<T>>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Rad::ADvar<T>, Sacado::Rad::ADvar<U>>
{
- typedef Sacado::Rad::ADvar<typename ProductType<T, U>::type> type;
+ using type = Sacado::Rad::ADvar<typename ProductType<T, U>::type>;
};
/* --- Sacado::Rad::ADvar: Temporary type --- */
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvari<T>, float>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T>
struct ProductTypeImpl<float, Sacado::Rad::ADvari<T>>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvari<T>, double>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T>
struct ProductTypeImpl<double, Sacado::Rad::ADvari<T>>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T>
struct ProductTypeImpl<Sacado::Rad::ADvari<T>, int>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T>
struct ProductTypeImpl<int, Sacado::Rad::ADvari<T>>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Rad::ADvari<T>, Sacado::Rad::ADvari<U>>
{
- typedef Sacado::Rad::ADvari<typename ProductType<T, U>::type> type;
+ using type = Sacado::Rad::ADvari<typename ProductType<T, U>::type>;
};
/* --- Sacado::Rad::ADvar: Main and temporary type --- */
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Rad::ADvar<T>, Sacado::Rad::ADvari<U>>
{
- typedef Sacado::Rad::ADvar<typename ProductType<T, U>::type> type;
+ using type = Sacado::Rad::ADvar<typename ProductType<T, U>::type>;
};
template <typename T, typename U>
struct ProductTypeImpl<Sacado::Rad::ADvari<T>, Sacado::Rad::ADvar<U>>
{
- typedef Sacado::Rad::ADvar<typename ProductType<T, U>::type> type;
+ using type = Sacado::Rad::ADvar<typename ProductType<T, U>::type>;
};
} // namespace internal
template <typename T>
struct EnableIfScalar<Sacado::Rad::ADvar<T>>
{
- typedef Sacado::Rad::ADvar<T> type;
+ using type = Sacado::Rad::ADvar<T>;
};
template <typename T>
struct EnableIfScalar<Sacado::Rad::ADvari<T>>
{
- typedef Sacado::Rad::ADvari<T> type;
+ using type = Sacado::Rad::ADvari<T>;
};
namespace p4est
{
/**
- * A structure whose explicit specializations contain typedefs to the
+ * A structure whose explicit specializations contain alias to the
* relevant p4est_* and p8est_* types. Using this structure, for example
* by saying <tt>types<dim>::connectivity</tt> we can write code in a
* dimension independent way, either referring to p4est_connectivity_t or
template <>
struct types<2>
{
- typedef p4est_connectivity_t connectivity;
- typedef p4est_t forest;
- typedef p4est_tree_t tree;
- typedef p4est_quadrant_t quadrant;
- typedef p4est_topidx_t topidx;
- typedef p4est_locidx_t locidx;
+ using connectivity = p4est_connectivity_t;
+ using forest = p4est_t;
+ using tree = p4est_tree_t;
+ using quadrant = p4est_quadrant_t;
+ using topidx = p4est_topidx_t;
+ using locidx = p4est_locidx_t;
# if DEAL_II_P4EST_VERSION_GTE(0, 3, 4, 3)
- typedef p4est_connect_type_t balance_type;
+ using balance_type = p4est_connect_type_t;
# else
- typedef p4est_balance_type_t balance_type;
+ using balance_type = p4est_balance_type_t;
# endif
- typedef p4est_ghost_t ghost;
+ using ghost = p4est_ghost_t;
};
template <>
struct types<3>
{
- typedef p8est_connectivity_t connectivity;
- typedef p8est_t forest;
- typedef p8est_tree_t tree;
- typedef p8est_quadrant_t quadrant;
- typedef p4est_topidx_t topidx;
- typedef p4est_locidx_t locidx;
+ using connectivity = p8est_connectivity_t;
+ using forest = p8est_t;
+ using tree = p8est_tree_t;
+ using quadrant = p8est_quadrant_t;
+ using topidx = p4est_topidx_t;
+ using locidx = p4est_locidx_t;
# if DEAL_II_P4EST_VERSION_GTE(0, 3, 4, 3)
- typedef p8est_connect_type_t balance_type;
+ using balance_type = p8est_connect_type_t;
# else
- typedef p8est_balance_type_t balance_type;
+ using balance_type = p8est_balance_type_t;
# endif
- typedef p8est_ghost_t ghost;
+ using ghost = p8est_ghost_t;
};
template <>
struct iter<2>
{
- typedef p4est_iter_corner_info_t corner_info;
- typedef p4est_iter_corner_side_t corner_side;
- typedef p4est_iter_corner_t corner_iter;
- typedef p4est_iter_face_info_t face_info;
- typedef p4est_iter_face_side_t face_side;
- typedef p4est_iter_face_t face_iter;
+ using corner_info = p4est_iter_corner_info_t;
+ using corner_side = p4est_iter_corner_side_t;
+ using corner_iter = p4est_iter_corner_t;
+ using face_info = p4est_iter_face_info_t;
+ using face_side = p4est_iter_face_side_t;
+ using face_iter = p4est_iter_face_t;
};
template <>
struct iter<3>
{
- typedef p8est_iter_corner_info_t corner_info;
- typedef p8est_iter_corner_side_t corner_side;
- typedef p8est_iter_corner_t corner_iter;
- typedef p8est_iter_edge_info_t edge_info;
- typedef p8est_iter_edge_side_t edge_side;
- typedef p8est_iter_edge_t edge_iter;
- typedef p8est_iter_face_info_t face_info;
- typedef p8est_iter_face_side_t face_side;
- typedef p8est_iter_face_t face_iter;
+ using corner_info = p8est_iter_corner_info_t;
+ using corner_side = p8est_iter_corner_side_t;
+ using corner_iter = p8est_iter_corner_t;
+ using edge_info = p8est_iter_edge_info_t;
+ using edge_side = p8est_iter_edge_side_t;
+ using edge_iter = p8est_iter_edge_t;
+ using face_info = p8est_iter_face_info_t;
+ using face_side = p8est_iter_face_side_t;
+ using face_iter = p8est_iter_face_t;
};
class Triangulation : public dealii::parallel::Triangulation<dim, spacedim>
{
public:
- typedef
- typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
- active_cell_iterator;
- typedef typename dealii::Triangulation<dim, spacedim>::cell_iterator
- cell_iterator;
+ using active_cell_iterator =
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator;
+ using cell_iterator =
+ typename dealii::Triangulation<dim, spacedim>::cell_iterator;
/**
* Configuration flags for distributed Triangulations to be set in the
{
public:
/**
- * A typedef that is used to identify cell iterators. The concept of
+ * An alias that is used to identify cell iterators. The concept of
* iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies cells in a triangulation. You can find
- * the exact type it refers to in the base class's own typedef, but it
+ * The current alias identifies cells in a triangulation. You can find
+ * the exact type it refers to in the base class's own alias, but it
* should be TriaIterator<CellAccessor<dim,spacedim> >. The TriaIterator
* class works like a pointer that when you dereference it yields an
* object of type CellAccessor. CellAccessor is a class that identifies
*
* @ingroup Iterators
*/
- typedef typename dealii::Triangulation<dim, spacedim>::cell_iterator
- cell_iterator;
+ using cell_iterator =
+ typename dealii::Triangulation<dim, spacedim>::cell_iterator;
/**
- * A typedef that is used to identify
+ * An alias that is used to identify
* @ref GlossActive "active cell iterators".
* The concept of iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies active cells in a triangulation. You
- * can find the exact type it refers to in the base class's own typedef,
+ * The current alias identifies active cells in a triangulation. You
+ * can find the exact type it refers to in the base class's own alias,
* but it should be TriaActiveIterator<CellAccessor<dim,spacedim> >. The
* TriaActiveIterator class works like a pointer to active objects that
* when you dereference it yields an object of type CellAccessor.
*
* @ingroup Iterators
*/
- typedef
- typename dealii::Triangulation<dim, spacedim>::active_cell_iterator
- active_cell_iterator;
+ using active_cell_iterator =
+ typename dealii::Triangulation<dim, spacedim>::active_cell_iterator;
- typedef
- typename dealii::Triangulation<dim, spacedim>::CellStatus CellStatus;
+ using CellStatus =
+ typename dealii::Triangulation<dim, spacedim>::CellStatus;
/**
* Configuration flags for distributed Triangulations to be set in the
* description of the latter, see the documentation for the member
* function register_data_attach.
*/
- typedef typename std::tuple<
+ using quadrant_cell_relation_t = typename std::tuple<
typename dealii::internal::p4est::types<dim>::quadrant *,
CellStatus,
- cell_iterator>
- quadrant_cell_relation_t;
+ cell_iterator>;
/**
* Vector of tuples, which each contain a p4est quadrant, a deal.II cell
/**
- * This class declares a local typedef that denotes a mapping between a
- * boundary indicator (see
- * @ref GlossBoundaryIndicator)
- * that is used to describe what kind of boundary condition holds on a
- * particular piece of the boundary, and the function describing the actual
- * function that provides the boundary values on this part of the boundary.
- * This type is required in many functions in the library where, for example,
- * we need to know about the functions $h_i(\mathbf x)$ used in boundary
- * conditions
+ * This class declares a local alias that denotes a mapping between a boundary
+ * indicator (see @ref GlossBoundaryIndicator) that is used to describe what
+ * kind of boundary condition holds on a particular piece of the boundary, and
+ * the function describing the actual function that provides the boundary values
+ * on this part of the boundary. This type is required in many functions in the
+ * library where, for example, we need to know about the functions
+ * $h_i(\mathbf x)$ used in boundary conditions
* @f{align*}{
* \mathbf n \cdot \nabla u = h_i \qquad \qquad
* \text{on}\ \Gamma_i\subset\partial\Omega.
* @f}
- * An example is the function KellyErrorEstimator::estimate() that allows us
- * to provide a set of functions $h_i$ for all those boundary indicators $i$
- * for which the boundary condition is supposed to be of Neumann type. Of
- * course, the same kind of principle can be applied to cases where we care
- * about Dirichlet values, where one needs to provide a map from boundary
- * indicator $i$ to Dirichlet function $h_i$ if the boundary conditions are
- * given as
+ * An example is the function KellyErrorEstimator::estimate() that allows us to
+ * provide a set of functions $h_i$ for all those boundary indicators $i$ for
+ * which the boundary condition is supposed to be of Neumann type. Of course,
+ * the same kind of principle can be applied to cases where we care about
+ * Dirichlet values, where one needs to provide a map from boundary indicator
+ * $i$ to Dirichlet function $h_i$ if the boundary conditions are given as
* @f{align*}{
* u = h_i \qquad \qquad \text{on}\ \Gamma_i\subset\partial\Omega.
* @f}
- * This is, for example, the case for the VectorTools::interpolate()
- * functions.
+ * This is, for example, the case for the VectorTools::interpolate() functions.
*
* Tutorial programs step-6, step-7 and step-8 show examples of how to use
- * function arguments of this type in situations where we actually have an
- * empty map (i.e., we want to describe that <i>no</i> part of the boundary is
- * a Neumann boundary). step-16 actually uses it in a case where one of the
- * parts of the boundary uses a boundary indicator for which we want to use a
- * function object.
+ * function arguments of this type in situations where we actually have an empty
+ * map (i.e., we want to describe that <i>no</i> part of the boundary is a
+ * Neumann boundary). step-16 actually uses it in a case where one of the parts
+ * of the boundary uses a boundary indicator for which we want to use a function
+ * object.
*
- * It seems odd at first to declare this typedef inside a class, rather than
- * declaring a typedef at global scope. The reason is that C++ does not allow
- * to define templated typedefs, where here in fact we want a typedef that
- * depends on the space dimension. (Defining templated typedefs is something
- * that is possible starting with the C++11 standard, but that wasn't possible
- * within the C++98 standard in place when this programming pattern was
- * conceived.)
+ * It seems odd at first to declare this alias inside a class, rather than
+ * declaring an alias at global scope. The reason is that C++ does not allow to
+ * define templated alias, where here in fact we want an alias that depends on
+ * the space dimension. (Defining templated alias is something that is possible
+ * starting with the C++11 standard, but that wasn't possible within the C++98
+ * standard in place when this programming pattern was conceived.)
*
* @ingroup functions
* @author Wolfgang Bangerth, Ralf Hartmann, 2001
/**
* Declare the type as discussed above. Since we can't name it FunctionMap
* (as that would ambiguate a possible constructor of this class), name it
- * in the fashion of the standard container local typedefs.
+ * in the fashion of the standard container local alias.
*
* @deprecated Use the alias type directly.
*/
- DEAL_II_DEPRECATED
- typedef std::map<types::boundary_id, const Function<dim, Number> *> type;
+ using type DEAL_II_DEPRECATED =
+ std::map<types::boundary_id, const Function<dim, Number> *>;
};
DEAL_II_NAMESPACE_CLOSE
namespace DoFAccessorImplementation
{
/**
- * This is a switch class which only declares a @p typedef. It is meant to
+ * This is a switch class which only declares an @p alias. It is meant to
* determine which class a DoFAccessor class is to be derived from. By
* default, <tt>DoFAccessor@<structdim,dim,spacedim@></tt> derives from
- * the typedef in the general
+ * the alias in the general
* <tt>Inheritance@<structdim,dim,spacedim@></tt> class, which is
* <tt>TriaAccessor@<structdim,dim,spacedim@></tt>, but if
* <tt>structdim==dim</tt>, then the specialization
struct Inheritance
{
/**
- * Declaration of the @p typedef. See the full documentation for more
+ * Declaration of the @p alias. See the full documentation for more
* information.
*/
- typedef dealii::TriaAccessor<structdim, dim, spacedim> BaseClass;
+ using BaseClass = dealii::TriaAccessor<structdim, dim, spacedim>;
};
struct Inheritance<dim, dim, spacedim>
{
/**
- * Declaration of the @p typedef. See the full documentation for more
+ * Declaration of the @p alias. See the full documentation for more
* information.
*/
- typedef dealii::CellAccessor<dim, spacedim> BaseClass;
+ using BaseClass = dealii::CellAccessor<dim, spacedim>;
};
} // namespace DoFAccessorImplementation
} // namespace internal
* function get_active_or_mg_dof_indices(). See the section on Generic loops
* below.
*
- * <h3>Typedefs</h3>
+ * <h3>Alias</h3>
*
- * Usage is best to happen through the typedefs to the various kinds of
+ * Usage is best to happen through the alias to the various kinds of
* iterators provided by the DoFHandler and hp::DoFHandler classes, since they
* are more secure to changes in the class naming and template interface as
* well as providing easier typing (much less complicated names!).
static const unsigned int space_dimension = DoFHandlerType::space_dimension;
/**
- * Declare a typedef to the base class to make accessing some of the
+ * Declare an alias to the base class to make accessing some of the
* exception classes simpler.
*/
- typedef typename dealii::internal::DoFAccessorImplementation::
- Inheritance<structdim, dimension, space_dimension>::BaseClass BaseClass;
+ using BaseClass = typename dealii::internal::DoFAccessorImplementation::
+ Inheritance<structdim, dimension, space_dimension>::BaseClass;
/**
* Data type passed by the iterator class.
*/
- typedef DoFHandlerType AccessorData;
+ using AccessorData = DoFHandlerType;
/**
* @name Constructors
static const unsigned int space_dimension = spacedim;
/**
- * Declare a typedef to the base class to make accessing some of the
+ * Declare an alias to the base class to make accessing some of the
* exception classes simpler.
*/
- typedef TriaAccessor<0, 1, spacedim> BaseClass;
+ using BaseClass = TriaAccessor<0, 1, spacedim>;
/**
* Data type passed by the iterator class.
*/
- typedef DoFHandlerType<1, spacedim> AccessorData;
+ using AccessorData = DoFHandlerType<1, spacedim>;
/**
* @name Constructors
{
public:
/**
- * Propagate typedef from base class to this class.
+ * Propagate alias from base class to this class.
*/
- typedef typename InvalidAccessor<structdim, dim, spacedim>::AccessorData
- AccessorData;
+ using AccessorData =
+ typename InvalidAccessor<structdim, dim, spacedim>::AccessorData;
/**
* Constructor. This class is used for iterators that do not make
/**
* Data type passed by the iterator class.
*/
- typedef DoFHandlerType AccessorData;
+ using AccessorData = DoFHandlerType;
/**
- * Declare a typedef to the base class to make accessing some of the
+ * Declare an alias to the base class to make accessing some of the
* exception classes simpler.
*/
- typedef DoFAccessor<DoFHandlerType::dimension,
- DoFHandlerType,
- level_dof_access>
- BaseClass;
+ using BaseClass =
+ DoFAccessor<DoFHandlerType::dimension, DoFHandlerType, level_dof_access>;
/**
* Define the type of the container this is part of.
*/
- typedef DoFHandlerType Container;
+ using Container = DoFHandlerType;
/**
* A type for an iterator over the faces of a cell. This is what the face()
* function returns.
*/
- typedef TriaIterator<DoFAccessor<DoFHandlerType::dimension - 1,
- DoFHandlerType,
- level_dof_access>>
- face_iterator;
+ using face_iterator = TriaIterator<DoFAccessor<DoFHandlerType::dimension - 1,
+ DoFHandlerType,
+ level_dof_access>>;
/**
* @name Constructors and initialization
template <int dim, int spacedim = dim>
class DoFHandler : public Subscriptor
{
- typedef dealii::internal::DoFHandlerImplementation::
- Iterators<DoFHandler<dim, spacedim>, false>
- ActiveSelector;
- typedef dealii::internal::DoFHandlerImplementation::
- Iterators<DoFHandler<dim, spacedim>, true>
- LevelSelector;
+ using ActiveSelector = dealii::internal::DoFHandlerImplementation::
+ Iterators<DoFHandler<dim, spacedim>, false>;
+ using LevelSelector = dealii::internal::DoFHandlerImplementation::
+ Iterators<DoFHandler<dim, spacedim>, true>;
public:
- typedef typename ActiveSelector::CellAccessor cell_accessor;
- typedef typename ActiveSelector::FaceAccessor face_accessor;
+ using cell_accessor = typename ActiveSelector::CellAccessor;
+ using face_accessor = typename ActiveSelector::FaceAccessor;
- typedef typename ActiveSelector::line_iterator line_iterator;
- typedef typename ActiveSelector::active_line_iterator active_line_iterator;
+ using line_iterator = typename ActiveSelector::line_iterator;
+ using active_line_iterator = typename ActiveSelector::active_line_iterator;
- typedef typename ActiveSelector::quad_iterator quad_iterator;
- typedef typename ActiveSelector::active_quad_iterator active_quad_iterator;
+ using quad_iterator = typename ActiveSelector::quad_iterator;
+ using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
- typedef typename ActiveSelector::hex_iterator hex_iterator;
- typedef typename ActiveSelector::active_hex_iterator active_hex_iterator;
+ using hex_iterator = typename ActiveSelector::hex_iterator;
+ using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
/**
- * A typedef that is used to identify
+ * An alias that is used to identify
* @ref GlossActive "active cell iterators".
* The concept of iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies active cells in a DoFHandler object. While
- * the actual data type of the typedef is hidden behind a few layers of
+ * The current alias identifies active cells in a DoFHandler object. While
+ * the actual data type of the alias is hidden behind a few layers of
* (unfortunately necessary) indirections, it is in essence
* TriaActiveIterator<DoFCellAccessor>. The TriaActiveIterator class works
* like a pointer to active objects that when you dereference it yields an
*
* @ingroup Iterators
*/
- typedef typename ActiveSelector::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
/**
- * A typedef that is used to identify cell iterators. The concept of
+ * An alias that is used to identify cell iterators. The concept of
* iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies cells in a DoFHandler object. Some of
+ * The current alias identifies cells in a DoFHandler object. Some of
* these cells may in fact be active (see
* @ref GlossActive "active cell iterators")
* in which case they can in fact be asked for the degrees of freedom that
* live on them. On the other hand, if the cell is not active, any such
* query will result in an error. Note that this is what distinguishes this
- * typedef from the level_cell_iterator typedef.
+ * alias from the level_cell_iterator alias.
*
- * While the actual data type of the typedef is hidden behind a few layers
+ * While the actual data type of the alias is hidden behind a few layers
* of (unfortunately necessary) indirections, it is in essence
* TriaIterator<DoFCellAccessor>. The TriaIterator class works like a
* pointer to objects that when you dereference it yields an object of type
*
* @ingroup Iterators
*/
- typedef typename ActiveSelector::cell_iterator cell_iterator;
+ using cell_iterator = typename ActiveSelector::cell_iterator;
/**
- * A typedef that is used to identify iterators that point to faces.
+ * An alias that is used to identify iterators that point to faces.
* The concept of iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * While the actual data type of the typedef is hidden behind a few layers
+ * While the actual data type of the alias is hidden behind a few layers
* of (unfortunately necessary) indirections, it is in essence
* TriaIterator<DoFAccessor>. The
* TriaIterator class works like a pointer to objects that when
*
* @ingroup Iterators
*/
- typedef typename ActiveSelector::face_iterator face_iterator;
+ using face_iterator = typename ActiveSelector::face_iterator;
/**
- * A typedef that is used to identify iterators that point to active faces,
+ * An alias that is used to identify iterators that point to active faces,
* i.e., to faces that have no children. Active faces must be faces of at
* least one active cell.
*
- * Other than the "active" qualification, this typedef is identical to the
- * @p face_iterator typedef. In particular, dereferencing either yields
+ * Other than the "active" qualification, this alias is identical to the
+ * @p face_iterator alias. In particular, dereferencing either yields
* the same kind of object.
*
* @ingroup Iterators
*/
- typedef typename ActiveSelector::active_face_iterator active_face_iterator;
+ using active_face_iterator = typename ActiveSelector::active_face_iterator;
- typedef typename LevelSelector::CellAccessor level_cell_accessor;
- typedef typename LevelSelector::FaceAccessor level_face_accessor;
+ using level_cell_accessor = typename LevelSelector::CellAccessor;
+ using level_face_accessor = typename LevelSelector::FaceAccessor;
- typedef typename LevelSelector::cell_iterator level_cell_iterator;
- typedef typename LevelSelector::face_iterator level_face_iterator;
+ using level_cell_iterator = typename LevelSelector::cell_iterator;
+ using level_face_iterator = typename LevelSelector::face_iterator;
/**
template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
struct Iterators<DoFHandlerType<1, spacedim>, lda>
{
- typedef DoFHandlerType<1, spacedim> DoFHandler_type;
- typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
- typedef dealii::DoFAccessor<0, DoFHandler_type, lda> FaceAccessor;
-
- typedef TriaRawIterator<CellAccessor> raw_line_iterator;
- typedef TriaIterator<CellAccessor> line_iterator;
- typedef TriaActiveIterator<CellAccessor> active_line_iterator;
-
- typedef TriaRawIterator<DoFInvalidAccessor<2, 1, spacedim>>
- raw_quad_iterator;
- typedef TriaIterator<DoFInvalidAccessor<2, 1, spacedim>> quad_iterator;
- typedef TriaActiveIterator<DoFInvalidAccessor<2, 1, spacedim>>
- active_quad_iterator;
-
- typedef TriaRawIterator<DoFInvalidAccessor<3, 1, spacedim>>
- raw_hex_iterator;
- typedef TriaIterator<DoFInvalidAccessor<3, 1, spacedim>> hex_iterator;
- typedef TriaActiveIterator<DoFInvalidAccessor<3, 1, spacedim>>
- active_hex_iterator;
-
- typedef raw_line_iterator raw_cell_iterator;
- typedef line_iterator cell_iterator;
- typedef active_line_iterator active_cell_iterator;
-
- typedef TriaRawIterator<FaceAccessor> raw_face_iterator;
- typedef TriaIterator<FaceAccessor> face_iterator;
- typedef TriaActiveIterator<FaceAccessor> active_face_iterator;
+ using DoFHandler_type = DoFHandlerType<1, spacedim>;
+ using CellAccessor = dealii::DoFCellAccessor<DoFHandler_type, lda>;
+ using FaceAccessor = dealii::DoFAccessor<0, DoFHandler_type, lda>;
+
+ using raw_line_iterator = TriaRawIterator<CellAccessor>;
+ using line_iterator = TriaIterator<CellAccessor>;
+ using active_line_iterator = TriaActiveIterator<CellAccessor>;
+
+ using raw_quad_iterator =
+ TriaRawIterator<DoFInvalidAccessor<2, 1, spacedim>>;
+ using quad_iterator = TriaIterator<DoFInvalidAccessor<2, 1, spacedim>>;
+ using active_quad_iterator =
+ TriaActiveIterator<DoFInvalidAccessor<2, 1, spacedim>>;
+
+ using raw_hex_iterator =
+ TriaRawIterator<DoFInvalidAccessor<3, 1, spacedim>>;
+ using hex_iterator = TriaIterator<DoFInvalidAccessor<3, 1, spacedim>>;
+ using active_hex_iterator =
+ TriaActiveIterator<DoFInvalidAccessor<3, 1, spacedim>>;
+
+ using raw_cell_iterator = raw_line_iterator;
+ using cell_iterator = line_iterator;
+ using active_cell_iterator = active_line_iterator;
+
+ using raw_face_iterator = TriaRawIterator<FaceAccessor>;
+ using face_iterator = TriaIterator<FaceAccessor>;
+ using active_face_iterator = TriaActiveIterator<FaceAccessor>;
};
template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
struct Iterators<DoFHandlerType<2, spacedim>, lda>
{
- typedef DoFHandlerType<2, spacedim> DoFHandler_type;
- typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
- typedef dealii::DoFAccessor<1, DoFHandler_type, lda> FaceAccessor;
-
- typedef TriaRawIterator<FaceAccessor> raw_line_iterator;
- typedef TriaIterator<FaceAccessor> line_iterator;
- typedef TriaActiveIterator<FaceAccessor> active_line_iterator;
-
- typedef TriaRawIterator<CellAccessor> raw_quad_iterator;
- typedef TriaIterator<CellAccessor> quad_iterator;
- typedef TriaActiveIterator<CellAccessor> active_quad_iterator;
-
- typedef TriaRawIterator<DoFInvalidAccessor<3, 2, spacedim>>
- raw_hex_iterator;
- typedef TriaIterator<DoFInvalidAccessor<3, 2, spacedim>> hex_iterator;
- typedef TriaActiveIterator<DoFInvalidAccessor<3, 2, spacedim>>
- active_hex_iterator;
-
- typedef raw_quad_iterator raw_cell_iterator;
- typedef quad_iterator cell_iterator;
- typedef active_quad_iterator active_cell_iterator;
-
- typedef raw_line_iterator raw_face_iterator;
- typedef line_iterator face_iterator;
- typedef active_line_iterator active_face_iterator;
+ using DoFHandler_type = DoFHandlerType<2, spacedim>;
+ using CellAccessor = dealii::DoFCellAccessor<DoFHandler_type, lda>;
+ using FaceAccessor = dealii::DoFAccessor<1, DoFHandler_type, lda>;
+
+ using raw_line_iterator = TriaRawIterator<FaceAccessor>;
+ using line_iterator = TriaIterator<FaceAccessor>;
+ using active_line_iterator = TriaActiveIterator<FaceAccessor>;
+
+ using raw_quad_iterator = TriaRawIterator<CellAccessor>;
+ using quad_iterator = TriaIterator<CellAccessor>;
+ using active_quad_iterator = TriaActiveIterator<CellAccessor>;
+
+ using raw_hex_iterator =
+ TriaRawIterator<DoFInvalidAccessor<3, 2, spacedim>>;
+ using hex_iterator = TriaIterator<DoFInvalidAccessor<3, 2, spacedim>>;
+ using active_hex_iterator =
+ TriaActiveIterator<DoFInvalidAccessor<3, 2, spacedim>>;
+
+ using raw_cell_iterator = raw_quad_iterator;
+ using cell_iterator = quad_iterator;
+ using active_cell_iterator = active_quad_iterator;
+
+ using raw_face_iterator = raw_line_iterator;
+ using face_iterator = line_iterator;
+ using active_face_iterator = active_line_iterator;
};
template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
struct Iterators<DoFHandlerType<3, spacedim>, lda>
{
- typedef DoFHandlerType<3, spacedim> DoFHandler_type;
- typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
- typedef dealii::DoFAccessor<2, DoFHandler_type, lda> FaceAccessor;
-
- typedef TriaRawIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>
- raw_line_iterator;
- typedef TriaIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>
- line_iterator;
- typedef TriaActiveIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>
- active_line_iterator;
-
- typedef TriaRawIterator<FaceAccessor> raw_quad_iterator;
- typedef TriaIterator<FaceAccessor> quad_iterator;
- typedef TriaActiveIterator<FaceAccessor> active_quad_iterator;
-
- typedef TriaRawIterator<CellAccessor> raw_hex_iterator;
- typedef TriaIterator<CellAccessor> hex_iterator;
- typedef TriaActiveIterator<CellAccessor> active_hex_iterator;
-
- typedef raw_hex_iterator raw_cell_iterator;
- typedef hex_iterator cell_iterator;
- typedef active_hex_iterator active_cell_iterator;
-
- typedef raw_quad_iterator raw_face_iterator;
- typedef quad_iterator face_iterator;
- typedef active_quad_iterator active_face_iterator;
+ using DoFHandler_type = DoFHandlerType<3, spacedim>;
+ using CellAccessor = dealii::DoFCellAccessor<DoFHandler_type, lda>;
+ using FaceAccessor = dealii::DoFAccessor<2, DoFHandler_type, lda>;
+
+ using raw_line_iterator =
+ TriaRawIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>;
+ using line_iterator =
+ TriaIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>;
+ using active_line_iterator =
+ TriaActiveIterator<dealii::DoFAccessor<1, DoFHandler_type, lda>>;
+
+ using raw_quad_iterator = TriaRawIterator<FaceAccessor>;
+ using quad_iterator = TriaIterator<FaceAccessor>;
+ using active_quad_iterator = TriaActiveIterator<FaceAccessor>;
+
+ using raw_hex_iterator = TriaRawIterator<CellAccessor>;
+ using hex_iterator = TriaIterator<CellAccessor>;
+ using active_hex_iterator = TriaActiveIterator<CellAccessor>;
+
+ using raw_cell_iterator = raw_hex_iterator;
+ using cell_iterator = hex_iterator;
+ using active_cell_iterator = active_hex_iterator;
+
+ using raw_face_iterator = raw_quad_iterator;
+ using face_iterator = quad_iterator;
+ using active_face_iterator = active_quad_iterator;
};
} // namespace DoFHandlerImplementation
} // namespace internal
private:
// A shortcut for the type of the OutVector
- typedef typename OutVector::value_type value_type;
+ using value_type = typename OutVector::value_type;
// A structure holding all data to
// set dofs recursively on cells of arbitrary level
* components are non-zero and thus have a row in the array presently
* under discussion.
*/
- typedef dealii::Table<2, double> ShapeVector;
+ using ShapeVector = dealii::Table<2, double>;
/**
* Storage type for gradients. The layout of data is the same as for the
* #ShapeVector data type.
*/
- typedef dealii::Table<2, Tensor<1, spacedim>> GradientVector;
+ using GradientVector = dealii::Table<2, Tensor<1, spacedim>>;
/**
* Likewise for second order derivatives.
*/
- typedef dealii::Table<2, Tensor<2, spacedim>> HessianVector;
+ using HessianVector = dealii::Table<2, Tensor<2, spacedim>>;
/**
* And the same also applies to the third order derivatives.
*/
- typedef dealii::Table<2, Tensor<3, spacedim>> ThirdDerivativeVector;
+ using ThirdDerivativeVector = dealii::Table<2, Tensor<3, spacedim>>;
/**
* Store the values of the shape functions at the quadrature points. See
template <class NumberType>
struct CurlType<1, NumberType>
{
- typedef Tensor<1, 1, NumberType> type;
+ using type = Tensor<1, 1, NumberType>;
};
/**
template <class NumberType>
struct CurlType<2, NumberType>
{
- typedef Tensor<1, 1, NumberType> type;
+ using type = Tensor<1, 1, NumberType>;
};
/**
template <class NumberType>
struct CurlType<3, NumberType>
{
- typedef Tensor<1, 3, NumberType> type;
+ using type = Tensor<1, 3, NumberType>;
};
} // namespace internal
{
public:
/**
- * A typedef for the data type of values of the view this class
+ * An alias for the data type of values of the view this class
* represents. Since we deal with a single components, the value type is a
* scalar double.
*/
- typedef double value_type;
+ using value_type = double;
/**
- * A typedef for the type of gradients of the view this class represents.
+ * An alias for the type of gradients of the view this class represents.
* Here, for a scalar component of the finite element, the gradient is a
* <code>Tensor@<1,dim@></code>.
*/
- typedef dealii::Tensor<1, spacedim> gradient_type;
+ using gradient_type = dealii::Tensor<1, spacedim>;
/**
- * A typedef for the type of second derivatives of the view this class
+ * An alias for the type of second derivatives of the view this class
* represents. Here, for a scalar component of the finite element, the
* Hessian is a <code>Tensor@<2,dim@></code>.
*/
- typedef dealii::Tensor<2, spacedim> hessian_type;
+ using hessian_type = dealii::Tensor<2, spacedim>;
/**
- * A typedef for the type of third derivatives of the view this class
+ * An alias for the type of third derivatives of the view this class
* represents. Here, for a scalar component of the finite element, the
* Third derivative is a <code>Tensor@<3,dim@></code>.
*/
- typedef dealii::Tensor<3, spacedim> third_derivative_type;
+ using third_derivative_type = dealii::Tensor<3, spacedim>;
/**
* A struct that provides the output type for the product of the value
struct OutputType
{
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* values of the view the Scalar class.
*/
- typedef
+ using value_type =
typename ProductType<Number,
- typename Scalar<dim, spacedim>::value_type>::type
- value_type;
+ typename Scalar<dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* gradients of the view the Scalar class.
*/
- typedef typename ProductType<
+ using gradient_type = typename ProductType<
Number,
- typename Scalar<dim, spacedim>::gradient_type>::type gradient_type;
+ typename Scalar<dim, spacedim>::gradient_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* laplacians of the view the Scalar class.
*/
- typedef
+ using laplacian_type =
typename ProductType<Number,
- typename Scalar<dim, spacedim>::value_type>::type
- laplacian_type;
+ typename Scalar<dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* hessians of the view the Scalar class.
*/
- typedef
- typename ProductType<Number,
- typename Scalar<dim, spacedim>::hessian_type>::type
- hessian_type;
+ using hessian_type = typename ProductType<
+ Number,
+ typename Scalar<dim, spacedim>::hessian_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* third derivatives of the view the Scalar class.
*/
- typedef typename ProductType<
+ using third_derivative_type = typename ProductType<
Number,
- typename Scalar<dim, spacedim>::third_derivative_type>::type
- third_derivative_type;
+ typename Scalar<dim, spacedim>::third_derivative_type>::type;
};
/**
{
public:
/**
- * A typedef for the data type of values of the view this class
+ * An alias for the data type of values of the view this class
* represents. Since we deal with a set of <code>dim</code> components,
* the value type is a Tensor<1,spacedim>.
*/
- typedef dealii::Tensor<1, spacedim> value_type;
+ using value_type = dealii::Tensor<1, spacedim>;
/**
- * A typedef for the type of gradients of the view this class represents.
+ * An alias for the type of gradients of the view this class represents.
* Here, for a set of <code>dim</code> components of the finite element,
* the gradient is a <code>Tensor@<2,spacedim@></code>.
*
* See the general documentation of this class for how exactly the
* gradient of a vector is defined.
*/
- typedef dealii::Tensor<2, spacedim> gradient_type;
+ using gradient_type = dealii::Tensor<2, spacedim>;
/**
- * A typedef for the type of symmetrized gradients of the view this class
+ * An alias for the type of symmetrized gradients of the view this class
* represents. Here, for a set of <code>dim</code> components of the
* finite element, the symmetrized gradient is a
* <code>SymmetricTensor@<2,spacedim@></code>.
* $\varepsilon(\mathbf v)=\frac 12 (\nabla \mathbf v + \nabla \mathbf
* v^T)$.
*/
- typedef dealii::SymmetricTensor<2, spacedim> symmetric_gradient_type;
+ using symmetric_gradient_type = dealii::SymmetricTensor<2, spacedim>;
/**
- * A typedef for the type of the divergence of the view this class
+ * An alias for the type of the divergence of the view this class
* represents. Here, for a set of <code>dim</code> components of the
* finite element, the divergence of course is a scalar.
*/
- typedef double divergence_type;
+ using divergence_type = double;
/**
- * A typedef for the type of the curl of the view this class represents.
+ * An alias for the type of the curl of the view this class represents.
* Here, for a set of <code>spacedim=2</code> components of the finite
* element, the curl is a <code>Tensor@<1, 1@></code>. For
* <code>spacedim=3</code> it is a <code>Tensor@<1, dim@></code>.
*/
- typedef typename dealii::internal::CurlType<spacedim>::type curl_type;
+ using curl_type = typename dealii::internal::CurlType<spacedim>::type;
/**
- * A typedef for the type of second derivatives of the view this class
+ * An alias for the type of second derivatives of the view this class
* represents. Here, for a set of <code>dim</code> components of the
* finite element, the Hessian is a <code>Tensor@<3,dim@></code>.
*/
- typedef dealii::Tensor<3, spacedim> hessian_type;
+ using hessian_type = dealii::Tensor<3, spacedim>;
/**
- * A typedef for the type of third derivatives of the view this class
+ * An alias for the type of third derivatives of the view this class
* represents. Here, for a set of <code>dim</code> components of the
* finite element, the third derivative is a <code>Tensor@<4,dim@></code>.
*/
- typedef dealii::Tensor<4, spacedim> third_derivative_type;
+ using third_derivative_type = dealii::Tensor<4, spacedim>;
/**
* A struct that provides the output type for the product of the value
struct OutputType
{
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* values of the view the Vector class.
*/
- typedef
+ using value_type =
typename ProductType<Number,
- typename Vector<dim, spacedim>::value_type>::type
- value_type;
+ typename Vector<dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* gradients of the view the Vector class.
*/
- typedef typename ProductType<
+ using gradient_type = typename ProductType<
Number,
- typename Vector<dim, spacedim>::gradient_type>::type gradient_type;
+ typename Vector<dim, spacedim>::gradient_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* symmetric gradients of the view the Vector class.
*/
- typedef typename ProductType<
+ using symmetric_gradient_type = typename ProductType<
Number,
- typename Vector<dim, spacedim>::symmetric_gradient_type>::type
- symmetric_gradient_type;
+ typename Vector<dim, spacedim>::symmetric_gradient_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* divergences of the view the Vector class.
*/
- typedef typename ProductType<
+ using divergence_type = typename ProductType<
Number,
- typename Vector<dim, spacedim>::divergence_type>::type divergence_type;
+ typename Vector<dim, spacedim>::divergence_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* laplacians of the view the Vector class.
*/
- typedef
+ using laplacian_type =
typename ProductType<Number,
- typename Vector<dim, spacedim>::value_type>::type
- laplacian_type;
+ typename Vector<dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* curls of the view the Vector class.
*/
- typedef
+ using curl_type =
typename ProductType<Number,
- typename Vector<dim, spacedim>::curl_type>::type
- curl_type;
+ typename Vector<dim, spacedim>::curl_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* hessians of the view the Vector class.
*/
- typedef
- typename ProductType<Number,
- typename Vector<dim, spacedim>::hessian_type>::type
- hessian_type;
+ using hessian_type = typename ProductType<
+ Number,
+ typename Vector<dim, spacedim>::hessian_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* third derivatives of the view the Vector class.
*/
- typedef typename ProductType<
+ using third_derivative_type = typename ProductType<
Number,
- typename Vector<dim, spacedim>::third_derivative_type>::type
- third_derivative_type;
+ typename Vector<dim, spacedim>::third_derivative_type>::type;
};
/**
{
public:
/**
- * A typedef for the data type of values of the view this class
+ * An alias for the data type of values of the view this class
* represents. Since we deal with a set of <code>(dim*dim + dim)/2</code>
* components (i.e. the unique components of a symmetric second-order
* tensor), the value type is a SymmetricTensor<2,spacedim>.
*/
- typedef dealii::SymmetricTensor<2, spacedim> value_type;
+ using value_type = dealii::SymmetricTensor<2, spacedim>;
/**
- * A typedef for the type of the divergence of the view this class
+ * An alias for the type of the divergence of the view this class
* represents. Here, for a set of <code>(dim*dim + dim)/2</code> unique
* components of the finite element representing a symmetric second-order
* tensor, the divergence of course is a * <code>Tensor@<1,dim@></code>.
* See the general discussion of this class for a definition of the
* divergence.
*/
- typedef dealii::Tensor<1, spacedim> divergence_type;
+ using divergence_type = dealii::Tensor<1, spacedim>;
/**
* A struct that provides the output type for the product of the value
struct OutputType
{
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* values of the view the SymmetricTensor class.
*/
- typedef typename ProductType<
+ using value_type = typename ProductType<
Number,
- typename SymmetricTensor<2, dim, spacedim>::value_type>::type
- value_type;
+ typename SymmetricTensor<2, dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* divergences of the view the SymmetricTensor class.
*/
- typedef typename ProductType<
+ using divergence_type = typename ProductType<
Number,
- typename SymmetricTensor<2, dim, spacedim>::divergence_type>::type
- divergence_type;
+ typename SymmetricTensor<2, dim, spacedim>::divergence_type>::type;
};
/**
* Data type for what you get when you apply an extractor of this kind to
* a vector-valued finite element.
*/
- typedef dealii::Tensor<2, spacedim> value_type;
+ using value_type = dealii::Tensor<2, spacedim>;
/**
* Data type for taking the divergence of a tensor: a vector.
*/
- typedef dealii::Tensor<1, spacedim> divergence_type;
+ using divergence_type = dealii::Tensor<1, spacedim>;
/**
* Data type for taking the gradient of a second order tensor: a third order
* tensor.
*/
- typedef dealii::Tensor<3, spacedim> gradient_type;
+ using gradient_type = dealii::Tensor<3, spacedim>;
/**
* A struct that provides the output type for the product of the value
struct OutputType
{
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* values of the view the Tensor class.
*/
- typedef typename ProductType<
+ using value_type = typename ProductType<
Number,
- typename Tensor<2, dim, spacedim>::value_type>::type value_type;
+ typename Tensor<2, dim, spacedim>::value_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* divergences of the view the Tensor class.
*/
- typedef typename ProductType<
+ using divergence_type = typename ProductType<
Number,
- typename Tensor<2, dim, spacedim>::divergence_type>::type
- divergence_type;
+ typename Tensor<2, dim, spacedim>::divergence_type>::type;
/**
- * A typedef for the data type of the product of a @p Number and the
+ * An alias for the data type of the product of a @p Number and the
* gradient of the view the Tensor class.
*/
- typedef typename ProductType<
+ using gradient_type = typename ProductType<
Number,
- typename Tensor<2, dim, spacedim>::gradient_type>::type gradient_type;
+ typename Tensor<2, dim, spacedim>::gradient_type>::type;
};
/**
* (using 2 times 32 bit for storage), a limitation that is identical to
* the one used by p4est.
*/
- typedef std::array<unsigned int, 4> binary_type;
+ using binary_type = std::array<unsigned int, 4>;
/**
* Construct a CellId object with a given @p coarse_cell_id and vector of
*
* The same can be achieved by the following snippet, though harder to read:
* @code
- * typedef FilteredIterator<typename Triangulation<dim>::active_cell_iterator>
- * FI; n_flagged_cells = std::distance (FI(IteratorFilters::UserFlagSet())
- * .set_to_next_positive(tria.begin_active()),
- * FI(IteratorFilters::UserFlagSet(), tria.end()));
+ * using FI =
+ * FilteredIterator<typename Triangulation<dim>::active_cell_iterator>;
+ * n_flagged_cells =
+ * std::distance (
+ * FI(IteratorFilters::UserFlagSet()).set_to_next_positive(
+ * tria.begin_active()),
+ * FI(IteratorFilters::UserFlagSet(), tria.end()));
* @endcode
* It relies on the fact that if we create an unnamed filtered iterator with a
* given predicate but no iterator value and assign it the next positive value
/**
* Typedef to the accessor type of the underlying iterator.
*/
- typedef typename BaseIterator::AccessorType AccessorType;
+ using AccessorType = typename BaseIterator::AccessorType;
/**
* Constructor. Set the iterator to the default state and use the given
template <typename BaseIterator, typename Predicate>
struct NestFilteredIterators<BaseIterator, std::tuple<Predicate>>
{
- typedef ::dealii::FilteredIterator<BaseIterator> type;
+ using type = ::dealii::FilteredIterator<BaseIterator>;
};
template <typename BaseIterator, typename Predicate, typename... Targs>
struct NestFilteredIterators<BaseIterator, std::tuple<Predicate, Targs...>>
{
- typedef ::dealii::FilteredIterator<
+ using type = ::dealii::FilteredIterator<
typename NestFilteredIterators<BaseIterator,
- std::tuple<Targs...>>::type>
- type;
+ std::tuple<Targs...>>::type>;
};
} // namespace FilteredIteratorImplementation
} // namespace internal
template <template <int, int> class MeshType, int dim, int spacedim>
struct ExtractBoundaryMesh
{
- typedef std::map<typename MeshType<dim - 1, spacedim>::cell_iterator,
- typename MeshType<dim, spacedim>::face_iterator>
- return_type;
+ using return_type =
+ std::map<typename MeshType<dim - 1, spacedim>::cell_iterator,
+ typename MeshType<dim, spacedim>::face_iterator>;
};
#endif
{
public:
# ifndef _MSC_VER
- typedef typename MeshType::active_cell_iterator type;
+ using type = typename MeshType::active_cell_iterator;
# else
- typedef TriaActiveIterator<dealii::CellAccessor<dim, spacedim>> type;
+ using type = TriaActiveIterator<dealii::CellAccessor<dim, spacedim>>;
# endif
};
class ActiveCellIterator<dim, spacedim, dealii::DoFHandler<dim, spacedim>>
{
public:
- typedef TriaActiveIterator<
- dealii::DoFCellAccessor<dealii::DoFHandler<dim, spacedim>, false>>
- type;
+ using type = TriaActiveIterator<
+ dealii::DoFCellAccessor<dealii::DoFHandler<dim, spacedim>, false>>;
};
template <int dim, int spacedim>
class ActiveCellIterator<dim, spacedim, dealii::hp::DoFHandler<dim, spacedim>>
{
public:
- typedef TriaActiveIterator<
- dealii::DoFCellAccessor<dealii::hp::DoFHandler<dim, spacedim>, false>>
- type;
+ using type = TriaActiveIterator<
+ dealii::DoFCellAccessor<dealii::hp::DoFHandler<dim, spacedim>, false>>;
};
# endif
} // namespace internal
* describes the locally owned part of the mesh for each process. The bounding
* boxes describing which part of the mesh is locally owned by process with
* rank rk are contained in global_bboxes[rk]. The local description can be
- * obtained from GridTools::compute_mesh_predicate_bounding_box ; then the
+ * obtained from GridTools::compute_mesh_predicate_bounding_box; then the
* global one can be obtained using either
* GridTools::exchange_local_bounding_boxes or Utilities::MPI::all_gather
* @return A tuple containing the quadrature information
"The function exchange_cell_data_to_ghosts() only works with parallel triangulations."));
// map neighbor_id -> data_buffer where we accumulate the data to send
- typedef std::map<dealii::types::subdomain_id,
- CellDataTransferBuffer<dim, DataType>>
- DestinationToBufferMap;
+ using DestinationToBufferMap =
+ std::map<dealii::types::subdomain_id,
+ CellDataTransferBuffer<dim, DataType>>;
DestinationToBufferMap destination_to_data_buffer_map;
std::map<unsigned int, std::set<dealii::types::subdomain_id>>
/**
* Typedef to the iterator type of the grid class under consideration.
*/
- typedef typename MeshType::cell_iterator cell_iterator;
+ using cell_iterator = typename MeshType::cell_iterator;
/**
* Constructor setting the class name arguments in the SmartPointer members.
*
* For obvious reasons, this type is not useful in 1d.
*/
- typedef Tensor<1, spacedim>
- FaceVertexNormals[GeometryInfo<dim>::vertices_per_face];
+ using FaceVertexNormals =
+ std::array<Tensor<1, spacedim>, GeometryInfo<dim>::vertices_per_face>;
/**
* quite inconvenient if one attempted to operate on it directly, since data
* is spread over quite a lot of arrays and other places. However, there are
* ways powerful enough to work on these data structures without knowing their
- * exact relations. deal.II uses class local typedefs (see below) to make
+ * exact relations. deal.II uses class local alias (see below) to make
* things as easy and dimension independent as possible.
*
* The Triangulation class provides iterators which enable looping over all
* cells without knowing the exact representation used to describe them. For
* more information see the documentation of <tt>TriaIterator</tt>. Their
- * names are typedefs imported from the Iterators class (thus making them
+ * names are alias imported from the Iterators class (thus making them
* local types to this class) and are as follows:
*
* <ul>
*
* For <tt>dim==1</tt>, these iterators are mapped as follows:
* @code
- * typedef line_iterator cell_iterator;
- * typedef active_line_iterator active_cell_iterator;
+ * using cell_iterator = line_iterator;
+ * using active_cell_iterator = active_line_iterator;
* @endcode
* while for @p dim==2 we have the additional face iterator:
* @code
- * typedef quad_iterator cell_iterator;
- * typedef active_quad_iterator active_cell_iterator;
+ * using cell_iterator = quad_iterator;
+ * using active_cell_iterator = active_quad_iterator;
*
- * typedef line_iterator face_iterator;
- * typedef active_line_iterator active_face_iterator;
+ * using face_iterator = line_iterator;
+ * using active_face_iterator = active_line_iterator;
* @endcode
*
* By using the cell iterators, you can write code independent of the spatial
{
private:
/**
- * An internal typedef to make the definition of the iterator classes
+ * An internal alias to make the definition of the iterator classes
* simpler.
*/
- typedef dealii::internal::TriangulationImplementation::Iterators<dim,
- spacedim>
- IteratorSelector;
+ using IteratorSelector =
+ dealii::internal::TriangulationImplementation::Iterators<dim, spacedim>;
public:
/**
};
/**
- * A typedef that is used to identify cell iterators. The concept of
+ * An alias that is used to identify cell iterators. The concept of
* iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies cells in a triangulation. The TriaIterator
+ * The current alias identifies cells in a triangulation. The TriaIterator
* class works like a pointer that when you dereference it yields an object
* of type CellAccessor. CellAccessor is a class that identifies properties
* that are specific to cells in a triangulation, but it is derived (and
*
* @ingroup Iterators
*/
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
/**
- * A typedef that is used to identify
+ * An alias that is used to identify
* @ref GlossActive "active cell iterators".
* The concept of iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies active cells in a triangulation. The
+ * The current alias identifies active cells in a triangulation. The
* TriaActiveIterator class works like a pointer to active objects that when
* you dereference it yields an object of type CellAccessor. CellAccessor is
* a class that identifies properties that are specific to cells in a
*
* @ingroup Iterators
*/
- typedef TriaActiveIterator<CellAccessor<dim, spacedim>> active_cell_iterator;
+ using active_cell_iterator = TriaActiveIterator<CellAccessor<dim, spacedim>>;
/**
- * A typedef that is used to identify iterators that point to faces.
+ * An alias that is used to identify iterators that point to faces.
* The concept of iterators is discussed at length in the
* @ref Iterators "iterators documentation module".
*
- * The current typedef identifies faces in a triangulation. The
+ * The current alias identifies faces in a triangulation. The
* TriaIterator class works like a pointer to objects that when
* you dereference it yields an object of type TriaAccessor, i.e.,
* class that can be used to query geometric properties of faces
*
* @ingroup Iterators
*/
- typedef TriaIterator<TriaAccessor<dim - 1, dim, spacedim>> face_iterator;
+ using face_iterator = TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>;
/**
- * A typedef that is used to identify iterators that point to active faces,
+ * An alias that is used to identify iterators that point to active faces,
* i.e., to faces that have no children. Active faces must be faces of at
* least one active cell.
*
- * Other than the "active" qualification, this typedef is identical to the
- * @p face_iterator typedef. In particular, dereferencing either yields
+ * Other than the "active" qualification, this alias is identical to the
+ * @p face_iterator alias. In particular, dereferencing either yields
* the same kind of object.
*
* @ingroup Iterators
*/
- typedef TriaActiveIterator<TriaAccessor<dim - 1, dim, spacedim>>
- active_face_iterator;
+ using active_face_iterator =
+ TriaActiveIterator<TriaAccessor<dim - 1, dim, spacedim>>;
/**
- * A typedef that defines an iterator type to iterate over
+ * An alias that defines an iterator type to iterate over
* vertices of a mesh. The concept of iterators is discussed at
* length in the
* @ref Iterators "iterators documentation module".
*
* @ingroup Iterators
*/
- typedef TriaIterator<dealii::TriaAccessor<0, dim, spacedim>> vertex_iterator;
+ using vertex_iterator = TriaIterator<dealii::TriaAccessor<0, dim, spacedim>>;
/**
- * A typedef that defines an iterator type to iterate over
+ * An alias that defines an iterator type to iterate over
* vertices of a mesh. The concept of iterators is discussed at
* length in the
* @ref Iterators "iterators documentation module".
*
- * This typedef is in fact identical to the @p vertex_iterator typedef
+ * This alias is in fact identical to the @p vertex_iterator alias
* above since all vertices in a mesh are active (i.e., are a vertex of
* an active cell).
*
* @ingroup Iterators
*/
- typedef TriaActiveIterator<dealii::TriaAccessor<0, dim, spacedim>>
- active_vertex_iterator;
+ using active_vertex_iterator =
+ TriaActiveIterator<dealii::TriaAccessor<0, dim, spacedim>>;
- typedef typename IteratorSelector::line_iterator line_iterator;
- typedef typename IteratorSelector::active_line_iterator active_line_iterator;
+ using line_iterator = typename IteratorSelector::line_iterator;
+ using active_line_iterator = typename IteratorSelector::active_line_iterator;
- typedef typename IteratorSelector::quad_iterator quad_iterator;
- typedef typename IteratorSelector::active_quad_iterator active_quad_iterator;
+ using quad_iterator = typename IteratorSelector::quad_iterator;
+ using active_quad_iterator = typename IteratorSelector::active_quad_iterator;
- typedef typename IteratorSelector::hex_iterator hex_iterator;
- typedef typename IteratorSelector::active_hex_iterator active_hex_iterator;
+ using hex_iterator = typename IteratorSelector::hex_iterator;
+ using active_hex_iterator = typename IteratorSelector::active_hex_iterator;
/**
* A structure that is used as an exception object by the
template <typename T>
struct CellWeightSum
{
- typedef T result_type;
+ using result_type = T;
template <typename InputIterator>
T
* Since users should never have to access these internal properties of how
* we store data, these iterator types are made private.
*/
- typedef TriaRawIterator<CellAccessor<dim, spacedim>> raw_cell_iterator;
- typedef TriaRawIterator<TriaAccessor<dim - 1, dim, spacedim>>
- raw_face_iterator;
- typedef TriaRawIterator<dealii::TriaAccessor<0, dim, spacedim>>
- raw_vertex_iterator;
- typedef typename IteratorSelector::raw_line_iterator raw_line_iterator;
- typedef typename IteratorSelector::raw_quad_iterator raw_quad_iterator;
- typedef typename IteratorSelector::raw_hex_iterator raw_hex_iterator;
+ using raw_cell_iterator = TriaRawIterator<CellAccessor<dim, spacedim>>;
+ using raw_face_iterator =
+ TriaRawIterator<TriaAccessor<dim - 1, dim, spacedim>>;
+ using raw_vertex_iterator =
+ TriaRawIterator<dealii::TriaAccessor<0, dim, spacedim>>;
+ using raw_line_iterator = typename IteratorSelector::raw_line_iterator;
+ using raw_quad_iterator = typename IteratorSelector::raw_quad_iterator;
+ using raw_hex_iterator = typename IteratorSelector::raw_hex_iterator;
/**
* Iterator to the first cell, used or not, on level @p level. If a level
template <int dim>
struct PresentLevelType<dim, dim>
{
- typedef int type;
+ using type = int;
};
} // namespace TriaAccessorImplementation
* the iterator classes. Since the pure triangulation iterators need no
* additional data, this data type is @p void.
*/
- typedef void AccessorData;
+ using AccessorData = void;
/**
* Constructor. Protected, thus only callable from friend classes.
* accessor classes in a unified way, no matter what the type of number of
* these parameters is.
*/
- typedef void *LocalData;
+ using LocalData = void *;
/**
* @name Iterator address and state
{
public:
/**
- * Propagate typedef from base class to this class.
+ * Propagate alias from base class to this class.
*/
- typedef typename TriaAccessorBase<structdim, dim, spacedim>::AccessorData
- AccessorData;
+ using AccessorData =
+ typename TriaAccessorBase<structdim, dim, spacedim>::AccessorData;
/**
* Constructor. This class is used for iterators that do not make
{
public:
/**
- * Propagate typedef from base class to this class.
+ * Propagate alias from base class to this class.
*/
- typedef typename TriaAccessorBase<structdim, dim, spacedim>::AccessorData
- AccessorData;
+ using AccessorData =
+ typename TriaAccessorBase<structdim, dim, spacedim>::AccessorData;
/**
* Constructor.
/**
* Pointer to internal data.
*/
- typedef void AccessorData;
+ using AccessorData = void;
/**
* Constructor. The second argument is the global index of the vertex we
/**
* Pointer to internal data.
*/
- typedef void AccessorData;
+ using AccessorData = void;
/**
* Whether the vertex represented here is at the left end of the domain, the
/**
* Propagate the AccessorData type into the present class.
*/
- typedef typename TriaAccessor<dim, dim, spacedim>::AccessorData AccessorData;
+ using AccessorData = typename TriaAccessor<dim, dim, spacedim>::AccessorData;
/**
* Define the type of the container this is part of.
*/
- typedef Triangulation<dim, spacedim> Container;
+ using Container = Triangulation<dim, spacedim>;
/**
* @name Constructors
*
* <li> It must have void operators <tt>++</tt> and <tt>--</tt>.
*
- * <li> It must declare a local <tt>typedef AccessorData</tt> which states the
+ * <li> It must declare a local alias <tt>AccessorData</tt> which states the
* data type the accessor expects to get passed as fourth constructor
* argument. By declaring a local data type, the respective iterator class may
* type-safely enforce that data type to be one of its own constructor
* other functions can use the Accessor's type without knowledge of how the
* exact implementation actually is.
*/
- typedef Accessor AccessorType;
+ using AccessorType = Accessor;
/**
* Empty constructor. Such an object is not usable!
memory_consumption() const;
/**
- * Mark the class as bidirectional iterator and declare some typedefs which
+ * Mark the class as bidirectional iterator and declare some alias which
* are standard for iterators and are used by algorithms to enquire about the
* specifics of the iterators they work on.
*/
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef Accessor value_type;
- typedef int difference_type;
- typedef Accessor * pointer;
- typedef Accessor & reference;
+ using iterator_category = std::bidirectional_iterator_tag;
+ using value_type = Accessor;
+ using difference_type = int;
+ using pointer = Accessor *;
+ using reference = Accessor &;
/**@name Exceptions*/
/*@{*/
/*@}*/
/**
- * Declare some typedefs which are standard for iterators and are used
+ * Declare some alias which are standard for iterators and are used
* by algorithms to enquire about the specifics of the iterators they
* work on.
*/
- typedef
- typename TriaRawIterator<Accessor>::iterator_category iterator_category;
- typedef typename TriaRawIterator<Accessor>::value_type value_type;
- typedef typename TriaRawIterator<Accessor>::pointer pointer;
- typedef typename TriaRawIterator<Accessor>::reference reference;
- typedef typename TriaRawIterator<Accessor>::difference_type difference_type;
+ using iterator_category =
+ typename TriaRawIterator<Accessor>::iterator_category;
+ using value_type = typename TriaRawIterator<Accessor>::value_type;
+ using pointer = typename TriaRawIterator<Accessor>::pointer;
+ using reference = typename TriaRawIterator<Accessor>::reference;
+ using difference_type = typename TriaRawIterator<Accessor>::difference_type;
/**
* Exception
/*@}*/
/**
- * Declare some typedefs which are standard for iterators and are used
+ * Declare some alias which are standard for iterators and are used
* by algorithms to enquire about the specifics of the iterators they
* work on.
*/
- typedef typename TriaIterator<Accessor>::iterator_category iterator_category;
- typedef typename TriaIterator<Accessor>::value_type value_type;
- typedef typename TriaIterator<Accessor>::pointer pointer;
- typedef typename TriaIterator<Accessor>::reference reference;
- typedef typename TriaIterator<Accessor>::difference_type difference_type;
+ using iterator_category = typename TriaIterator<Accessor>::iterator_category;
+ using value_type = typename TriaIterator<Accessor>::value_type;
+ using pointer = typename TriaIterator<Accessor>::pointer;
+ using reference = typename TriaIterator<Accessor>::reference;
+ using difference_type = typename TriaIterator<Accessor>::difference_type;
/**
* Exception
* @ref Iterators
* module for more information.
*
- * A @p line_iterator is typedef'd to an iterator operating on the @p
+ * A @p line_iterator is aliased to an iterator operating on the @p
* lines member variable of a <tt>Triangulation<1></tt> object. An @p
* active_line_iterator only operates on the active lines. @p
* raw_line_iterator objects operate on all lines, used or not.
*
* Since we are in one dimension, the following identities are declared:
* @code
- * typedef raw_line_iterator raw_cell_iterator;
- * typedef line_iterator cell_iterator;
- * typedef active_line_iterator active_cell_iterator;
+ * using raw_cell_iterator = raw_line_iterator;
+ * using cell_iterator = line_iterator;
+ * using active_cell_iterator = active_line_iterator;
* @endcode
*
* To enable the declaration of @p begin_quad and the like in
template <int spacedim>
struct Iterators<1, spacedim>
{
- typedef TriaRawIterator<dealii::CellAccessor<1, spacedim>>
- raw_line_iterator;
- typedef TriaIterator<dealii::CellAccessor<1, spacedim>> line_iterator;
- typedef TriaActiveIterator<dealii::CellAccessor<1, spacedim>>
- active_line_iterator;
-
- typedef TriaRawIterator<dealii::InvalidAccessor<2, 1, spacedim>>
- raw_quad_iterator;
- typedef TriaIterator<dealii::InvalidAccessor<2, 1, spacedim>>
- quad_iterator;
- typedef TriaActiveIterator<dealii::InvalidAccessor<2, 1, spacedim>>
- active_quad_iterator;
-
- typedef TriaRawIterator<dealii::InvalidAccessor<3, 1, spacedim>>
- raw_hex_iterator;
- typedef TriaIterator<dealii::InvalidAccessor<3, 1, spacedim>>
- hex_iterator;
- typedef TriaActiveIterator<dealii::InvalidAccessor<3, 1, spacedim>>
- active_hex_iterator;
+ using raw_line_iterator =
+ TriaRawIterator<dealii::CellAccessor<1, spacedim>>;
+ using line_iterator = TriaIterator<dealii::CellAccessor<1, spacedim>>;
+ using active_line_iterator =
+ TriaActiveIterator<dealii::CellAccessor<1, spacedim>>;
+
+ using raw_quad_iterator =
+ TriaRawIterator<dealii::InvalidAccessor<2, 1, spacedim>>;
+ using quad_iterator =
+ TriaIterator<dealii::InvalidAccessor<2, 1, spacedim>>;
+ using active_quad_iterator =
+ TriaActiveIterator<dealii::InvalidAccessor<2, 1, spacedim>>;
+
+ using raw_hex_iterator =
+ TriaRawIterator<dealii::InvalidAccessor<3, 1, spacedim>>;
+ using hex_iterator =
+ TriaIterator<dealii::InvalidAccessor<3, 1, spacedim>>;
+ using active_hex_iterator =
+ TriaActiveIterator<dealii::InvalidAccessor<3, 1, spacedim>>;
};
* @ref Iterators
* module for more information.
*
- * A @p line_iterator is typedef'd to an iterator operating on the @p
+ * A @p line_iterator is aliased to an iterator operating on the @p
* lines member variable of a <tt>Triangulation<2></tt> object. An @p
* active_line_iterator only operates on the active lines. @p
* raw_line_iterator objects operate on all lines, used or not. Using @p
*
* Since we are in two dimension, the following identities are declared:
* @code
- * typedef raw_quad_iterator raw_cell_iterator;
- * typedef quad_iterator cell_iterator;
- * typedef active_quad_iterator active_cell_iterator;
+ * using raw_cell_iterator = raw_quad_iterator;
+ * using cell_iterator = quad_iterator;
+ * using active_cell_iterator = active_quad_iterator;
*
- * typedef raw_line_iterator raw_face_iterator;
- * typedef line_iterator face_iterator;
- * typedef active_line_iterator active_face_iterator;
+ * using raw_face_iterator = raw_line_iterator;
+ * using face_iterator = line_iterator;
+ * using active_face_iterator = active_line_iterator;
* @endcode
*
* @author Wolfgang Bangerth, 1998
template <int spacedim>
struct Iterators<2, spacedim>
{
- typedef TriaRawIterator<dealii::TriaAccessor<1, 2, spacedim>>
- raw_line_iterator;
- typedef TriaIterator<dealii::TriaAccessor<1, 2, spacedim>> line_iterator;
- typedef TriaActiveIterator<dealii::TriaAccessor<1, 2, spacedim>>
- active_line_iterator;
-
- typedef TriaRawIterator<dealii::CellAccessor<2, spacedim>>
- raw_quad_iterator;
- typedef TriaIterator<dealii::CellAccessor<2, spacedim>> quad_iterator;
- typedef TriaActiveIterator<dealii::CellAccessor<2, spacedim>>
- active_quad_iterator;
-
- typedef TriaRawIterator<dealii::InvalidAccessor<3, 2, spacedim>>
- raw_hex_iterator;
- typedef TriaIterator<dealii::InvalidAccessor<3, 2, spacedim>>
- hex_iterator;
- typedef TriaActiveIterator<dealii::InvalidAccessor<3, 2, spacedim>>
- active_hex_iterator;
+ using raw_line_iterator =
+ TriaRawIterator<dealii::TriaAccessor<1, 2, spacedim>>;
+ using line_iterator = TriaIterator<dealii::TriaAccessor<1, 2, spacedim>>;
+ using active_line_iterator =
+ TriaActiveIterator<dealii::TriaAccessor<1, 2, spacedim>>;
+
+ using raw_quad_iterator =
+ TriaRawIterator<dealii::CellAccessor<2, spacedim>>;
+ using quad_iterator = TriaIterator<dealii::CellAccessor<2, spacedim>>;
+ using active_quad_iterator =
+ TriaActiveIterator<dealii::CellAccessor<2, spacedim>>;
+
+ using raw_hex_iterator =
+ TriaRawIterator<dealii::InvalidAccessor<3, 2, spacedim>>;
+ using hex_iterator =
+ TriaIterator<dealii::InvalidAccessor<3, 2, spacedim>>;
+ using active_hex_iterator =
+ TriaActiveIterator<dealii::InvalidAccessor<3, 2, spacedim>>;
};
* for lower dimensions (see <tt>Iterators<[12]></tt>). The dimension
* specific data types are here, since we are in three dimensions:
* @code
- * typedef raw_hex_iterator raw_cell_iterator;
- * typedef hex_iterator cell_iterator;
- * typedef active_hex_iterator active_cell_iterator;
+ * using raw_cell_iterator = raw_hex_iterator;
+ * using cell_iterator = hex_iterator;
+ * using active_cell_iterator = active_hex_iterator;
*
- * typedef raw_quad_iterator raw_face_iterator;
- * typedef quad_iterator face_iterator;
- * typedef active_quad_iterator active_face_iterator;
+ * using raw_face_iterator = raw_quad_iterator;
+ * using face_iterator = quad_iterator;
+ * using active_face_iterator = active_quad_iterator;
* @endcode
*
* @author Wolfgang Bangerth, 1998
template <int spacedim>
struct Iterators<3, spacedim>
{
- typedef TriaRawIterator<dealii::TriaAccessor<1, 3, spacedim>>
- raw_line_iterator;
- typedef TriaIterator<dealii::TriaAccessor<1, 3, spacedim>> line_iterator;
- typedef TriaActiveIterator<dealii::TriaAccessor<1, 3, spacedim>>
- active_line_iterator;
-
- typedef TriaRawIterator<dealii::TriaAccessor<2, 3, spacedim>>
- raw_quad_iterator;
- typedef TriaIterator<dealii::TriaAccessor<2, 3, spacedim>> quad_iterator;
- typedef TriaActiveIterator<dealii::TriaAccessor<2, 3, spacedim>>
- active_quad_iterator;
-
- typedef TriaRawIterator<dealii::CellAccessor<3, spacedim>>
- raw_hex_iterator;
- typedef TriaIterator<dealii::CellAccessor<3, spacedim>> hex_iterator;
- typedef TriaActiveIterator<dealii::CellAccessor<3, spacedim>>
- active_hex_iterator;
+ using raw_line_iterator =
+ TriaRawIterator<dealii::TriaAccessor<1, 3, spacedim>>;
+ using line_iterator = TriaIterator<dealii::TriaAccessor<1, 3, spacedim>>;
+ using active_line_iterator =
+ TriaActiveIterator<dealii::TriaAccessor<1, 3, spacedim>>;
+
+ using raw_quad_iterator =
+ TriaRawIterator<dealii::TriaAccessor<2, 3, spacedim>>;
+ using quad_iterator = TriaIterator<dealii::TriaAccessor<2, 3, spacedim>>;
+ using active_quad_iterator =
+ TriaActiveIterator<dealii::TriaAccessor<2, 3, spacedim>>;
+
+ using raw_hex_iterator =
+ TriaRawIterator<dealii::CellAccessor<3, spacedim>>;
+ using hex_iterator = TriaIterator<dealii::CellAccessor<3, spacedim>>;
+ using active_hex_iterator =
+ TriaActiveIterator<dealii::CellAccessor<3, spacedim>>;
};
} // namespace TriangulationImplementation
template <int dim, int spacedim = dim>
class DoFHandler : public Subscriptor
{
- typedef dealii::internal::DoFHandlerImplementation::
- Iterators<DoFHandler<dim, spacedim>, false>
- ActiveSelector;
- typedef dealii::internal::DoFHandlerImplementation::
- Iterators<DoFHandler<dim, spacedim>, true>
- LevelSelector;
+ using ActiveSelector = dealii::internal::DoFHandlerImplementation::
+ Iterators<DoFHandler<dim, spacedim>, false>;
+ using LevelSelector = dealii::internal::DoFHandlerImplementation::
+ Iterators<DoFHandler<dim, spacedim>, true>;
public:
- typedef typename ActiveSelector::CellAccessor cell_accessor;
- typedef typename ActiveSelector::FaceAccessor face_accessor;
+ using cell_accessor = typename ActiveSelector::CellAccessor;
+ using face_accessor = typename ActiveSelector::FaceAccessor;
- typedef typename ActiveSelector::line_iterator line_iterator;
- typedef typename ActiveSelector::active_line_iterator active_line_iterator;
+ using line_iterator = typename ActiveSelector::line_iterator;
+ using active_line_iterator = typename ActiveSelector::active_line_iterator;
- typedef typename ActiveSelector::quad_iterator quad_iterator;
- typedef typename ActiveSelector::active_quad_iterator active_quad_iterator;
+ using quad_iterator = typename ActiveSelector::quad_iterator;
+ using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
- typedef typename ActiveSelector::hex_iterator hex_iterator;
- typedef typename ActiveSelector::active_hex_iterator active_hex_iterator;
+ using hex_iterator = typename ActiveSelector::hex_iterator;
+ using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
/**
* @copydoc ::DoFHandler::active_cell_iterator
* @ingroup Iterators
*/
#ifndef _MSC_VER
- typedef typename ActiveSelector::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
#else
- typedef TriaActiveIterator<
- dealii::DoFCellAccessor<DoFHandler<dim, spacedim>, false>>
- active_cell_iterator;
+ using active_cell_iterator = TriaActiveIterator<
+ dealii::DoFCellAccessor<DoFHandler<dim, spacedim>, false>>;
#endif
- typedef typename LevelSelector::cell_iterator level_cell_iterator;
+ using level_cell_iterator = typename LevelSelector::cell_iterator;
/**
* @copydoc ::DoFHandler::cell_iterator
* @ingroup Iterators
*/
#ifndef _MSC_VER
- typedef typename ActiveSelector::cell_iterator cell_iterator;
+ using cell_iterator = typename ActiveSelector::cell_iterator;
#else
- typedef TriaIterator<
- dealii::DoFCellAccessor<DoFHandler<dim, spacedim>, false>>
- cell_iterator;
+ using cell_iterator =
+ TriaIterator<dealii::DoFCellAccessor<DoFHandler<dim, spacedim>, false>>;
#endif
/**
* @copydoc ::DoFHandler::face_iterator
* @ingroup Iterators
*/
- typedef typename ActiveSelector::face_iterator face_iterator;
+ using face_iterator = typename ActiveSelector::face_iterator;
/**
* @copydoc ::DoFHandler::active_face_iterator
* @ingroup Iterators
*/
- typedef typename ActiveSelector::active_face_iterator active_face_iterator;
+ using active_face_iterator = typename ActiveSelector::active_face_iterator;
- typedef typename LevelSelector::CellAccessor level_cell_accessor;
- typedef typename LevelSelector::FaceAccessor level_face_accessor;
+ using level_cell_accessor = typename LevelSelector::CellAccessor;
+ using level_face_accessor = typename LevelSelector::FaceAccessor;
- typedef typename LevelSelector::face_iterator level_face_iterator;
+ using level_face_iterator = typename LevelSelector::face_iterator;
/**
* Make the dimension available in function templates.
/**
* The type in which we store the offsets into the dof_indices array.
*/
- typedef unsigned int offset_type;
+ using offset_type = unsigned int;
/**
* The type in which we store the active FE index.
*/
- typedef unsigned short int active_fe_index_type;
+ using active_fe_index_type = unsigned short int;
/**
* A signed type that matches the type in which we store the active FE
* index. We use this in computing binary complements.
*/
- typedef signed short int signed_active_fe_index_type;
+ using signed_active_fe_index_type = signed short int;
/**
* Given an active_fe_index, return whether the corresponding
* FECollection, namely 2.
*
* For the purpose of this function by domination we consider either
- * this_element_dominate or either_element_can_dominate ; therefore the
+ * this_element_dominate or either_element_can_dominate; therefore the
* element can dominate itself. Thus if FECollection contains
* {Q1,Q2,Q4,Q3} and @p fes = {3}, the function returns 3.
*
/**
* ConstraintMatrix has been renamed to AffineConstraints. Provide a
- * compatibility typedef that defaults to AffineConstraints<double>.
+ * compatibility alias that defaults to AffineConstraints<double>.
*
* @deprecated Use AffineConstraints<double> instead of ConstraintMatrix
*/
using ConstraintMatrix DEAL_II_DEPRECATED = AffineConstraints<double>;
-// Note: Unfortunately, we cannot move this compatibility typedef into
+// Note: Unfortunately, we cannot move this compatibility alias into
// constraint_matrix.h directly. This would break a lot of user projects
// that include constraint_matrix.h transitively due to various deal.II
// headers that include the file.
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* An enum that describes what should happen if the two AffineConstraints
* A data type in which we store the list of entries that make up the
* homogenous part of a constraint.
*/
- typedef std::vector<std::pair<size_type, number>> Entries;
+ using Entries = std::vector<std::pair<size_type, number>>;
/**
* Global DoF index of this line. Since only very few lines are stored,
};
/**
- * Typedef for the iterator type that is used in the LineRange container.
+ * Alias for the iterator type that is used in the LineRange container.
*/
- typedef typename std::vector<ConstraintLine>::const_iterator const_iterator;
+ using const_iterator = typename std::vector<ConstraintLine>::const_iterator;
/**
- * Typedef for the return type used by get_lines().
+ * Alias for the return type used by get_lines().
*/
- typedef boost::iterator_range<const_iterator> LineRange;
+ using LineRange = boost::iterator_range<const_iterator>;
/**
* Return a range object containing (const) iterators to all line entries
{
namespace AffineConstraintsImplementation
{
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
template <class VectorType>
void
// following.
IndexSet needed_elements = vec_owned_elements;
- typedef typename std::vector<ConstraintLine>::const_iterator
- constraint_iterator;
+ using constraint_iterator =
+ typename std::vector<ConstraintLine>::const_iterator;
for (constraint_iterator it = lines.begin(); it != lines.end(); ++it)
if (vec_owned_elements.is_element(it->index))
for (unsigned int i = 0; i < it->entries.size(); ++i)
// Some helper definitions for the local_to_global functions.
namespace internals
{
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
// this struct contains all the information we need to store about each of
// the global entries (global_row): are they obtained directly by some local
const size_type local_row,
const number constraint_value)
{
- typedef std::vector<Distributing>::iterator index_iterator;
- index_iterator pos, pos1;
- Distributing row_value(global_row);
+ using index_iterator = std::vector<Distributing>::iterator;
+ index_iterator pos, pos1;
+ Distributing row_value(global_row);
std::pair<size_type, number> constraint(local_row, constraint_value);
// check whether the list was really sorted before entering here
{
AssertDimension(block_starts.size(), block_object.n_block_rows() + 1);
- typedef std::vector<Distributing>::iterator row_iterator;
+ using row_iterator = std::vector<Distributing>::iterator;
row_iterator block_indices = global_rows.total_row_indices.begin();
const size_type num_blocks = block_object.n_block_rows();
{
AssertDimension(block_starts.size(), block_object.n_block_rows() + 1);
- typedef std::vector<size_type>::iterator row_iterator;
- row_iterator col_indices = row_indices.begin();
+ using row_iterator = std::vector<size_type>::iterator;
+ row_iterator col_indices = row_indices.begin();
const size_type num_blocks = block_object.n_block_rows();
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor. Initialize for zero blocks.
: public LinearOperator<Range, Domain, typename BlockPayload::BlockType>
{
public:
- typedef LinearOperator<typename Range::BlockType,
- typename Domain::BlockType,
- typename BlockPayload::BlockType>
- BlockType;
+ using BlockType = LinearOperator<typename Range::BlockType,
+ typename Domain::BlockType,
+ typename BlockPayload::BlockType>;
/**
* Create an empty BlockLinearOperator object.
/**
* Type of payload held by each subblock
*/
- typedef PayloadBlockType BlockType;
+ using BlockType = PayloadBlockType;
/**
* Default constructor
BlockLinearOperator<Range, Domain, BlockPayload>
block_operator(const BlockMatrixType &block_matrix)
{
- typedef typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType
- BlockType;
+ using BlockType =
+ typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
BlockLinearOperator<Range, Domain, BlockPayload> return_op(
BlockPayload(block_matrix, block_matrix));
static_assert(m > 0 && n > 0,
"a blocked LinearOperator must consist of at least one block");
- typedef typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType
- BlockType;
+ using BlockType =
+ typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
BlockLinearOperator<Range, Domain, BlockPayload> return_op(
(BlockPayload())); // TODO: Create block payload so that this can be
BlockLinearOperator<Range, Domain, BlockPayload>
block_diagonal_operator(const BlockMatrixType &block_matrix)
{
- typedef typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType
- BlockType;
+ using BlockType =
+ typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
BlockLinearOperator<Range, Domain, BlockPayload> return_op(
BlockPayload(block_matrix, block_matrix));
static_assert(
m > 0, "a blockdiagonal LinearOperator must consist of at least one block");
- typedef typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType
- BlockType;
+ using BlockType =
+ typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
std::array<std::array<BlockType, m>, m> new_ops;
"a blockdiagonal LinearOperator must consist of at least "
"one block");
- typedef typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType
- BlockType;
+ using BlockType =
+ typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
std::array<BlockType, m> new_ops;
new_ops.fill(op);
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor creating a useless object. initialize() must be
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor creating a useless object. initialize() must be
Table<2, std::string> array(n_block_rows(), n_block_cols());
- typedef std::map<
- const PointerMatrixBase<typename BlockVectorType::BlockType> *,
- std::string>
- NameMap;
+ using NameMap =
+ std::map<const PointerMatrixBase<typename BlockVectorType::BlockType> *,
+ std::string>;
NameMap matrix_names;
typename std::vector<Entry>::const_iterator m = entries.begin();
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Typedef the value type of the matrix we point into.
*/
- typedef typename BlockMatrixType::value_type value_type;
+ using value_type = typename BlockMatrixType::value_type;
/**
* Initialize data fields to default values.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Type of the matrix used in this accessor.
*/
- typedef BlockMatrixType MatrixType;
+ using MatrixType = BlockMatrixType;
/**
* Typedef the value type of the matrix we point into.
*/
- typedef typename BlockMatrixType::value_type value_type;
+ using value_type = typename BlockMatrixType::value_type;
/**
* Constructor. Since we use accessors only for read access, a const
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Type of the matrix used in this accessor.
*/
- typedef const BlockMatrixType MatrixType;
+ using MatrixType = const BlockMatrixType;
/**
* Typedef the value type of the matrix we point into.
*/
- typedef typename BlockMatrixType::value_type value_type;
+ using value_type = typename BlockMatrixType::value_type;
/**
* Constructor. Since we use accessors only for read access, a const
/**
* Typedef the type of the underlying matrix.
*/
- typedef MatrixType BlockType;
+ using BlockType = MatrixType;
/**
- * Type of matrix entries. These are analogous to typedefs in the standard
+ * Type of matrix entries. These are analogous to alias in the standard
* library containers.
*/
- typedef typename BlockType::value_type value_type;
- typedef value_type * pointer;
- typedef const value_type * const_pointer;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- typedef types::global_dof_index size_type;
+ using value_type = typename BlockType::value_type;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using reference = value_type &;
+ using const_reference = const value_type &;
+ using size_type = types::global_dof_index;
- typedef MatrixIterator<BlockMatrixIterators::Accessor<BlockMatrixBase, false>>
- iterator;
+ using iterator =
+ MatrixIterator<BlockMatrixIterators::Accessor<BlockMatrixBase, false>>;
- typedef MatrixIterator<BlockMatrixIterators::Accessor<BlockMatrixBase, true>>
- const_iterator;
+ using const_iterator =
+ MatrixIterator<BlockMatrixIterators::Accessor<BlockMatrixBase, true>>;
/**
// save some cycles for zero additions, but
// only if it is safe for the matrix we are
// working with
- typedef typename MatrixType::Traits MatrixTraits;
+ using MatrixTraits = typename MatrixType::Traits;
if ((MatrixTraits::zero_addition_can_be_elided == true) &&
(value == value_type()))
return;
// save some cycles for zero additions, but
// only if it is safe for the matrix we are
// working with
- typedef typename MatrixType::Traits MatrixTraits;
+ using MatrixTraits = typename MatrixType::Traits;
if ((MatrixTraits::zero_addition_can_be_elided == true) && (factor == 0))
return;
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockMatrixBase<SparseMatrix<number>> BaseClass;
+ using BaseClass = BlockMatrixBase<SparseMatrix<number>>;
/**
* Typedef the type of the underlying matrix.
*/
- typedef typename BaseClass::BlockType BlockType;
+ using BlockType = typename BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef typename BaseClass::value_type value_type;
- typedef typename BaseClass::pointer pointer;
- typedef typename BaseClass::const_pointer const_pointer;
- typedef typename BaseClass::reference reference;
- typedef typename BaseClass::const_reference const_reference;
- typedef typename BaseClass::size_type size_type;
- typedef typename BaseClass::iterator iterator;
- typedef typename BaseClass::const_iterator const_iterator;
+ using value_type = typename BaseClass::value_type;
+ using pointer = typename BaseClass::pointer;
+ using const_pointer = typename BaseClass::const_pointer;
+ using reference = typename BaseClass::reference;
+ using const_reference = typename BaseClass::const_reference;
+ using size_type = typename BaseClass::size_type;
+ using iterator = typename BaseClass::iterator;
+ using const_iterator = typename BaseClass::const_iterator;
/**
* @name Constructors and initialization
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor. The result is an empty object with zero dimensions.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Define a value which is used to indicate that a certain value in the @p
* This class extends the base class to implement an array of compressed
* sparsity patterns that can be used to initialize objects of type
* BlockSparsityPattern. It does not add additional member functions, but
- * rather acts as a @p typedef to introduce the name of this class, without
+ * rather acts as an @p alias to introduce the name of this class, without
* requiring the user to specify the templated name of the base class. For
* information on the interface of this class refer to the base class. The
* individual blocks are based on the DynamicSparsityPattern class.
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockVectorBase<Vector<Number>> BaseClass;
+ using BaseClass = BlockVectorBase<Vector<Number>>;
/**
* Typedef the type of the underlying vector.
*/
- typedef typename BaseClass::BlockType BlockType;
+ using BlockType = typename BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef typename BaseClass::value_type value_type;
- typedef typename BaseClass::real_type real_type;
- typedef typename BaseClass::pointer pointer;
- typedef typename BaseClass::const_pointer const_pointer;
- typedef typename BaseClass::reference reference;
- typedef typename BaseClass::const_reference const_reference;
- typedef typename BaseClass::size_type size_type;
- typedef typename BaseClass::iterator iterator;
- typedef typename BaseClass::const_iterator const_iterator;
+ using value_type = typename BaseClass::value_type;
+ using real_type = typename BaseClass::real_type;
+ using pointer = typename BaseClass::pointer;
+ using const_pointer = typename BaseClass::const_pointer;
+ using reference = typename BaseClass::reference;
+ using const_reference = typename BaseClass::const_reference;
+ using size_type = typename BaseClass::size_type;
+ using iterator = typename BaseClass::iterator;
+ using const_iterator = typename BaseClass::const_iterator;
/**
* Constructor. There are three ways to use this constructor. First, without
* Type of the vector underlying the block vector used in non-const
* iterators. There, the vector must not be constant.
*/
- typedef typename BlockVectorType::BlockType Vector;
+ using Vector = typename BlockVectorType::BlockType;
/**
* Type of the block vector used in non-const iterators. There, the
* block vector must not be constant.
*/
- typedef BlockVectorType BlockVector;
+ using BlockVector = BlockVectorType;
/**
* Type of the numbers we point to. Here, they are not constant.
*/
- typedef typename BlockVector::value_type value_type;
+ using value_type = typename BlockVector::value_type;
/**
* Typedef the result of a dereferencing operation for an iterator of
* the underlying iterator.
*/
- typedef typename Vector::reference dereference_type;
+ using dereference_type = typename Vector::reference;
};
* Type of the vector underlying the block vector used in
* const_iterator. There, the vector must be constant.
*/
- typedef const typename BlockVectorType::BlockType Vector;
+ using Vector = const typename BlockVectorType::BlockType;
/**
* Type of the block vector used in const_iterator. There, the block
* vector must be constant.
*/
- typedef const BlockVectorType BlockVector;
+ using BlockVector = const BlockVectorType;
/**
* Type of the numbers we point to. Here, they are constant since the
* block vector we use is constant.
*/
- typedef const typename BlockVector::value_type value_type;
+ using value_type = const typename BlockVector::value_type;
/**
* Typedef the result of a dereferencing operation for an iterator of
* the underlying iterator. Since this is for constant iterators, we can
* only return values, not actual references.
*/
- typedef value_type dereference_type;
+ using dereference_type = value_type;
};
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Type of the number this iterator points to. Depending on the value of
* the second template parameter, this is either a constant or non-const
* number.
*/
- typedef typename Types<BlockVectorType, Constness>::value_type value_type;
+ using value_type = typename Types<BlockVectorType, Constness>::value_type;
/**
- * Declare some typedefs which are standard for iterators and are used
+ * Declare some alias which are standard for iterators and are used
* by algorithms to enquire about the specifics of the iterators they
* work on.
*/
- typedef std::random_access_iterator_tag iterator_category;
- typedef std::ptrdiff_t difference_type;
- typedef typename BlockVectorType::reference reference;
- typedef value_type * pointer;
+ using iterator_category = std::random_access_iterator_tag;
+ using difference_type = std::ptrdiff_t;
+ using reference = typename BlockVectorType::reference;
+ using pointer = value_type *;
- typedef typename Types<BlockVectorType, Constness>::dereference_type
- dereference_type;
+ using dereference_type =
+ typename Types<BlockVectorType, Constness>::dereference_type;
/**
* Typedef the type of the block vector (which differs in constness,
* depending on the second template parameter).
*/
- typedef
- typename Types<BlockVectorType, Constness>::BlockVector BlockVector;
+ using BlockVector =
+ typename Types<BlockVectorType, Constness>::BlockVector;
/**
* Construct an iterator from a vector to which we point and the global
/**
* Typedef the type of the underlying vector.
*/
- typedef VectorType BlockType;
+ using BlockType = VectorType;
/*
* Declare standard types used in
* class. This includes iterator
* types.
*/
- typedef typename BlockType::value_type value_type;
- typedef value_type * pointer;
- typedef const value_type * const_pointer;
- typedef dealii::internal::BlockVectorIterators::Iterator<BlockVectorBase,
- false>
- iterator;
- typedef dealii::internal::BlockVectorIterators::Iterator<BlockVectorBase,
- true>
- const_iterator;
- typedef typename BlockType::reference reference;
- typedef typename BlockType::const_reference const_reference;
- typedef types::global_dof_index size_type;
+ using value_type = typename BlockType::value_type;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using iterator =
+ dealii::internal::BlockVectorIterators::Iterator<BlockVectorBase, false>;
+ using const_iterator =
+ dealii::internal::BlockVectorIterators::Iterator<BlockVectorBase, true>;
+ using reference = typename BlockType::reference;
+ using const_reference = typename BlockType::const_reference;
+ using size_type = types::global_dof_index;
/**
* Declare a type that has holds real-valued numbers with the same precision
* If the template argument is a std::complex type then real_type equals the
* type underlying the complex numbers.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename BlockType::real_type real_type;
+ using real_type = typename BlockType::real_type;
/**
* Default constructor.
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef const ChunkSparseMatrix<number> MatrixType;
+ using MatrixType = const ChunkSparseMatrix<number>;
/**
* Constructor.
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef ChunkSparseMatrix<number> MatrixType;
+ using MatrixType = ChunkSparseMatrix<number>;
/**
* Constructor.
/**
* Typedef for the matrix type (including constness) we are to operate on.
*/
- typedef typename Accessor<number, Constness>::MatrixType MatrixType;
+ using MatrixType = typename Accessor<number, Constness>::MatrixType;
/**
- * A typedef for the type you get when you dereference an iterator of the
+ * An alias for the type you get when you dereference an iterator of the
* current kind.
*/
- typedef const Accessor<number, Constness> &value_type;
+ using value_type = const Accessor<number, Constness> &;
/**
* Constructor. Create an iterator into the matrix @p matrix for the given
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * Type of matrix entries. This alias is analogous to <tt>value_type</tt>
* in the standard library containers.
*/
- typedef number value_type;
+ using value_type = number;
/**
* Declare a type that has holds real-valued numbers with the same precision
* If the template argument is a std::complex type then real_type equals the
* type underlying the complex numbers.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename numbers::NumberTraits<number>::real_type real_type;
+ using real_type = typename numbers::NumberTraits<number>::real_type;
/**
* Typedef of an iterator class walking over all the nonzero entries of this
* matrix. This iterator cannot change the values of the matrix.
*/
- typedef ChunkSparseMatrixIterators::Iterator<number, true> const_iterator;
+ using const_iterator = ChunkSparseMatrixIterators::Iterator<number, true>;
/**
* Typedef of an iterator class walking over all the nonzero entries of this
* course can't change the sparsity pattern as this is fixed once a sparse
* matrix is attached to it.
*/
- typedef ChunkSparseMatrixIterators::Iterator<number, false> iterator;
+ using iterator = ChunkSparseMatrixIterators::Iterator<number, false>;
/**
* A structure that describes some of the traits of this class in terms of
Assert(static_cast<size_type>(std::distance(begin, end)) == m(),
ExcIteratorRange(std::distance(begin, end), m()));
- // for use in the inner loop, we define a typedef to the type of the inner
+ // for use in the inner loop, we define an alias to the type of the inner
// iterators
- typedef
- typename std::iterator_traits<ForwardIterator>::value_type::const_iterator
- inner_iterator;
+ using inner_iterator =
+ typename std::iterator_traits<ForwardIterator>::value_type::const_iterator;
size_type row = 0;
for (ForwardIterator i = begin; i != end; ++i, ++row)
{
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Add the result of multiplying a chunk of size chunk_size times
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Typedef an iterator class that allows to walk over all nonzero elements
* of a sparsity pattern.
*/
- typedef ChunkSparsityPatternIterators::Iterator const_iterator;
+ using const_iterator = ChunkSparsityPatternIterators::Iterator;
/**
* Typedef an iterator class that allows to walk over all nonzero elements
* Since the iterator does not allow to modify the sparsity pattern, this
* type is the same as that for @p const_iterator.
*/
- typedef ChunkSparsityPatternIterators::Iterator iterator;
+ using iterator = ChunkSparsityPatternIterators::Iterator;
/**
* Define a value which is used to indicate that a certain value in the
// now enter all the elements into the matrix
size_type row = 0;
- typedef
- typename std::iterator_traits<ForwardIterator>::value_type::const_iterator
- inner_iterator;
+ using inner_iterator =
+ typename std::iterator_traits<ForwardIterator>::value_type::const_iterator;
for (ForwardIterator i = begin; i != end; ++i, ++row)
{
const inner_iterator end_of_row = i->end();
/**
* Declare type for container size.
*/
- typedef unsigned int size_type;
+ using size_type = unsigned int;
/**
* Type of the matrix entries.
*/
- typedef Number value_type;
+ using value_type = Number;
/**
* Declare a type that holds real-valued numbers with the same precision
* as the template argument to this class.
*/
- typedef Number real_type;
+ using real_type = Number;
/**
* @name Constructors and initialization
class Vector : public VectorSpaceVector<Number>
{
public:
- typedef typename VectorSpaceVector<Number>::value_type value_type;
- typedef typename VectorSpaceVector<Number>::size_type size_type;
- typedef typename VectorSpaceVector<Number>::real_type real_type;
+ using value_type = typename VectorSpaceVector<Number>::value_type;
+ using size_type = typename VectorSpaceVector<Number>::size_type;
+ using real_type = typename VectorSpaceVector<Number>::real_type;
/**
* Constructor. Create a vector of dimension zero.
class DiagonalMatrix : public Subscriptor
{
public:
- typedef typename VectorType::value_type value_type;
- typedef typename VectorType::size_type size_type;
+ using value_type = typename VectorType::value_type;
+ using size_type = typename VectorType::size_type;
/**
* Constructor.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Accessor class for iterators into objects of type DynamicSparsityPattern.
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Typedef an for iterator class that allows to walk over all nonzero
* Since the iterator does not allow to modify the sparsity pattern, this
* type is the same as that for @p const_iterator.
*/
- typedef DynamicSparsityPatternIterators::Iterator iterator;
+ using iterator = DynamicSparsityPatternIterators::Iterator;
/**
* Typedef for an iterator class that allows to walk over all nonzero
* elements of a sparsity pattern.
*/
- typedef DynamicSparsityPatternIterators::Iterator const_iterator;
+ using const_iterator = DynamicSparsityPatternIterators::Iterator;
/**
* Initialize as an empty object. This is useful if you want such objects as
/**
* Declare type of container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Standardized data struct to pipe additional data to the solver.
/**
* Declare type of container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Standardized data struct to pipe additional data to the solver.
/**
* Declare the type of container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Accessor class for iterators
* Typedef defining a type that represents a pair of degree of freedom index
* and the value it shall have.
*/
- typedef std::pair<size_type, double> IndexValuePair;
+ using IndexValuePair = std::pair<size_type, double>;
/**
* @name Constructors and initialization
* since that data type is so often used and is rather awkward to write out
* each time.
*/
- typedef typename std::vector<IndexValuePair>::const_iterator
- const_index_value_iterator;
+ using const_index_value_iterator =
+ typename std::vector<IndexValuePair>::const_iterator;
/**
* Helper class used to sort pairs of indices and values. Only the index is
/**
* A type of used to index into this container.
*/
- typedef std::size_t size_type;
+ using size_type = std::size_t;
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * Type of matrix entries. This alias is analogous to <tt>value_type</tt>
* in the standard library containers.
*/
- typedef number value_type;
+ using value_type = number;
/**
* If the template argument is a std::complex type then real_type equals the
* type underlying the complex numbers.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename numbers::NumberTraits<number>::real_type real_type;
+ using real_type = typename numbers::NumberTraits<number>::real_type;
class const_iterator;
/**
- * A namespace in which the deal.II linear algebra classes are typedef'ed to
+ * A namespace in which the deal.II linear algebra classes are aliased to
* generic names. There are similar namespaces LinearAlgebraPETSc and
- * LinearAlgebraTrilinos for typedefs to classes that interface with the PETSc
+ * LinearAlgebraTrilinos for alias to classes that interface with the PETSc
* and Trilinos libraries.
*/
namespace LinearAlgebraDealII
{
- typedef Vector<double> Vector;
- typedef BlockVector<double> BlockVector;
+ using Vector = Vector<double>;
+ using BlockVector = BlockVector<double>;
- typedef SparseMatrix<double> SparseMatrix;
+ using SparseMatrix = SparseMatrix<double>;
- typedef PreconditionSSOR<SparseMatrix> PreconditionSSOR;
+ using PreconditionSSOR = PreconditionSSOR<SparseMatrix>;
} // namespace LinearAlgebraDealII
/**
* A namespace in which the wrappers to the PETSc linear algebra classes are
- * typedef'ed to generic names. There are similar namespaces
- * LinearAlgebraDealII and LinearAlgebraTrilinos for typedefs to deal.II's own
+ * aliased to generic names. There are similar namespaces
+ * LinearAlgebraDealII and LinearAlgebraTrilinos for alias to deal.II's own
* classes and classes that interface with Trilinos.
*/
namespace LinearAlgebraPETSc
{
using namespace dealii;
- typedef PETScWrappers::SolverCG SolverCG;
- typedef PETScWrappers::SolverGMRES SolverGMRES;
+ using SolverCG = PETScWrappers::SolverCG;
+ using SolverGMRES = PETScWrappers::SolverGMRES;
/**
- * A namespace with typedefs to generic names for parallel PETSc linear
+ * A namespace with alias to generic names for parallel PETSc linear
* algebra objects.
*/
namespace MPI
/**
* Typedef for the vector type used.
*/
- typedef PETScWrappers::MPI::Vector Vector;
+ using Vector = PETScWrappers::MPI::Vector;
/**
* Typedef for the type used to describe vectors that consist of multiple
* blocks.
*/
- typedef PETScWrappers::MPI::BlockVector BlockVector;
+ using BlockVector = PETScWrappers::MPI::BlockVector;
/**
* Typedef for the sparse matrix type used.
*/
- typedef PETScWrappers::MPI::SparseMatrix SparseMatrix;
+ using SparseMatrix = PETScWrappers::MPI::SparseMatrix;
/**
* Typedef for the type used to describe sparse matrices that consist of
* multiple blocks.
*/
- typedef PETScWrappers::MPI::BlockSparseMatrix BlockSparseMatrix;
+ using BlockSparseMatrix = PETScWrappers::MPI::BlockSparseMatrix;
- typedef dealii::BlockDynamicSparsityPattern BlockCompressedSparsityPattern;
+ using BlockCompressedSparsityPattern = dealii::BlockDynamicSparsityPattern;
/**
* Typedef for the AMG preconditioner type.
*/
- typedef PETScWrappers::PreconditionBoomerAMG PreconditionAMG;
+ using PreconditionAMG = PETScWrappers::PreconditionBoomerAMG;
/**
* Typedef for the Incomplete Cholesky preconditioner.
*/
- typedef PETScWrappers::PreconditionICC PreconditionIC;
+ using PreconditionIC = PETScWrappers::PreconditionICC;
/**
* Typedef for the Incomplete LU decomposition preconditioner.
*/
- typedef PETScWrappers::PreconditionILU PreconditionILU;
+ using PreconditionILU = PETScWrappers::PreconditionILU;
/**
* Typedef for the Incomplete Jacobi decomposition preconditioner.
*/
- typedef PETScWrappers::PreconditionJacobi PreconditionJacobi;
+ using PreconditionJacobi = PETScWrappers::PreconditionJacobi;
/**
* Typedef for the SSOR preconditioner.
*/
- typedef PETScWrappers::PreconditionSSOR PreconditionSSOR;
+ using PreconditionSSOR = PETScWrappers::PreconditionSSOR;
} // namespace MPI
/**
* A namespace in which the wrappers to the Trilinos linear algebra classes
- * are typedef'ed to generic names. There are similar namespaces
- * LinearAlgebraDealII and LinearAlgebraPETSc for typedefs to deal.II's own
+ * are aliased to generic names. There are similar namespaces
+ * LinearAlgebraDealII and LinearAlgebraPETSc for alias to deal.II's own
* classes and classes that interface with PETSc.
*/
namespace LinearAlgebraTrilinos
{
using namespace dealii;
- typedef TrilinosWrappers::SolverCG SolverCG;
- typedef TrilinosWrappers::SolverGMRES SolverGMRES;
+ using SolverCG = TrilinosWrappers::SolverCG;
+ using SolverGMRES = TrilinosWrappers::SolverGMRES;
/**
- * A namespace with typedefs to generic names for parallel Trilinos linear
+ * A namespace with alias to generic names for parallel Trilinos linear
* algebra objects.
*/
namespace MPI
/**
* Typedef for the vector type used.
*/
- typedef TrilinosWrappers::MPI::Vector Vector;
+ using Vector = TrilinosWrappers::MPI::Vector;
/**
* Typedef for the type used to describe vectors that consist of multiple
* blocks.
*/
- typedef TrilinosWrappers::MPI::BlockVector BlockVector;
+ using BlockVector = TrilinosWrappers::MPI::BlockVector;
/**
* Typedef for the sparse matrix type used.
*/
- typedef TrilinosWrappers::SparseMatrix SparseMatrix;
+ using SparseMatrix = TrilinosWrappers::SparseMatrix;
/**
* Typedef for the type used to describe sparse matrices that consist of
* multiple blocks.
*/
- typedef TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix;
+ using BlockSparseMatrix = TrilinosWrappers::BlockSparseMatrix;
- typedef TrilinosWrappers::BlockSparsityPattern
- BlockCompressedSparsityPattern;
+ using BlockCompressedSparsityPattern =
+ TrilinosWrappers::BlockSparsityPattern;
/**
* Typedef for the AMG preconditioner type.
*/
- typedef TrilinosWrappers::PreconditionAMG PreconditionAMG;
+ using PreconditionAMG = TrilinosWrappers::PreconditionAMG;
/**
* Typedef for the Incomplete Cholesky preconditioner.
*/
- typedef TrilinosWrappers::PreconditionIC PreconditionIC;
+ using PreconditionIC = TrilinosWrappers::PreconditionIC;
/**
* Typedef for the Incomplete LU decomposition preconditioner.
*/
- typedef TrilinosWrappers::PreconditionILU PreconditionILU;
+ using PreconditionILU = TrilinosWrappers::PreconditionILU;
/**
* Typedef for the Incomplete Jacobi decomposition preconditioner.
*/
- typedef TrilinosWrappers::PreconditionJacobi PreconditionJacobi;
+ using PreconditionJacobi = TrilinosWrappers::PreconditionJacobi;
/**
* Typedef for the SSOR preconditioner
*/
- typedef TrilinosWrappers::PreconditionSSOR PreconditionSSOR;
+ using PreconditionSSOR = TrilinosWrappers::PreconditionSSOR;
} // namespace MPI
/**
* Declare type of container size type.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Create an empty object.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor. Creates a zero-sized matrix that should be resized
static constexpr unsigned int communication_block_size = 20;
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockVectorBase<Vector<Number>> BaseClass;
+ using BaseClass = BlockVectorBase<Vector<Number>>;
/**
* Typedef the type of the underlying vector.
*/
- typedef typename BaseClass::BlockType BlockType;
+ using BlockType = typename BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef typename BaseClass::value_type value_type;
- typedef typename BaseClass::real_type real_type;
- typedef typename BaseClass::pointer pointer;
- typedef typename BaseClass::const_pointer const_pointer;
- typedef typename BaseClass::reference reference;
- typedef typename BaseClass::const_reference const_reference;
- typedef typename BaseClass::size_type size_type;
- typedef typename BaseClass::iterator iterator;
- typedef typename BaseClass::const_iterator const_iterator;
+ using value_type = typename BaseClass::value_type;
+ using real_type = typename BaseClass::real_type;
+ using pointer = typename BaseClass::pointer;
+ using const_pointer = typename BaseClass::const_pointer;
+ using reference = typename BaseClass::reference;
+ using const_reference = typename BaseClass::const_reference;
+ using size_type = typename BaseClass::size_type;
+ using iterator = typename BaseClass::iterator;
+ using const_iterator = typename BaseClass::const_iterator;
/**
* @name 1: Basic operations
public Subscriptor
{
public:
- typedef Number value_type;
- typedef value_type * pointer;
- typedef const value_type * const_pointer;
- typedef value_type * iterator;
- typedef const value_type * const_iterator;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- typedef types::global_dof_index size_type;
- typedef typename numbers::NumberTraits<Number>::real_type real_type;
+ using value_type = Number;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using iterator = value_type *;
+ using const_iterator = const value_type *;
+ using reference = value_type &;
+ using const_reference = const value_type &;
+ using size_type = types::global_dof_index;
+ using real_type = typename numbers::NumberTraits<Number>::real_type;
/**
* @name 1: Basic Object-handling
public VectorSpaceVector<Number>
{
public:
- typedef types::global_dof_index size_type;
- typedef typename ReadWriteVector<Number>::value_type value_type;
+ using size_type = types::global_dof_index;
+ using value_type = typename ReadWriteVector<Number>::value_type;
/**
* Constructor. Create a vector of dimension zero.
{
Assert(this->size(), ExcEmptyObject());
- typedef typename VectorSpaceVector<Number>::real_type real_type;
- value_type sum;
- internal::VectorOperations::MeanValue<Number> mean_value(
+ using real_type = typename VectorSpaceVector<Number>::real_type;
+ value_type sum;
+ internal::VectorOperations::MeanValue<Number> mean_value(
this->values.get());
internal::VectorOperations::parallel_reduce(
mean_value, 0, this->size(), sum, this->thread_loop_partitioner);
{
Assert(this->size(), ExcEmptyObject());
- typedef typename VectorSpaceVector<Number>::real_type real_type;
- real_type sum;
- internal::VectorOperations::Norm1<Number, real_type> norm1(
+ using real_type = typename VectorSpaceVector<Number>::real_type;
+ real_type sum;
+ internal::VectorOperations::Norm1<Number, real_type> norm1(
this->values.get());
internal::VectorOperations::parallel_reduce(
norm1, 0, this->size(), sum, this->thread_loop_partitioner);
// might still be finite. In that case, recompute ig (this is a rare case,
// so working on the vector twice is uncritical and paid off by the extended
// precision) using the BLAS approach with a weight, see e.g. dnrm2.f.
- typedef typename VectorSpaceVector<Number>::real_type real_type;
- real_type norm_square;
- internal::VectorOperations::Norm2<Number, real_type> norm2(
+ using real_type = typename VectorSpaceVector<Number>::real_type;
+ real_type norm_square;
+ internal::VectorOperations::Norm2<Number, real_type> norm2(
this->values.get());
internal::VectorOperations::parallel_reduce(
norm2, 0, this->size(), norm_square, this->thread_loop_partitioner);
/**
* Declare type for container size.
*/
- typedef std::make_unsigned<types::blas_int>::type size_type;
+ using size_type = std::make_unsigned<types::blas_int>::type;
/**
* Constructor. Initialize the matrix as a square matrix with dimension
/**
* Integer type in BLAS.
*/
- typedef long long blas_int;
+ using blas_int = long long;
#else
/**
* Integer type in BLAS.
*/
- typedef int blas_int;
+ using blas_int = int;
#endif
} // namespace types
// type is std::true_type if Matrix provides vmult_add and Tvmult_add,
// otherwise it is std::false_type
- typedef decltype(test<T>(nullptr, nullptr)) type;
+ using type = decltype(test<T>(nullptr, nullptr));
};
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Declare a type for matrix entries.
*/
- typedef typename MatrixType::value_type value_type;
+ using value_type = typename MatrixType::value_type;
/**
* Constructor rendering an uninitialized object.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* The type of object stored.
*/
- typedef MatrixBlock<MatrixType> value_type;
+ using value_type = MatrixBlock<MatrixType>;
/**
* The pointer type used for storing the objects. We use a shard pointer,
* such that they get deleted automatically when not used anymore.
*/
- typedef std::shared_ptr<value_type> ptr_type;
+ using ptr_type = std::shared_ptr<value_type>;
/**
* Add a new matrix block at the position <tt>(row,column)</tt> in the block
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* The type of object stored.
*/
- typedef MGLevelObject<MatrixBlock<MatrixType>> value_type;
+ using value_type = MGLevelObject<MatrixBlock<MatrixType>>;
/**
* Constructor, determining which matrices should be stored.
*
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Typedef for the matrix type (including constness) we are to operate on.
*/
- typedef typename ACCESSOR::MatrixType MatrixType;
+ using MatrixType = typename ACCESSOR::MatrixType;
/**
* Constructor. Create an iterator into the matrix <tt>matrix</tt> for the
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor, optionally selecting a component.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Class holding various variables which are used to modify the output of
* Abbreviate the somewhat lengthy name for the dealii::DataOutBase::Patch
* class.
*/
- typedef DataOutBase::Patch<2, 2> Patch;
+ using Patch = DataOutBase::Patch<2, 2>;
/**
* This is a list of patches that is created each time build_patches() is
// type is std::true_type if Matrix provides vmult_add and Tvmult_add,
// otherwise it is std::false_type
- typedef decltype(test<T>(nullptr, nullptr, nullptr)) type;
+ using type = decltype(test<T>(nullptr, nullptr, nullptr));
}; // namespace
} // namespace PackagedOperationImplementation
} // namespace internal
/**
* Declare the type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* An enum that lists the possible choices for which eigenvalues to compute
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor. Since we use accessors only for read access, a const
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor. Create an iterator into the matrix @p matrix for the
{
public:
/**
- * Declare a typedef for the iterator class.
+ * Declare an alias for the iterator class.
*/
- typedef MatrixIterators::const_iterator const_iterator;
+ using const_iterator = MatrixIterators::const_iterator;
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
- * Declare a typedef in analogy to all the other container classes.
+ * Declare an alias in analogy to all the other container classes.
*/
- typedef PetscScalar value_type;
+ using value_type = PetscScalar;
/**
* Default constructor.
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockMatrixBase<SparseMatrix> BaseClass;
+ using BaseClass = BlockMatrixBase<SparseMatrix>;
/**
* Typedef the type of the underlying matrix.
*/
- typedef BaseClass::BlockType BlockType;
+ using BlockType = BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef BaseClass::value_type value_type;
- typedef BaseClass::pointer pointer;
- typedef BaseClass::const_pointer const_pointer;
- typedef BaseClass::reference reference;
- typedef BaseClass::const_reference const_reference;
- typedef BaseClass::size_type size_type;
- typedef BaseClass::iterator iterator;
- typedef BaseClass::const_iterator const_iterator;
+ using value_type = BaseClass::value_type;
+ using pointer = BaseClass::pointer;
+ using const_pointer = BaseClass::const_pointer;
+ using reference = BaseClass::reference;
+ using const_reference = BaseClass::const_reference;
+ using size_type = BaseClass::size_type;
+ using iterator = BaseClass::iterator;
+ using const_iterator = BaseClass::const_iterator;
/**
* Constructor; initializes the matrix to be empty, without any
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockVectorBase<Vector> BaseClass;
+ using BaseClass = BlockVectorBase<Vector>;
/**
* Typedef the type of the underlying vector.
*/
- typedef BaseClass::BlockType BlockType;
+ using BlockType = BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef BaseClass::value_type value_type;
- typedef BaseClass::pointer pointer;
- typedef BaseClass::const_pointer const_pointer;
- typedef BaseClass::reference reference;
- typedef BaseClass::const_reference const_reference;
- typedef BaseClass::size_type size_type;
- typedef BaseClass::iterator iterator;
- typedef BaseClass::const_iterator const_iterator;
+ using value_type = BaseClass::value_type;
+ using pointer = BaseClass::pointer;
+ using const_pointer = BaseClass::const_pointer;
+ using reference = BaseClass::reference;
+ using const_reference = BaseClass::const_reference;
+ using size_type = BaseClass::size_type;
+ using iterator = BaseClass::iterator;
+ using const_iterator = BaseClass::const_iterator;
/**
* Default constructor. Generate an empty vector without any blocks.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* A structure that describes some of the traits of this class in terms
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor. Initialize the vector as empty.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
private:
/**
* parallel those in the <tt>C++</tt> standard libraries
* <tt>vector<...></tt> class.
*/
- typedef PetscScalar value_type;
- typedef PetscReal real_type;
- typedef types::global_dof_index size_type;
- typedef internal::VectorReference reference;
- typedef const internal::VectorReference const_reference;
+ using value_type = PetscScalar;
+ using real_type = PetscReal;
+ using size_type = types::global_dof_index;
+ using reference = internal::VectorReference;
+ using const_reference = const internal::VectorReference;
/**
* Default constructor. It doesn't do anything, derived classes will have
* This was defined to make this matrix a possible template argument to
* BlockMatrixArray.
*/
- typedef typename VectorType::value_type value_type;
+ using value_type = typename VectorType::value_type;
/**
* Virtual destructor. Does nothing except making sure that the destructor
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* This function is only present to provide the interface of a
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Parameters for Richardson preconditioner.
/**
* Type of the preconditioning function of the matrix.
*/
- typedef void (MatrixType::*function_ptr)(VectorType &,
- const VectorType &) const;
+ using function_ptr = void (MatrixType::*)(VectorType &,
+ const VectorType &) const;
/**
* Constructor. This constructor stores a reference to the matrix object
/**
* Declare type for container size.
*/
- typedef typename MatrixType::size_type size_type;
+ using size_type = typename MatrixType::size_type;
/**
* Class for parameters.
{
public:
/**
- * A typedef to the base class AdditionalData.
+ * An alias to the base class AdditionalData.
*/
- typedef
- typename PreconditionRelaxation<MatrixType>::AdditionalData AdditionalData;
+ using AdditionalData =
+ typename PreconditionRelaxation<MatrixType>::AdditionalData;
/**
* Apply preconditioner.
{
public:
/**
- * A typedef to the base class AdditionalData.
+ * An alias to the base class AdditionalData.
*/
- typedef
- typename PreconditionRelaxation<MatrixType>::AdditionalData AdditionalData;
+ using AdditionalData =
+ typename PreconditionRelaxation<MatrixType>::AdditionalData;
/**
* Apply preconditioner.
{
public:
/**
- * A typedef to the base class AdditionalData.
+ * An alias to the base class AdditionalData.
*/
- typedef
- typename PreconditionRelaxation<MatrixType>::AdditionalData AdditionalData;
+ using AdditionalData =
+ typename PreconditionRelaxation<MatrixType>::AdditionalData;
/**
* Declare type for container size.
*/
- typedef typename MatrixType::size_type size_type;
+ using size_type = typename MatrixType::size_type;
/**
- * A typedef to the base class.
+ * An alias to the base class.
*/
- typedef PreconditionRelaxation<MatrixType> BaseClass;
+ using BaseClass = PreconditionRelaxation<MatrixType>;
/**
/**
* Declare type for container size.
*/
- typedef typename MatrixType::size_type size_type;
+ using size_type = typename MatrixType::size_type;
/**
* Parameters for PreconditionPSOR.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
// avoid warning about use of deprecated variables
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Value type for inverse matrices.
*/
- typedef inverse_type value_type;
+ using value_type = inverse_type;
public:
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Parameters for block preconditioners.
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
public:
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Standard-conforming iterator.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Default constructor.
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* import types and functions from protected base class.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Constructor.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Choose a method for inverting the blocks, and thus the data type for the
/**
* Declare type for container size.
*/
- typedef typename MatrixType::size_type size_type;
+ using size_type = typename MatrixType::size_type;
/**
* Constructor. @p omega denotes the damping parameter of the
* those in the <tt>C++</tt> standard libraries <tt>vector<...></tt>
* class.
*/
- typedef Number value_type;
- typedef value_type * pointer;
- typedef const value_type * const_pointer;
- typedef value_type * iterator;
- typedef const value_type * const_iterator;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- typedef types::global_dof_index size_type;
- typedef typename numbers::NumberTraits<Number>::real_type real_type;
+ using value_type = Number;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using iterator = value_type *;
+ using const_iterator = const value_type *;
+ using reference = value_type &;
+ using const_reference = const value_type &;
+ using size_type = types::global_dof_index;
+ using real_type = typename numbers::NumberTraits<Number>::real_type;
/**
* @name 1: Basic Object-handling
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Value type for inverse matrices.
*/
- typedef InverseNumberType value_type;
+ using value_type = InverseNumberType;
public:
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Parameters for block relaxation methods. In addition to typical control
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Make type publicly available.
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Make type publicly available.
/**
* Define number type of matrix.
*/
- typedef typename MatrixType::value_type number;
+ using number = typename MatrixType::value_type;
/**
* Make type publicly available.
/**
* Declare the type for container size.
*/
- typedef unsigned int size_type;
+ using size_type = unsigned int;
/**
* Constructor for a rectangular matrix with @p n_rows and @p n_cols
{
public:
/**
- * A typedef for the underlying vector type
+ * An alias for the underlying vector type
*/
- typedef VectorType vector_type;
+ using vector_type = VectorType;
/**
* Constructor. Takes a control object which evaluates the conditions for
*/
struct StateCombiner
{
- typedef SolverControl::State result_type;
+ using result_type = SolverControl::State;
SolverControl::State
operator()(const SolverControl::State state1,
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Standardized data struct to pipe additional data to the solver.
typename VectorMemory<VectorType>::Pointer Vv(this->memory);
// define some aliases for simpler access
- typedef VectorType *vecptr;
- vecptr u[3] = {Vu0.get(), Vu1.get(), Vu2.get()};
- vecptr m[3] = {Vm0.get(), Vm1.get(), Vm2.get()};
- VectorType & v = *Vv;
+ using vecptr = VectorType *;
+ vecptr u[3] = {Vu0.get(), Vu1.get(), Vu2.get()};
+ vecptr m[3] = {Vm0.get(), Vm1.get(), Vm2.get()};
+ VectorType &v = *Vv;
// resize the vectors, but do not set the values since they'd be overwritten
// soon anyway.
{
public:
/**
- * A typedef for the underlying vector type
+ * An alias for the underlying vector type
*/
- typedef VectorType vector_type;
+ using vector_type = VectorType;
/**
* Constructor, filling in default values
/**
* Declare type for container size.
*/
- typedef typename SparseMatrix<number>::size_type size_type;
+ using size_type = typename SparseMatrix<number>::size_type;
/**
* Destruction. Mark the destructor pure to ensure that this class isn't
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Dummy class needed for the usual initialization interface of
/**
* Declare type for container size.
*/
- typedef typename SparseLUDecomposition<number>::size_type size_type;
+ using size_type = typename SparseLUDecomposition<number>::size_type;
/**
* Constructor. Does nothing.
* Make SparseLUDecomposition::AdditionalData accessible to this class as
* well.
*/
- typedef typename SparseLUDecomposition<number>::AdditionalData AdditionalData;
+ using AdditionalData = typename SparseLUDecomposition<number>::AdditionalData;
/**
* Perform the incomplete LU factorization of the given matrix.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
// forward declaration
template <typename number, bool Constness>
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef const SparseMatrix<number> MatrixType;
+ using MatrixType = const SparseMatrix<number>;
/**
* Constructor.
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef SparseMatrix<number> MatrixType;
+ using MatrixType = SparseMatrix<number>;
/**
* Constructor.
/**
* Typedef for the matrix type (including constness) we are to operate on.
*/
- typedef typename Accessor<number, Constness>::MatrixType MatrixType;
+ using MatrixType = typename Accessor<number, Constness>::MatrixType;
/**
- * A typedef for the type you get when you dereference an iterator of the
+ * An alias for the type you get when you dereference an iterator of the
* current kind.
*/
- typedef const Accessor<number, Constness> &value_type;
+ using value_type = const Accessor<number, Constness> &;
/**
* Constructor. Create an iterator into the matrix @p matrix for the given
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
- * Type of the matrix entries. This typedef is analogous to
+ * Type of the matrix entries. This alias is analogous to
* <tt>value_type</tt> in the standard library containers.
*/
- typedef number value_type;
+ using value_type = number;
/**
* Declare a type that has holds real-valued numbers with the same precision
* If the template argument is a std::complex type then real_type equals the
* type underlying the complex numbers.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename numbers::NumberTraits<number>::real_type real_type;
+ using real_type = typename numbers::NumberTraits<number>::real_type;
/**
* Typedef of an iterator class walking over all the nonzero entries of this
* matrix. This iterator cannot change the values of the matrix.
*/
- typedef SparseMatrixIterators::Iterator<number, true> const_iterator;
+ using const_iterator = SparseMatrixIterators::Iterator<number, true>;
/**
* Typedef of an iterator class walking over all the nonzero entries of this
* course can't change the sparsity pattern as this is fixed once a sparse
* matrix is attached to it.
*/
- typedef SparseMatrixIterators::Iterator<number, false> iterator;
+ using iterator = SparseMatrixIterators::Iterator<number, false>;
/**
* A structure that describes some of the traits of this class in terms of
Assert(static_cast<size_type>(std::distance(begin, end)) == m(),
ExcIteratorRange(std::distance(begin, end), m()));
- // for use in the inner loop, we define a typedef to the type of the inner
+ // for use in the inner loop, we define an alias to the type of the inner
// iterators
- typedef
- typename std::iterator_traits<ForwardIterator>::value_type::const_iterator
- inner_iterator;
+ using inner_iterator =
+ typename std::iterator_traits<ForwardIterator>::value_type::const_iterator;
size_type row = 0;
for (ForwardIterator i = begin; i != end; ++i, ++row)
{
{
namespace SparseMatrixImplementation
{
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
template <typename T>
typename std::enable_if<std::is_trivial<T>::value>::type
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* The class for storing the column number of an entry together with its
};
/**
- * Type of matrix entries. This typedef is analogous to <tt>value_type</tt>
+ * Type of matrix entries. This alias is analogous to <tt>value_type</tt>
* in the standard library containers.
*/
- typedef number value_type;
+ using value_type = number;
/**
* @name Constructors and initialization
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor. Does nothing, so you have to call @p decompose sometimes
* Make the @p AdditionalData type in the base class accessible to this
* class as well.
*/
- typedef typename SparseLUDecomposition<number>::AdditionalData AdditionalData;
+ using AdditionalData = typename SparseLUDecomposition<number>::AdditionalData;
/**
* Perform the incomplete LU factorization of the given matrix.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor. Does nothing.
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Enumeration of the different methods by which the DoFs are distributed to
};
blocking[n_threads - 1].second = matrix->m();
- typedef void (SparseVanka<number>::*FunPtr)(const size_type, const size_type);
+ using FunPtr =
+ void (SparseVanka<number>::*)(const size_type, const size_type);
const FunPtr fun_ptr = &SparseVanka<number>::compute_inverses;
// Now spawn the threads
{
dst = 0;
- // if no blocking is required, pass
- // down to the underlying class
+ // if no blocking is required, pass down to the underlying class
if (n_blocks == 1)
this->apply_preconditioner(dst, src);
else
// otherwise: blocking requested
{
#ifdef DEAL_II_WITH_THREADS
- // spawn threads. since
- // some compilers have
- // trouble finding out
- // which 'encapsulate'
- // function to take of all
- // those possible ones if
- // we simply drop in the
- // address of an overloaded
- // template member
- // function, make it
- // simpler for the compiler
- // by giving it the correct
- // type right away:
- typedef void (
- SparseVanka<number>::*mem_fun_p)(Vector<number2> &,
- const Vector<number2> &,
- const std::vector<bool> *const) const;
+ // spawn threads. since some compilers have trouble finding out which
+ // 'encapsulate' function to take of all those possible ones if we simply
+ // idrop in the address of an overloaded template member function, make it
+ // simpler for the compiler by giving it the correct type right away:
+ using mem_fun_p =
+ void (SparseVanka<number>::*)(Vector<number2> &,
+ const Vector<number2> &,
+ const std::vector<bool> *const) const;
+
const mem_fun_p comp =
&SparseVanka<number>::template apply_preconditioner<number2>;
Threads::ThreadGroup<> threads;
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Helper function to get the column index from a dereferenced iterator in
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Accessor class for iterators into sparsity patterns. This class is also
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Typedef an iterator class that allows to walk over all nonzero elements
* of a sparsity pattern.
*/
- typedef SparsityPatternIterators::Iterator const_iterator;
+ using const_iterator = SparsityPatternIterators::Iterator;
/**
* Typedef an iterator class that allows to walk over all nonzero elements
* Since the iterator does not allow to modify the sparsity pattern, this
* type is the same as that for @p const_iterator.
*/
- typedef SparsityPatternIterators::Iterator iterator;
+ using iterator = SparsityPatternIterators::Iterator;
/**
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
inline size_type
get_column_index_from_iterator(const size_type i)
// now enter all the elements into the matrix. note that if the matrix is
// quadratic, then we already have the diagonal element preallocated
//
- // for use in the inner loop, we define a typedef to the type of the inner
+ // for use in the inner loop, we define an alias to the type of the inner
// iterators
size_type row = 0;
- typedef
- typename std::iterator_traits<ForwardIterator>::value_type::const_iterator
- inner_iterator;
+ using inner_iterator =
+ typename std::iterator_traits<ForwardIterator>::value_type::const_iterator;
for (ForwardIterator i = begin; i != end; ++i, ++row)
{
size_type * cols = &colnums[rowstart[row]] + (is_square ? 1 : 0);
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* @name Constructors and initialization.
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef BlockMatrixBase<SparseMatrix> BaseClass;
+ using BaseClass = BlockMatrixBase<SparseMatrix>;
/**
* Typedef the type of the underlying matrix.
*/
- typedef BaseClass::BlockType BlockType;
+ using BlockType = BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef BaseClass::value_type value_type;
- typedef BaseClass::pointer pointer;
- typedef BaseClass::const_pointer const_pointer;
- typedef BaseClass::reference reference;
- typedef BaseClass::const_reference const_reference;
- typedef BaseClass::size_type size_type;
- typedef BaseClass::iterator iterator;
- typedef BaseClass::const_iterator const_iterator;
+ using value_type = BaseClass::value_type;
+ using pointer = BaseClass::pointer;
+ using const_pointer = BaseClass::const_pointer;
+ using reference = BaseClass::reference;
+ using const_reference = BaseClass::const_reference;
+ using size_type = BaseClass::size_type;
+ using iterator = BaseClass::iterator;
+ using const_iterator = BaseClass::const_iterator;
/**
* Constructor; initializes the matrix to be empty, without any structure,
/**
* Type of payload held by each subblock
*/
- typedef PayloadBlockType BlockType;
+ using BlockType = PayloadBlockType;
/**
* Default constructor
linear_operator(const TrilinosWrappers::SparseMatrix &operator_exemplar,
const Matrix & matrix)
{
- typedef TrilinosWrappers::SparseMatrix OperatorExemplar;
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload Payload;
+ using OperatorExemplar = TrilinosWrappers::SparseMatrix;
+ using Payload =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
return dealii::
linear_operator<Range, Domain, Payload, OperatorExemplar, Matrix>(
operator_exemplar, matrix);
TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload>
linear_operator(const TrilinosWrappers::SparseMatrix &matrix)
{
- typedef TrilinosWrappers::SparseMatrix Matrix;
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload Payload;
+ using Matrix = TrilinosWrappers::SparseMatrix;
+ using Payload =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
return dealii::linear_operator<Range, Domain, Payload, Matrix, Matrix>(
matrix, matrix);
}
LinearOperatorImplementation::TrilinosPayload>>
block_operator(const TrilinosWrappers::BlockSparseMatrix &block_matrix)
{
- typedef TrilinosWrappers::BlockSparseMatrix BlockMatrix;
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadBlockType;
- typedef TrilinosWrappers::internal::BlockLinearOperatorImplementation::
- TrilinosBlockPayload<PayloadBlockType>
- BlockPayload;
+ using BlockMatrix = TrilinosWrappers::BlockSparseMatrix;
+ using PayloadBlockType =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
+ using BlockPayload = TrilinosWrappers::internal::
+ BlockLinearOperatorImplementation::TrilinosBlockPayload<PayloadBlockType>;
return dealii::block_operator<Range, Domain, BlockPayload, BlockMatrix>(
block_matrix);
}
n>,
m> &ops)
{
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadBlockType;
- typedef TrilinosWrappers::internal::BlockLinearOperatorImplementation::
- TrilinosBlockPayload<PayloadBlockType>
- BlockPayload;
+ using PayloadBlockType =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
+ using BlockPayload = TrilinosWrappers::internal::
+ BlockLinearOperatorImplementation::TrilinosBlockPayload<PayloadBlockType>;
return dealii::block_operator<m, n, Range, Domain, BlockPayload>(ops);
}
block_diagonal_operator(
const TrilinosWrappers::BlockSparseMatrix &block_matrix)
{
- typedef TrilinosWrappers::BlockSparseMatrix BlockMatrix;
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadBlockType;
- typedef TrilinosWrappers::internal::BlockLinearOperatorImplementation::
- TrilinosBlockPayload<PayloadBlockType>
- BlockPayload;
+ using BlockMatrix = TrilinosWrappers::BlockSparseMatrix;
+ using PayloadBlockType =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
+ using BlockPayload = TrilinosWrappers::internal::
+ BlockLinearOperatorImplementation::TrilinosBlockPayload<PayloadBlockType>;
return dealii::
block_diagonal_operator<Range, Domain, BlockPayload, BlockMatrix>(
block_matrix);
TrilinosPayload>,
m> &ops)
{
- typedef TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadBlockType;
- typedef TrilinosWrappers::internal::BlockLinearOperatorImplementation::
- TrilinosBlockPayload<PayloadBlockType>
- BlockPayload;
+ using PayloadBlockType =
+ TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload;
+ using BlockPayload = TrilinosWrappers::internal::
+ BlockLinearOperatorImplementation::TrilinosBlockPayload<PayloadBlockType>;
return dealii::block_diagonal_operator<m, Range, Domain, BlockPayload>(ops);
}
{
public:
/**
- * Typedef the base class for simpler access to its own typedefs.
+ * Typedef the base class for simpler access to its own alias.
*/
- typedef dealii::BlockVectorBase<MPI::Vector> BaseClass;
+ using BaseClass = dealii::BlockVectorBase<MPI::Vector>;
/**
* Typedef the type of the underlying vector.
*/
- typedef BaseClass::BlockType BlockType;
+ using BlockType = BaseClass::BlockType;
/**
- * Import the typedefs from the base class.
+ * Import the alias from the base class.
*/
- typedef BaseClass::value_type value_type;
- typedef BaseClass::pointer pointer;
- typedef BaseClass::const_pointer const_pointer;
- typedef BaseClass::reference reference;
- typedef BaseClass::const_reference const_reference;
- typedef BaseClass::size_type size_type;
- typedef BaseClass::iterator iterator;
- typedef BaseClass::const_iterator const_iterator;
+ using value_type = BaseClass::value_type;
+ using pointer = BaseClass::pointer;
+ using const_pointer = BaseClass::const_pointer;
+ using reference = BaseClass::reference;
+ using const_reference = BaseClass::const_reference;
+ using size_type = BaseClass::size_type;
+ using iterator = BaseClass::iterator;
+ using const_iterator = BaseClass::const_iterator;
/**
* Default constructor. Generate an empty vector without any blocks.
/**
* Declare the type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Standardized data struct to pipe additional flags to the
/**
* Declare the type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Constructor.
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef const SparseMatrix MatrixType;
+ using MatrixType = const SparseMatrix;
/**
* Constructor. Since we use accessors only for read access, a const
* Typedef for the type (including constness) of the matrix to be used
* here.
*/
- typedef SparseMatrix MatrixType;
+ using MatrixType = SparseMatrix;
/**
* Constructor. Since we use accessors only for read access, a const
/**
* Declare type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Typedef for the matrix type (including constness) we are to operate
* on.
*/
- typedef typename Accessor<Constness>::MatrixType MatrixType;
+ using MatrixType = typename Accessor<Constness>::MatrixType;
/**
* Constructor. Create an iterator into the matrix @p matrix for the
/**
* Declare the type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Exception
};
/**
- * Declare a typedef for the iterator class.
+ * Declare an alias for the iterator class.
*/
- typedef SparseMatrixIterators::Iterator<false> iterator;
+ using iterator = SparseMatrixIterators::Iterator<false>;
/**
- * Declare a typedef for the const iterator class.
+ * Declare an alias for the const iterator class.
*/
- typedef SparseMatrixIterators::Iterator<true> const_iterator;
+ using const_iterator = SparseMatrixIterators::Iterator<true>;
/**
- * Declare a typedef in analogy to all the other container classes.
+ * Declare an alias in analogy to all the other container classes.
*/
- typedef TrilinosScalar value_type;
+ using value_type = TrilinosScalar;
/**
* @name Constructors and initialization.
/**
* Definition for the internally supported vector type.
*/
- typedef Epetra_MultiVector VectorType;
+ using VectorType = Epetra_MultiVector;
/**
* Definition for the vector type for the domain space of the operator.
*/
- typedef VectorType Range;
+ using Range = VectorType;
/**
* Definition for the vector type for the range space of the operator.
*/
- typedef VectorType Domain;
+ using Domain = VectorType;
/**
* @name Constructors / destructor
/**
* Declare type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Constructor.
/**
* Declare type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* Constructor. Create an iterator into the matrix @p matrix for the
/**
* Declare type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
- * Declare a typedef for the iterator class.
+ * Declare an alias for the iterator class.
*/
- typedef SparsityPatternIterators::Iterator const_iterator;
+ using const_iterator = SparsityPatternIterators::Iterator;
/**
* @name Basic constructors and initialization.
/**
* Declare type for container size.
*/
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
/**
* This class implements a wrapper for accessing the Trilinos vector in
* parallel those in the <tt>C</tt> standard libraries
* <tt>vector<...></tt> class.
*/
- typedef TrilinosScalar value_type;
- typedef TrilinosScalar real_type;
- typedef dealii::types::global_dof_index size_type;
- typedef value_type * iterator;
- typedef const value_type * const_iterator;
- typedef internal::VectorReference reference;
- typedef const internal::VectorReference const_reference;
+ using value_type = TrilinosScalar;
+ using real_type = TrilinosScalar;
+ using size_type = dealii::types::global_dof_index;
+ using iterator = value_type *;
+ using const_iterator = const value_type *;
+ using reference = internal::VectorReference;
+ using const_reference = const internal::VectorReference;
/**
* @name 1: Basic Object-handling
* Declare standard types used in all containers. These types parallel those
* in the <tt>C++</tt> standard libraries <tt>vector<...></tt> class.
*/
- typedef Number value_type;
- typedef value_type * pointer;
- typedef const value_type * const_pointer;
- typedef value_type * iterator;
- typedef const value_type * const_iterator;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- typedef types::global_dof_index size_type;
+ using value_type = Number;
+ using pointer = value_type *;
+ using const_pointer = const value_type *;
+ using iterator = value_type *;
+ using const_iterator = const value_type *;
+ using reference = value_type &;
+ using const_reference = const value_type &;
+ using size_type = types::global_dof_index;
/**
* Declare a type that has holds real-valued numbers with the same precision
* If the template argument is a std::complex type then real_type equals the
* type underlying the complex numbers.
*
- * This typedef is used to represent the return type of norms.
+ * This alias is used to represent the return type of norms.
*/
- typedef typename numbers::NumberTraits<Number>::real_type real_type;
+ using real_type = typename numbers::NumberTraits<Number>::real_type;
public:
/**
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Constructor. The argument allows to preallocate a certain number of
* is be a flag telling whether the vector is used, the second
* a pointer to the vector itself.
*/
- typedef std::pair<bool, std::unique_ptr<VectorType>> entry_type;
+ using entry_type = std::pair<bool, std::unique_ptr<VectorType>>;
/**
* The class providing the actual storage for the memory pool.
{
namespace VectorOperations
{
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
template <typename T>
bool
class VectorSpaceVector
{
public:
- typedef Number value_type;
- typedef types::global_dof_index size_type;
- typedef typename numbers::NumberTraits<Number>::real_type real_type;
+ using value_type = Number;
+ using size_type = types::global_dof_index;
+ using real_type = typename numbers::NumberTraits<Number>::real_type;
/**
* Change the dimension to that of the vector V. The elements of V are not
/**
* Declare type for container size.
*/
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
/**
* Read write constructor. Takes the size of the vector, just like the
class FEEvaluation
{
public:
- typedef Number value_type;
- typedef Tensor<1, dim, Number> gradient_type;
- typedef typename MatrixFree<dim, Number>::Data data_type;
- static constexpr unsigned int dimension = dim;
- static constexpr unsigned int n_components = n_components_;
- static constexpr unsigned int n_q_points =
+ using value_type = Number;
+ using gradient_type = Tensor<1, dim, Number>;
+ using data_type = typename MatrixFree<dim, Number>::Data;
+ static constexpr unsigned int dimension = dim;
+ static constexpr unsigned int n_components = n_components_;
+ static constexpr unsigned int n_q_points =
Utilities::pow(n_q_points_1d, dim);
static constexpr unsigned int tensor_dofs_per_cell =
Utilities::pow(fe_degree + 1, dim);
class MatrixFree : public Subscriptor
{
public:
- typedef Tensor<2, dim, Tensor<1, dim, Number>> jacobian_type;
+ using jacobian_type = Tensor<2, dim, Tensor<1, dim, Number>>;
// TODO this should really be a CUDAWrappers::Point
- typedef Tensor<1, dim, Number> point_type;
+ using point_type = Tensor<1, dim, Number>;
// Use Number2 so we don't hide the template parameter Number
template <typename Number2>
this, mapping, fe, quad, shape_info, update_flags);
// Create a graph coloring
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
- typedef std::function<std::vector<types::global_dof_index>(
- CellFilter const &)>
- fun_type;
+ using fun_type =
+ std::function<std::vector<types::global_dof_index>(CellFilter const &)>;
const auto fun = [&](const CellFilter &filter) {
return internal::get_conflict_indices<dim, Number>(filter, constraints);
};
const EvaluatorVariant variant =
EvaluatorSelector<type, (fe_degree + n_q_points_1d > 4)>::variant;
- typedef EvaluatorTensorProduct<variant,
- dim,
- fe_degree + 1,
- n_q_points_1d,
- Number>
- Eval;
+ using Eval = EvaluatorTensorProduct<variant,
+ dim,
+ fe_degree + 1,
+ n_q_points_1d,
+ Number>;
Eval eval(variant == evaluate_evenodd ? shape_info.shape_values_eo :
shape_info.shape_values,
variant == evaluate_evenodd ? shape_info.shape_gradients_eo :
{
const EvaluatorVariant variant =
EvaluatorSelector<type, (fe_degree + n_q_points_1d > 4)>::variant;
- typedef EvaluatorTensorProduct<variant,
- dim,
- fe_degree + 1,
- n_q_points_1d,
- Number>
- Eval;
+ using Eval = EvaluatorTensorProduct<variant,
+ dim,
+ fe_degree + 1,
+ n_q_points_1d,
+ Number>;
Eval eval(variant == evaluate_evenodd ? shape_info.shape_values_eo :
shape_info.shape_values,
variant == evaluate_evenodd ? shape_info.shape_gradients_eo :
data.shape_gradients :
data.gradients_within_subface[subface_index / 2]);
- typedef internal::EvaluatorTensorProduct<symmetric_evaluate ?
- internal::evaluate_evenodd :
- internal::evaluate_general,
- dim - 1,
- fe_degree + 1,
- n_q_points_1d,
- Number>
- Eval;
+ using Eval =
+ internal::EvaluatorTensorProduct<symmetric_evaluate ?
+ internal::evaluate_evenodd :
+ internal::evaluate_general,
+ dim - 1,
+ fe_degree + 1,
+ n_q_points_1d,
+ Number>;
Eval eval1(val1,
grad1,
AlignedVector<Number>(),
data.shape_gradients :
data.gradients_within_subface[subface_index / 2]);
- typedef internal::EvaluatorTensorProduct<symmetric_evaluate ?
- internal::evaluate_evenodd :
- internal::evaluate_general,
- dim - 1,
- fe_degree + 1,
- n_q_points_1d,
- Number>
- Eval;
+ using Eval =
+ internal::EvaluatorTensorProduct<symmetric_evaluate ?
+ internal::evaluate_evenodd :
+ internal::evaluate_general,
+ dim - 1,
+ fe_degree + 1,
+ n_q_points_1d,
+ Number>;
Eval eval1(val1, grad1, val1, data.fe_degree + 1, data.n_q_points_1d);
Eval eval2(val2, grad2, val1, data.fe_degree + 1, data.n_q_points_1d);
class FEEvaluationBase
{
public:
- typedef Number number_type;
- typedef Tensor<1, n_components_, VectorizedArray<Number>> value_type;
- typedef Tensor<1, n_components_, Tensor<1, dim, VectorizedArray<Number>>>
- gradient_type;
+ using number_type = Number;
+ using value_type = Tensor<1, n_components_, VectorizedArray<Number>>;
+ using gradient_type =
+ Tensor<1, n_components_, Tensor<1, dim, VectorizedArray<Number>>>;
static constexpr unsigned int dimension = dim;
static constexpr unsigned int n_components = n_components_;
: public FEEvaluationBase<dim, n_components_, Number, is_face>
{
public:
- typedef Number number_type;
- typedef Tensor<1, n_components_, VectorizedArray<Number>> value_type;
- typedef Tensor<1, n_components_, Tensor<1, dim, VectorizedArray<Number>>>
- gradient_type;
+ using number_type = Number;
+ using value_type = Tensor<1, n_components_, VectorizedArray<Number>>;
+ using gradient_type =
+ Tensor<1, n_components_, Tensor<1, dim, VectorizedArray<Number>>>;
static constexpr unsigned int dimension = dim;
static constexpr unsigned int n_components = n_components_;
- typedef FEEvaluationBase<dim, n_components_, Number, is_face> BaseClass;
+ using BaseClass = FEEvaluationBase<dim, n_components_, Number, is_face>;
protected:
/**
: public FEEvaluationBase<dim, 1, Number, is_face>
{
public:
- typedef Number number_type;
- typedef VectorizedArray<Number> value_type;
- typedef Tensor<1, dim, VectorizedArray<Number>> gradient_type;
- static constexpr unsigned int dimension = dim;
- typedef FEEvaluationBase<dim, 1, Number, is_face> BaseClass;
+ using number_type = Number;
+ using value_type = VectorizedArray<Number>;
+ using gradient_type = Tensor<1, dim, VectorizedArray<Number>>;
+ static constexpr unsigned int dimension = dim;
+ using BaseClass = FEEvaluationBase<dim, 1, Number, is_face>;
/** @copydoc FEEvaluationBase<dim,1,Number,is_face>::get_dof_value()
*/
: public FEEvaluationBase<dim, dim, Number, is_face>
{
public:
- typedef Number number_type;
- typedef Tensor<1, dim, VectorizedArray<Number>> value_type;
- typedef Tensor<2, dim, VectorizedArray<Number>> gradient_type;
- static constexpr unsigned int dimension = dim;
- static constexpr unsigned int n_components = dim;
- typedef FEEvaluationBase<dim, dim, Number, is_face> BaseClass;
+ using number_type = Number;
+ using value_type = Tensor<1, dim, VectorizedArray<Number>>;
+ using gradient_type = Tensor<2, dim, VectorizedArray<Number>>;
+ static constexpr unsigned int dimension = dim;
+ static constexpr unsigned int n_components = dim;
+ using BaseClass = FEEvaluationBase<dim, dim, Number, is_face>;
/** @copydoc FEEvaluationBase<dim,dim,Number,is_face>::get_gradient()
*/
: public FEEvaluationBase<1, 1, Number, is_face>
{
public:
- typedef Number number_type;
- typedef VectorizedArray<Number> value_type;
- typedef Tensor<1, 1, VectorizedArray<Number>> gradient_type;
- static constexpr unsigned int dimension = 1;
- typedef FEEvaluationBase<1, 1, Number, is_face> BaseClass;
+ using number_type = Number;
+ using value_type = VectorizedArray<Number>;
+ using gradient_type = Tensor<1, 1, VectorizedArray<Number>>;
+ static constexpr unsigned int dimension = 1;
+ using BaseClass = FEEvaluationBase<1, 1, Number, is_face>;
/** @copydoc FEEvaluationBase<1,1,Number,is_face>::get_dof_value()
*/
{
public:
/**
- * A typedef to the base class.
+ * An alias to the base class.
*/
- typedef FEEvaluationAccess<dim, n_components_, Number, false> BaseClass;
+ using BaseClass = FEEvaluationAccess<dim, n_components_, Number, false>;
/**
* An underlying number type specified as template argument.
*/
- typedef Number number_type;
+ using number_type = Number;
/**
* The type of function values, e.g. `VectorizedArray<Number>` for
* `n_components=1` or `Tensor<1,dim,VectorizedArray<Number> >` for
* `n_components=dim`.
*/
- typedef typename BaseClass::value_type value_type;
+ using value_type = typename BaseClass::value_type;
/**
* The type of gradients, e.g. `Tensor<1,dim,VectorizedArray<Number>>` for
* `n_components=1` or `Tensor<2,dim,VectorizedArray<Number> >` for
* `n_components=dim`.
*/
- typedef typename BaseClass::gradient_type gradient_type;
+ using gradient_type = typename BaseClass::gradient_type;
/**
* The dimension given as template argument.
{
public:
/**
- * A typedef to the base class.
+ * An alias to the base class.
*/
- typedef FEEvaluationAccess<dim, n_components_, Number, true> BaseClass;
+ using BaseClass = FEEvaluationAccess<dim, n_components_, Number, true>;
/**
* A underlying number type specified as template argument.
*/
- typedef Number number_type;
+ using number_type = Number;
/**
* The type of function values, e.g. `VectorizedArray<Number>` for
* `n_components=1` or `Tensor<1,dim,VectorizedArray<Number> >` for
* `n_components=dim`.
*/
- typedef typename BaseClass::value_type value_type;
+ using value_type = typename BaseClass::value_type;
/**
* The type of gradients, e.g. `Tensor<1,dim,VectorizedArray<Number>>` for
* `n_components=1` or `Tensor<2,dim,VectorizedArray<Number> >` for
* `n_components=dim`.
*/
- typedef typename BaseClass::gradient_type gradient_type;
+ using gradient_type = typename BaseClass::gradient_type;
/**
* The dimension given as template argument.
template <typename VectorType>
struct BlockVectorSelector<VectorType, true>
{
- typedef typename VectorType::BlockType BaseVectorType;
+ using BaseVectorType = typename VectorType::BlockType;
static BaseVectorType *
get_vector_component(VectorType &vec, const unsigned int component)
template <typename VectorType>
struct BlockVectorSelector<VectorType, false>
{
- typedef VectorType BaseVectorType;
+ using BaseVectorType = VectorType;
static BaseVectorType *
get_vector_component(VectorType &vec, const unsigned int component)
template <typename VectorType>
struct BlockVectorSelector<std::vector<VectorType>, false>
{
- typedef VectorType BaseVectorType;
+ using BaseVectorType = VectorType;
static BaseVectorType *
get_vector_component(std::vector<VectorType> &vec,
template <typename VectorType>
struct BlockVectorSelector<std::vector<VectorType *>, false>
{
- typedef VectorType BaseVectorType;
+ using BaseVectorType = VectorType;
static BaseVectorType *
get_vector_component(std::vector<VectorType *> &vec,
face_data.quadrature_points[q]);
}
- typedef Tensor<1,
- VectorizedArray<Number>::n_array_elements,
- Number>
- VEC_ARRAY;
+ using VEC_ARRAY =
+ Tensor<1, VectorizedArray<Number>::n_array_elements, Number>;
unsigned int insert_position = data.first[my_q].JxW_values.size();
// Fill in JxW values, apply compression
{
public:
/**
- * A typedef for the underlying number type specified by the template
+ * An alias for the underlying number type specified by the template
* argument.
*/
- typedef Number value_type;
+ using value_type = Number;
/**
* The dimension set by the template argument `dim`.
AlignedVector<VectorizedArray<Number>> *
MatrixFree<dim, Number>::acquire_scratch_data() const
{
- typedef std::list<std::pair<bool, AlignedVector<VectorizedArray<Number>>>>
- list_type;
+ using list_type =
+ std::list<std::pair<bool, AlignedVector<VectorizedArray<Number>>>>;
list_type &data = scratch_pad.get();
for (typename list_type::iterator it = data.begin(); it != data.end(); ++it)
if (it->first == false)
MatrixFree<dim, Number>::release_scratch_data(
const AlignedVector<VectorizedArray<Number>> *scratch) const
{
- typedef std::list<std::pair<bool, AlignedVector<VectorizedArray<Number>>>>
- list_type;
+ using list_type =
+ std::list<std::pair<bool, AlignedVector<VectorizedArray<Number>>>>;
list_type &data = scratch_pad.get();
for (typename list_type::iterator it = data.begin(); it != data.end(); ++it)
if (&it->second == scratch)
struct InterfaceSelector
{};
- // Version of constant functions
+ // Version for constant functions
template <typename MF,
typename InVector,
typename OutVector,
typename Container>
struct InterfaceSelector<MF, InVector, OutVector, Container, true>
{
- typedef void (Container::*function_type)(
+ using function_type = void (Container::*)(
const MF &,
OutVector &,
const InVector &,
typename Container>
struct InterfaceSelector<MF, InVector, OutVector, Container, false>
{
- typedef void (Container::*function_type)(
- const MF &,
- OutVector &,
- const InVector &,
- const std::pair<unsigned int, unsigned int> &);
+ using function_type =
+ void (Container::*)(const MF &,
+ OutVector &,
+ const InVector &,
+ const std::pair<unsigned int, unsigned int> &);
};
} // namespace MatrixFreeFunctions
class MFWorker : public MFWorkerInterface
{
public:
- // A typedef to make the arguments further down more readable
- typedef typename MatrixFreeFunctions::
+ // An alias to make the arguments further down more readable
+ using function_type = typename MatrixFreeFunctions::
InterfaceSelector<MF, InVector, OutVector, Container, is_constant>::
- function_type function_type;
+ function_type;
// constructor, binds all the arguments to this class
MFWorker(const MF & matrix_free,
template <class MF, typename InVector, typename OutVector>
struct MFClassWrapper
{
- typedef std::function<void(const MF &,
- OutVector &,
- const InVector &,
- const std::pair<unsigned int, unsigned int> &)>
- function_type;
+ using function_type =
+ std::function<void(const MF &,
+ OutVector &,
+ const InVector &,
+ const std::pair<unsigned int, unsigned int> &)>;
MFClassWrapper(const function_type cell,
const function_type face,
const InVector &src,
const bool zero_dst_vector) const
{
- typedef internal::MFClassWrapper<MatrixFree<dim, Number>, InVector, OutVector>
- Wrapper;
+ using Wrapper =
+ internal::MFClassWrapper<MatrixFree<dim, Number>, InVector, OutVector>;
Wrapper wrap(cell_operation, nullptr, nullptr);
internal::
MFWorker<MatrixFree<dim, Number>, InVector, OutVector, Wrapper, true>
const DataAccessOnFaces dst_vector_face_access,
const DataAccessOnFaces src_vector_face_access) const
{
- typedef internal::MFClassWrapper<MatrixFree<dim, Number>, InVector, OutVector>
- Wrapper;
+ using Wrapper =
+ internal::MFClassWrapper<MatrixFree<dim, Number>, InVector, OutVector>;
Wrapper wrap(cell_operation, face_operation, boundary_operation);
internal::
MFWorker<MatrixFree<dim, Number>, InVector, OutVector, Wrapper, true>
{
public:
/**
- * Number typedef.
+ * Number alias.
*/
- typedef typename VectorType::value_type value_type;
+ using value_type = typename VectorType::value_type;
/**
* size_type needed for preconditioner classes.
*/
- typedef typename VectorType::size_type size_type;
+ using size_type = typename VectorType::size_type;
/**
* Default constructor.
{
public:
/**
- * Number typedef.
+ * Number alias.
*/
- typedef typename OperatorType::value_type value_type;
+ using value_type = typename OperatorType::value_type;
/**
* Size type.
*/
- typedef typename OperatorType::size_type size_type;
+ using size_type = typename OperatorType::size_type;
/**
* Default constructor.
{
public:
/**
- * Number typedef.
+ * Number alias.
*/
- typedef typename Base<dim, VectorType>::value_type value_type;
+ using value_type = typename Base<dim, VectorType>::value_type;
/**
* size_type needed for preconditioner classes.
*/
- typedef typename Base<dim, VectorType>::size_type size_type;
+ using size_type = typename Base<dim, VectorType>::size_type;
/**
* Constructor.
{
public:
/**
- * Number typedef.
+ * Number alias.
*/
- typedef typename Base<dim, VectorType>::value_type value_type;
+ using value_type = typename Base<dim, VectorType>::value_type;
/**
* size_type needed for preconditioner classes.
*/
- typedef typename Base<dim, VectorType>::size_type size_type;
+ using size_type = typename Base<dim, VectorType>::size_type;
/**
* Constructor.
void
Base<dim, VectorType>::vmult(VectorType &dst, const VectorType &src) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
- dst = Number(0.);
+ using Number = typename Base<dim, VectorType>::value_type;
+ dst = Number(0.);
vmult_add(dst, src);
}
const VectorType &src,
const bool is_row) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
for (unsigned int i = 0; i < BlockHelper::n_blocks(src); ++i)
{
const unsigned int mf_component =
Base<dim, VectorType>::preprocess_constraints(VectorType & dst,
const VectorType &src) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
adjust_ghost_range_if_necessary(src, false);
adjust_ghost_range_if_necessary(dst, true);
Base<dim, VectorType>::vmult_interface_down(VectorType & dst,
const VectorType &src) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
AssertDimension(dst.size(), src.size());
adjust_ghost_range_if_necessary(src, false);
adjust_ghost_range_if_necessary(dst, true);
Base<dim, VectorType>::vmult_interface_up(VectorType & dst,
const VectorType &src) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
AssertDimension(dst.size(), src.size());
adjust_ghost_range_if_necessary(src, false);
adjust_ghost_range_if_necessary(dst, true);
void
Base<dim, VectorType>::Tvmult(VectorType &dst, const VectorType &src) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
- dst = Number(0.);
+ using Number = typename Base<dim, VectorType>::value_type;
+ dst = Number(0.);
Tvmult_add(dst, src);
}
MassOperator<dim, fe_degree, n_q_points_1d, n_components, VectorType>::
compute_diagonal()
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
Assert((Base<dim, VectorType>::data.get() != nullptr), ExcNotInitialized());
this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
FEEvaluation<dim, fe_degree, n_q_points_1d, n_components, Number> phi(
data, this->selected_rows[0]);
for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell)
LaplaceOperator<dim, fe_degree, n_q_points_1d, n_components, VectorType>::
compute_diagonal()
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
Assert((Base<dim, VectorType>::data.get() != nullptr), ExcNotInitialized());
unsigned int dummy = 0;
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
FEEvaluation<dim, fe_degree, n_q_points_1d, n_components, Number> phi(
data, this->selected_rows[0]);
for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell)
const unsigned int &,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef typename Base<dim, VectorType>::value_type Number;
+ using Number = typename Base<dim, VectorType>::value_type;
FEEvaluation<dim, fe_degree, n_q_points_1d, n_components, Number> phi(
data, this->selected_rows[0]);
for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell)
/**
* Typedef to deprecated name.
*/
- DEAL_II_DEPRECATED
- typedef TaskInfo SizeInfo;
+ using SizeInfo DEAL_II_DEPRECATED = TaskInfo;
} // end of namespace MatrixFreeFunctions
} // end of namespace internal
class MGMatrixLocalBlocksToGlobalBlocks
{
public:
- typedef MGMatrixBlockVector<MatrixType> MatrixPtrVector;
- typedef SmartPointer<
- MatrixPtrVector,
- MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
- MatrixPtrVectorPtr;
+ using MatrixPtrVector = MGMatrixBlockVector<MatrixType>;
+ using MatrixPtrVectorPtr =
+ SmartPointer<MatrixPtrVector,
+ MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>;
/**
* Constructor, initializing the #threshold, which limits how small
/**
* The type of the @p info object for cells.
*/
- typedef IntegrationInfo<dim, spacedim> CellInfo;
+ using CellInfo = IntegrationInfo<dim, spacedim>;
/**
* Default constructor.
class MGConstrainedDoFs : public Subscriptor
{
public:
- typedef std::vector<std::set<types::global_dof_index>>::size_type size_dof;
+ using size_dof = std::vector<std::set<types::global_dof_index>>::size_type;
/**
* Fill the internal data structures with hanging node constraints extracted
* from the dof handler object. Works with natural boundary conditions only.
template <typename VectorType>
struct MatrixSelector
{
- typedef ::dealii::SparsityPattern Sparsity;
- typedef ::dealii::SparseMatrix<typename VectorType::value_type> Matrix;
+ using Sparsity = ::dealii::SparsityPattern;
+ using Matrix = ::dealii::SparseMatrix<typename VectorType::value_type>;
static const bool requires_distributed_sparsity_pattern = false;
template <typename Number>
struct MatrixSelector<LinearAlgebra::distributed::Vector<Number>>
{
- typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
- typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
+ using Sparsity = ::dealii::TrilinosWrappers::SparsityPattern;
+ using Matrix = ::dealii::TrilinosWrappers::SparseMatrix;
static const bool requires_distributed_sparsity_pattern = false;
template <>
struct MatrixSelector<dealii::TrilinosWrappers::MPI::Vector>
{
- typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
- typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
+ using Sparsity = ::dealii::TrilinosWrappers::SparsityPattern;
+ using Matrix = ::dealii::TrilinosWrappers::SparseMatrix;
static const bool requires_distributed_sparsity_pattern = false;
template <>
struct MatrixSelector<dealii::LinearAlgebra::EpetraWrappers::Vector>
{
- typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
- typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
+ using Sparsity = ::dealii::TrilinosWrappers::SparsityPattern;
+ using Matrix = ::dealii::TrilinosWrappers::SparseMatrix;
static const bool requires_distributed_sparsity_pattern = false;
template <typename Number>
struct MatrixSelector<LinearAlgebra::distributed::Vector<Number>>
{
- typedef ::dealii::SparsityPattern Sparsity;
- typedef ::dealii::SparseMatrix<Number> Matrix;
+ using Sparsity = ::dealii::SparsityPattern;
+ using Matrix = ::dealii::SparseMatrix<Number>;
static const bool requires_distributed_sparsity_pattern = false;
template <>
struct MatrixSelector<dealii::PETScWrappers::MPI::Vector>
{
- typedef ::dealii::DynamicSparsityPattern Sparsity;
- typedef ::dealii::PETScWrappers::MPI::SparseMatrix Matrix;
+ using Sparsity = ::dealii::DynamicSparsityPattern;
+ using Matrix = ::dealii::PETScWrappers::MPI::SparseMatrix;
static const bool requires_distributed_sparsity_pattern = true;
AssertThrowMPI(ierr);
#endif
- typedef std::vector<std::pair<types::global_dof_index,
- types::global_dof_index>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<types::global_dof_index,
+ types::global_dof_index>>::const_iterator;
VectorType &dst_level = dst[level];
// first copy local unknowns
AssertThrowMPI(ierr);
#endif
- typedef std::vector<std::pair<types::global_dof_index,
- types::global_dof_index>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<types::global_dof_index,
+ types::global_dof_index>>::const_iterator;
const VectorType &src_level = src[level];
// First copy all indices local to this process
// basis functions
for (unsigned int level = src.min_level(); level <= src.max_level(); ++level)
{
- typedef std::vector<std::pair<types::global_dof_index,
- types::global_dof_index>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<types::global_dof_index,
+ types::global_dof_index>>::const_iterator;
const VectorType &src_level = src[level];
// First add all indices local to this process
{
--level;
- typedef std::vector<std::pair<unsigned int, unsigned int>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<unsigned int, unsigned int>>::const_iterator;
LinearAlgebra::distributed::Vector<Number> &dst_level = dst[level];
// first copy local unknowns
dst = 0;
for (unsigned int level = src.min_level(); level <= src.max_level(); ++level)
{
- typedef std::vector<std::pair<unsigned int, unsigned int>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<unsigned int, unsigned int>>::const_iterator;
// the ghosted vector should already have the correct local size (but
// different parallel layout)
dst.zero_out_ghosts();
for (unsigned int level = src.min_level(); level <= src.max_level(); ++level)
{
- typedef std::vector<std::pair<unsigned int, unsigned int>>::const_iterator
- dof_pair_iterator;
+ using dof_pair_iterator =
+ std::vector<std::pair<unsigned int, unsigned int>>::const_iterator;
// the ghosted vector should already have the correct local size (but
// different parallel layout)
/* --------------------- MGTransferBlockSelect -------------- */
// Simplify some things below
-typedef std::vector<std::pair<unsigned int, unsigned int>>::const_iterator IT;
+using IT = std::vector<std::pair<unsigned int, unsigned int>>::const_iterator;
template <typename number>
for (; level_cell != endc; ++level_cell)
{
const unsigned int level = level_cell->level();
- typedef std::vector<
- std::pair<types::global_dof_index, unsigned int>>::const_iterator IT;
+ using IT = std::vector<
+ std::pair<types::global_dof_index, unsigned int>>::const_iterator;
for (IT i = copy_to_and_from_indices[level].begin();
i != copy_to_and_from_indices[level].end();
++i)
for (; level_cell != endc; ++level_cell)
{
const unsigned int level = level_cell->level();
- typedef std::vector<
- std::pair<types::global_dof_index, unsigned int>>::const_iterator IT;
+ using IT = std::vector<
+ std::pair<types::global_dof_index, unsigned int>>::const_iterator;
for (IT i = copy_to_and_from_indices[level].begin();
i != copy_to_and_from_indices[level].end();
++i)
f_cycle
};
- typedef VectorType vector_type;
- typedef const VectorType const_vector_type;
+ using vector_type = VectorType;
+ using const_vector_type = const VectorType;
/**
* Constructor. The DoFHandler is used to check whether the provided
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef
+ using cell_iterator =
typename DataOut_DoFData<DoFHandlerType,
DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>::cell_iterator
- cell_iterator;
- typedef typename DataOut_DoFData<
+ DoFHandlerType::space_dimension>::cell_iterator;
+ using active_cell_iterator = typename DataOut_DoFData<
DoFHandlerType,
DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>::active_cell_iterator active_cell_iterator;
+ DoFHandlerType::space_dimension>::active_cell_iterator;
/**
* Enumeration describing the part of the domain in which cells
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename Triangulation<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>::cell_iterator
- cell_iterator;
- typedef typename Triangulation<
+ using cell_iterator =
+ typename Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::cell_iterator;
+ using active_cell_iterator = typename Triangulation<
DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>::active_cell_iterator active_cell_iterator;
+ DoFHandlerType::space_dimension>::active_cell_iterator;
public:
/**
/**
* Abbreviate the somewhat lengthy name for the Patch class.
*/
- typedef dealii::DataOutBase::Patch<patch_dim, patch_space_dim> Patch;
+ using Patch = dealii::DataOutBase::Patch<patch_dim, patch_space_dim>;
/**
* Pointer to the triangulation object.
{
std::vector<std::string> names;
// collect the names of dof and cell data
- typedef typename std::vector<std::shared_ptr<
+ using data_iterator = typename std::vector<std::shared_ptr<
internal::DataOutImplementation::DataEntryBase<DoFHandlerType>>>::
- const_iterator data_iterator;
+ const_iterator;
for (data_iterator d = dof_data.begin(); d != dof_data.end(); ++d)
for (unsigned int i = 0; i < (*d)->names.size(); ++i)
ranges;
// collect the ranges of dof and cell data
- typedef typename std::vector<std::shared_ptr<
+ using data_iterator = typename std::vector<std::shared_ptr<
internal::DataOutImplementation::DataEntryBase<DoFHandlerType>>>::
- const_iterator data_iterator;
+ const_iterator;
unsigned int output_component = 0;
for (data_iterator d = dof_data.begin(); d != dof_data.end(); ++d)
* face (think of discontinuous finite elements, where the value of the finite
* element field depend on the direction from which you approach a face, thus
* it is necessary to use a pair of cell and face, rather than only a face
- * iterator). Therefore, this class defines a @p typedef which creates a type
+ * iterator). Therefore, this class defines an @p alias which creates a type
* @p FaceDescriptor that is an abbreviation for a pair of cell iterator and
* face number. The functions @p first_face and @p next_face operate on
* objects of this type.
static const unsigned int space_dimension = DoFHandlerType::space_dimension;
/**
- * Typedef to the iterator type of the dof handler class under
+ * Alias to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename DataOut_DoFData<DoFHandlerType, dimension - 1, dimension>::
- cell_iterator cell_iterator;
+ using cell_iterator = typename DataOut_DoFData<DoFHandlerType,
+ dimension - 1,
+ dimension>::cell_iterator;
/**
* Constructor determining whether a surface mesh (default) or the whole
* of a cell and the number of the face. This pair is here aliased to a name
* that is better to type.
*/
- typedef typename std::pair<cell_iterator, unsigned int> FaceDescriptor;
+ using FaceDescriptor = typename std::pair<cell_iterator, unsigned int>;
/**
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename DataOut_DoFData<DoFHandlerType, dimension + 1>::cell_iterator
- cell_iterator;
+ using cell_iterator =
+ typename DataOut_DoFData<DoFHandlerType, dimension + 1>::cell_iterator;
/**
* This is the central function of this class since it builds the list of
* order derivatives than are presently implemented. Basically, only an
* additional class along the lines of the derivative descriptor classes @p
* Gradient and @p SecondDerivative has to be implemented, with the respective
- * typedefs and functions replaced by the appropriate analogues for the
+ * alias and functions replaced by the appropriate analogues for the
* derivative that is to be approximated.
*
* @ingroup numerics
/**
* Typedef holding the local cell_hint.
*/
- typedef Threads::ThreadLocalStorage<
- typename DoFHandlerType::active_cell_iterator>
- cell_hint_t;
+ using cell_hint_t = Threads::ThreadLocalStorage<
+ typename DoFHandlerType::active_cell_iterator>;
/**
* Pointer to the dof handler.
std::vector<Tensor<1, dim, typename VectorType::value_type>> &gradients)
const
{
- typedef typename VectorType::value_type number;
+ using number = typename VectorType::value_type;
Assert(gradients.size() == this->n_components,
ExcDimensionMismatch(gradients.size(), this->n_components));
typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
struct PointCloudAdaptor
{
/**
- * A typedef used by nanoflann.
+ * An alias used by nanoflann.
*/
- typedef double coord_t;
+ using coord_t = double;
/**
/**
- * A typedef for the actual KDTree object.
+ * An alias for the actual KDTree object.
*/
- typedef typename nanoflann::KDTreeSingleIndexAdaptor<
+ using NanoFlannKDTree = typename nanoflann::KDTreeSingleIndexAdaptor<
nanoflann::L2_Simple_Adaptor<double, PointCloudAdaptor>,
PointCloudAdaptor,
dim,
- unsigned int>
- NanoFlannKDTree;
+ unsigned int>;
/**
/**
* Typedef for the iterator type.
*/
- typedef
- typename DoFHandlerType::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator =
+ typename DoFHandlerType::active_cell_iterator;
/**
* Abbreviation for a pair of iterators.
*/
- typedef std::pair<active_cell_iterator, active_cell_iterator>
- iterator_pair;
+ using iterator_pair =
+ std::pair<active_cell_iterator, active_cell_iterator>;
/**
* Constructor. Initialize the two values by the given values.
* process. See the general description of this class for more
* information.
*/
- typedef std::vector<std::vector<std::pair<unsigned int, double>>>
- CorrectionRelaxations;
+ using CorrectionRelaxations =
+ std::vector<std::vector<std::pair<unsigned int, double>>>;
/**
* Default values for the relaxations: no relaxations.
* Typedef the data types of the TimeStepBase_Tria_Flags() namespace into
* local scope.
*/
- typedef typename TimeStepBase_Tria_Flags::Flags<dim> Flags;
- typedef typename TimeStepBase_Tria_Flags::RefinementFlags<dim>
- RefinementFlags;
- typedef typename TimeStepBase_Tria_Flags::RefinementData<dim> RefinementData;
+ using Flags = typename TimeStepBase_Tria_Flags::Flags<dim>;
+ using RefinementFlags =
+ typename TimeStepBase_Tria_Flags::RefinementFlags<dim>;
+ using RefinementData = typename TimeStepBase_Tria_Flags::RefinementData<dim>;
/**
// to the JxW values.
//
- typedef typename VectorType::value_type number;
+ using number = typename VectorType::value_type;
const hp::FECollection<dim, spacedim> &fe(
dof_handler.get_fe_collection());
const InVector & data_1,
OutVector & data_2)
{
- typedef typename OutVector::value_type number;
+ using number = typename OutVector::value_type;
Vector<number> cell_data_1(dof_1.get_fe().dofs_per_cell);
Vector<number> cell_data_2(dof_2.get_fe().dofs_per_cell);
for (unsigned int i = 0; i < dof_2.n_dofs(); ++i)
{
Assert(touch_count[i] != 0, ExcInternalError());
- typedef typename OutVector::value_type value_type;
- const value_type val =
+ using value_type = typename OutVector::value_type;
+ const value_type val =
::dealii::internal::ElementAccess<OutVector>::get(data_2, i);
::dealii::internal::ElementAccess<OutVector>::set(
const Q_or_QC<dim - 1> &q_boundary,
const bool project_to_boundary_first)
{
- typedef typename VectorType::value_type number;
+ using number = typename VectorType::value_type;
Assert(dof.get_fe(0).n_components() == function.n_components,
ExcDimensionMismatch(dof.get_fe(0).n_components(),
function.n_components));
constraints,
QGauss<1>(dof.get_fe().degree + 2),
additional_data);
- typedef MatrixFreeOperators::MassOperator<
+ using MatrixType = MatrixFreeOperators::MassOperator<
dim,
fe_degree,
fe_degree + 2,
components,
- LinearAlgebra::distributed::Vector<Number>>
- MatrixType;
+ LinearAlgebra::distributed::Vector<Number>>;
MatrixType mass_matrix;
mass_matrix.initialize(matrix_free);
mass_matrix.compute_diagonal();
const unsigned int)> & func,
VectorType & vec_result)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
Assert(dof.get_fe(0).n_components() == 1,
ExcDimensionMismatch(dof.get_fe(0).n_components(), 1));
Assert(vec_result.size() == dof.n_dofs(),
constraints,
QGauss<1>(dof.get_fe().degree + 2),
additional_data);
- typedef MatrixFreeOperators::MassOperator<
+ using MatrixType = MatrixFreeOperators::MassOperator<
dim,
fe_degree,
fe_degree + 2,
1,
- LinearAlgebra::distributed::Vector<Number>>
- MatrixType;
+ LinearAlgebra::distributed::Vector<Number>>;
MatrixType mass_matrix;
mass_matrix.initialize(matrix_free);
mass_matrix.compute_diagonal();
- typedef LinearAlgebra::distributed::Vector<Number> LocalVectorType;
+ using LocalVectorType = LinearAlgebra::distributed::Vector<Number>;
LocalVectorType vec, rhs, inhomogeneities;
matrix_free->initialize_dof_vector(vec);
matrix_free->initialize_dof_vector(rhs);
const DoFHandler<dim, spacedim> &dof =
matrix_free->get_dof_handler(fe_component);
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
Assert(dof.get_fe(0).n_components() == 1,
ExcDimensionMismatch(dof.get_fe(0).n_components(), 1));
Assert(vec_result.size() == dof.n_dofs(),
dof.get_fe().degree == static_cast<unsigned int>(fe_degree),
ExcDimensionMismatch(fe_degree, dof.get_fe().degree));
- typedef MatrixFreeOperators::MassOperator<
+ using MatrixType = MatrixFreeOperators::MassOperator<
dim,
fe_degree,
n_q_points_1d,
1,
- LinearAlgebra::distributed::Vector<Number>>
- MatrixType;
+ LinearAlgebra::distributed::Vector<Number>>;
MatrixType mass_matrix;
mass_matrix.initialize(matrix_free, {fe_component});
mass_matrix.compute_diagonal();
- typedef LinearAlgebra::distributed::Vector<Number> LocalVectorType;
+ using LocalVectorType = LinearAlgebra::distributed::Vector<Number>;
LocalVectorType vec, rhs, inhomogeneities;
matrix_free->initialize_dof_vector(vec, fe_component);
matrix_free->initialize_dof_vector(rhs, fe_component);
VectorType & rhs_vector,
const AffineConstraints<typename VectorType::value_type> & constraints)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
const FiniteElement<dim, spacedim> &fe = dof_handler.get_fe();
Assert(fe.n_components() == rhs_function.n_components,
VectorType & rhs_vector,
const AffineConstraints<typename VectorType::value_type> & constraints)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
const hp::FECollection<dim, spacedim> &fe = dof_handler.get_fe_collection();
Assert(fe.n_components() == rhs_function.n_components,
// (i.e. constrain not just the *average normal direction* but *all normal
// directions* we find). consequently, we also have to store which cell a
// normal vector was computed on
- typedef std::multimap<
+ using DoFToNormalsMap = std::multimap<
internal::VectorDoFTuple<dim>,
std::pair<Tensor<1, dim>,
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator>>
- DoFToNormalsMap;
+ typename DoFHandlerType<dim, spacedim>::active_cell_iterator>>;
std::map<internal::VectorDoFTuple<dim>, Vector<double>>
dof_vector_to_b_values;
// contributed to the current set of vector dofs, add up the normal
// vectors. the values of the map are pairs of normal vectors and
// number of cells that have contributed
- typedef std::map<
- typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
- std::pair<Tensor<1, dim>, unsigned int>>
- CellToNormalsMap;
+ using CellToNormalsMap =
+ std::map<typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
+ std::pair<Tensor<1, dim>, unsigned int>>;
CellToNormalsMap cell_to_normals_map;
for (typename DoFToNormalsMap::const_iterator q = same_dof_range[0];
// std::list instead of a std::set (which would be more natural)
// because std::set requires that the stored elements are
// comparable with operator<
- typedef std::map<
+ using CellContributions = std::map<
typename DoFHandlerType<dim, spacedim>::active_cell_iterator,
- std::list<Tensor<1, dim>>>
- CellContributions;
+ std::list<Tensor<1, dim>>>;
CellContributions cell_contributions;
for (typename DoFToNormalsMap::const_iterator q =
const Function<spacedim> * weight,
const double exponent_1)
{
- typedef typename InVector::value_type Number;
+ using Number = typename InVector::value_type;
// we mark the "exponent" parameter to this function "const" since it is
// strictly incoming, but we need to set it to something different later
// on, if necessary, so have a read-write version of it:
Vector<typename VectorType::value_type> & difference,
const Point<spacedim> & point)
{
- typedef typename VectorType::value_type Number;
- const FiniteElement<dim> & fe = dof.get_fe();
+ using Number = typename VectorType::value_type;
+ const FiniteElement<dim> &fe = dof.get_fe();
Assert(difference.size() == fe.n_components(),
ExcDimensionMismatch(difference.size(), fe.n_components()));
const Point<spacedim> & point,
Vector<typename VectorType::value_type> &value)
{
- typedef typename VectorType::value_type Number;
- const FiniteElement<dim> & fe = dof.get_fe();
+ using Number = typename VectorType::value_type;
+ const FiniteElement<dim> &fe = dof.get_fe();
Assert(value.size() == fe.n_components(),
ExcDimensionMismatch(value.size(), fe.n_components()));
const Point<spacedim> & point,
Vector<typename VectorType::value_type> & value)
{
- typedef typename VectorType::value_type Number;
- const hp::FECollection<dim, spacedim> & fe = dof.get_fe_collection();
+ using Number = typename VectorType::value_type;
+ const hp::FECollection<dim, spacedim> &fe = dof.get_fe_collection();
Assert(value.size() == fe.n_components(),
ExcDimensionMismatch(value.size(), fe.n_components()));
// then use this to get the gradients of
// the given fe_function at this point
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
std::vector<std::vector<Tensor<1, dim, Number>>> u_gradient(
1, std::vector<Tensor<1, dim, Number>>(fe.n_components()));
fe_values.get_function_gradients(fe_function, u_gradient);
const Point<spacedim> & point,
std::vector<Tensor<1, spacedim, typename VectorType::value_type>> &gradient)
{
- typedef typename VectorType::value_type Number;
- const hp::FECollection<dim, spacedim> & fe = dof.get_fe_collection();
+ using Number = typename VectorType::value_type;
+ const hp::FECollection<dim, spacedim> &fe = dof.get_fe_collection();
Assert(gradient.size() == fe.n_components(),
ExcDimensionMismatch(gradient.size(), fe.n_components()));
const VectorType & v,
const unsigned int component)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
Assert(v.size() == dof.n_dofs(),
ExcDimensionMismatch(v.size(), dof.n_dofs()));
Assert(component < dof.get_fe(0).n_components(),
class VectorAdaptor : public ROL::Vector<typename VectorType::value_type>
{
/**
- * A typedef for size type of <tt>VectorType</tt>.
+ * An alias for size type of <tt>VectorType</tt>.
*/
using size_type = typename VectorType::size_type;
/**
- * A typedef for element type stored in the <tt>VectorType</tt>.
+ * An alias for element type stored in the <tt>VectorType</tt>.
*/
using value_type = typename VectorType::value_type;
/**
- * A typedef for real-valued numbers.
+ * An alias for real-valued numbers.
*/
using real_type = typename VectorType::real_type;
*
* The data type always indicates an unsigned integer type.
*/
- typedef unsigned long long int particle_index;
+ using particle_index = unsigned long long int;
# ifdef DEAL_II_WITH_MPI
/**
*
* The data type always indicates an unsigned integer type.
*/
- typedef unsigned int particle_index;
+ using particle_index = unsigned int;
# ifdef DEAL_II_WITH_MPI
/**
namespace internal
{
/**
- * Internal typedef of cell level/index pair.
+ * Internal alias of cell level/index pair.
*/
- typedef std::pair<int, int> LevelInd;
+ using LevelInd = std::pair<int, int>;
} // namespace internal
/**
/**
* A type that can be used to iterate over all particles in the domain.
*/
- typedef ParticleIterator<dim, spacedim> particle_iterator;
+ using particle_iterator = ParticleIterator<dim, spacedim>;
/**
* A type that represents a range of particles.
*/
- typedef boost::iterator_range<particle_iterator> particle_iterator_range;
+ using particle_iterator_range = boost::iterator_range<particle_iterator>;
/**
* Default constructor.
operator--(int);
/**
- * Mark the class as bidirectional iterator and declare some typedefs which
+ * Mark the class as bidirectional iterator and declare some alias which
* are standard for iterators and are used by algorithms to enquire about
* the specifics of the iterators they work on.
*/
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef ParticleAccessor<dim, spacedim> value_type;
- typedef std::ptrdiff_t difference_type;
- typedef ParticleAccessor<dim, spacedim> *pointer;
- typedef ParticleAccessor<dim, spacedim> &reference;
+ using iterator_category = std::bidirectional_iterator_tag;
+ using value_type = ParticleAccessor<dim, spacedim>;
+ using difference_type = std::ptrdiff_t;
+ using pointer = ParticleAccessor<dim, spacedim> *;
+ using reference = ParticleAccessor<dim, spacedim> &;
private:
/**
* uniquely identifies the slot of memory that is reserved for this
* particle.
*/
- typedef double *Handle;
+ using Handle = double *;
/**
* Define a default (invalid) value for handles.
* following code snippet:
*
* @code
- * typedef Vector<double> VectorType;
+ * using VectorType = Vector<double>;
*
* SUNDIALS::ARKode<VectorType> ode;
*
/**
* MPI communicator. SUNDIALS solver runs happily in
* parallel. Note that if the library is compiled without MPI
- * support, MPI_Comm is typedefed as int.
+ * support, MPI_Comm is aliased as int.
*/
MPI_Comm communicator;
*
* This is achieved by the following snippet of code:
* @code
- * typedef Vector<double> VectorType;
+ * using VectorType = Vector<double>;
*
* VectorType y(2);
* VectorType y_dot(2);
/**
* MPI communicator. SUNDIALS solver runs happily in
* parallel. Note that if the library is compiled without MPI
- * support, MPI_Comm is typedefed as int.
+ * support, MPI_Comm is aliased as int.
*/
MPI_Comm communicator;