From a1d80282eca8df8c1c7eb521c48c3aa78ccdb389 Mon Sep 17 00:00:00 2001 From: paboyle Date: Tue, 10 Oct 2017 13:49:31 +0100 Subject: [PATCH] cb factorise --- lib/algorithms/iterative/SchurRedBlack.h | 27 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/lib/algorithms/iterative/SchurRedBlack.h b/lib/algorithms/iterative/SchurRedBlack.h index b6eab762..a309386b 100644 --- a/lib/algorithms/iterative/SchurRedBlack.h +++ b/lib/algorithms/iterative/SchurRedBlack.h @@ -53,13 +53,28 @@ Author: Peter Boyle * M psi = eta *********************** *Odd - * i) (D_oo)^{\dag} D_oo psi_o = (D_oo)^dag L^{-1} eta_o + * i) D_oo psi_o = L^{-1} eta_o * eta_o' = (D_oo)^dag (eta_o - Moe Mee^{-1} eta_e) + * (D_oo)^{\dag} D_oo psi_o = (D_oo)^dag L^{-1} eta_o *Even * ii) Mee psi_e + Meo psi_o = src_e * * => sol_e = M_ee^-1 * ( src_e - Meo sol_o )... * + * + * TODO: Other options: + * + * a) change checkerboards for Schur e<->o + * + * Left precon by Moo^-1 + * b) Doo^{dag} M_oo^-dag Moo^-1 Doo psi_0 = (D_oo)^dag M_oo^-dag Moo^-1 L^{-1} eta_o + * eta_o' = (D_oo)^dag M_oo^-dag Moo^-1 (eta_o - Moe Mee^{-1} eta_e) + * + * Right precon by Moo^-1 + * c) M_oo^-dag Doo^{dag} Doo Moo^-1 phi_0 = M_oo^-dag (D_oo)^dag L^{-1} eta_o + * eta_o' = M_oo^-dag (D_oo)^dag (eta_o - Moe Mee^{-1} eta_e) + * psi_o = M_oo^-1 phi_o + * TODO: Deflation */ namespace Grid { @@ -155,12 +170,10 @@ namespace Grid { ///////////////////////////////////////////////////// // Wrap the usual normal equations Schur trick ///////////////////////////////////////////////////// - SchurRedBlackDiagMooeeSolve(OperatorFunction &HermitianRBSolver) : - _HermitianRBSolver(HermitianRBSolver) - { - CBfactorise=0; - }; - + SchurRedBlackDiagMooeeSolve(OperatorFunction &HermitianRBSolver,int cb=0) : _HermitianRBSolver(HermitianRBSolver) + { + CBfactorise=cb; + }; template void operator() (Matrix & _Matrix,const Field &in, Field &out){