-
Notifications
You must be signed in to change notification settings - Fork 49
Added hopping.h #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mtaillefumier
wants to merge
2
commits into
master
Choose a base branch
from
hopping_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+157
−1
Open
Added hopping.h #674
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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