<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 15, 2014 at 8:33 PM, Abhyankar, Shrirang G. <span dir="ltr"><<a href="mailto:abhyshr@mcs.anl.gov" target="_blank">abhyshr@mcs.anl.gov</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matt,<br>
Does MatSetValuesLocal work with a matrix that is created with DMPlex?<br>
Well, actually I am using DMNetwork. I am getting the following error<br>
because ISLocalToGlobalMapping mat->rmap->mapping and mat->cmap->mapping<br>
are not set on the matrix. Perhaps I am not setting up something correctly?<br></blockquote><div><br></div><div>You are definitely right. I am not setting any L2G mapping. Do you want to add it? I think you would</div><div>just call DMGetLocalToGlobalMapping() at the end of DMCreateMatrix_Plex() and set it.</div><div><br></div><div>Personally, it would seem better for the Mat to create it on the fly when someone uses that interface,</div><div>but that seems to mix levels too much.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Shri<br>
<br>
[0]PETSC ERROR: --------------------- Error Message<br>
--------------------------------------------------------------<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer<br>
[0]PETSC ERROR: Null Object: Parameter # 1<br>
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
for trouble shooting.<br>
[0]PETSC ERROR: Petsc Development GIT revision: v3.5.2-1134-g7fbfed6 GIT<br>
Date: 2014-12-13 14:24:34 -0600<br>
[0]PETSC ERROR: ./DYN on a debug-master named Shrirangs-MacBook-Pro.local<br>
by Shri Mon Dec 15 20:11:18 2014<br>
[0]PETSC ERROR: Configure options --download-chaco --download-metis<br>
--download-parmetis --download-superlu_dist PETSC_ARCH=debug-master<br>
[0]PETSC ERROR: #1 ISLocalToGlobalMappingApply() line 396 in<br>
/Users/Shri/packages/petsc/src/vec/is/utils/isltog.c<br>
[0]PETSC ERROR: #2 MatSetValuesLocal() line 2017 in<br>
/Users/Shri/packages/petsc/src/mat/interface/matrix.c<br>
[0]PETSC ERROR: #3 DYNIJacobian() line 282 in<br>
/Users/Shri/Documents/tsopf-code/src/dyn/dyn.c<br>
[0]PETSC ERROR: #4 TSComputeIJacobian() line 763 in<br>
/Users/Shri/packages/petsc/src/ts/interface/ts.c<br>
[0]PETSC ERROR: #5 SNESTSFormJacobian_Theta() line 320 in<br>
/Users/Shri/packages/petsc/src/ts/impls/implicit/theta/theta.c<br>
[0]PETSC ERROR: #6 SNESTSFormJacobian() line 3552 in<br>
/Users/Shri/packages/petsc/src/ts/interface/ts.c<br>
[0]PETSC ERROR: #7 SNESComputeJacobian() line 2193 in<br>
/Users/Shri/packages/petsc/src/snes/interface/snes.c<br>
[0]PETSC ERROR: #8 SNESSolve_NEWTONLS() line 230 in<br>
/Users/Shri/packages/petsc/src/snes/impls/ls/ls.c<br>
[0]PETSC ERROR: #9 SNESSolve() line 3743 in<br>
/Users/Shri/packages/petsc/src/snes/interface/snes.c<br>
[0]PETSC ERROR: #10 TSStep_Theta() line 195 in<br>
/Users/Shri/packages/petsc/src/ts/impls/implicit/theta/theta.c<br>
[0]PETSC ERROR: #11 TSStep() line 2628 in<br>
/Users/Shri/packages/petsc/src/ts/interface/ts.c<br>
[0]PETSC ERROR: #12 TSSolve() line 2745 in<br>
/Users/Shri/packages/petsc/src/ts/interface/ts.c<br>
[0]PETSC ERROR: #13 DYNSolve() line 620 in<br>
/Users/Shri/Documents/tsopf-code/src/dyn/dyn.c<br>
[0]PETSC ERROR: #14 main() line 35 in<br>
/Users/Shri/Documents/tsopf-code/applications/dyn-main.c<br>
[0]PETSC ERROR: ----------------End of Error Message -------send entire<br>
error message to petsc-maint@mcs.anl.gov----------<br>
application called MPI_Abort(MPI_COMM_WORLD, 85) - process 0<br>
<br>
Shri<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>