← Back to team overview

dolfin team mailing list archive

Re: Many small dense matrices or one big sparse...

 

On Tuesday April 26 2011 10:41:50 Anders Logg wrote:
> On Tue, Apr 26, 2011 at 10:23:35AM -0700, Johan Hake wrote:
> > Hello!
> > 
> > (Sorry for the spamming, the previous email was prematurely sent...)
> > 
> > I am about to use DOLFIN to solve a set of distrinct ODEs. The ODEs are a
> > result of an operator splitting of a PDE, avoiding an expensive
> > reassemble each newton itteration.
> > 
> > Each ODE is potentially small but it needs to be solved for each node on
> > a mesh. Each one of the ODEs are decoupled from eachother.
> > 
> > What do you think would be fastest:
> >   1) To solve each small ODE using a DenseMatrix and a direct solver
> >   2) Put all the small dense matrices into a big sparse one and go for an
> >   
> >      iterative solver.
> > 
> > For the last one I need to construct my own assembler, iterating over the
> > degrees of freedom.
> 
> I think Option (1) since it can be easily and efficiently
> parallelized.

Ok.

> You could also consider checking out the ODECollection class.

Has this been tested, and are there any example of how to use the 
ODECollection? What ODE solver is used to solve the ODE. I do not need any 
multi adaptive ODE solver ;), just an implicit fast and rock stable one.

I guess I then just implement 

  virtual void f(const Array<real>& u, real t, Array<real>& y)

and potentially also:

   virtual void J(const Array<real>& dx, Array<real>& dy, 
                  const Array<real>& u, real t);

as I have my ODE in a symbolic language (SymPy) already, so it would be easy 
to generate that code.

Johan




Follow ups

References