1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMFOREST/DMForestGetAdaptivitySuccess.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMForestGetAdaptivitySuccess</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.10.3 2018-12-18</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.10.3 v3.10.3 docs/manualpages/DMFOREST/DMForestGetAdaptivitySuccess.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMForestGetAdaptivitySuccess"><H1>DMForestGetAdaptivitySuccess</H1></A>
Return whether the requested adaptation (refinement, coarsening, repartitioning, etc.) was successful. <A HREF="../Sys/PETSC_FALSE.html#PETSC_FALSE">PETSC_FALSE</A> 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.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdmforest.h"
#include "petscdm.h"
#include "petscdmlabel.h"
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMFOREST/DMForestGetAdaptivitySuccess.html#DMForestGetAdaptivitySuccess">DMForestGetAdaptivitySuccess</A>(<A HREF="../DM/DM.html#DM">DM</A> dm, <A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A> *success)
</PRE>
Collective on dm
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<P>
<DT><B>dm </B> -the post-adaptation forest
<br>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<P>
<DT><B>success </B> -<A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A> if the post-adaptation forest is different from the pre-adaptation forest.
<br>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
@*/
<BR><A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMFOREST/DMForestGetAdaptivitySuccess.html#DMForestGetAdaptivitySuccess">DMForestGetAdaptivitySuccess</A>(<A HREF="../DM/DM.html#DM">DM</A> dm, <A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A> *success)
{
DM_Forest *forest;
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> ierr;
<P>
<A HREF="../Sys/PetscFunctionBegin.html#PetscFunctionBegin">PetscFunctionBegin</A>;
PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
if (!dm->setupcalled) <A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</A>(<A HREF="../Sys/PetscObjectComm.html#PetscObjectComm">PetscObjectComm</A>((<A HREF="../Sys/PetscObject.html#PetscObject">PetscObject</A>)dm),PETSC_ERR_ARG_WRONGSTATE,"<A HREF="../DM/DMSetUp.html#DMSetUp">DMSetUp</A>() has not been called yet.");
forest = (DM_Forest *) dm->data;
ierr = (forest->getadaptivitysuccess)(dm,success);<A HREF="../Sys/CHKERRQ.html#CHKERRQ">CHKERRQ</A>(ierr);
<A HREF="../Sys/PetscFunctionReturn.html#PetscFunctionReturn">PetscFunctionReturn</A>(0);
}
<P>
/*@
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 <A HREF="../DM/DMSetUp.html#DMSetUp">DMSetUp</A>() is called, these transfer PetscSFs can be accessed with <A HREF="../DMFOREST/DMForestGetAdaptivitySF.html#DMForestGetAdaptivitySF">DMForestGetAdaptivitySF</A>().
<P>
Logically collective on dm
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dm </B></TD><TD>- the post-adaptation forest
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>computeSF </B></TD><TD>- default <A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A>
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DMFOREST/DMForestGetComputeAdaptivitySF.html#DMForestGetComputeAdaptivitySF">DMForestGetComputeAdaptivitySF</A>(), <A HREF="../DMFOREST/DMForestGetAdaptivitySF.html#DMForestGetAdaptivitySF">DMForestGetAdaptivitySF</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>intermediate<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/impls/forest/forest.c.html#DMForestGetAdaptivitySuccess">src/dm/impls/forest/forest.c</A>
<P><H3><FONT COLOR="CC3333">Implementations</FONT></H3><A HREF="../../../src/dm/impls/forest/p4est/pforest.c.html#DMForestGetAdaptivitySuccess_pforest">DMForestGetAdaptivitySuccess_pforest in src/dm/impls/forest/p4est/pforest.c</A><BR>
<BR><A HREF="./index.html">Index of all DMFOREST routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|