// domain
namespace base64
{
- typedef enum
- {
- step_A,
- step_B,
- step_C
- } base64_encodestep;
+ using base64_encodestep = enum { step_A, step_B, step_C };
- typedef struct
+ using base64_encodestate = struct
{
base64_encodestep step;
char result;
- } base64_encodestate;
+ };
void
base64_init_encodestate(base64_encodestate *state_in)
<< ascii_or_binary << "\">\n";
{
- // uint8_t might be a typedef to unsigned char which is then not printed
+ // uint8_t might be an alias to unsigned char which is then not printed
// as ascii integers
#ifdef DEAL_II_WITH_ZLIB
std::vector<uint8_t> cell_types(n_cells,
void
DataOutReader<dim, spacedim>::merge(const DataOutReader<dim, spacedim> &source)
{
- typedef typename dealii::DataOutBase::Patch<dim, spacedim> Patch;
+ using Patch = typename dealii::DataOutBase::Patch<dim, spacedim>;
const std::vector<Patch> &source_patches = source.get_patches();
}
// std::cerr << p
// << '\t' << moment_weight[0].value(x)
-// << '\t' << moment_weight[1].value(x)
-// ;
+// << '\t' << moment_weight[1].value(x);
compute (p, values, grads, grad_grads);
const std::function<adouble(const adouble &, const adouble &)>
&comparator)
{
- typedef typename Differentiation::AD::NumberTraits<
+ using ad_type = typename Differentiation::AD::NumberTraits<
double,
- Differentiation::AD::NumberTypes::adolc_taped>::ad_type ad_type;
+ Differentiation::AD::NumberTypes::adolc_taped>::ad_type;
static_assert(
std::is_same<adouble, ad_type>::value,
"The type of the AD number is not that which was expected.");
// {6,7} belong together, respectively). If periodicity is set in x and
// z direction, the output is {0,0,2,2,0,0,2,2}, and if periodicity is
// in all directions, the output is simply {0,0,0,0,0,0,0,0}.
- typedef
- typename Triangulation<dim, spacedim>::cell_iterator cell_iterator;
+ using cell_iterator =
+ typename Triangulation<dim, spacedim>::cell_iterator;
typename std::map<std::pair<cell_iterator, unsigned int>,
std::pair<std::pair<cell_iterator, unsigned int>,
std::bitset<3>>>::const_iterator it;
// now collect cells and their vertices
// for the interested neighbors
- typedef std::map<dealii::types::subdomain_id,
- CommunicateLocallyMovedVertices::CellInfo<dim, spacedim>>
- cellmap_t;
+ using cellmap_t =
+ std::map<dealii::types::subdomain_id,
+ CommunicateLocallyMovedVertices::CellInfo<dim, spacedim>>;
cellmap_t needs_to_get_cells;
for (typename Triangulation<dim, spacedim>::cell_iterator cell =
Assert(this->n_levels() == 1,
ExcMessage("The triangulation is refined!"));
- typedef std::vector<dealii::GridTools::PeriodicFacePair<cell_iterator>>
- FaceVector;
+ using FaceVector =
+ std::vector<dealii::GridTools::PeriodicFacePair<cell_iterator>>;
typename FaceVector::const_iterator it, periodic_end;
it = periodicity_vector.begin();
periodic_end = periodicity_vector.end();
}
- typedef std::vector<std::pair<unsigned int, unsigned int>>
- DoFIdentities;
+ using DoFIdentities =
+ std::vector<std::pair<unsigned int, unsigned int>>;
/**
// build list of cells to request for each neighbor
std::set<dealii::types::subdomain_id> level_ghost_owners =
tria.level_ghost_owners();
- typedef std::map<dealii::types::subdomain_id,
- CellDataTransferBuffer<dim>>
- cellmap_t;
+ using cellmap_t =
+ std::map<dealii::types::subdomain_id, CellDataTransferBuffer<dim>>;
cellmap_t neighbor_cell_list;
for (std::set<dealii::types::subdomain_id>::iterator it =
level_ghost_owners.begin();
using namespace ::boost;
using namespace std;
- typedef adjacency_list<vecS,
- vecS,
- undirectedS,
- property<vertex_color_t,
- default_color_type,
- property<vertex_degree_t, int>>>
- Graph;
- typedef graph_traits<Graph>::vertex_descriptor Vertex;
- typedef graph_traits<Graph>::vertices_size_type size_type;
-
- typedef std::pair<size_type, size_type> Pair;
+ using Graph = adjacency_list<vecS,
+ vecS,
+ undirectedS,
+ property<vertex_color_t,
+ default_color_type,
+ property<vertex_degree_t, int>>>;
+ using Vertex = graph_traits<Graph>::vertex_descriptor;
+ using size_type = graph_traits<Graph>::vertices_size_type;
+
+ using Pair = std::pair<size_type, size_type>;
} // namespace boosttypes
int delta = 0;
// must be BGL directed graph now
- typedef adjacency_list<vecS, vecS, directedS> Graph;
+ using Graph = adjacency_list<vecS, vecS, directedS>;
int n = dof_handler.n_dofs();
}
- typedef std::vector<int> Vector;
+ using Vector = std::vector<int>;
Vector inverse_perm(n, 0);
{
AssertThrow(out, ExcIO());
- typedef std::map<types::global_dof_index, Point<spacedim>> dof_map_t;
+ using dof_map_t = std::map<types::global_dof_index, Point<spacedim>>;
- typedef std::map<Point<spacedim>,
- std::vector<types::global_dof_index>,
- typename internal::ComparisonHelper<spacedim>>
- point_map_t;
+ using point_map_t = std::map<Point<spacedim>,
+ std::vector<types::global_dof_index>,
+ typename internal::ComparisonHelper<spacedim>>;
point_map_t point_map;
// have an array that stores the location of each vector-dof tuple we want
// to rotate.
- typedef std::array<unsigned int, spacedim> DoFTuple;
+ using DoFTuple = std::array<unsigned int, spacedim>;
// start with a pristine interpolation matrix...
FullMatrix<double> transformation = IdentityMatrix(n_dofs_per_face);
const ComponentMask & component_mask,
const std::vector<unsigned int> &first_vector_components)
{
- typedef std::vector<
- GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>
- FaceVector;
+ using FaceVector = std::vector<
+ GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator>>;
typename FaceVector::const_iterator it, end_periodic;
it = periodic_faces.begin();
end_periodic = periodic_faces.end();
// Loop over all periodic faces...
for (; it != end_periodic; ++it)
{
- typedef typename DoFHandlerType::face_iterator FaceIterator;
+ using FaceIterator = typename DoFHandlerType::face_iterator;
const FaceIterator face_1 = it->cell[0]->face(it->face_idx[0]);
const FaceIterator face_2 = it->cell[1]->face(it->face_idx[1]);
// interpolation matrix is necessarily empty -- i.e. there isn't much we
// need to do here.
(void)interpolation_matrix;
- typedef FiniteElement<dim, spacedim> FE;
- typedef FE_DGP<dim, spacedim> FEDGP;
+ using FE = FiniteElement<dim, spacedim>;
+ using FEDGP = FE_DGP<dim, spacedim>;
AssertThrow((x_source_fe.get_name().find("FE_DGP<") == 0) ||
(dynamic_cast<const FEDGP *>(&x_source_fe) != nullptr),
typename FE::ExcInterpolationNotImplemented());
// interpolation matrix is necessarily empty -- i.e. there isn't much we
// need to do here.
(void)interpolation_matrix;
- typedef FiniteElement<dim, spacedim> FE;
- typedef FE_DGP<dim, spacedim> FEDGP;
+ using FE = FiniteElement<dim, spacedim>;
+ using FEDGP = FE_DGP<dim, spacedim>;
AssertThrow((x_source_fe.get_name().find("FE_DGP<") == 0) ||
(dynamic_cast<const FEDGP *>(&x_source_fe) != nullptr),
typename FE::ExcInterpolationNotImplemented());
// this is only implemented, if the
// source FE is also a
// DGQ element
- typedef FiniteElement<dim, spacedim> FE;
+ using FE = FiniteElement<dim, spacedim>;
AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
nullptr),
typename FE::ExcInterpolationNotImplemented());
// is necessarily empty -- i.e. there isn't
// much we need to do here.
(void)interpolation_matrix;
- typedef FiniteElement<dim, spacedim> FE;
+ using FE = FiniteElement<dim, spacedim>;
AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
nullptr),
typename FE::ExcInterpolationNotImplemented());
// is necessarily empty -- i.e. there isn't
// much we need to do here.
(void)interpolation_matrix;
- typedef FiniteElement<dim, spacedim> FE;
+ using FE = FiniteElement<dim, spacedim>;
AssertThrow((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&x_source_fe) !=
nullptr),
typename FE::ExcInterpolationNotImplemented());
FE_NedelecSZ<dim, spacedim>::shape_value(const unsigned int /*i*/,
const Point<dim> & /*p*/) const
{
- typedef FiniteElement<dim, dim> FEE;
+ using FEE = FiniteElement<dim, dim>;
Assert(false, typename FEE::ExcFENotPrimitive());
return 0.;
}
FE_NedelecSZ<dim, spacedim>::shape_grad(const unsigned int /*i*/,
const Point<dim> & /*p*/) const
{
- typedef FiniteElement<dim, dim> FEE;
+ using FEE = FiniteElement<dim, dim>;
Assert(false, typename FEE::ExcFENotPrimitive());
return Tensor<1, dim>();
}
FE_NedelecSZ<dim, spacedim>::shape_grad_grad(const unsigned int /*i*/,
const Point<dim> & /*p*/) const
{
- typedef FiniteElement<dim, dim> FEE;
+ using FEE = FiniteElement<dim, dim>;
Assert(false, typename FEE::ExcFENotPrimitive());
return Tensor<2, dim>();
}
return QGaussLobatto<1>(degree + 1).get_points();
else
{
- typedef dealii::FE_Q_Base<TensorProductPolynomials<1>, 1, 1> FEQ;
+ using FEQ = dealii::FE_Q_Base<TensorProductPolynomials<1>, 1, 1>;
AssertThrow(false, FEQ::ExcFEQCannotHaveDegree0());
}
return std::vector<Point<1>>();
FE_Q_Base<PolynomialType, dim, spacedim>::get_dpo_vector(
const unsigned int degree)
{
- typedef FE_Q_Base<PolynomialType, dim, spacedim> FEQ;
+ using FEQ = FE_Q_Base<PolynomialType, dim, spacedim>;
AssertThrow(degree > 0, typename FEQ::ExcFEQCannotHaveDegree0());
std::vector<unsigned int> dpo(dim + 1, 1U);
for (unsigned int i = 1; i < dpo.size(); ++i)
// We don't know how to do this properly, yet.
// However, for SolutionTransfer to work we need to provide an implementation
// for the case that the x_source_fe is identical to this FE
- typedef FE_Q_Bubbles<dim, spacedim> FEQBUBBLES;
+ using FEQBUBBLES = FE_Q_Bubbles<dim, spacedim>;
AssertThrow(
(x_source_fe.get_name().find("FE_Q_Bubbles<") == 0) ||
FullMatrix<double> & interpolation_matrix) const
{
// this is only implemented, if the source FE is also a Q_DG0 element
- typedef FE_Q_DG0<dim, spacedim> FEQDG0;
+ using FEQDG0 = FE_Q_DG0<dim, spacedim>;
AssertThrow(
(x_source_fe.get_name().find("FE_Q_DG0<") == 0) ||
// this is only implemented, if the
// source FE is also a
// Q_Hierarchical element
- typedef FE_Q_Hierarchical<dim> FEQHierarchical;
+ using FEQHierarchical = FE_Q_Hierarchical<dim>;
AssertThrow((x_source_fe.get_name().find("FE_Q_Hierarchical<") == 0) ||
(dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
nullptr),
// this is only implemented, if the
// source FE is also a
// Q_Hierarchical element
- typedef FE_Q_Hierarchical<dim> FEQHierarchical;
+ using FEQHierarchical = FE_Q_Hierarchical<dim>;
AssertThrow((x_source_fe.get_name().find("FE_Q_Hierarchical<") == 0) ||
(dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
nullptr),
scalars.resize(n_scalars);
for (unsigned int component = 0; component < n_scalars; ++component)
{
- // Use a typedef here to work around an issue with gcc-4.1:
- typedef dealii::FEValuesViews::Scalar<dim, spacedim> ScalarView;
+ // Use an alias here to work around an issue with gcc-4.1:
+ using ScalarView = dealii::FEValuesViews::Scalar<dim, spacedim>;
scalars[component].ScalarView::~ScalarView();
new (&scalars[component])
vectors.resize(n_vectors);
for (unsigned int component = 0; component < n_vectors; ++component)
{
- // Use a typedef here to work around an issue with gcc-4.1:
- typedef dealii::FEValuesViews::Vector<dim, spacedim> VectorView;
+ // Use an alias here to work around an issue with gcc-4.1:
+ using VectorView = dealii::FEValuesViews::Vector<dim, spacedim>;
vectors[component].VectorView::~VectorView();
new (&vectors[component])
component < n_symmetric_second_order_tensors;
++component)
{
- // Use a typedef here to work around an issue with gcc-4.1:
- typedef dealii::FEValuesViews::SymmetricTensor<2, dim, spacedim>
- SymmetricTensorView;
+ // Use an alias here to work around an issue with gcc-4.1:
+ using SymmetricTensorView =
+ dealii::FEValuesViews::SymmetricTensor<2, dim, spacedim>;
symmetric_second_order_tensors[component]
.SymmetricTensorView::~SymmetricTensorView();
for (unsigned int component = 0; component < n_second_order_tensors;
++component)
{
- // Use a typedef here to work around an issue with gcc-4.1:
- typedef dealii::FEValuesViews::Tensor<2, dim, spacedim> TensorView;
+ // Use an alias here to work around an issue with gcc-4.1:
+ using TensorView = dealii::FEValuesViews::Tensor<2, dim, spacedim>;
second_order_tensors[component].TensorView::~TensorView();
new (&second_order_tensors[component])
const bool quadrature_points_fastest = false,
const unsigned int component_multiple = 1)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
// initialize with zero
for (unsigned int i = 0; i < values.size(); ++i)
std::fill_n(values[i].begin(),
const InputVector & fe_function,
std::vector<typename InputVector::value_type> &values) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_values,
ExcAccessToUninitializedField("update_values"));
AssertDimension(fe->n_components(), 1);
const VectorSlice<const std::vector<types::global_dof_index>> &indices,
std::vector<typename InputVector::value_type> & values) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_values,
ExcAccessToUninitializedField("update_values"));
AssertDimension(fe->n_components(), 1);
const InputVector & fe_function,
std::vector<Vector<typename InputVector::value_type>> &values) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(present_cell.get() != nullptr,
ExcMessage("FEValues object is not reinit'ed to any cell"));
const VectorSlice<const std::vector<types::global_dof_index>> &indices,
std::vector<Vector<typename InputVector::value_type>> & values) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
// Size of indices must be a multiple of dofs_per_cell such that an integer
// number of function values is generated in each point.
Assert(indices.size() % dofs_per_cell == 0,
values,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_values,
ExcAccessToUninitializedField("update_values"));
std::vector<Tensor<1, spacedim, typename InputVector::value_type>> &gradients)
const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_gradients,
ExcAccessToUninitializedField("update_gradients"));
AssertDimension(fe->n_components(), 1);
std::vector<Tensor<1, spacedim, typename InputVector::value_type>> &gradients)
const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_gradients,
ExcAccessToUninitializedField("update_gradients"));
AssertDimension(fe->n_components(), 1);
std::vector<Tensor<1, spacedim, typename InputVector::value_type>>>
&gradients) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_gradients,
ExcAccessToUninitializedField("update_gradients"));
Assert(present_cell.get() != nullptr,
gradients,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
// Size of indices must be a multiple of dofs_per_cell such that an integer
// number of function values is generated in each point.
Assert(indices.size() % dofs_per_cell == 0,
std::vector<Tensor<2, spacedim, typename InputVector::value_type>> &hessians)
const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
AssertDimension(fe->n_components(), 1);
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
std::vector<Tensor<2, spacedim, typename InputVector::value_type>> &hessians)
const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
AssertDimension(fe_function.size(), present_cell->n_dofs_for_dof_handler());
& hessians,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
Assert(present_cell.get() != nullptr,
hessians,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
Assert(indices.size() % dofs_per_cell == 0,
const InputVector & fe_function,
std::vector<typename InputVector::value_type> &laplacians) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
AssertDimension(fe->n_components(), 1);
const VectorSlice<const std::vector<types::global_dof_index>> &indices,
std::vector<typename InputVector::value_type> &laplacians) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
AssertDimension(fe->n_components(), 1);
const InputVector & fe_function,
std::vector<Vector<typename InputVector::value_type>> &laplacians) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(present_cell.get() != nullptr,
ExcMessage("FEValues object is not reinit'ed to any cell"));
Assert(this->update_flags & update_hessians,
const VectorSlice<const std::vector<types::global_dof_index>> &indices,
std::vector<Vector<typename InputVector::value_type>> &laplacians) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
// Size of indices must be a multiple of dofs_per_cell such that an integer
// number of function values is generated in each point.
Assert(indices.size() % dofs_per_cell == 0,
std::vector<std::vector<typename InputVector::value_type>> & laplacians,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(indices.size() % dofs_per_cell == 0,
ExcNotMultiple(indices.size(), dofs_per_cell));
Assert(this->update_flags & update_hessians,
std::vector<Tensor<3, spacedim, typename InputVector::value_type>>
&third_derivatives) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
AssertDimension(fe->n_components(), 1);
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
std::vector<Tensor<3, spacedim, typename InputVector::value_type>>
&third_derivatives) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
AssertDimension(fe_function.size(), present_cell->n_dofs_for_dof_handler());
& third_derivatives,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
Assert(present_cell.get() != nullptr,
third_derivatives,
bool quadrature_points_fastest) const
{
- typedef typename InputVector::value_type Number;
+ using Number = typename InputVector::value_type;
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
Assert(indices.size() % dofs_per_cell == 0,
const GridOutFlags::Eps<2> & eps_flags_2,
const GridOutFlags::Eps<3> & eps_flags_3)
{
- typedef std::list<LineEntry> LineList;
+ using LineList = std::list<LineEntry>;
// We should never get here in 1D since this function is overloaded for
// all dim == 1 cases.
* An iterator that allows iterating over all cells adjacent
* to the edge represented by the current object.
*/
- typedef const AdjacentCell *const_iterator;
+ using const_iterator = const AdjacentCell *;
/**
* Add the given cell to the collection of cells adjacent to
/**
* Iterator type for the elements of the set.
*/
- typedef const unsigned int *const_iterator;
+ using const_iterator = const unsigned int *;
/**
* Default constructor. Initialize both slots as unused, corresponding
#else
- typedef typename Triangulation<dim, spacedim>::active_cell_iterator
- active_cell_iterator;
+ using active_cell_iterator =
+ typename Triangulation<dim, spacedim>::active_cell_iterator;
const std::vector<std::set<active_cell_iterator>> vertex_to_cell =
vertex_to_cell_map(triangulation);
#endif
{
#ifndef _MSC_VER
- typedef
- typename MeshType<dim, spacedim>::active_cell_iterator cell_iterator;
+ using cell_iterator =
+ typename MeshType<dim, spacedim>::active_cell_iterator;
#else
- typedef typename dealii::internal::
- ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
- cell_iterator;
+ using cell_iterator = typename dealii::internal::
+ ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
#endif
// update the searched cells
const std::vector<bool> & marked_vertices,
const double tolerance)
{
- typedef typename dealii::internal::
- ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
- active_cell_iterator;
+ using active_cell_iterator = typename dealii::internal::
+ ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
// The best distance is set to the
// maximum allowable distance from
// non-active cells, we will get to
// the later on for further
// consideration
- typedef std::list<std::pair<typename MeshType::cell_iterator,
- typename MeshType::cell_iterator>>
- CellList;
-
+ using CellList = std::list<std::pair<typename MeshType::cell_iterator,
+ typename MeshType::cell_iterator>>;
CellList cell_list;
// first push the coarse level cells
"or size equal to the number of elements in "
"the FECollection."));
- typedef typename hp::DoFHandler<dim, spacedim>::active_cell_iterator
- cell_iterator;
+ using cell_iterator =
+ typename hp::DoFHandler<dim, spacedim>::active_cell_iterator;
std::pair<cell_iterator, Point<dim>> best_cell;
// If we have only one element in the MappingCollection,
// Match with a complexity of O(n^2). This could be improved...
std::bitset<3> orientation;
- typedef
- typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator
- PairIterator;
+ using PairIterator =
+ typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator;
for (PairIterator it1 = pairs1.begin(); it1 != pairs1.end(); ++it1)
{
for (PairIterator it2 = pairs2.begin(); it2 != pairs2.end(); ++it2)
template <>
struct OrientationLookupTable<1>
{
- typedef std::array<unsigned int, GeometryInfo<1>::vertices_per_face>
- MATCH_T;
+ using MATCH_T =
+ std::array<unsigned int, GeometryInfo<1>::vertices_per_face>;
static inline std::bitset<3>
lookup(const MATCH_T &)
{
template <>
struct OrientationLookupTable<2>
{
- typedef std::array<unsigned int, GeometryInfo<2>::vertices_per_face>
- MATCH_T;
+ using MATCH_T =
+ std::array<unsigned int, GeometryInfo<2>::vertices_per_face>;
static inline std::bitset<3>
lookup(const MATCH_T &matching)
{
template <>
struct OrientationLookupTable<3>
{
- typedef std::array<unsigned int, GeometryInfo<3>::vertices_per_face>
- MATCH_T;
+ using MATCH_T =
+ std::array<unsigned int, GeometryInfo<3>::vertices_per_face>;
static inline std::bitset<3>
lookup(const MATCH_T &matching)
{
unsigned int>,
std::bitset<3>>> &periodic_face_map)
{
- typedef typename Triangulation<dim, spacedim>::face_iterator FaceIterator;
+ using FaceIterator = typename Triangulation<dim, spacedim>::face_iterator;
const FaceIterator face_1 = cell_1->face(n_face_1);
const FaceIterator face_2 = cell_2->face(n_face_2);
ExcMessage("Periodic faces must be on the boundary"));
// insert periodic face pair for both cells
- typedef std::pair<typename Triangulation<dim, spacedim>::cell_iterator,
- unsigned int>
- CellFace;
+ using CellFace =
+ std::pair<typename Triangulation<dim, spacedim>::cell_iterator,
+ unsigned int>;
const CellFace cell_face_1(cell_1, n_face_1);
const CellFace cell_face_2(cell_2, n_face_2);
const std::pair<CellFace, std::bitset<3>> cell_face_orientation_2(
*
* Ideally, we would make this class a member class of the
* Triangulation<dim,spacedim> class, since then our implementation
- * functions have immediate access to the typedefs and static functions of
+ * functions have immediate access to the alias and static functions of
* the surrounding Triangulation class. I.e., we do not have to write
* "typename Triangulation<dim,spacedim>::active_cell_iterator" but can
* write "active_cell_iterator" right away. This is, in fact, the way it was
const unsigned int level_objects,
internal::TriangulationImplementation::NumberCache<1> &number_cache)
{
- typedef
- typename Triangulation<dim, spacedim>::line_iterator line_iterator;
+ using line_iterator =
+ typename Triangulation<dim, spacedim>::line_iterator;
number_cache.n_levels = 0;
if (level_objects > 0)
static_cast<internal::TriangulationImplementation::NumberCache<1> &>(
number_cache));
- typedef
- typename Triangulation<dim, spacedim>::quad_iterator quad_iterator;
+ using quad_iterator =
+ typename Triangulation<dim, spacedim>::quad_iterator;
///////////////////////////////////
// update the number of quads on the different levels in the
static_cast<internal::TriangulationImplementation::NumberCache<2> &>(
number_cache));
- typedef
- typename Triangulation<dim, spacedim>::hex_iterator hex_iterator;
+ using hex_iterator =
+ typename Triangulation<dim, spacedim>::hex_iterator;
///////////////////////////////////
// update the number of hexes on the different levels in the
* We decided to use the 2nd option.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
// my_it : is the iterator to the current cell.
cell_iterator my_it(*this);
if (this->tria->periodic_face_map.find(
* being the current cell_face.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
- cell_iterator my_it(*this);
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+ cell_iterator my_it(*this);
const typename std::map<std::pair<cell_iterator, unsigned int>,
std::pair<std::pair<cell_iterator, unsigned int>,
* neighboring face.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
- cell_iterator my_it(*this);
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+ cell_iterator my_it(*this);
const typename std::map<std::pair<cell_iterator, unsigned int>,
std::pair<std::pair<cell_iterator, unsigned int>,
std::bitset<3>>>::const_iterator
* cell.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
const int my_face_index = this->face_index(i_face);
cell_iterator my_it(*this);
const typename std::map<std::pair<cell_iterator, unsigned int>,
* being the current cell_face.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
- cell_iterator my_it(*this);
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+ cell_iterator my_it(*this);
const typename std::map<std::pair<cell_iterator, unsigned int>,
std::pair<std::pair<cell_iterator, unsigned int>,
std::bitset<3>>>::const_iterator
* first pair being the periodic neighbor cell_face.
*/
AssertIndexRange(i_face, GeometryInfo<dim>::faces_per_cell);
- typedef TriaIterator<CellAccessor<dim, spacedim>> cell_iterator;
- cell_iterator my_it(*this);
+ using cell_iterator = TriaIterator<CellAccessor<dim, spacedim>>;
+ cell_iterator my_it(*this);
const typename std::map<std::pair<cell_iterator, unsigned int>,
std::pair<std::pair<cell_iterator, unsigned int>,
std::bitset<3>>>::const_iterator
{
namespace MPI
{
- typedef types::global_dof_index size_type;
+ using size_type = types::global_dof_index;
void
BlockVector::reinit(const unsigned int num_blocks)
for (DynamicSparsityPattern::size_type i = 0; i < rows_per_cpu.size(); ++i)
start_index[i + 1] = start_index[i] + rows_per_cpu[i];
- typedef std::map<DynamicSparsityPattern::size_type,
- std::vector<DynamicSparsityPattern::size_type>>
- map_vec_t;
+ using map_vec_t = std::map<DynamicSparsityPattern::size_type,
+ std::vector<DynamicSparsityPattern::size_type>>;
map_vec_t send_data;
{
const unsigned int myid = Utilities::MPI::this_mpi_process(mpi_comm);
- typedef std::map<BlockDynamicSparsityPattern::size_type,
- std::vector<BlockDynamicSparsityPattern::size_type>>
- map_vec_t;
+ using map_vec_t =
+ std::map<BlockDynamicSparsityPattern::size_type,
+ std::vector<BlockDynamicSparsityPattern::size_type>>;
map_vec_t send_data;
{
// std::shared_ptr.
// For now, just use serial node, i.e. no multithreaing or GPU.
- typedef KokkosClassic::DefaultNode::DefaultNodeType node;
+ using node = KokkosClassic::DefaultNode::DefaultNodeType;
preconditioner.reset();
// Cast matrix into a MueLu::Matrix. The constness needs to be cast away.
namespace
{
- typedef SparseMatrix::size_type size_type;
+ using size_type = SparseMatrix::size_type;
template <typename SparsityPatternType>
void
namespace internals
{
- typedef dealii::types::global_dof_index size_type;
+ using size_type = dealii::types::global_dof_index;
void
perform_mmult(const SparseMatrix &inputleft,
operator+(const TrilinosPayload &first_op,
const TrilinosPayload &second_op)
{
- typedef typename TrilinosPayload::Domain Domain;
- typedef typename TrilinosPayload::Range Range;
- typedef typename TrilinosPayload::VectorType Intermediate;
- typedef TrilinosWrappers::MPI::Vector GVMVectorType;
+ using Domain = typename TrilinosPayload::Domain;
+ using Range = typename TrilinosPayload::Range;
+ using Intermediate = typename TrilinosPayload::VectorType;
+ using GVMVectorType = TrilinosWrappers::MPI::Vector;
Assert(first_op.locally_owned_domain_indices() ==
second_op.locally_owned_domain_indices(),
TrilinosPayload operator*(const TrilinosPayload &first_op,
const TrilinosPayload &second_op)
{
- typedef typename TrilinosPayload::Domain Domain;
- typedef typename TrilinosPayload::Range Range;
- typedef typename TrilinosPayload::VectorType Intermediate;
- typedef TrilinosWrappers::MPI::Vector GVMVectorType;
+ using Domain = typename TrilinosPayload::Domain;
+ using Range = typename TrilinosPayload::Range;
+ using Intermediate = typename TrilinosPayload::VectorType;
+ using GVMVectorType = TrilinosWrappers::MPI::Vector;
AssertThrow(first_op.locally_owned_domain_indices() ==
second_op.locally_owned_range_indices(),
namespace
{
- typedef SparsityPattern::size_type size_type;
+ using size_type = SparsityPattern::size_type;
void
reinit_sp(const Epetra_Map & row_map,
{
--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)
* Declare the data type which holds the derivative described by this
* class.
*/
- typedef Tensor<1, dim> Derivative;
+ using Derivative = Tensor<1, dim>;
/**
* Likewise declare the data type that holds the derivative projected to a
* certain directions.
*/
- typedef Tensor<0, dim> ProjectedDerivative;
+ using ProjectedDerivative = Tensor<0, dim>;
/**
* Given an FEValues object initialized to a cell, and a solution vector,
* Declare the data type which holds the derivative described by this
* class.
*/
- typedef Tensor<2, dim> Derivative;
+ using Derivative = Tensor<2, dim>;
/**
* Likewise declare the data type that holds the derivative projected to a
* certain directions.
*/
- typedef Tensor<1, dim> ProjectedDerivative;
+ using ProjectedDerivative = Tensor<1, dim>;
/**
* Given an FEValues object initialized to a cell, and a solution vector,
* holds the derivative described
* by this class.
*/
- typedef Tensor<3, dim> Derivative;
+ using Derivative = Tensor<3, dim>;
/**
* Likewise declare the data type that holds the derivative projected to a
* certain directions.
*/
- typedef Tensor<2, dim> ProjectedDerivative;
+ using ProjectedDerivative = Tensor<2, dim>;
/**
* Given an FEValues object initialized to a cell, and a solution vector,
{
public:
/**
- * typedef to select the DerivativeDescription corresponding to the
+ * alias to select the DerivativeDescription corresponding to the
* <tt>order</tt>th derivative. In this general template we set an unvalid
- * typedef to void, the real typedefs have to be specialized.
+ * alias to void, the real alias have to be specialized.
*/
- typedef void DerivDescr;
+ using DerivDescr = void;
};
template <int dim>
class DerivativeSelector<1, dim>
{
public:
- typedef Gradient<dim> DerivDescr;
+ using DerivDescr = Gradient<dim>;
};
template <int dim>
class DerivativeSelector<2, dim>
{
public:
- typedef SecondDerivative<dim> DerivDescr;
+ using DerivDescr = SecondDerivative<dim>;
};
template <int dim>
class DerivativeSelector<3, dim>
{
public:
- typedef ThirdDerivative<dim> DerivDescr;
+ using DerivDescr = ThirdDerivative<dim>;
};
} // namespace internal
} // namespace DerivativeApproximation
Assert(component < dof_handler.get_fe(0).n_components(),
ExcIndexRange(component, 0, dof_handler.get_fe(0).n_components()));
- typedef std::tuple<
+ using Iterators = std::tuple<
TriaActiveIterator<
dealii::DoFCellAccessor<DoFHandlerType<dim, spacedim>, false>>,
- Vector<float>::iterator>
- Iterators;
+ Vector<float>::iterator>;
SynchronousIterators<Iterators> begin(
Iterators(dof_handler.begin_active(), derivative_norm.begin())),
end(Iterators(dof_handler.end(), derivative_norm.end()));
const Strategy strategy)
{
AssertThrow(strategy == cell_diameter_over_24, ExcNotImplemented());
- typedef typename InputVector::value_type number;
+ using number = typename InputVector::value_type;
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<1, spacedim> *>(
&dof_handler.get_triangulation()) != nullptr)
case logarithmic:
{
- typedef bool (*comparator)(const number, const number);
- const comparator logarithmic_less_function =
+ const auto logarithmic_less_function =
&Histogram::template logarithmic_less<number>;
min_value = *std::min_element(values[0].begin(),
const std::string &vector_name,
const VectorType & solution)
{
- typedef typename VectorType::value_type number;
+ using number = typename VectorType::value_type;
// must be closed to add data to internal
// members.
Assert(closed, ExcInvalidState());
// sizes for these vectors. If more space is needed an automatic and
// relatively fast (compared to other parts of this algorithm)
// re-allocation will happen.
- typedef typename std::vector<particle_iterator>::size_type vector_size;
+ using vector_size = typename std::vector<particle_iterator>::size_type;
sorted_particles.reserve(
static_cast<vector_size>(particles_out_of_cell.size() * 1.25));