petsc-3.10.4 2019-02-26
Report Typos and Errors


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.


#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; PetscErrorCode ierr;

PetscFunctionBegin; PetscValidHeaderSpecific(dm, DM_CLASSID, 1); if (!dm->setupcalled) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_ARG_WRONGSTATE,"DMSetUp() has not been called yet."); forest = (DM_Forest *) dm->data; ierr = (forest->getadaptivitysuccess)(dm,success);CHKERRQ(ierr); 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()






DMForestGetAdaptivitySuccess_pforest in src/dm/impls/forest/p4est/pforest.c

Index of all DMFOREST routines
Table of Contents for all manual pages
Index of all manual pages