[petsc-users] DAGlobalToLocalBegin()

Jed Brown jed at 59A2.org
Wed Mar 24 15:50:00 CDT 2010


On Wed, 24 Mar 2010 15:34:24 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> On Mar 24, 2010, at 2:41 PM, (Rebecca) Xuefei YUAN wrote:
> 
> > Hi,all,
> >
> > I have an error from
> >
> > ierr = DAGlobalToLocalBegin(dafield,X,INSERT_VALUES,localFIELD);  
> > CHKERRQ(ierr);
> >
> > where
> >
> > ierr = DMMGSetSNES(dmmg, FormFunction,0);CHKERRQ(ierr); is used for  
> > set up the SNES.
> >
> 
>      There is not enough information here to determine what is going  
> on. Where is X coming from? Where is dafield coming from?

Apply the attached patch and run snes ex25 on two procs.  The solution
vector is a local vector on the second entry to FormFunction (within
SNESDefaultComputeJacobianColor) when it would normally be a global one
(the residual vector is correctly global in both cases).  This vector is
created in DMMGComputeJacobianWithFD (damgsnes.c:362).  Note that
MatFDColoringApply_AIJ calls the function in a different place than the
local function (I think this is where all the logic is, FormFunction is
called from fdmatrix.c:680, FormFunctionLocal is called from
fdmatrix.c:588).

Note that this all works fine with -dmmg_iscoloring_type global.

Jed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iscoloring-ghosted.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100324/cce38202/attachment.bin>


More information about the petsc-users mailing list