On Wed, Aug 28, 2013 at 8:46 AM, Roy Stogner <roystgnr@...>wrote:
>
> On Wed, 28 Aug 2013, Praveen C wrote:
>
> > I found that TransientExplicitSystem does not have any mass matrix. I
> wrote
> > my explicit dg code with TransientLinearImplicitSystem and it works.
> > However I end up computing mass matrix every time step
>
> Hmm... it would be easy enough for you to add an "already_computed"
> flag and then skip the mass matrix assembly after the first time it's
> turned on.
>
> > and I am not able to solve the matrices at element level.
>
> This, on the other hand, would not be so easy. Your proposed
> alternative looks uglier but is probably much more efficient.
>
> > I want to use the TransientExplicitSystem. I want to store the mass
> matrix
> > as
> >
> > std::vector< DenseMatrix<Real> >
> >
> > with one small mass matrix per element. I can then solve at element level
> > using cholesky_solve function available in DenseMatrix. But where do I
> > store this matrix?
>
> Personally, I'd make a subclass of TransientExplicitSystem with that
> as a member object; there are lots of good options though.
>
Are you planning to do adaptivity ever? The indexing into this std::vector
may get a bit tricky in that scenario...
Also, when running in parallel, you probably don't have to store mass
matrices for nonlocal elements, but if you use a vector you'll waste a lot
of space storing empty mass matrices.

John
