[petsc-dev] Problem mixing sieve and TS
Blaise Bourdin
bourdin at lsu.edu
Wed Oct 26 15:19:37 CDT 2011
On Oct 26, 2011, at 1:57 PM, Matthew Knepley wrote:
> On Wed, Oct 26, 2011 at 6:45 PM, Blaise Bourdin <bourdin at lsu.edu> wrote:
> Hi,
>
> We are slowly progressing in our attempt to use TS to solve evolution problems with our Sieve-based f90 unstructured element code, but are having a small problem. When we pass a DMMesh object to TSSetDM, we get the following error in TSSetup:
>
> [0]PETSC ERROR: DMCreateGlobalVector_Mesh() line 359 in src/dm/impls/mesh/mesh.c Must set default section
>
> Program received signal SIGABRT, Aborted.
> 0x00007f0abdfdca75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> in ../nptl/sysdeps/unix/sysv/linux/raise.c
> (gdb) where
> #0 0x00007f0abdfdca75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1 0x00007f0abdfe05c0 in *__GI_abort () at abort.c:92
> #2 0x00007f0ac297207b in PetscAbortErrorHandler (comm=-2080374784, line=359, fun=0x7f0ac3a4dcf0 "DMCreateGlobalVector_Mesh", file=0x7f0ac3a4635e "mesh.c",
> dir=0x7f0ac3a46180 "src/dm/impls/mesh/", n=73, p=PETSC_ERROR_INITIAL, mess=0x7fff983d6080 "Must set default section", ctx=0x0) at errabort.c:62
> #3 0x00007f0ac296da19 in PetscError (comm=-2080374784, line=359, func=0x7f0ac3a4dcf0 "DMCreateGlobalVector_Mesh", file=0x7f0ac3a4635e "mesh.c", dir=0x7f0ac3a46180 "src/dm/impls/mesh/",
> n=73, p=PETSC_ERROR_INITIAL, mess=0x7f0ac3a464e8 "Must set default section") at err.c:356
> #4 0x00007f0ac2c5258c in DMCreateGlobalVector_Mesh (dm=0x20778a0, gvec=0x237d9c0) at mesh.c:359
> #5 0x00007f0ac2932b07 in DMCreateGlobalVector (dm=0x20778a0, vec=0x237d9c0) at dm.c:299
> #6 0x00007f0ac3143975 in SNESSetFunction (snes=0x237d7d0, r=0x0, func=0x7f0ac31f5f02 <SNESTSFormFunction(_p_SNES*, _p_Vec*, _p_Vec*, void*)>, ctx=0x2368a20) at snes.c:1153
> #7 0x00007f0ac31e5dc6 in TSSetIFunction (ts=0x2368a20, res=0x0, f=0x7f0ac32f0493 <ourifunction>, ctx=0x7fff983d6ee0) at ts.c:643
> #8 0x00007f0ac32f101e in tssetifunction_ (ts=0x7fff983d77d0, r=0x0, f=0x40dadb <ifunctionpoisson>, fP=0x7fff983d6ee0, ierr=0x7fff983d6bcc) at ztsf.c:158
> #9 0x000000000040e0d4 in tssetup (appctx=...) at m_TransientHeat.F90:376
> #10 0x000000000040b5fa in transientheat () at TransientHeat.F90:29
> #11 0x000000000047d3ea in main ()
> #12 0x00007f0abdfc7c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>,
> rtld_fini=<value optimized out>, stack_end=0x7fff983d7978) at libc-start.c:226
> #13 0x00000000004061b9 in _start ()
>
> My understanding is that we could address this problem in 2 ways
> 1. Associating a default section to the mesh
>
> This is not hard. You can just take your solution section and call DMMeshSetSection(mesh, "default", solution).
>
> The reason is that the DM wants to know how to create global vectors which hold solution values, etc. Somehow
> the data layout must be communicated to the DM.
That make sense, yes. I just could not remember how to do that.
Thanks Matt,
Blaise
>
> Matt
>
> 2. Allocating the Solution vector, Jacobian matrix and so on by hand using the proper sieve--based functions, then passing them to the TS solver.
> but I have no idea how to do either one.
>
> Any suggestion? FWIW, in this test, both the IJacobian matrix and RHS Vector are constant, but this will not be the case once in the future.
>
> Something else bugging me is that the Jacobian function does not seem to be ever called (even in ex22 from src/ts/examples/tutorial). Is that expected? Is there a written description (or link to the literature) for each of the ODE solvers implemented in TS?
>
> Blaise
>
>
>
> --
> Department of Mathematics and Center for Computation & Technology
> Louisiana State University, Baton Rouge, LA 70803, USA
> Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
>
>
>
>
>
>
>
>
>
>
> --
> 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
--
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111026/fd808504/attachment.html>
More information about the petsc-dev
mailing list