Skip to content

Commit

Permalink
feature-wrap-partition: reinstate set_partitioning for backwards comp…
Browse files Browse the repository at this point in the history
…atibility
  • Loading branch information
hannesbrandt committed Jul 12, 2024
1 parent 21937f5 commit b1e6c0c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/p4est_to_p8est.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@
#define p4est_wrap_destroy p8est_wrap_destroy
#define p4est_wrap_set_hollow p8est_wrap_set_hollow
#define p4est_wrap_set_coarsen_delay p8est_wrap_set_coarsen_delay
#define p4est_wrap_set_partitioning p8est_wrap_set_partitioning
#define p4est_wrap_get_ghost p8est_wrap_get_ghost
#define p4est_wrap_get_mesh p8est_wrap_get_mesh
#define p4est_wrap_mark_refine p8est_wrap_mark_refine
Expand Down
8 changes: 8 additions & 0 deletions src/p4est_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,14 @@ p4est_wrap_set_coarsen_delay (p4est_wrap_t * pp,
}
}

/*** OUTDATED FUNCTION ***/
void
p4est_wrap_set_partitioning (p4est_wrap_t *pp, int partition_for_coarsening)
{
P4EST_ASSERT (pp != NULL);
pp->params.partition_for_coarsening = partition_for_coarsening;
}

p4est_ghost_t *
p4est_wrap_get_ghost (p4est_wrap_t * pp)
{
Expand Down
16 changes: 16 additions & 0 deletions src/p4est_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,22 @@ void p4est_wrap_set_coarsen_delay (p4est_wrap_t * pp,
int coarsen_delay,
int coarsen_affect);

/*** OUTDATED FUNCTION ***/
/** Set a parameter that ensures future partitions allow one level of coarsening.
* The partition_for_coarsening parameter is passed to \ref p4est_partition_ext
* in \ref p4est_wrap_partition.
* If not zero, all future calls to \ref p4est_wrap_partition will partition
* in a manner that allows one level of coarsening. This function does not
* automatically repartition the mesh, when switching partition_for_coarsening
* to a non-zero value.
* \param [in,out] pp A valid p4est_wrap structure.
* \param [in] partition_for_coarsening Boolean: If true, all future partitions
* of the wrap allow one level of coarsening.
* Suggested default: 1.
*/
void p4est_wrap_set_partitioning (p4est_wrap_t *pp,
int partition_for_coarsening);

/** Return the appropriate ghost layer.
* This function is necessary since two versions may exist simultaneously
* after refinement and before partition/complete.
Expand Down
16 changes: 16 additions & 0 deletions src/p8est_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,22 @@ void p8est_wrap_set_coarsen_delay (p8est_wrap_t * pp,
int coarsen_delay,
int coarsen_affect);

/*** OUTDATED FUNCTION ***/
/** Set a parameter that ensures future partitions allow one level of coarsening.
* The partition_for_coarsening parameter is passed to \ref p8est_partition_ext
* in \ref p8est_wrap_partition.
* If not zero, all future calls to \ref p8est_wrap_partition will partition
* in a manner that allows one level of coarsening. This function does not
* automatically repartition the mesh, when switching partition_for_coarsening
* to a non-zero value.
* \param [in,out] pp A valid p4est_wrap structure.
* \param [in] partition_for_coarsening Boolean: If true, all future partitions
* of the wrap allow one level of coarsening.
* Suggested default: 1.
*/
void p8est_wrap_set_partitioning (p8est_wrap_t *pp,
int partition_for_coarsening);

/** Return the appropriate ghost layer.
* This function is necessary since two versions may exist simultaneously
* after refinement and before partition/complete.
Expand Down

0 comments on commit b1e6c0c

Please sign in to comment.