Skip to content

Commit

Permalink
Use int current_local_num_patches
Browse files Browse the repository at this point in the history
Casting the process patch count at the earliest opportunity.
  • Loading branch information
cburstedde authored Dec 14, 2023
1 parent 9f5d48e commit 93a2b9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/fclaw2d_convenience.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ fclaw2d_domain_new (p4est_wrap_t * wrap, sc_keyvalue_t * attributes)
int nb, nm, mirror_quadrant_num;
int block_nm_pre;
int local_num_patches;
int current_local_num_patches;
int tree_minlevel, local_minlevel;
int tree_maxlevel, local_maxlevel;
int levels[2], global_levels[2];
p4est_topidx_t vnum;
p4est_gloidx_t current_local_num_patches;
p4est_connectivity_t *conn = wrap->conn;
p4est_ghost_t *ghost = wrap->match_aux ? wrap->ghost_aux : wrap->ghost;
#ifdef FCLAW_ENABLE_DEBUG
Expand Down Expand Up @@ -281,12 +281,12 @@ fclaw2d_domain_new (p4est_wrap_t * wrap, sc_keyvalue_t * attributes)
domain->local_max_patches = 0;
for (i = 0; i < wrap->p4est->mpisize; ++i)
{
current_local_num_patches =
wrap->p4est->global_first_quadrant[i + 1] -
wrap->p4est->global_first_quadrant[i];
current_local_num_patches = (int)
(wrap->p4est->global_first_quadrant[i + 1] -
wrap->p4est->global_first_quadrant[i]);

domain->local_max_patches = SC_MAX (domain->local_max_patches,
(int) current_local_num_patches);
current_local_num_patches);
}

/* allocate ghost patches */
Expand Down

0 comments on commit 93a2b9a

Please sign in to comment.