--- /dev/null
+Deprecated: internal::bool2type and int2type has been depreated
+in favor of std::intergral_constant.
+<br>
+(Daniel Arndt, 2017/08/10)
std::memset ((void *)(destination_+begin), 0, (end-begin)*sizeof(T));
else
copy_construct_or_assign(begin, end,
- ::dealii::internal::bool2type<initialize_memory>());
+ std::integral_constant<bool, initialize_memory>());
}
private:
// copy assignment operation
void copy_construct_or_assign(const std::size_t begin,
const std::size_t end,
- ::dealii::internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
{
for (std::size_t i=begin; i<end; ++i)
destination_[i] = element_;
// copy constructor (memory initialization)
void copy_construct_or_assign(const std::size_t begin,
const std::size_t end,
- ::dealii::internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
{
for (std::size_t i=begin; i<end; ++i)
new (&destination_[i]) T(element_);
template <int rank>
TableIndices<rank>
get_partially_filled_indices (const unsigned int row,
- const internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return TableIndices<rank> (row,
numbers::invalid_unsigned_int);
template <int rank>
TableIndices<rank>
get_partially_filled_indices (const unsigned int row,
- const internal::int2type<4> &)
+ const std::integral_constant<int, 4> &)
{
return TableIndices<rank> (row,
numbers::invalid_unsigned_int,
internal::SymmetricTensorAccessors::
Accessor<rank,dim,true,rank-1,Number> (*this,
internal::SymmetricTensor::get_partially_filled_indices<rank> (row,
- internal::int2type<rank>()));
+ std::integral_constant<int, rank>()));
}
internal::SymmetricTensorAccessors::
Accessor<rank,dim,false,rank-1,Number> (*this,
internal::SymmetricTensor::get_partially_filled_indices<rank> (row,
- internal::int2type<rank>()));
+ std::integral_constant<int, rank>()));
}
TableIndices<2>
unrolled_to_component_indices
(const unsigned int i,
- const int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
Assert ((i < dealii::SymmetricTensor<2,dim,double>::n_independent_components),
ExcIndexRange(i, 0, dealii::SymmetricTensor<2,dim,double>::n_independent_components));
TableIndices<rank>
unrolled_to_component_indices
(const unsigned int i,
- const int2type<rank> &)
+ const std::integral_constant<int, rank> &)
{
(void)i;
Assert ((i < dealii::SymmetricTensor<rank,dim,double>::n_independent_components),
{
return
internal::SymmetricTensor::unrolled_to_component_indices<dim> (i,
- internal::int2type<rank>());
+ std::integral_constant<int, rank>());
}
* still select which of the different <code>X::f()</code> we want based on
* the <code>subdim</code> template argument.
*
+ * @deprecated Use std::integral_constant instead.
+ *
* @author Wolfgang Bangerth, 2006
*/
template <int N>
struct int2type
- {};
+ {} DEAL_II_DEPRECATED;
/**
* The equivalent of the int2type class for boolean arguments.
*
+ * @deprecated Use std::integral_constant instead.
+ *
* @author Wolfgang Bangerth, 2009
*/
template <bool B>
struct bool2type
- {};
+ {} DEAL_II_DEPRECATED;
}
ArrayElementType &
subscript (ArrayElementType *values,
const unsigned int i,
- dealii::internal::int2type<dim>)
+ std::integral_constant<int, dim>)
{
Assert (i<dim, ExcIndexRange(i, 0, dim));
return values[i];
ArrayElementType &
subscript (ArrayElementType *,
const unsigned int,
- dealii::internal::int2type<0>)
+ std::integral_constant<int, 0>)
{
Assert(false, ExcMessage("Cannot access elements of an object of type Tensor<rank,0,Number>."));
static ArrayElementType t;
typename Tensor<rank_,dim,Number>::value_type &
Tensor<rank_,dim,Number>::operator[] (const unsigned int i)
{
- return dealii::internal::TensorSubscriptor::subscript(values, i, dealii::internal::int2type<dim>());
+ return dealii::internal::TensorSubscriptor::subscript(values, i, std::integral_constant<int, dim>());
}
const typename Tensor<rank_,dim,Number>::value_type &
Tensor<rank_,dim,Number>::operator[] (const unsigned int i) const
{
- return dealii::internal::TensorSubscriptor::subscript(values, i, dealii::internal::int2type<dim>());
+ return dealii::internal::TensorSubscriptor::subscript(values, i, std::integral_constant<int, dim>());
}
*
* This function exists in 2d and 3d variants.
*/
- void copy_new_triangulation_to_p4est (dealii::internal::int2type<2>);
- void copy_new_triangulation_to_p4est (dealii::internal::int2type<3>);
+ void copy_new_triangulation_to_p4est (std::integral_constant<int, 2>);
+ void copy_new_triangulation_to_p4est (std::integral_constant<int, 3>);
/**
* Copy the local part of the refined forest from p4est into the
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
return dof_handler.levels[obj_level]->dof_object.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>,
+ std::integral_constant<int, 1>,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
(void)obj_level;
// faces have no levels
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>,
+ std::integral_constant<int, 1>,
const types::global_dof_index global_index)
{
(void)obj_level;
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<2>)
+ std::integral_constant<int, 2>)
{
return dof_handler.levels[obj_level]->dof_object.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<2>,
+ std::integral_constant<int, 2>,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
(void)obj_level;
// faces have no levels
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<1>,
+ std::integral_constant<int, 1>,
const types::global_dof_index global_index)
{
(void)obj_level;
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<2>)
+ std::integral_constant<int, 2>)
{
(void)obj_level;
// faces have no levels
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<2>,
+ std::integral_constant<int, 2>,
const types::global_dof_index global_index)
{
(void)obj_level;
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<3>)
+ std::integral_constant<int, 3>)
{
return dof_handler.levels[obj_level]->dof_object.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- dealii::internal::int2type<3>,
+ std::integral_constant<int, 3>,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.levels[obj_level]->
get_dof_index (obj_index,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &,
+ const std::integral_constant<int, 1> &,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &,
+ const std::integral_constant<int, 1> &,
const types::global_dof_index global_index)
{
dof_handler.faces->lines.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.levels[obj_level]->
get_dof_index (obj_index,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<2> &,
+ const std::integral_constant<int, 2> &,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<1> &,
+ const std::integral_constant<int, 1> &,
const types::global_dof_index global_index)
{
dof_handler.faces->lines.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.faces->quads.
get_dof_index (dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<2> &,
+ const std::integral_constant<int, 2> &,
const types::global_dof_index global_index)
{
dof_handler.faces->quads.
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<3> &)
+ const std::integral_constant<int, 3> &)
{
return dof_handler.levels[obj_level]->
get_dof_index (obj_index,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const dealii::internal::int2type<3> &,
+ const std::integral_constant<int, 3> &,
const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->
const unsigned int,
const unsigned int,
const unsigned int fe_index,
- const dealii::internal::int2type<structdim> &)
+ const std::integral_constant<int, structdim> &)
{
return (fe_index == 0);
}
n_active_fe_indices (const dealii::DoFHandler<dim,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const dealii::internal::int2type<structdim> &)
+ const std::integral_constant<int, structdim> &)
{
(void)dof_handler;
(void)obj_level;
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<structdim> &)
+ const std::integral_constant<int, structdim> &)
{
(void)dof_handler;
(void)obj_level;
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
fe_index);
n_active_fe_indices (const dealii::hp::DoFHandler<1,spacedim> &,
const unsigned int /*obj_level*/,
const unsigned int /*obj_index*/,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
// on a cell, the number of active elements is one
return 1;
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
(void)n;
Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.fe_index_is_active(dof_handler,
obj_index,
n_active_fe_indices (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
const unsigned int,
const unsigned int obj_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.n_active_fe_indices (dof_handler,
obj_index);
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.nth_active_fe_index (dof_handler,
obj_level,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
fe_index);
n_active_fe_indices (const dealii::hp::DoFHandler<2,spacedim> &,
const unsigned int /*obj_level*/,
const unsigned int /*obj_index*/,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
// on a cell, the number of active elements is one
return 1;
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
(void)n;
Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.fe_index_is_active(dof_handler,
obj_index,
n_active_fe_indices (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
const unsigned int,
const unsigned int obj_index,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.n_active_fe_indices (dof_handler,
obj_index);
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
return dof_handler.faces->lines.nth_active_fe_index (dof_handler,
obj_level,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.faces->quads.fe_index_is_active(dof_handler,
obj_index,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
- const dealii::internal::int2type<3> &)
+ const std::integral_constant<int, 3> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
fe_index);
n_active_fe_indices (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
const unsigned int,
const unsigned int obj_index,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.faces->quads.n_active_fe_indices (dof_handler,
obj_index);
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
return dof_handler.faces->quads.nth_active_fe_index (dof_handler,
obj_level,
n_active_fe_indices (const dealii::hp::DoFHandler<3,spacedim> &,
const unsigned int /*obj_level*/,
const unsigned int /*obj_index*/,
- const dealii::internal::int2type<3> &)
+ const std::integral_constant<int, 3> &)
{
// on a cell, the number of active elements is one
return 1;
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int n,
- const dealii::internal::int2type<3> &)
+ const std::integral_constant<int, 3> &)
{
(void)n;
Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
this->present_index,
fe_index,
i,
- dealii::internal::int2type<dim>());
+ std::integral_constant<int, dim>());
}
this->present_index,
fe_index,
i,
- dealii::internal::int2type<dim>(),
+ std::integral_constant<int, dim>(),
index);
}
n_active_fe_indices (*this->dof_handler,
this->level(),
this->present_index,
- dealii::internal::int2type<dim>());
+ std::integral_constant<int, dim>());
}
this->level(),
this->present_index,
n,
- dealii::internal::int2type<dim>());
+ std::integral_constant<int, dim>());
}
this->level(),
this->present_index,
fe_index,
- dealii::internal::int2type<dim>());
+ std::integral_constant<int, dim>());
}
TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
- const dealii::internal::int2type<1>)
+ const std::integral_constant<int, 1>)
{
dealii::DoFAccessor<0, DoFHandlerType,level_dof_access>
a (&cell.get_triangulation(),
TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
- const dealii::internal::int2type<2>)
+ const std::integral_constant<int, 2>)
{
return cell.line(i);
}
TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
- const dealii::internal::int2type<3>)
+ const std::integral_constant<int, 3>)
{
return cell.quad(i);
}
Assert (i<GeometryInfo<dim>::faces_per_cell, ExcIndexRange (i, 0, GeometryInfo<dim>::faces_per_cell));
const unsigned int dim = DoFHandlerType::dimension;
- return dealii::internal::DoFCellAccessor::get_face (*this, i, dealii::internal::int2type<dim>());
+ return dealii::internal::DoFCellAccessor::get_face (*this, i, std::integral_constant<int, dim>());
}
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<1> > *
get_objects (dealii::internal::Triangulation::TriaFaces<dim> *faces,
- const dealii::internal::int2type<1>)
+ const std::integral_constant<int, 1>)
{
return &faces->lines;
}
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<2> > *
get_objects (dealii::internal::Triangulation::TriaFaces<dim> *faces,
- const dealii::internal::int2type<2>)
+ const std::integral_constant<int, 2>)
{
return &faces->quads;
}
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<1> > *
get_objects (dealii::internal::Triangulation::TriaFaces<1> *,
- const dealii::internal::int2type<1>)
+ const std::integral_constant<int, 1>)
{
Assert (false, ExcInternalError());
return nullptr;
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<2> > *
get_objects (dealii::internal::Triangulation::TriaFaces<2> *,
- const dealii::internal::int2type<2>)
+ const std::integral_constant<int, 2>)
{
Assert (false, ExcInternalError());
return nullptr;
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<3> > *
get_objects (dealii::internal::Triangulation::TriaFaces<3> *,
- const dealii::internal::int2type<3>)
+ const std::integral_constant<int, 3>)
{
Assert (false, ExcInternalError());
return nullptr;
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<3> > *
get_objects (dealii::internal::Triangulation::TriaFaces<dim> *,
- const dealii::internal::int2type<3>)
+ const std::integral_constant<int, 3>)
{
Assert (false, ExcInternalError());
return nullptr;
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<structdim> > *
get_objects (dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<dim> > *,
- const dealii::internal::int2type<structdim>)
+ const std::integral_constant<int, structdim>)
{
Assert (false, ExcInternalError());
return nullptr;
inline
dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<dim> > *
get_objects (dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<dim> > *cells,
- const dealii::internal::int2type<dim>)
+ const std::integral_constant<int, dim>)
{
return cells;
}
// current class is only used for
// objects that are *not* cells
return *dealii::internal::TriaAccessorBase::get_objects (this->tria->faces.get(),
- dealii::internal::int2type<structdim> ());
+ std::integral_constant<int, structdim> ());
else
return *dealii::internal::TriaAccessorBase::get_objects (&this->tria->levels[this->present_level]->cells,
- dealii::internal::int2type<structdim> ());
+ std::integral_constant<int, structdim> ());
}
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
- internal::bool2type<false>) const;
+ std::integral_constant<bool, false>) const;
/**
* This function actually implements the local_to_global function for block
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
- internal::bool2type<true>) const;
+ std::integral_constant<bool, true>) const;
/**
* This function actually implements the local_to_global function for
SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
- internal::bool2type<false>) const;
+ std::integral_constant<bool, false>) const;
/**
* This function actually implements the local_to_global function for block
SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
- internal::bool2type<true>) const;
+ std::integral_constant<bool, true>) const;
/**
* Internal helper function for distribute_local_to_global function.
Vector<typename MatrixType::value_type> dummy(0);
distribute_local_to_global (local_matrix, dummy, local_dof_indices,
global_matrix, dummy, false,
- dealii::internal::bool2type<IsBlockMatrix<MatrixType>::value>());
+ std::integral_constant<bool, IsBlockMatrix<MatrixType>::value>());
}
// the actual implementation follows in the cm.templates.h file.
distribute_local_to_global (local_matrix, local_vector, local_dof_indices,
global_matrix, global_vector, use_inhomogeneities_for_rhs,
- dealii::internal::bool2type<IsBlockMatrix<MatrixType>::value>());
+ std::integral_constant<bool, IsBlockMatrix<MatrixType>::value>());
}
// the actual implementation follows in the cm.templates.h file.
add_entries_local_to_global (local_dof_indices, sparsity_pattern,
keep_constrained_entries, dof_mask,
- internal::bool2type<IsBlockMatrix<SparsityPatternType>::value>());
+ std::integral_constant<bool, IsBlockMatrix<SparsityPatternType>::value>());
}
}
template <class VEC>
- void set_zero_in_parallel(const std::vector<size_type> &cm, VEC &vec, internal::bool2type<false>)
+ void set_zero_in_parallel(const std::vector<size_type> &cm, VEC &vec, std::integral_constant<bool, false>)
{
set_zero_parallel(cm, vec, 0);
}
// in parallel for BlockVectors
template <class VEC>
- void set_zero_in_parallel(const std::vector<size_type> &cm, VEC &vec, internal::bool2type<true>)
+ void set_zero_in_parallel(const std::vector<size_type> &cm, VEC &vec, std::integral_constant<bool, true>)
{
size_type start_shift = 0;
for (size_type j=0; j<vec.n_blocks(); ++j)
template <class VEC>
void set_zero_all(const std::vector<size_type> &cm, VEC &vec)
{
- set_zero_in_parallel<VEC>(cm, vec, internal::bool2type<IsBlockVector<VEC>::value>());
+ set_zero_in_parallel<VEC>(cm, vec, std::integral_constant<bool, IsBlockVector<VEC>::value>());
vec.compress(VectorOperation::insert);
}
const IndexSet &/*locally_owned_elements*/,
const IndexSet &needed_elements,
TrilinosWrappers::MPI::Vector &output,
- const internal::bool2type<false> /*is_block_vector*/)
+ const std::integral_constant<bool, false> /*is_block_vector*/)
{
Assert(!vec.has_ghost_elements(),
ExcGhostsPresent());
const IndexSet &locally_owned_elements,
const IndexSet &needed_elements,
PETScWrappers::MPI::Vector &output,
- const internal::bool2type<false> /*is_block_vector*/)
+ const std::integral_constant<bool, false> /*is_block_vector*/)
{
output.reinit (locally_owned_elements, needed_elements, vec.get_mpi_communicator());
output = vec;
const IndexSet &locally_owned_elements,
const IndexSet &needed_elements,
LinearAlgebra::distributed::Vector<number> &output,
- const internal::bool2type<false> /*is_block_vector*/)
+ const std::integral_constant<bool, false> /*is_block_vector*/)
{
// TODO: the in vector might already have all elements. need to find a
// way to efficiently avoid the copy then
const IndexSet &/*locally_owned_elements*/,
const IndexSet &/*needed_elements*/,
Vector &/*output*/,
- const internal::bool2type<false> /*is_block_vector*/)
+ const std::integral_constant<bool, false> /*is_block_vector*/)
{
Assert (false, ExcMessage ("We shouldn't even get here!"));
}
const IndexSet &locally_owned_elements,
const IndexSet &needed_elements,
VectorType &output,
- const internal::bool2type<true> /*is_block_vector*/)
+ const std::integral_constant<bool, true> /*is_block_vector*/)
{
output.reinit (vec.n_blocks());
locally_owned_elements.get_view (block_start, block_start+vec.block(b).size()),
needed_elements.get_view (block_start, block_start+vec.block(b).size()),
output.block(b),
- internal::bool2type<false>());
+ std::integral_constant<bool, false>());
block_start += vec.block(b).size();
}
internal::import_vector_with_ghost_elements (vec,
vec_owned_elements, needed_elements,
ghosted_vector,
- internal::bool2type<IsBlockVector<VectorType>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorType>::value>());
for (constraint_iterator it = lines.begin();
it != lines.end(); ++it)
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
{
// check whether we work on real vectors or we just used a dummy when
// calling the other function above.
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
{
const bool use_vectors = (local_vector.size() == 0 &&
global_vector.size() == 0) ? false : true;
SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
- internal::bool2type<false> ) const
+ std::integral_constant<bool, false> ) const
{
Assert (sparsity_pattern.n_rows() == sparsity_pattern.n_cols(), ExcNotQuadratic());
SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
- internal::bool2type<true> ) const
+ std::integral_constant<bool, true> ) const
{
// just as the other add_entries_local_to_global function, but now
// specialized for block matrices.
void vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- const dealii::internal::bool2type<true>,
- const dealii::internal::bool2type<true>) const;
+ const std::integral_constant<bool, true>,
+ const std::integral_constant<bool, true>) const;
/**
* Internal version of (T)vmult where the source vector is a block vector
void vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- const dealii::internal::bool2type<false>,
- const dealii::internal::bool2type<true>) const;
+ const std::integral_constant<bool, false>,
+ const std::integral_constant<bool, true>) const;
/**
* Internal version of (T)vmult where the source vector is a non-block
void vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- const dealii::internal::bool2type<true>,
- const dealii::internal::bool2type<false>) const;
+ const std::integral_constant<bool, true>,
+ const std::integral_constant<bool, false>) const;
/**
* Internal version of (T)vmult where both source vector and the
void vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- const dealii::internal::bool2type<false>,
- const dealii::internal::bool2type<false>) const;
+ const std::integral_constant<bool, false>,
+ const std::integral_constant<bool, false>) const;
};
const VectorType2 &src) const
{
vmult(dst, src, false,
- dealii::internal::bool2type<IsBlockVector<VectorType1>::value>(),
- dealii::internal::bool2type<IsBlockVector<VectorType2>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorType1>::value>(),
+ std::integral_constant<bool, IsBlockVector<VectorType2>::value>());
}
const VectorType2 &src) const
{
vmult(dst, src, true,
- dealii::internal::bool2type<IsBlockVector<VectorType1>::value>(),
- dealii::internal::bool2type<IsBlockVector<VectorType2>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorType1>::value>(),
+ std::integral_constant<bool, IsBlockVector<VectorType2>::value>());
}
BlockSparseMatrix::vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- dealii::internal::bool2type<true>,
- dealii::internal::bool2type<true>) const
+ std::integral_constant<bool, true>,
+ std::integral_constant<bool, true>) const
{
if (transpose == true)
BaseClass::Tvmult_block_block (dst, src);
BlockSparseMatrix::vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- dealii::internal::bool2type<false>,
- dealii::internal::bool2type<true>) const
+ std::integral_constant<bool, false>,
+ std::integral_constant<bool, true>) const
{
if (transpose == true)
BaseClass::Tvmult_nonblock_block (dst, src);
BlockSparseMatrix::vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- dealii::internal::bool2type<true>,
- dealii::internal::bool2type<false>) const
+ std::integral_constant<bool, true>,
+ std::integral_constant<bool, false>) const
{
if (transpose == true)
BaseClass::Tvmult_block_nonblock (dst, src);
BlockSparseMatrix::vmult (VectorType1 &dst,
const VectorType2 &src,
const bool transpose,
- dealii::internal::bool2type<false>,
- dealii::internal::bool2type<false>) const
+ std::integral_constant<bool, false>,
+ std::integral_constant<bool, false>) const
{
if (transpose == true)
BaseClass::Tvmult_nonblock_nonblock (dst, src);
// version often enough, we need to have all tasks but the last one
// to be divisible by the vectorization length
accumulate_regular(op, n_chunks, index, outer_results,
- internal::bool2type<Operation::vectorizes>());
+ std::integral_constant<bool, Operation::vectorizes>());
// now work on the remainder, i.e., the last up to 32 values. Use
// switch statement with fall-through to work on these values.
size_type &n_chunks,
size_type &index,
ResultType (&outer_results)[vector_accumulation_recursion_threshold],
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{
// note that each chunk is chosen to have a width of 32, thereby the index
// is incremented by 4*8 for each @p i.
size_type &n_chunks,
size_type &index,
Number (&outer_results)[vector_accumulation_recursion_threshold],
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
// we start from @p index and workout @p n_chunks each of size 32.
// in order employ SIMD and work on @p nvecs at a time, we split this
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
{
res.gather(vec.begin(), indices);
}
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
{
for (unsigned int v=0; v<VectorizedArray<Number>::n_array_elements; ++v)
res[v] = vector_access(const_cast<const VectorType &>(vec), indices[v]);
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
{
// TODO: enable scatter path when indices are fixed
//#if DEAL_II_COMPILER_VECTORIZATION_LEVEL < 3
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
{
for (unsigned int v=0; v<VectorizedArray<Number>::n_array_elements; ++v)
vector_access(vec, indices[v]) += res[v];
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
{
res.scatter(indices, vec.begin());
}
void process_dof_gather (const unsigned int *indices,
VectorType &vec,
VectorizedArray<Number> &res,
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
{
for (unsigned int v=0; v<VectorizedArray<Number>::n_array_elements; ++v)
vector_access(vec, indices[v]) = res[v];
for (unsigned int comp=0; comp<n_components; ++comp)
operation.process_dof_gather(dof_indices+ind,
*src[comp], values_dofs[comp][j],
- dealii::internal::bool2type<types_are_equal<typename VectorType::value_type,Number>::value>());
+ std::integral_constant<bool, types_are_equal<typename VectorType::value_type,Number>::value>());
}
}
for (unsigned int j=0; j<dofs_per_cell; ++j, ind += VectorizedArray<Number>::n_array_elements)
operation.process_dof_gather(dof_indices+ind,
*src[0], values_dofs[comp][j],
- dealii::internal::bool2type<types_are_equal<typename VectorType::value_type,Number>::value>());
+ std::integral_constant<bool, types_are_equal<typename VectorType::value_type,Number>::value>());
}
}
template <typename VectorStruct>
bool update_ghost_values_start_block (const VectorStruct &vec,
const unsigned int channel,
- internal::bool2type<true>);
+ std::integral_constant<bool, true>);
template <typename VectorStruct>
void reset_ghost_values_block (const VectorStruct &vec,
const bool zero_out_ghosts,
- internal::bool2type<true>);
+ std::integral_constant<bool, true>);
template <typename VectorStruct>
void update_ghost_values_finish_block (const VectorStruct &vec,
- internal::bool2type<true>);
+ std::integral_constant<bool, true>);
template <typename VectorStruct>
void compress_start_block (const VectorStruct &vec,
const unsigned int channel,
- internal::bool2type<true>);
+ std::integral_constant<bool, true>);
template <typename VectorStruct>
void compress_finish_block (const VectorStruct &vec,
- internal::bool2type<true>);
+ std::integral_constant<bool, true>);
template <typename VectorStruct>
bool update_ghost_values_start_block (const VectorStruct &,
const unsigned int,
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{
return false;
}
template <typename VectorStruct>
void reset_ghost_values_block (const VectorStruct &,
const bool,
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{}
template <typename VectorStruct>
void update_ghost_values_finish_block (const VectorStruct &,
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{}
template <typename VectorStruct>
void compress_start_block (const VectorStruct &,
const unsigned int,
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{}
template <typename VectorStruct>
void compress_finish_block (const VectorStruct &,
- internal::bool2type<false>)
+ std::integral_constant<bool, false>)
{}
{
return
update_ghost_values_start_block(vec, channel,
- internal::bool2type<IsBlockVector<VectorStruct>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
}
inline
bool update_ghost_values_start_block (const VectorStruct &vec,
const unsigned int channel,
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
bool return_value = false;
for (unsigned int i=0; i<vec.n_blocks(); ++i)
const bool zero_out_ghosts)
{
reset_ghost_values_block(vec, zero_out_ghosts,
- internal::bool2type<IsBlockVector<VectorStruct>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
}
inline
void reset_ghost_values_block (const VectorStruct &vec,
const bool zero_out_ghosts,
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
for (unsigned int i=0; i<vec.n_blocks(); ++i)
reset_ghost_values(vec.block(i), zero_out_ghosts);
void update_ghost_values_finish (const VectorStruct &vec)
{
update_ghost_values_finish_block(vec,
- internal::bool2type<IsBlockVector<VectorStruct>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
}
template <typename VectorStruct>
inline
void update_ghost_values_finish_block (const VectorStruct &vec,
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
for (unsigned int i=0; i<vec.n_blocks(); ++i)
update_ghost_values_finish(vec.block(i));
const unsigned int channel = 0)
{
compress_start_block (vec, channel,
- internal::bool2type<IsBlockVector<VectorStruct>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
}
inline
void compress_start_block (VectorStruct &vec,
const unsigned int channel,
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
for (unsigned int i=0; i<vec.n_blocks(); ++i)
compress_start(vec.block(i), channel + 500*i);
void compress_finish (VectorStruct &vec)
{
compress_finish_block(vec,
- internal::bool2type<IsBlockVector<VectorStruct>::value>());
+ std::integral_constant<bool, IsBlockVector<VectorStruct>::value>());
}
template <typename VectorStruct>
inline
void compress_finish_block (VectorStruct &vec,
- internal::bool2type<true>)
+ std::integral_constant<bool, true>)
{
for (unsigned int i=0; i<vec.n_blocks(); ++i)
compress_finish(vec.block(i));
setup_coarse_cell_to_p4est_tree_permutation ();
- copy_new_triangulation_to_p4est (dealii::internal::int2type<dim>());
+ copy_new_triangulation_to_p4est (std::integral_constant<int, dim>());
try
{
template <>
void
- Triangulation<2,2>::copy_new_triangulation_to_p4est (dealii::internal::int2type<2>)
+ Triangulation<2,2>::copy_new_triangulation_to_p4est (std::integral_constant<int, 2>)
{
const unsigned int dim = 2, spacedim = 2;
Assert (this->n_cells(0) > 0, ExcInternalError());
// specialize the dim template argument, but let spacedim open
template <>
void
- Triangulation<2,3>::copy_new_triangulation_to_p4est (dealii::internal::int2type<2>)
+ Triangulation<2,3>::copy_new_triangulation_to_p4est (std::integral_constant<int, 2>)
{
const unsigned int dim = 2, spacedim = 3;
Assert (this->n_cells(0) > 0, ExcInternalError());
template <>
void
- Triangulation<3,3>::copy_new_triangulation_to_p4est (dealii::internal::int2type<3>)
+ Triangulation<3,3>::copy_new_triangulation_to_p4est (std::integral_constant<int, 3>)
{
const int dim = 3, spacedim = 3;
Assert (this->n_cells(0) > 0, ExcInternalError());
setup_coarse_cell_to_p4est_tree_permutation ();
}
- copy_new_triangulation_to_p4est (dealii::internal::int2type<dim>());
+ copy_new_triangulation_to_p4est (std::integral_constant<int, dim>());
try
{
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const int2type<1>)
+ const std::integral_constant<int, 1>)
{
return mg_level.dof_object.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
types::global_dof_index
- get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
+ get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const std::integral_constant<int, 1>)
{
return mg_faces.lines.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
types::global_dof_index
- get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
+ get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const std::integral_constant<int, 2>)
{
return mg_level.dof_object.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
types::global_dof_index
- get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const std::integral_constant<int, 1>)
{
return mg_faces.lines.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
types::global_dof_index
- get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const std::integral_constant<int, 2>)
{
return mg_faces.quads.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
types::global_dof_index
- get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<3>)
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const std::integral_constant<int, 3>)
{
return mg_level.dof_object.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<1, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<1> &mg_level, internal::DoFHandler::DoFFaces<1> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<1, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<1> &mg_level, internal::DoFHandler::DoFFaces<1> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 1>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 1>)
{
mg_faces.lines.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<2>)
+ void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 2>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 1>)
{
mg_faces.lines.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<2>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 2>)
{
mg_faces.quads.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<3>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const std::integral_constant<int, 3>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
return internal::DoFHandler::Implementation::get_dof_index (*this, *this->mg_levels[obj_level],
*this->mg_faces, obj_index,
fe_index, local_index,
- internal::int2type<structdim> ());
+ std::integral_constant<int, structdim> ());
}
fe_index,
local_index,
global_index,
- internal::int2type<structdim> ());
+ std::integral_constant<int, structdim> ());
}
types::global_dof_index
distribute_mg_dofs_on_cell (const typename DoFHandler<dim,spacedim>::level_cell_iterator &cell,
types::global_dof_index next_free_dof,
- const internal::int2type<1> &)
+ const std::integral_constant<int, 1> &)
{
// distribute dofs of vertices
if (cell->get_fe().dofs_per_vertex > 0)
types::global_dof_index
distribute_mg_dofs_on_cell (const typename DoFHandler<dim,spacedim>::level_cell_iterator &cell,
types::global_dof_index next_free_dof,
- const internal::int2type<2> &)
+ const std::integral_constant<int, 2> &)
{
if (cell->get_fe().dofs_per_vertex > 0)
// number dofs on vertices
types::global_dof_index
distribute_mg_dofs_on_cell (const typename DoFHandler<dim,spacedim>::level_cell_iterator &cell,
types::global_dof_index next_free_dof,
- const internal::int2type<3> &)
+ const std::integral_constant<int, 3> &)
{
if (cell->get_fe().dofs_per_vertex > 0)
// number dofs on vertices
(cell->level_subdomain_id() == level_subdomain_id))
next_free_dof
= Implementation::distribute_mg_dofs_on_cell<dim,spacedim> (cell, next_free_dof,
- internal::int2type<dim>());
+ std::integral_constant<int, dim>());
// finally restore the user flags
const_cast<dealii::Triangulation<dim,spacedim> &>(tria).load_user_flags(user_flags);
{
// dispatch to
// dimension-dependent functions
- return compare (c1, c2, dealii::internal::int2type<dim>());
+ return compare (c1, c2, std::integral_constant<int, dim>());
}
private:
template <class DHCellIterator, int xdim>
bool compare (const DHCellIterator &c1,
const DHCellIterator &c2,
- dealii::internal::int2type<xdim>) const
+ std::integral_constant<int, xdim>) const
{
const Tensor<1,dim> v1 = c1->center() - center;
const Tensor<1,dim> v2 = c2->center() - center;
template <class DHCellIterator>
bool compare (const DHCellIterator &,
const DHCellIterator &,
- dealii::internal::int2type<1>) const
+ std::integral_constant<int, 1>) const
{
Assert (dim >= 2,
ExcMessage ("This operation only makes sense for dim>=2."));
void
make_oldstyle_hanging_node_constraints (const dealii::DoFHandler<1> &,
ConstraintMatrix &,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
// nothing to do for regular dof handlers in 1d
}
void
make_oldstyle_hanging_node_constraints (const dealii::hp::DoFHandler<1> &/*dof_handler*/,
ConstraintMatrix &/*constraints*/,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
// we may have to compute constraints for vertices. gotta think about
// that a bit more
void
make_oldstyle_hanging_node_constraints (const dealii::DoFHandler<1,2> &,
ConstraintMatrix &,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
// nothing to do for regular dof handlers in 1d
}
void
make_oldstyle_hanging_node_constraints (const dealii::DoFHandler<1,3> &,
ConstraintMatrix &,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
// nothing to do for regular dof handlers in 1d
}
// void
// make_oldstyle_hanging_node_constraints (const dealii::DoFHandler<1,2> &,
// ConstraintMatrix &,
-// dealii::internal::int2type<1>)
+// std::integral_constant<int, 1>)
// {
// // nothing to do for regular
// // dof handlers in 1d
// void
// make_oldstyle_hanging_node_constraints (const dealii::hp::DoFHandler<1,2> &/*dof_handler*/,
// ConstraintMatrix &/*constraints*/,
-// dealii::internal::int2type<1>)
+// std::integral_constant<int, 1>)
// {
// // we may have to compute
// // constraints for
void
make_oldstyle_hanging_node_constraints (const DoFHandlerType &dof_handler,
ConstraintMatrix &constraints,
- dealii::internal::int2type<2>)
+ std::integral_constant<int, 2>)
{
const unsigned int dim = 2;
void
make_oldstyle_hanging_node_constraints (const DoFHandlerType &dof_handler,
ConstraintMatrix &constraints,
- dealii::internal::int2type<3>)
+ std::integral_constant<int, 3>)
{
const unsigned int dim = 3;
internal::
make_oldstyle_hanging_node_constraints (dof_handler,
constraints,
- dealii::internal::int2type<DoFHandlerType::dimension>());
+ std::integral_constant<int, DoFHandlerType::dimension>());
}
Point<Iterator::AccessorType::space_dimension>
get_face_midpoint (const Iterator &object,
const unsigned int f,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>)
{
return object->vertex(f);
}
Point<Iterator::AccessorType::space_dimension>
get_face_midpoint (const Iterator &object,
const unsigned int f,
- dealii::internal::int2type<2>)
+ std::integral_constant<int, 2>)
{
return object->line(f)->center();
}
Point<Iterator::AccessorType::space_dimension>
get_face_midpoint (const Iterator &object,
const unsigned int f,
- dealii::internal::int2type<3>)
+ std::integral_constant<int, 3>)
{
return object->face(f)->center();
}
diameter = std::min (diameter,
get_face_midpoint
(object, f,
- dealii::internal::int2type<structdim>())
+ std::integral_constant<int, structdim>())
.distance (get_face_midpoint
(object,
e,
- dealii::internal::int2type<structdim>())));
+ std::integral_constant<int, structdim>())));
return diameter;
}
void fix_up_faces (const dealii::Triangulation<1,1>::cell_iterator &,
- dealii::internal::int2type<1>,
- dealii::internal::int2type<1>)
+ std::integral_constant<int, 1>,
+ std::integral_constant<int, 1>)
{
// nothing to do for the faces of
// cells in 1d
// mid-points
template <int structdim, int spacedim>
void fix_up_faces (const typename dealii::Triangulation<structdim,spacedim>::cell_iterator &cell,
- dealii::internal::int2type<structdim>,
- dealii::internal::int2type<spacedim>)
+ std::integral_constant<int, structdim>,
+ std::integral_constant<int, spacedim>)
{
// see if we first can fix up
// some of the faces of this
internal::FixUpDistortedChildCells
::fix_up_faces (cell,
- dealii::internal::int2type<dim>(),
- dealii::internal::int2type<spacedim>());
+ std::integral_constant<int, dim>(),
+ std::integral_constant<int, spacedim>());
// fix up the object. we need to
// respect the manifold if the cell is
template <int dim>
bool
has_distorted_children (const typename Triangulation<dim,dim>::cell_iterator &cell,
- internal::int2type<dim>,
- internal::int2type<dim>)
+ std::integral_constant<int, dim>,
+ std::integral_constant<int, dim>)
{
Assert (cell->has_children(), ExcInternalError());
template <int dim, int spacedim>
bool
has_distorted_children (const typename Triangulation<dim,spacedim>::cell_iterator &,
- internal::int2type<dim>,
- internal::int2type<spacedim>)
+ std::integral_constant<int, dim>,
+ std::integral_constant<int, spacedim>)
{
return false;
}
if ((check_for_distorted_cells == true)
&&
has_distorted_children (cell,
- internal::int2type<dim>(),
- internal::int2type<spacedim>()))
+ std::integral_constant<int, dim>(),
+ std::integral_constant<int, spacedim>()))
cells_with_distorted_children.distorted_cells.push_back (cell);
// inform all listeners that cell refinement is done
triangulation.signals.post_refinement_on_cell(cell);
if ((check_for_distorted_cells == true)
&&
has_distorted_children (hex,
- internal::int2type<dim>(),
- internal::int2type<spacedim>()))
+ std::integral_constant<int, dim>(),
+ std::integral_constant<int, spacedim>()))
cells_with_distorted_children.distorted_cells.push_back (hex);
// note that the refinement flag was already cleared
Point<spacedim>
compute_projection (const Iterator &object,
const Point<spacedim> &y,
- internal::int2type<dim>)
+ std::integral_constant<int, dim>)
{
// let's look at this for
// simplicity for a quad (dim==2)
Point<1>
compute_projection (const Iterator &,
const Point<1> &y,
- /* it's a quad: */internal::int2type<2>)
+ /* it's a quad: */std::integral_constant<int, 2>)
{
return y;
}
Point<2>
compute_projection (const Iterator &,
const Point<2> &y,
- /* it's a quad: */internal::int2type<2>)
+ /* it's a quad: */std::integral_constant<int, 2>)
{
return y;
}
return y;
else
return internal::compute_projection (quad, y,
- /* it's a quad */internal::int2type<2>());
+ /* it's a quad */std::integral_constant<int, 2>());
}
MatrixType &, \
VectorType &, \
bool , \
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
#define MATRIX_FUNCTIONS(MatrixType) \
template void ConstraintMatrix:: \
distribute_local_to_global<MatrixType,Vector<MatrixType::value_type> > (const FullMatrix<MatrixType::value_type> &, \
MatrixType &, \
Vector<MatrixType::value_type> &, \
bool , \
- internal::bool2type<false>) const
+ std::integral_constant<bool, false>) const
#define BLOCK_MATRIX_VECTOR_FUNCTIONS(MatrixType, VectorType) \
template void ConstraintMatrix:: \
distribute_local_to_global<MatrixType,VectorType > (const FullMatrix<MatrixType::value_type> &, \
MatrixType &, \
VectorType &, \
bool , \
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
#define BLOCK_MATRIX_FUNCTIONS(MatrixType) \
template void ConstraintMatrix:: \
distribute_local_to_global<MatrixType,Vector<MatrixType::value_type> > (const FullMatrix<MatrixType::value_type> &, \
MatrixType &, \
Vector<MatrixType::value_type> &, \
bool , \
- internal::bool2type<true>) const
+ std::integral_constant<bool, true>) const
MATRIX_FUNCTIONS(SparseMatrix<double>);
MATRIX_FUNCTIONS(SparseMatrix<float>);
SparsityPatternType &, \
const bool, \
const Table<2,bool> &, \
- internal::bool2type<false>) const; \
+ std::integral_constant<bool, false>) const; \
template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
const std::vector<ConstraintMatrix::size_type> &, \
const std::vector<ConstraintMatrix::size_type> &, \
SparsityPatternType &, \
const bool, \
const Table<2,bool> &, \
- internal::bool2type<true>) const; \
+ std::integral_constant<bool, true>) const; \
template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
const std::vector<ConstraintMatrix::size_type> &, \
const std::vector<ConstraintMatrix::size_type> &, \
template void ConstraintMatrix::distribute_local_to_global<DiagonalMatrix<LinearAlgebra::distributed::T<S> >, LinearAlgebra::distributed::T<S> > (
const FullMatrix<S> &, const Vector<S>&, const std::vector< size_type > &,
DiagonalMatrix<LinearAlgebra::distributed::T<S> > &, LinearAlgebra::distributed::T<S>&,
- bool, dealii::internal::bool2type<false>) const;
+ bool, std::integral_constant<bool, false>) const;
template void ConstraintMatrix::distribute_local_to_global<DiagonalMatrix<LinearAlgebra::distributed::T<S> >, T<S> > (
const FullMatrix<S> &, const Vector<S>&, const std::vector< size_type > &,
DiagonalMatrix<LinearAlgebra::distributed::T<S> > &, T<S>&,
- bool, dealii::internal::bool2type<false>) const;
+ bool, std::integral_constant<bool, false>) const;
}