PETSc version 3.17.4
Fix/Edit manual page

# DMForestGetAdaptivitySuccess

Return whether the requested adaptation (refinement, coarsening, repartitioning, etc.) was successful. PETSC_FALSE indicates that the post-adaptation forest is the same as the pre-adpatation forest. A requested adaptation may have been unsuccessful if, for example, the requested refinement would have exceeded the maximum refinement level.

### Synopsis

    #include "petscdmforest.h"
    #include "petscdm.h"
    #include "petscdmlabel.h"
    PetscErrorCode DMForestGetAdaptivitySuccess(DM dm, PetscBool *success)

Collective on dm

### Input Parameter

| dm | - the post-adaptation forest

### Output Parameter

| success | - PETSC_TRUE if the post-adaptation forest is different from the pre-adaptation forest.

### See Also

@*/
PetscErrorCode DMForestGetAdaptivitySuccess(DM dm, PetscBool *success) { DM_Forest *forest;

PetscFunctionBegin; PetscValidHeaderSpecific(dm, DM_CLASSID, 1); PetscCheck(dm->setupcalled,PetscObjectComm((PetscObject)dm),PETSC_ERR_ARG_WRONGSTATE,"DMSetUp() has not been called yet."); forest = (DM_Forest *) dm->data; PetscCall((forest->getadaptivitysuccess)(dm,success)); PetscFunctionReturn(0); }

/*@ DMForestSetComputeAdaptivitySF - During the pre-setup phase, set whether transfer PetscSFs should be computed relating the cells of the pre-adaptation forest to the post-adaptiation forest. After DMSetUp() is called, these transfer PetscSFs can be accessed with DMForestGetAdaptivitySF().

Logically collective on dm

### Input Parameters

| dm | - the post-adaptation forest
| computeSF | - default PETSC_TRUE

### See Also

DMForestGetComputeAdaptivitySF(), DMForestGetAdaptivitySF()

### Level

intermediate

### Location

src/dm/impls/forest/forest.c

### Implementations

DMForestGetAdaptivitySuccess_pforest in src/dm/impls/forest/p4est/pforest.h
Index of all DMFOREST routines
Table of Contents for all manual pages
Index of all manual pages