Hello Martin,
OK - I will inherit from Subscriptor like in the example step-37, and define only the vmult( ) operation. What if I want to use a SSOR-type preconditioner for my matrix? Are there any additional operations that need to be implemented for my MatrixFree class? Thanks for the advice! Best, Mihai ________________________________ Von: Martin Kronbichler <[email protected]> An: mihai alexe <[email protected]> CC: deal.ii <[email protected]> Gesendet: Montag, den 22. März 2010, 12:03:40 Uhr Betreff: Re: [deal.II] matrix-free implicit timestepping Dear Mihai, > > I am trying to code up an implicit method for a DG discretization, and > came upon example 37 in the tutorial programs. Is there a simpler way > to implement the matrix free product for a solver? That is, suppose I > define my own class MatrixFree that inherits from SparseMatrix<double> > and I only override the operations below: I don't see the point in letting MatrixFree inherit from SparseMatrix<double> because there will be nothing in common with the matrix. A solver actually just needs an operation vmult(), nothing else. In step-37, the operation Tvmult() is needed for implementing the multigrid preconditioner. So you would override the only function that is needed if you use SparseMatrix as base class. I'd start off with a class like in step-37 and throw away everything that you do not need, e.g. the parallelism with WorkStream, the initialize function, and the computation of the diagonal (which is present in step-37 because the Chebyshev smoother for multigrid needs to use diag(row)). Best, Martin __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
