[petsc-users] DMLocalToGlobal

Dharmendar Reddy dharmareddy84 at gmail.com
Tue Jan 21 21:52:41 CST 2014


Hello,
         I am trying to understand the usage rule for DMLocalToGlobalBegin/End.

I have a sequence of calls like this:

call DMLocalToGlobalBegin(dm, localLB, INSERT_VALUES, LB, ierr)    ----- (1)

call DMLocalToGlobalBegin(dm, localUB, INSERT_VALUES, UB, ierr)   ------ (2)

call DMLocalToGlobalEnd(dm, localLB, INSERT_VALUES, LB, ierr)    ------- (3)

call DMLocalToGlobalEnd(dm, localUB, INSERT_VALUES, UB, ierr)    --------(4)


call SNESVISetVariableBounds(snes,LB,UB, ierr)


SNES fails to run. I get function norm zero right in the first call
and simulation ends.


If i change the order of DM calls above to

1,3,2,4 then code works as expected


Does that mean the End call should occur immediately after Begin call ?


Thanks
Reddy


More information about the petsc-users mailing list