[petsc-users] Vector form of TS solvers

Matthew Knepley knepley at gmail.com
Thu Jul 9 08:48:16 CDT 2015


On Wed, Jul 8, 2015 at 6:47 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Jul 8, 2015, at 6:25 PM, Chris Bradley <c.bradley at auckland.ac.nz>
> wrote:
> >
> > Dear PETSc,
> > I was wondering if you had any advice for using PETSc TS solvers to
> > solve a vector of ODEs. PETSc TS solvers solve DAEs of the form
> >
> > f(t,u,u^dot,a) = g(u,t) = 0 (for my case)
> >
> > where f is a user provided function, u is a vector of state variables,
> > u^dot a vector of the derivatives of state variables and a is a vector
> > of parameters (passed through the context).
> >
> > I need to solve a large number of these DAEs (one for every node in a
> > bigger finite element problem). Is there a vector form of the TS solvers
> > that can solve
> >
> > F(t,U,U^dot) = G(U,t) = 0
> >
> > where F is now a vector, U is a matrix of state variables and U^dot is a
> > matrix of the derivatives of U. Each row of the system corresponds to
> > the standard PETSc TS problem above and is independent of every other
> row.
>
>   No, there is not.
>
> >
> > If I understand the TS manual correctly then if I wanted to do this in
> > PETSc I would have to create a TS object and state and derivative
> > vectors objects for each row?
>
>    That is one way to do (if the size of the individual DAE is tiny (say
> 3) then yes it would use a great deal of "extra" memory). You could also
> have a single TS on each process that you "reused" for each "small problem"
> but how difficult this would be depends on how often you need to solve each
> of these (for example do you run it for many time steps and then move on to
> the next one or do you need to get out the result after each time step and
> use it in some other computation?).
>
> > All these PETSc objects for each row would
> > seem like a big overhead if there was a very large number of rows
> > (potentially tens of millions for my problem).
>
>   How many unknowns are there in each individual (uncoupled) DAE?
>
>   Is each individual DAE essentially the same DAE (with different
> parameter values etc?)
>
>   Is the Jacobian for each individual (uncoupled) DAE dense or sparse, if
> sparse is it the same for each one?


Another way to do it would be to use a big matrix of little, uncoupled
blocks. This has the downside that it ties
the whole solve to the worst performer (not an issue for explicit if the
CFL is the same), but on the other hand
its easy.

   Matt


>
>   Barry
>
> >
> > Thanks for your help
> > Chris
> > --
> > Chris Bradley
> > Auckland Bioengineering Institute,
> > University of Auckland,
> > Private Bag 92019,
> > New Zealand.
> >
> > Tel: +64 9 373 7599 xtn 89924
> > Fax: +64 9 367 7157
> >
>
>


-- 
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/20150709/7f450314/attachment.html>


More information about the petsc-users mailing list