Matt and the rest of the PETSc developers,

This issue is not whether the TS is linear or nonlinear, but whether it is explicit or implicit. As far as I can tell only TS type Implicit-Explicit Runge Kutta makes use of the equation_type.

The equations types defined in petscts.h are:

  TS_EQ_UNSPECIFIED               = -1,
  TS_EQ_EXPLICIT                  = 0,
  TS_EQ_ODE_EXPLICIT              = 1,
  TS_EQ_DAE_SEMI_EXPLICIT_INDEX1  = 100,
  TS_EQ_DAE_SEMI_EXPLICIT_INDEX2  = 200,
  TS_EQ_DAE_SEMI_EXPLICIT_INDEX3  = 300,
  TS_EQ_DAE_SEMI_EXPLICIT_INDEXHI = 500,
  TS_EQ_IMPLICIT                  = 1000,
  TS_EQ_ODE_IMPLICIT              = 1001,
  TS_EQ_DAE_IMPLICIT_INDEX1       = 1100,
  TS_EQ_DAE_IMPLICIT_INDEX2       = 1200,
  TS_EQ_DAE_IMPLICIT_INDEX3       = 1300,
  TS_EQ_DAE_IMPLICIT_INDEXHI      = 1500

For PyLith we would like the TS implementation (type) to set the equation type so we can detect whether the user has specified an implicit or explicit algorithm and set the residual and Jacobian functions appropriately. For example, the user may want to solve the linear elasticity equation for a quasi-static problem with implicit time stepping or a dynamic problem with explicit time stepping.

Brad

On 12/03/2016 12:20 PM, Matthew Knepley wrote:
On Sat, Dec 3, 2016 at 2:18 PM, Barry Smith <[email protected]
<mailto:[email protected]>> wrote:


    > On Dec 3, 2016, at 11:58 AM, Matthew Knepley <[email protected] 
<mailto:[email protected]>> wrote:
    >
    > Right now, TS just leaves the equation type as undetermined, and never 
queries it except for the IMEX methods. This seems really strange to me. If we 
choose a linear TS solver, shouldn't it set the type to LINEAR, and likewise for 
nonlinear? Then a user could query this for information. We want to do just that 
in PyLith.

      Is your concern that many of the examples never bother to set the
    type?


Yes, since I want to query this to see what formulation the user expects.


    Or that not enough error checking is done that the set type works
    with solution method selected by the user?


No


    I think these are just oversights and you should go ahead and add
    these in the examples and code where appropriate.


Will do.

   Matt



       Barry

    >
    >    Matt
    >
    > --
    > 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

Reply via email to