Hello all,

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:


template<class OutVector , class InVector >  
void  vmult (OutVector &dst, const InVector &src) const  
template<class OutVector , class InVector >  
void  Tvmult (OutVector &dst, const InVector &src) const  
template<class OutVector , class InVector >  
void  vmult_add (OutVector &dst, const InVector &src) const  
template<class OutVector , class InVector >  
void  Tvmult_add (OutVector &dst, const InVector &src) const
 

I have already coded my matrix vector product (and I guess I could add Tvmult 
as well if needed). I am aiming initially for a simple implicit Euler 
implementation where the system matrix is B = I + dt* inv(M) * A. I already 
have M and A, and code to compute B*v. Do i need to override other methods in 
my MatrixFree implementation? If I use something like Richardson iterations or 
CG in my solver, I guess I do not need to re-define Tvmult* (since it's not 
used), right?

many thanks,
-- Mihai


__________________________________________________
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

Reply via email to