Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script
#
AC_PREREQ(2.59)
AC_INIT(tmLQCD, 6.0.1, curbach@gmx.de)
AC_INIT(tmLQCD, 6.0.2, curbach@gmx.de)
AC_CONFIG_HEADER(include/tmlqcd_config_internal.h)
AC_CONFIG_SRCDIR([hmc_tm.c])
AC_CANONICAL_HOST()
Expand Down
152 changes: 152 additions & 0 deletions operator/hopping.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
/**********************************************************************
*
* Copyright (C) 2012 Carsten Urbach
*
* BG and halfspinor versions (C) 2007, 2008 Carsten Urbach
*
* This file is based on an implementation of the Dirac operator
* written by Martin Luescher, modified by Martin Hasenbusch in 2002
* and modified and extended by Carsten Urbach from 2003-2008
*
* This file is part of tmLQCD.
*
* tmLQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* tmLQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with tmLQCD. If not, see <http://www.gnu.org/licenses/>.
*
**********************************************************************/

#ifndef _HOPPING_H
#define _HOPPING_H

#define _declare_regs() \
su3_vector ALIGN psi, chi; \
spinor ALIGN temp;

#define _hop_t_p() \
_vector_add(psi, sp->s0, sp->s2); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka0, chi); \
_vector_assign(temp.s0, psi); \
_vector_assign(temp.s2, psi); \
_vector_add(psi, sp->s1, sp->s3); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka0, chi); \
_vector_assign(temp.s1, psi); \
_vector_assign(temp.s3, psi);

#define _hop_t_m() \
_vector_sub(psi, sm->s0, sm->s2); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka0, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_sub_assign(temp.s2, psi); \
_vector_sub(psi, sm->s1, sm->s3); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka0, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_sub_assign(temp.s3, psi);

#define _hop_x_p() \
_vector_i_add(psi, sp->s0, sp->s3); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka1, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_i_sub_assign(temp.s3, psi); \
_vector_i_add(psi, sp->s1, sp->s2); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka1, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_i_sub_assign(temp.s2, psi);

#define _hop_x_m() \
_vector_i_sub(psi, sm->s0, sm->s3); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka1, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_i_add_assign(temp.s3, psi); \
_vector_i_sub(psi, sm->s1, sm->s2); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka1, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_i_add_assign(temp.s2, psi);

#define _hop_y_p() \
_vector_add(psi, sp->s0, sp->s3); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka2, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_add_assign(temp.s3, psi); \
_vector_sub(psi, sp->s1, sp->s2); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka2, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_sub_assign(temp.s2, psi);

#define _hop_y_m() \
_vector_sub(psi, sm->s0, sm->s3); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka2, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_sub_assign(temp.s3, psi); \
_vector_add(psi, sm->s1, sm->s2); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka2, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_add_assign(temp.s2, psi);

#define _hop_z_p() \
_vector_i_add(psi, sp->s0, sp->s2); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka3, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_i_sub_assign(temp.s2, psi); \
_vector_i_sub(psi, sp->s1, sp->s3); \
_su3_multiply(chi, (*up), psi); \
_complex_times_vector(psi, ka3, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_i_add_assign(temp.s3, psi);

#define _hop_z_m() \
_vector_i_sub(psi, sm->s0, sm->s2); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka3, chi); \
_vector_add_assign(temp.s0, psi); \
_vector_i_add_assign(temp.s2, psi); \
_vector_i_add(psi, sm->s1, sm->s3); \
_su3_inverse_multiply(chi, (*um), psi); \
_complexcjg_times_vector(psi, ka3, chi); \
_vector_add_assign(temp.s1, psi); \
_vector_i_sub_assign(temp.s3, psi);

#define _hop_mul_g5_cmplx_and_store() \
_complex_times_vector(rn->s0, cfactor, temp.s0); \
_complex_times_vector(rn->s1, cfactor, temp.s1); \
_complexcjg_times_vector(rn->s2, cfactor, temp.s2); \
_complexcjg_times_vector(rn->s3, cfactor, temp.s3);

#define _g5_cmplx_sub_hop_and_g5store() \
_complex_times_vector(psi, cfactor, pn->s0); \
_vector_sub(rn->s0, psi, temp.s0); \
_complex_times_vector(chi, cfactor, pn->s1); \
_vector_sub(rn->s1, chi, temp.s1); \
_complexcjg_times_vector(psi, cfactor, pn->s2); \
_vector_sub(rn->s2, temp.s2, psi); \
_complexcjg_times_vector(chi, cfactor, pn->s3); \
_vector_sub(rn->s3, temp.s3, chi);

#define _store_res() \
_vector_assign(rn->s0, temp.s0); \
_vector_assign(rn->s1, temp.s1); \
_vector_assign(rn->s2, temp.s2); \
_vector_assign(rn->s3, temp.s3);
#endif
2 changes: 2 additions & 0 deletions operator/hopping_bg_dbl.c
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well remove this file since it should not be referenced anywhere

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*
**********************************************************************/

#include "hopping.h"

void Hopping_Matrix(const int ieo, spinor* const l, spinor* const k) {
int icx, icy, icz, ioff, ioff2;
int ix, iy, iz;
Expand Down
2 changes: 2 additions & 0 deletions operator/hopping_body_dbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*
**********************************************************************/

#include "hopping.h"

int ioff;
int* hi;
su3* restrict ALIGN up;
Expand Down
Loading