typename dealii::internal::p4est::iter<dim>::corner_info *info,
void * user_data)
{
- int i, j;
- int nsides = info->sides.elem_count;
- typename dealii::internal::p4est::iter<dim>::corner_side *sides =
- (typename dealii::internal::p4est::iter<dim>::corner_side
- *)(info->sides.array);
+ int i, j;
+ int nsides = info->sides.elem_count;
+ auto *sides = reinterpret_cast<
+ typename dealii::internal::p4est::iter<dim>::corner_side *>(
+ info->sides.array);
FindGhosts<dim, spacedim> *fg =
static_cast<FindGhosts<dim, spacedim> *>(user_data);
sc_array_t *subids = fg->subids;
return;
}
- nsubs = (int)subids->elem_count;
- subdomain_ids = (dealii::types::subdomain_id *)(subids->array);
+ nsubs = static_cast<int>(subids->elem_count);
+ subdomain_ids =
+ reinterpret_cast<dealii::types::subdomain_id *>(subids->array);
for (i = 0; i < nsides; i++)
{
typename dealii::internal::p4est::iter<dim>::edge_info *info,
void * user_data)
{
- int i, j, k;
- int nsides = info->sides.elem_count;
- typename dealii::internal::p4est::iter<dim>::edge_side *sides =
- (typename dealii::internal::p4est::iter<dim>::edge_side *)(info->sides
- .array);
- FindGhosts<dim, spacedim> *fg =
- static_cast<FindGhosts<dim, spacedim> *>(user_data);
+ int i, j, k;
+ int nsides = info->sides.elem_count;
+ auto *sides = reinterpret_cast<
+ typename dealii::internal::p4est::iter<dim>::edge_side *>(
+ info->sides.array);
+ auto * fg = static_cast<FindGhosts<dim, spacedim> *>(user_data);
sc_array_t *subids = fg->subids;
const dealii::parallel::distributed::Triangulation<dim, spacedim>
* triangulation = fg->triangulation;
return;
}
- nsubs = (int)subids->elem_count;
- subdomain_ids = (dealii::types::subdomain_id *)(subids->array);
+ nsubs = static_cast<int>(subids->elem_count);
+ subdomain_ids =
+ reinterpret_cast<dealii::types::subdomain_id *>(subids->array);
for (i = 0; i < nsides; i++)
{
typename dealii::internal::p4est::iter<dim>::face_info *info,
void * user_data)
{
- int i, j, k;
- int nsides = info->sides.elem_count;
- typename dealii::internal::p4est::iter<dim>::face_side *sides =
- (typename dealii::internal::p4est::iter<dim>::face_side *)(info->sides
- .array);
+ int i, j, k;
+ int nsides = info->sides.elem_count;
+ auto *sides = reinterpret_cast<
+ typename dealii::internal::p4est::iter<dim>::face_side *>(
+ info->sides.array);
FindGhosts<dim, spacedim> *fg =
static_cast<FindGhosts<dim, spacedim> *>(user_data);
sc_array_t *subids = fg->subids;
return;
}
- nsubs = (int)subids->elem_count;
- subdomain_ids = (dealii::types::subdomain_id *)(subids->array);
+ nsubs = static_cast<int>(subids->elem_count);
+ subdomain_ids =
+ reinterpret_cast<dealii::types::subdomain_id *>(subids->array);
for (i = 0; i < nsides; i++)
{
types::subdomain_id ghost_owner = 0;
typename dealii::internal::p4est::types<dim>::topidx ghost_tree = 0;
- for (unsigned int g_idx = 0;
- g_idx < parallel_ghost->ghosts.elem_count;
+ for (int g_idx = 0; static_cast<unsigned int>(g_idx) <
+ parallel_ghost->ghosts.elem_count;
++g_idx)
{
- while (
- g_idx >=
- (unsigned int)parallel_ghost->proc_offsets[ghost_owner + 1])
+ while (g_idx >= parallel_ghost->proc_offsets[ghost_owner + 1])
++ghost_owner;
- while (g_idx >=
- (unsigned int)parallel_ghost->tree_offsets[ghost_tree + 1])
+ while (g_idx >= parallel_ghost->tree_offsets[ghost_tree + 1])
++ghost_tree;
quadr = static_cast<