That option dates from the time I was trying to use DA to do structured<div>finite elements. I have since given up on this, and use a CartesianMesh</div><div>which has more support for this. Of course, eventually they should merge.</div>
<div><br></div><div> Matt<br><br><div class="gmail_quote">On Wed, Mar 24, 2010 at 4:56 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I know this was an absolutely horrendous API, but this patch completely<br>
removed the option which makes ex48 fail (and certainly some user code).<br>
Releaes-3.1 either needs to get a proper API for this, or the option<br>
needs to remain available. DMMGFormFunctionGhost is currently<br>
unreachable.<br>
<br>
(I'll add some ex48 tests to get them run in the nightlies, I should<br>
have done this long ago.)<br>
<br>
Jed<br>
<br>
<br>
changeset: 15513:e8e19296a5dc<br>
parent: 15511:2cefbdbb44a8<br>
user: Barry Smith <a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a><br>
date: Wed Mar 24 16:39:07 2010 -0500<br>
files: src/snes/utils/damg.c src/snes/utils/damgsnes.c<br>
description:<br>
fixed bug in DMMGCreate() that it ALWAYS used ghosted coloring even when it would not work.<br>
<br>
<br>
diff --git a/src/snes/utils/damg.c b/src/snes/utils/damg.c<br>
--- a/src/snes/utils/damg.c<br>
+++ b/src/snes/utils/damg.c<br>
@@ -65,7 +65,7 @@<br>
p[i]->user = user;<br>
p[i]->updatejacobianperiod = 1;<br>
p[i]->updatejacobian = PETSC_TRUE;<br>
- p[i]->isctype = IS_COLORING_GHOSTED; /* default to faster version, requires DMMGSetSNESLocal() */<br>
+ p[i]->isctype = IS_COLORING_GLOBAL;<br>
ierr = PetscStrallocpy(MATAIJ,&p[i]->mtype);CHKERRQ(ierr);<br>
}<br>
*dmmg = p;<br>
diff --git a/src/snes/utils/damgsnes.c b/src/snes/utils/damgsnes.c<br>
--- a/src/snes/utils/damgsnes.c<br>
+++ b/src/snes/utils/damgsnes.c<br>
@@ -942,16 +942,9 @@<br>
CHKMEMQ;<br>
ierr = PetscObjectGetCookie((PetscObject) dmmg[0]->dm,&cookie);CHKERRQ(ierr);<br>
if (cookie == DM_COOKIE) {<br>
- PetscTruth flag = PETSC_FALSE;<br>
- /* it makes no sense to use an option to decide on ghost, it depends on whether the<br>
- formfunctionlocal computes ghost values in F or not. */<br>
- ierr = PetscOptionsGetTruth(PETSC_NULL, "-dmmg_form_function_ghost", &flag,PETSC_NULL);CHKERRQ(ierr);<br>
- if (flag) {<br>
- ierr = DMMGSetSNES(dmmg,DMMGFormFunctionGhost,computejacobian);CHKERRQ(ierr);<br>
- } else {<br>
- ierr = DMMGSetSNES(dmmg,DMMGFormFunction,computejacobian);CHKERRQ(ierr);<br>
- }<br>
+ ierr = DMMGSetSNES(dmmg,DMMGFormFunction,computejacobian);CHKERRQ(ierr);<br>
for (i=0; i<nlevels; i++) {<br>
+ dmmg[i]->isctype = IS_COLORING_GHOSTED; /* switch to faster version since have local function evaluation */<br>
ierr = DASetLocalFunction((DA)dmmg[i]->dm,function);CHKERRQ(ierr);<br>
dmmg[i]->lfj = (PetscErrorCode (*)(void))function;<br>
ierr = DASetLocalJacobian((DA)dmmg[i]->dm,jacobian);CHKERRQ(ierr);<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>
</div>