Howdy,

I am implementing a matrix-free shift-and-invert eigensolver for Ax = λBx, 
where A and B are both symmetric positive-definite MatrixFreeOperators. In 
the inverse iteration, I need to do a linear solve with the matrix M = A - 
σB. Since I can't just pass A - σB into, say, SolverCG::solve(), I need to 
make a new operator for M, call it ShiftedOperator. I'm aware of two 
strategies to do this, assuming A and B already exist.

1. Derive a new class from MatrixFreeOperators::Base and implement 
apply_add() and calculate_diagonal() methods.

2. Create a new class, not derived from anything, that just stores const 
references to A and B and implements a vmult() method in order to meet the 
requirements of SolverCG::solve().

In both cases, the actual work is being forwarded to the A and B operators, 
and the new ShiftedOperator just combines those results as needed. Are 
there strong technical reasons to prefer one approach over the other? If I 
only need M for this linear solve, is there added value in having the full 
MatrixFreeOperator functionality? Perhaps I've overlooked something about 
preconditioning?

Cheers,
Nathaniel

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/0363cc1b-a052-4cce-9e71-13555f54ebf4n%40googlegroups.com.

Reply via email to