@@ -268,6 +268,7 @@ double gauge_force(Real eps) {
268268// All called by assemble_fermion_force below
269269// First Q-closed piece: chi_ab D_c chi_de epsilon_{abcde}
270270// Note factor of -1/2
271+ #ifdef QCLOSED
271272void F1Q (matrix * plaq_sol [NPLAQ ], matrix * plaq_psol [NPLAQ ]) {
272273 register int i , opp_a , opp_b ;
273274 register site * s ;
@@ -359,13 +360,15 @@ void F1Q(matrix *plaq_sol[NPLAQ], matrix *plaq_psol[NPLAQ]) {
359360 flip = (flip + 1 ) % 2 ;
360361 }
361362}
363+ #endif
362364// -----------------------------------------------------------------
363365
364366
365367
366368// -----------------------------------------------------------------
367369// Second Q-closed piece
368370// Note factor of -1/2
371+ #ifdef QCLOSED
369372void F2Q (matrix * plaq_sol [NPLAQ ], matrix * plaq_psol [NPLAQ ]) {
370373 register int i , opp_a , opp_b ;
371374 register site * s ;
@@ -457,6 +460,7 @@ void F2Q(matrix *plaq_sol[NPLAQ], matrix *plaq_psol[NPLAQ]) {
457460 flip = (flip + 1 ) % 2 ;
458461 }
459462}
463+ #endif
460464// -----------------------------------------------------------------
461465
462466
@@ -469,6 +473,7 @@ void F2Q(matrix *plaq_sol[NPLAQ], matrix *plaq_psol[NPLAQ]) {
469473// Assume compute_plaqdet() has already been run
470474// Appropriate adjoints set up in assemble_fermion_force
471475// A bit more code reuse may be possible
476+ #ifdef SV
472477void detF (matrix * eta , matrix * psi [NUMLINK ], int sign ) {
473478 register int i ;
474479 register site * s ;
@@ -644,6 +649,7 @@ void detF(matrix *eta, matrix *psi[NUMLINK], int sign) {
644649 free (inv_term );
645650 free (adj_term );
646651}
652+ #endif
647653// -----------------------------------------------------------------
648654
649655
@@ -686,6 +692,13 @@ void assemble_fermion_force(Twist_Fermion *sol, Twist_Fermion *psol) {
686692 mat_copy (& (sol [i ].Fplaq [mu ]), & (plaq_src [mu ][i ]));
687693 adjoint (& (psol [i ].Fplaq [mu ]), & (plaq_dest [mu ][i ]));
688694 }
695+
696+ // Optionally rescale to make fermion operator more symmetric
697+ // psol[i].Fsite already rescaled in fermion_op
698+ // !!!TODO: Not yet conserving...
699+ #ifdef RESCALE
700+ scalar_mult_matrix (& (site_src [i ]), 2.0 , & (site_src [i ]));
701+ #endif
689702 }
690703
691704#ifdef SV
@@ -730,6 +743,11 @@ void assemble_fermion_force(Twist_Fermion *sol, Twist_Fermion *psol) {
730743 }
731744 cleanup_gather (mtag [mu ]);
732745 }
746+ #else
747+ FORALLDIR (mu ) { // Zero force collectors
748+ FORALLSITES (i , s )
749+ clear_mat (& (s -> f_U [mu ]));
750+ }
733751#endif
734752#ifdef VP
735753 // Now calculate DU on chi_{munu} D_mu(U) psi_nu
@@ -875,6 +893,7 @@ void assemble_fermion_force(Twist_Fermion *sol, Twist_Fermion *psol) {
875893 }
876894#endif
877895
896+ #ifdef SV
878897 // Plaquette determinant contributions if G is non-zero
879898 if (doG ) {
880899 // First connect link_src with site_dest[DIMF - 1]^dag (LtoS)
@@ -883,6 +902,7 @@ void assemble_fermion_force(Twist_Fermion *sol, Twist_Fermion *psol) {
883902 // Second connect site_src[DIMF - 1] with link_dest^dag (StoL)
884903 detF (site_src , link_dest , MINUS );
885904 }
905+ #endif
886906
887907#ifdef QCLOSED
888908 if (NUMLINK != 5 ) {
0 commit comments