Program Design Question

Hong Zhang hzhang at mcs.anl.gov
Mon May 8 14:33:17 CDT 2006


Josh,

You may take a look at
~/src/ts/examples/tests/ex1.c, ex2.c

Let us know if you still have trouble.

Hong

On Mon, 8 May 2006, Joshua L. Adelman wrote:

> I am a new user of PETsc and was hoping that a more experienced
> member of the group could give me some insight as to what would be
> the proper formulation of the following problem in PETsc. I am
> attempting to solve the simple ODE:
> d{rho}/dt = K*rho
>
> Where K is a large rate matrix that doesn't depend on time within the
> simulation (i.e K(x)) and rho is a vector of densities. K is usually
> stiff as it contains terms that reflect both diffusive and chemical
> transitions, and its entries are sparse.   I am interested in the
> evolution of the system in time as well as the steady-state behavior.
> I have already implemented a version of the code in Matlab and am
> looking to write a PETsc version that can be run in parallel on a
> cluster. In my matlab code, setting up K is fast and the rate
> limiting step is actually doing the solve.
>
> Is the appropriate approach using the Backward Euler TS to solve the
> problem? Also it is unclear to me whether I need to employ
> Distributed Arrays (DA). I can provide more information about the
> nature of the simulation if necessary if it helps in answering my
> questions.
>
> Any suggestions/insight would be most appreciated.
>
> Josh
>
>




More information about the petsc-users mailing list