[petsc-users] DMPlex and MatSetValuesLocal

Matthew Knepley knepley at gmail.com
Mon Dec 22 16:54:57 CST 2014


On Mon, Dec 15, 2014 at 8:33 PM, Abhyankar, Shrirang G. <abhyshr at mcs.anl.gov
> wrote:
>
> Matt,
>    Does MatSetValuesLocal work with a matrix that is created with DMPlex?
> Well, actually I am using DMNetwork. I am getting the following error
> because ISLocalToGlobalMapping mat->rmap->mapping and mat->cmap->mapping
> are not set on the matrix. Perhaps I am not setting up something correctly?
>

You are definitely right. I am not setting any L2G mapping. Do you want to
add it? I think you would
just call DMGetLocalToGlobalMapping() at the end of DMCreateMatrix_Plex()
and set it.

Personally, it would seem better for the Mat to create it on the fly when
someone uses that interface,
but that seems to mix levels too much.

   Matt


> Shri
>
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Null argument, when expecting valid pointer
> [0]PETSC ERROR: Null Object: Parameter # 1
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.5.2-1134-g7fbfed6  GIT
> Date: 2014-12-13 14:24:34 -0600
> [0]PETSC ERROR: ./DYN on a debug-master named Shrirangs-MacBook-Pro.local
> by Shri Mon Dec 15 20:11:18 2014
> [0]PETSC ERROR: Configure options --download-chaco --download-metis
> --download-parmetis --download-superlu_dist PETSC_ARCH=debug-master
> [0]PETSC ERROR: #1 ISLocalToGlobalMappingApply() line 396 in
> /Users/Shri/packages/petsc/src/vec/is/utils/isltog.c
> [0]PETSC ERROR: #2 MatSetValuesLocal() line 2017 in
> /Users/Shri/packages/petsc/src/mat/interface/matrix.c
> [0]PETSC ERROR: #3 DYNIJacobian() line 282 in
> /Users/Shri/Documents/tsopf-code/src/dyn/dyn.c
> [0]PETSC ERROR: #4 TSComputeIJacobian() line 763 in
> /Users/Shri/packages/petsc/src/ts/interface/ts.c
> [0]PETSC ERROR: #5 SNESTSFormJacobian_Theta() line 320 in
> /Users/Shri/packages/petsc/src/ts/impls/implicit/theta/theta.c
> [0]PETSC ERROR: #6 SNESTSFormJacobian() line 3552 in
> /Users/Shri/packages/petsc/src/ts/interface/ts.c
> [0]PETSC ERROR: #7 SNESComputeJacobian() line 2193 in
> /Users/Shri/packages/petsc/src/snes/interface/snes.c
> [0]PETSC ERROR: #8 SNESSolve_NEWTONLS() line 230 in
> /Users/Shri/packages/petsc/src/snes/impls/ls/ls.c
> [0]PETSC ERROR: #9 SNESSolve() line 3743 in
> /Users/Shri/packages/petsc/src/snes/interface/snes.c
> [0]PETSC ERROR: #10 TSStep_Theta() line 195 in
> /Users/Shri/packages/petsc/src/ts/impls/implicit/theta/theta.c
> [0]PETSC ERROR: #11 TSStep() line 2628 in
> /Users/Shri/packages/petsc/src/ts/interface/ts.c
> [0]PETSC ERROR: #12 TSSolve() line 2745 in
> /Users/Shri/packages/petsc/src/ts/interface/ts.c
> [0]PETSC ERROR: #13 DYNSolve() line 620 in
> /Users/Shri/Documents/tsopf-code/src/dyn/dyn.c
> [0]PETSC ERROR: #14 main() line 35 in
> /Users/Shri/Documents/tsopf-code/applications/dyn-main.c
> [0]PETSC ERROR: ----------------End of Error Message -------send entire
> error message to petsc-maint at mcs.anl.gov----------
> application called MPI_Abort(MPI_COMM_WORLD, 85) - process 0
>
> Shri
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141222/7f9f57c6/attachment.html>


More information about the petsc-users mailing list