[petsc-users] Solution update is not working in TS
Konstantinos Kontzialis
ckontzialis at lycos.com
Mon Nov 7 12:55:55 CST 2011
On 11/07/2011 04:50 PM, petsc-users-request at mcs.anl.gov wrote:
> Send petsc-users mailing list submissions to
> petsc-users at mcs.anl.gov
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.mcs.anl.gov/mailman/listinfo/petsc-users
> or, via email, send a message with subject or body 'help' to
> petsc-users-request at mcs.anl.gov
>
> You can reach the person managing the list at
> petsc-users-owner at mcs.anl.gov
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of petsc-users digest..."
>
>
> Today's Topics:
>
> 1. Extremal Singular Values (behzad baghapour)
> 2. Re: about Singular value (Matthew Knepley)
> 3. Solution update is not working in TS (Konstantinos Kontzialis)
> 4. Re: TS solution (Jed Brown)
> 5. Re: Solution update is not working in TS (Jed Brown)
> 6. Re: Petsc-3.2 with superlu_dist building error (Ping Rong)
> 7. Re: Petsc-3.2 with superlu_dist building error (Jed Brown)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 7 Nov 2011 16:05:58 +0330
> From: behzad baghapour<behzad.baghapour at gmail.com>
> Subject: [petsc-users] Extremal Singular Values
> To: PETSc users list<petsc-users at mcs.anl.gov>
> Message-ID:
> <CA+jOtDKkftQb=A1dx6quevgGN0HT8uw5-sKL6h5+BbALRg5SDg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Is there any link with "Incremental Condition Estimation" (ICE) developed
> by Bischof in LAPACK with Petsc to evaluate Extremal singular values?
>
> Thanks, Behzad.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111107/dc4064bc/attachment-0001.htm>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 7 Nov 2011 13:16:43 +0000
> From: Matthew Knepley<knepley at gmail.com>
> Subject: Re: [petsc-users] about Singular value
> To: PETSc users list<petsc-users at mcs.anl.gov>
> Message-ID:
> <CAMYG4GmRhn3jeAmv3sGw4kGfQbf=2KyX1xG0nK51g+NoLZf7Vg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Mon, Nov 7, 2011 at 9:06 AM, behzad baghapour<behzad.baghapour at gmail.com
>> wrote:
>> Is there any link with "Incremental Condition Estimation" (ICE) developed
>> by Bischof in LAPACK with Petsc to evaluate Extremal singular values?
>>
> We do not use this (it is intended for triangular matrices). It may be
> tenuously connected. He says he is
> approximating the secular equation with rational functions, in some sense
> we are approximating the
> characteristic equation with polynomials (Krylov).
>
> Matt
>
>
>> Thanks,
>> B.B.
>>
>>
>>
>>
>> On Sun, Oct 30, 2011 at 6:49 PM, Jed Brown<jedbrown at mcs.anl.gov> wrote:
>>
>>> On Sun, Oct 30, 2011 at 05:17, Matthew Knepley<knepley at gmail.com> wrote:
>>>
>>>> We call LAPACK SVD on the Hermitian matrix made by the Krylov method.
>>>
>>> GMRES builds a Hessenberg matrix.
>>>
>>
>>
>
Dear Jed,
I perform a simulation over a cylinder at M=0.14 using the Euler
equations. The explicit part now works . I use the Vec vector in my
monitor routine and I get the results.
But, when I go for the implicit solution I code:
ierr = TSCreate(sys.comm, &sys.ts);
CHKERRQ(ierr);
ierr = TSSetProblemType(sys.ts, TS_NONLINEAR);
CHKERRQ(ierr);
ierr = TSSetSolution(sys.ts, sys.gsv);
CHKERRQ(ierr);
ierr = TSSetIFunction(sys.ts, PETSC_NULL, base_residual_implicit,
&sys);
CHKERRQ(ierr);
ierr = TSGetSNES(sys.ts, &sys.snes);
CHKERRQ(ierr);
ierr = MatCreateSNESMF(sys.snes, &sys.J);
CHKERRQ(ierr);
ISColoring iscoloring;
MatFDColoring matfdcoloring;
ierr = jacobian_diff_numerical(sys, &sys.P);
CHKERRQ(ierr);
ierr = MatGetColoring(sys.P, MATCOLORINGSL, &iscoloring);
CHKERRQ(ierr);
ierr = MatFDColoringCreate(sys.P, iscoloring, &matfdcoloring);
CHKERRQ(ierr);
ierr = MatFDColoringSetFunction(matfdcoloring,
(PetscErrorCode(*)(void)) SNESTSFormFunction, sys.ts);
CHKERRQ(ierr);
ierr = MatFDColoringSetFromOptions(matfdcoloring);
CHKERRQ(ierr);
ierr = ISColoringDestroy(&iscoloring);
CHKERRQ(ierr);
ierr = SNESSetJacobian(sys.snes, sys.J, sys.P,
SNESDefaultComputeJacobianColor, matfdcoloring);
CHKERRQ(ierr);
ierr = TSSetInitialTimeStep(sys.ts, sys.con->tm, sys.con->dt);
CHKERRQ(ierr);
ierr = TSSetDuration(sys.ts, 100e+6, sys.con->etime);
CHKERRQ(ierr);
ierr = TSMonitorSet(sys.ts, monitor, &sys, PETSC_NULL);
CHKERRQ(ierr);
ierr = TSSetFromOptions(sys.ts);
CHKERRQ(ierr);
ierr = TSSolve(sys.ts, sys.gsv, &sys.con->etime);
CHKERRQ(ierr);
and I run with:
mpiexec -n 8 valgrind ./hoac cylinder -llf_flux -n_out 500 -end_time
50.0 -dt 2.0e-1 -ts_type beuler -gl -implicit
and I get:
**********************************************************************
METIS 4.0.3 Copyright 1998, Regents of the University of Minnesota
Graph Information ---------------------------------------------------
Name: mesh.graph, #Vertices: 400, #Edges: 780, #Parts: 8
Recursive Partitioning... -------------------------------------------
8-way Edge-Cut: 102, Balance: 1.00
Timing Information --------------------------------------------------
I/O: 0.000
Partitioning: 0.000 (PMETIS time)
Total: 0.000
**********************************************************************
Approximation order = 1
# DOF = 6080
# nodes in mesh = 400
# elements in mesh = 380
Euler solution
Using LLF flux
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Object is in wrong state!
[0]PETSC ERROR: Must call SNESSetFunction() or SNESSetDM() first
More information about the petsc-users
mailing list