[petsc-users] TS and petscFE -unable to access u_t

Matthew Knepley knepley at gmail.com
Mon Aug 8 10:23:40 CDT 2016


On Mon, Aug 8, 2016 at 10:15 AM, Maximilian Hartig <imilian.hartig at gmail.com
> wrote:

> Thank you,
>
> I used these routines to setup a CN type TS. The problem I face now is
> that I seem to be unable to access the temporal derivatives u_t[..] for the
> definition of the residuals. I get a segmentation violation inside the
>  PetscFEIntegrateResidual routine whenever I try to. I have attached the
> error message below.
> Also, I am wondering whether it is possible to update the neumann boundary
> condition of the FE object for each timestep. This would be useful for
> coupling purposes.
>

Could you send you example so I can run it myself?

  Thanks,

     Matt


> Thank you,
>
> Max
>
>
> [0]PETSC ERROR: ------------------------------
> ------------------------------------------
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
> [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/
> documentation/faq.html#valgrind
> [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS
> X to find memory corruption errors
> [0]PETSC ERROR: likely location of problem given in stack below
> [0]PETSC ERROR: ---------------------  Stack Frames
> ------------------------------------
> [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not
> available,
> [0]PETSC ERROR:       INSTEAD the line number of the start of the function
> [0]PETSC ERROR:       is given.
> [0]PETSC ERROR: [0] PetscFEIntegrateResidual_Basic line 3503
> /Users/maxhartig/PETSc/src/dm/dt/interface/dtfe.c
> [0]PETSC ERROR: [0] PetscFEIntegrateResidual line 5753
> /Users/maxhartig/PETSc/src/dm/dt/interface/dtfe.c
> [0]PETSC ERROR: [0] DMPlexComputeResidual_Internal line 1706
> /Users/maxhartig/PETSc/src/snes/utils/dmplexsnes.c
> [0]PETSC ERROR: [0] DMPlexSNESComputeResidualFEM line 2152
> /Users/maxhartig/PETSc/src/snes/utils/dmplexsnes.c
> [0]PETSC ERROR: [0] SNESComputeFunction_DMLocal line 65
> /Users/maxhartig/PETSc/src/snes/utils/dmlocalsnes.c
> [0]PETSC ERROR: [0] SNES user function line 2144
> /Users/maxhartig/PETSc/src/snes/interface/snes.c
> [0]PETSC ERROR: [0] SNESComputeFunction line 2129
> /Users/maxhartig/PETSc/src/snes/interface/snes.c
> [0]PETSC ERROR: [0] SNESSolve_NEWTONLS line 150 /Users/maxhartig/PETSc/src/
> snes/impls/ls/ls.c
> [0]PETSC ERROR: [0] SNESSolve line 3961 /Users/maxhartig/PETSc/src/
> snes/interface/snes.c
> [0]PETSC ERROR: [0] TS_SNESSolve line 188 /Users/maxhartig/PETSc/src/ts/
> impls/implicit/theta/theta.c
> [0]PETSC ERROR: [0] TSStep_Theta line 206 /Users/maxhartig/PETSc/src/ts/
> impls/implicit/theta/theta.c
> [0]PETSC ERROR: [0] TSStep line 3700 /Users/maxhartig/PETSc/src/ts/
> interface/ts.c
> [0]PETSC ERROR: [0] TSSolve line 3921 /Users/maxhartig/PETSc/src/ts/
> interface/ts.c
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Signal received
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.2, unknown
> [0]PETSC ERROR: Configure options --download-triangle
> [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
> application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59
>
> On 03 Aug 2016, at 16:44, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Tue, Aug 2, 2016 at 8:22 AM, Maximilian Hartig <
> imilian.hartig at gmail.com> wrote:
>
>> Hello all,
>>
>> I would like to run a transient problem with PetscFE. Example ex11.c
>> seems relevant since it uses the PestcFV context to create boundary
>> conditions and RHS Functions for the TS.
>> Is there an easy way to do transient analysis with TS and petscFE or do I
>> have to code my own time-stepping routine?
>>
>
> You can use
>
>     ierr = DMTSSetBoundaryLocal(adaptedDM,  DMPlexTSComputeBoundary,
> user);CHKERRQ(ierr);
>     ierr = DMTSSetIFunctionLocal(adaptedDM, DMPlexTSComputeIFunctionFEM,
> user);CHKERRQ(ierr);
>     ierr = DMTSSetIJacobianLocal(adaptedDM, DMPlexTSComputeIJacobianFEM,
> user);CHKERRQ(ierr);
>
> I have been meaning to write a heat equation example, but I have not
> finished yet,
>
>   Thanks,
>
>      Matt
>
>
>> Thanks,
>> Max
>
>
>
>
> --
> 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
>
>
>


-- 
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/20160808/dae12a13/attachment-0001.html>


More information about the petsc-users mailing list