From 0cf94587cdbc6d815141f10603b3a320be1822ce Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:20:16 +0000 Subject: [PATCH 01/29] array with all gammas for convenience --- Grid/qcd/spin/Gamma.cc | 18 ++ Grid/qcd/spin/Gamma.h | 1 + Grid/qcd/spin/gamma-gen/gamma-gen.nb | 356 +++++---------------------- 3 files changed, 76 insertions(+), 299 deletions(-) diff --git a/Grid/qcd/spin/Gamma.cc b/Grid/qcd/spin/Gamma.cc index 5d9b7719..6cc881fb 100644 --- a/Grid/qcd/spin/Gamma.cc +++ b/Grid/qcd/spin/Gamma.cc @@ -11,6 +11,24 @@ const std::array Gamma::gmu = {{ Gamma(Gamma::Algebra::GammaZ), Gamma(Gamma::Algebra::GammaT)}}; +const std::array Gamma::gall = {{ + Gamma(Gamma::Algebra::Identity), + Gamma(Gamma::Algebra::Gamma5), + Gamma(Gamma::Algebra::GammaX), + Gamma(Gamma::Algebra::GammaY), + Gamma(Gamma::Algebra::GammaZ), + Gamma(Gamma::Algebra::GammaT), + Gamma(Gamma::Algebra::GammaXGamma5), + Gamma(Gamma::Algebra::GammaYGamma5), + Gamma(Gamma::Algebra::GammaZGamma5), + Gamma(Gamma::Algebra::GammaTGamma5), + Gamma(Gamma::Algebra::SigmaXT), + Gamma(Gamma::Algebra::SigmaXY), + Gamma(Gamma::Algebra::SigmaXZ), + Gamma(Gamma::Algebra::SigmaYT), + Gamma(Gamma::Algebra::SigmaYZ), + Gamma(Gamma::Algebra::SigmaZT)}}; + const std::array Gamma::name = {{ "-Gamma5 ", "Gamma5 ", diff --git a/Grid/qcd/spin/Gamma.h b/Grid/qcd/spin/Gamma.h index bc32eab9..5655bb8c 100644 --- a/Grid/qcd/spin/Gamma.h +++ b/Grid/qcd/spin/Gamma.h @@ -48,6 +48,7 @@ class Gamma { static const std::array, nGamma> mul; static const std::array adj; static const std::array gmu; + static const std::array gall; Algebra g; public: Gamma(Algebra initg): g(initg) {} diff --git a/Grid/qcd/spin/gamma-gen/gamma-gen.nb b/Grid/qcd/spin/gamma-gen/gamma-gen.nb index 4167b6e2..dc8a242e 100644 --- a/Grid/qcd/spin/gamma-gen/gamma-gen.nb +++ b/Grid/qcd/spin/gamma-gen/gamma-gen.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] -NotebookDataLength[ 75090, 1956] -NotebookOptionsPosition[ 69536, 1867] -NotebookOutlinePosition[ 69898, 1883] -CellTagsIndexPosition[ 69855, 1880] +NotebookDataLength[ 67118, 1714] +NotebookOptionsPosition[ 63485, 1652] +NotebookOutlinePosition[ 63842, 1668] +CellTagsIndexPosition[ 63799, 1665] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -76,234 +76,6 @@ Cell[BoxData["\<\"/Users/antonin/Development/Grid/lib/qcd/spin/gamma-gen\"\>"]\ Cell[CellGroupData[{ -Cell[BoxData[ - RowBox[{"FactorInteger", "[", "3152", "]"}]], "Input", - CellChangeTimes->{{3.7432347536316767`*^9, 3.7432347764739027`*^9}, { - 3.743234833567358*^9, - 3.743234862146022*^9}},ExpressionUUID->"d1a0fd03-85e1-43af-ba80-\ -3ca4235675d8"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", "4"}], "}"}], ",", - RowBox[{"{", - RowBox[{"197", ",", "1"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.743234836792224*^9, - 3.743234862493619*^9}},ExpressionUUID->"16d3f953-4b24-4ed2-ae62-\ -306dcab66ca7"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"sol", "=", - RowBox[{"Solve", "[", - RowBox[{ - RowBox[{ - RowBox[{ - SuperscriptBox["x", "2"], "+", - SuperscriptBox["y", "2"], "+", - SuperscriptBox["z", "2"]}], "\[Equal]", "2"}], ",", - RowBox[{"{", - RowBox[{"x", ",", "y", ",", "z"}], "}"}], ",", "Integers"}], - "]"}]}]], "Input", - CellChangeTimes->{{3.743235304127721*^9, - 3.7432353087929983`*^9}},ExpressionUUID->"f0fa2a5c-3d81-4d75-a447-\ -50c7ca3459ff"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"y", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"z", "\[Rule]", "0"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"y", "\[Rule]", "0"}], ",", - RowBox[{"z", "\[Rule]", - RowBox[{"-", "1"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"y", "\[Rule]", "0"}], ",", - RowBox[{"z", "\[Rule]", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"y", "\[Rule]", "1"}], ",", - RowBox[{"z", "\[Rule]", "0"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "0"}], ",", - RowBox[{"y", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"z", "\[Rule]", - RowBox[{"-", "1"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "0"}], ",", - RowBox[{"y", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"z", "\[Rule]", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "0"}], ",", - RowBox[{"y", "\[Rule]", "1"}], ",", - RowBox[{"z", "\[Rule]", - RowBox[{"-", "1"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "0"}], ",", - RowBox[{"y", "\[Rule]", "1"}], ",", - RowBox[{"z", "\[Rule]", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "1"}], ",", - RowBox[{"y", "\[Rule]", - RowBox[{"-", "1"}]}], ",", - RowBox[{"z", "\[Rule]", "0"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "1"}], ",", - RowBox[{"y", "\[Rule]", "0"}], ",", - RowBox[{"z", "\[Rule]", - RowBox[{"-", "1"}]}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "1"}], ",", - RowBox[{"y", "\[Rule]", "0"}], ",", - RowBox[{"z", "\[Rule]", "1"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"x", "\[Rule]", "1"}], ",", - RowBox[{"y", "\[Rule]", "1"}], ",", - RowBox[{"z", "\[Rule]", "0"}]}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.743235305220907*^9, - 3.743235309139554*^9}},ExpressionUUID->"d9825c95-24bb-442a-8734-\ -4c0f47e99dfc"] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"xmlElem", "[", "x_", "]"}], ":=", - RowBox[{"Print", "[", - RowBox[{"\"\<\>\"", "<>", - RowBox[{"ToString", "[", - RowBox[{"x", "[", - RowBox[{"[", "1", "]"}], "]"}], "]"}], "<>", "\"\< \>\"", "<>", - RowBox[{"ToString", "[", - RowBox[{"x", "[", - RowBox[{"[", "2", "]"}], "]"}], "]"}], "<>", "\"\< \>\"", "<>", - RowBox[{"ToString", "[", - RowBox[{"x", "[", - RowBox[{"[", "3", "]"}], "]"}], "]"}], "<>", "\"\<\>\""}], - "]"}]}]], "Input", - CellChangeTimes->{{3.74323534002862*^9, 3.743235351000985*^9}, { - 3.743235403233039*^9, 3.743235413488028*^9}, {3.743235473169856*^9, - 3.7432354747126904`*^9}},ExpressionUUID->"aea76313-c89e-45e8-b429-\ -3f454091666d"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"xmlElem", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"x", ",", "y", ",", "z"}], "}"}], "/.", "#"}], "]"}], "&"}], "/@", - "sol"}]], "Input", - CellChangeTimes->{{3.743235415820318*^9, - 3.743235467025091*^9}},ExpressionUUID->"07da3998-8eab-40ba-8c0b-\ -ac6b130cb4fb"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"-1 -1 0\"\>"], "Print", - CellChangeTimes->{ - 3.743235476581676*^9},ExpressionUUID->"c577ba06-b67a-405a-9ff5-\ -2bf7dc898d03"], - -Cell[BoxData["\<\"-1 0 -1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476588011*^9},ExpressionUUID->"d041aa36-0cea-457c-9d4b-\ -1fe9be66e2ab"], - -Cell[BoxData["\<\"-1 0 1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476596887*^9},ExpressionUUID->"bf141b55-86b2-4430-a994-\ -5c03d5a19441"], - -Cell[BoxData["\<\"-1 1 0\"\>"], "Print", - CellChangeTimes->{ - 3.743235476605785*^9},ExpressionUUID->"4968a660-4ecf-4b66-9071-\ -8bd798c18d21"], - -Cell[BoxData["\<\"0 -1 -1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476613523*^9},ExpressionUUID->"4e22d943-2680-416b-a1d7-\ -a16ca20b781f"], - -Cell[BoxData["\<\"0 -1 1\"\>"], "Print", - CellChangeTimes->{ - 3.7432354766218576`*^9},ExpressionUUID->"6dd38385-08b3-4dd9-932f-\ -98a00c6db1b2"], - -Cell[BoxData["\<\"0 1 -1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476629427*^9},ExpressionUUID->"ef3baad3-91d1-4735-9a22-\ -53495a624c15"], - -Cell[BoxData["\<\"0 1 1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476638257*^9},ExpressionUUID->"413fbb68-5017-4272-a62a-\ -fa234e6daaea"], - -Cell[BoxData["\<\"1 -1 0\"\>"], "Print", - CellChangeTimes->{ - 3.743235476646203*^9},ExpressionUUID->"3a832a60-ae00-414b-a9ac-\ -f5e86e67e917"], - -Cell[BoxData["\<\"1 0 -1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476653907*^9},ExpressionUUID->"bfc79ef6-f6c7-4f1e-88e8-\ -005ac314be9c"], - -Cell[BoxData["\<\"1 0 1\"\>"], "Print", - CellChangeTimes->{ - 3.743235476662575*^9},ExpressionUUID->"0f892891-f885-489c-9925-\ -ddef4d698410"], - -Cell[BoxData["\<\"1 1 0\"\>"], "Print", - CellChangeTimes->{ - 3.7432354766702337`*^9},ExpressionUUID->"2906f190-e673-4f33-9c34-\ -e8e56efe7a27"] -}, Open ]], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null", - ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", "Null", ",", - "Null"}], "}"}]], "Output", - CellChangeTimes->{ - 3.7432354246225967`*^9, {3.7432354674878073`*^9, - 3.743235476678007*^9}},ExpressionUUID->"500ca3c1-88d8-46e5-a1a1-\ -86a7878e5638"] -}, Open ]], - -Cell[CellGroupData[{ - Cell["Clifford algebra generation", "Section", CellChangeTimes->{{3.6942089434583883`*^9, 3.694208978559093*^9}},ExpressionUUID->"a5b064b3-3011-4922-8559-\ @@ -1048,9 +820,10 @@ generated by the Mathematica notebook gamma-gen/gamma-gen.nb\n\n#include \ "\"\< static const std::array \ name;\n static const std::array, nGamma> mul;\n\ static const std::array adj;\n \ -static const std::array gmu;\n \ -Algebra g;\n public:\n \ - Gamma(Algebra initg): g(initg) {} \n};\n\n\>\""}]}], ";", +static const std::array gmu;\n static \ +const std::array gall;\n Algebra \ + g;\n public:\n \ +Gamma(Algebra initg): g(initg) {} \n};\n\n\>\""}]}], ";", "\[IndentingNewLine]", RowBox[{"out", " ", "=", RowBox[{"out", "<>", "funcCode"}]}], ";", "\[IndentingNewLine]", @@ -1076,7 +849,8 @@ Algebra g;\n public:\n \ 3.694963343265525*^9}, {3.694964367519239*^9, 3.69496439461199*^9}, { 3.694964462130747*^9, 3.6949644669959793`*^9}, 3.694964509762739*^9, { 3.694964705045744*^9, 3.694964723148797*^9}, {3.694964992988984*^9, - 3.6949649968504257`*^9}},ExpressionUUID->"c7103bd6-b539-4495-b98c-\ + 3.6949649968504257`*^9}, {3.758291687176977*^9, + 3.758291694181189*^9}},ExpressionUUID->"c7103bd6-b539-4495-b98c-\ d4d12ac6cad8"], Cell["Gamma enum generation:", "Text", @@ -1745,8 +1519,17 @@ namespace QCD {\>\""}]}], ";", "\[IndentingNewLine]", "\"\<\n\nconst std::array Gamma::gmu = {{\n \ Gamma(Gamma::Algebra::GammaX),\n Gamma(Gamma::Algebra::GammaY),\n \ Gamma(Gamma::Algebra::GammaZ),\n Gamma(Gamma::Algebra::GammaT)}};\n\nconst \ -std::array Gamma::name = {{\n\>\""}]}], ";", - "\[IndentingNewLine]", +std::array Gamma::gall = {{\n \ +Gamma(Gamma::Algebra::Identity),\n Gamma(Gamma::Algebra::Gamma5),\n \ +Gamma(Gamma::Algebra::GammaX),\n Gamma(Gamma::Algebra::GammaY),\n \ +Gamma(Gamma::Algebra::GammaZ),\n Gamma(Gamma::Algebra::GammaT),\n \ +Gamma(Gamma::Algebra::GammaXGamma5),\n Gamma(Gamma::Algebra::GammaYGamma5),\n\ + Gamma(Gamma::Algebra::GammaZGamma5),\n \ +Gamma(Gamma::Algebra::GammaTGamma5),\n Gamma(Gamma::Algebra::SigmaXT), \ +\n Gamma(Gamma::Algebra::SigmaXY), \n Gamma(Gamma::Algebra::SigmaXZ), \ + \n Gamma(Gamma::Algebra::SigmaYT),\n Gamma(Gamma::Algebra::SigmaYZ),\n \ +Gamma(Gamma::Algebra::SigmaZT)}};\n\nconst std::array Gamma::name = {{\n\>\""}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"out", " ", "=", " ", @@ -1847,7 +1630,9 @@ Gamma::nGamma> Gamma::mul = {{\\n\>\""}]}], ";", "\[IndentingNewLine]", 3.694963031525289*^9}, {3.694963065828494*^9, 3.694963098327538*^9}, { 3.6949632020836153`*^9, 3.6949632715940027`*^9}, {3.694963440035037*^9, 3.6949634418966017`*^9}, {3.6949651447067547`*^9, 3.694965161228381*^9}, { - 3.694967957845581*^9, 3.694967958364184*^9}}], + 3.694967957845581*^9, 3.694967958364184*^9}, {3.758291673792514*^9, + 3.758291676983432*^9}},ExpressionUUID->"b1b309f8-a3a7-4081-a781-\ +c3845e3cd372"], Cell[BoxData[ RowBox[{ @@ -1867,8 +1652,8 @@ Cell[BoxData[""], "Input", }, WindowSize->{1246, 1005}, WindowMargins->{{282, Automatic}, {Automatic, 14}}, -FrontEndVersion->"11.2 for Mac OS X x86 (32-bit, 64-bit Kernel) (September \ -10, 2017)", +FrontEndVersion->"11.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \ +2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) @@ -1888,75 +1673,48 @@ Cell[1948, 43, 570, 11, 73, "Input",ExpressionUUID->"5c937a3e-adfd-4d7e-8fde-afb Cell[2521, 56, 1172, 17, 34, "Output",ExpressionUUID->"72817ba6-2f6a-4a4d-8212-6f0970f49e7c"] }, Open ]], Cell[CellGroupData[{ -Cell[3730, 78, 248, 5, 30, "Input",ExpressionUUID->"d1a0fd03-85e1-43af-ba80-3ca4235675d8"], -Cell[3981, 85, 299, 9, 34, "Output",ExpressionUUID->"16d3f953-4b24-4ed2-ae62-306dcab66ca7"] +Cell[3730, 78, 174, 3, 67, "Section",ExpressionUUID->"a5b064b3-3011-4922-8559-ead857cad102"], +Cell[3907, 83, 535, 16, 52, "Input",ExpressionUUID->"aa28f02b-31e1-4df2-9b5d-482177464b59"], +Cell[4445, 101, 250, 4, 35, "Text",ExpressionUUID->"c8896b88-f1db-4ce4-b7a6-0c9838bdb8f1"], +Cell[4698, 107, 5511, 169, 425, "Input",ExpressionUUID->"52a96ff6-047e-4043-86d0-e303866e5f8e"], +Cell[CellGroupData[{ +Cell[10234, 280, 2183, 58, 135, "Input",ExpressionUUID->"8b0f4955-2c3f-418c-9226-9be8f87621e8"], +Cell[12420, 340, 1027, 27, 56, "Output",ExpressionUUID->"edd0619f-6f12-4070-a1d2-6b547877fadc"] }, Open ]], Cell[CellGroupData[{ -Cell[4317, 99, 469, 14, 33, "Input",ExpressionUUID->"f0fa2a5c-3d81-4d75-a447-50c7ca3459ff"], -Cell[4789, 115, 2423, 77, 56, "Output",ExpressionUUID->"d9825c95-24bb-442a-8734-4c0f47e99dfc"] +Cell[13484, 372, 1543, 46, 114, "Input",ExpressionUUID->"fb45123c-c610-4075-99b0-7cd71c728ae7"], +Cell[15030, 420, 1311, 32, 87, "Output",ExpressionUUID->"2ae14565-b412-4dc0-9dce-bd6c1ba5ef27"] }, Open ]], -Cell[7227, 195, 751, 18, 30, "Input",ExpressionUUID->"aea76313-c89e-45e8-b429-3f454091666d"], +Cell[16356, 455, 179, 3, 35, "Text",ExpressionUUID->"af247231-a58d-417b-987a-26908dafffdb"], +Cell[16538, 460, 2175, 65, 94, "Input",ExpressionUUID->"7c44cadd-e488-4f51-87d8-c64eef11f40c"], +Cell[18716, 527, 193, 3, 35, "Text",ExpressionUUID->"856f1746-1107-4509-a5ce-ac9c7f56cdb1"], Cell[CellGroupData[{ -Cell[8003, 217, 323, 10, 30, "Input",ExpressionUUID->"07da3998-8eab-40ba-8c0b-ac6b130cb4fb"], -Cell[CellGroupData[{ -Cell[8351, 231, 156, 3, 24, "Print",ExpressionUUID->"c577ba06-b67a-405a-9ff5-2bf7dc898d03"], -Cell[8510, 236, 156, 3, 24, "Print",ExpressionUUID->"d041aa36-0cea-457c-9d4b-1fe9be66e2ab"], -Cell[8669, 241, 155, 3, 24, "Print",ExpressionUUID->"bf141b55-86b2-4430-a994-5c03d5a19441"], -Cell[8827, 246, 155, 3, 24, "Print",ExpressionUUID->"4968a660-4ecf-4b66-9071-8bd798c18d21"], -Cell[8985, 251, 156, 3, 24, "Print",ExpressionUUID->"4e22d943-2680-416b-a1d7-a16ca20b781f"], -Cell[9144, 256, 157, 3, 24, "Print",ExpressionUUID->"6dd38385-08b3-4dd9-932f-98a00c6db1b2"], -Cell[9304, 261, 155, 3, 24, "Print",ExpressionUUID->"ef3baad3-91d1-4735-9a22-53495a624c15"], -Cell[9462, 266, 154, 3, 24, "Print",ExpressionUUID->"413fbb68-5017-4272-a62a-fa234e6daaea"], -Cell[9619, 271, 155, 3, 24, "Print",ExpressionUUID->"3a832a60-ae00-414b-a9ac-f5e86e67e917"], -Cell[9777, 276, 155, 3, 24, "Print",ExpressionUUID->"bfc79ef6-f6c7-4f1e-88e8-005ac314be9c"], -Cell[9935, 281, 154, 3, 24, "Print",ExpressionUUID->"0f892891-f885-489c-9925-ddef4d698410"], -Cell[10092, 286, 156, 3, 24, "Print",ExpressionUUID->"2906f190-e673-4f33-9c34-e8e56efe7a27"] -}, Open ]], -Cell[10263, 292, 376, 9, 34, "Output",ExpressionUUID->"500ca3c1-88d8-46e5-a1a1-86a7878e5638"] +Cell[18934, 534, 536, 16, 30, "Input",ExpressionUUID->"8674484a-8543-434f-b177-3b27f9353212"], +Cell[19473, 552, 1705, 35, 87, "Output",ExpressionUUID->"c3b3f84d-91f6-41af-af6b-a394ca020511"] }, Open ]], +Cell[21193, 590, 170, 3, 35, "Text",ExpressionUUID->"518a3040-54b1-4d43-8947-5c7d12efa94d"], Cell[CellGroupData[{ -Cell[10676, 306, 174, 3, 67, "Section",ExpressionUUID->"a5b064b3-3011-4922-8559-ead857cad102"], -Cell[10853, 311, 535, 16, 52, "Input",ExpressionUUID->"aa28f02b-31e1-4df2-9b5d-482177464b59"], -Cell[11391, 329, 250, 4, 35, "Text",ExpressionUUID->"c8896b88-f1db-4ce4-b7a6-0c9838bdb8f1"], -Cell[11644, 335, 5511, 169, 425, "Input",ExpressionUUID->"52a96ff6-047e-4043-86d0-e303866e5f8e"], -Cell[CellGroupData[{ -Cell[17180, 508, 2183, 58, 135, "Input",ExpressionUUID->"8b0f4955-2c3f-418c-9226-9be8f87621e8"], -Cell[19366, 568, 1027, 27, 67, "Output",ExpressionUUID->"edd0619f-6f12-4070-a1d2-6b547877fadc"] -}, Open ]], -Cell[CellGroupData[{ -Cell[20430, 600, 1543, 46, 114, "Input",ExpressionUUID->"fb45123c-c610-4075-99b0-7cd71c728ae7"], -Cell[21976, 648, 1311, 32, 98, "Output",ExpressionUUID->"2ae14565-b412-4dc0-9dce-bd6c1ba5ef27"] -}, Open ]], -Cell[23302, 683, 179, 3, 35, "Text",ExpressionUUID->"af247231-a58d-417b-987a-26908dafffdb"], -Cell[23484, 688, 2175, 65, 94, "Input",ExpressionUUID->"7c44cadd-e488-4f51-87d8-c64eef11f40c"], -Cell[25662, 755, 193, 3, 35, "Text",ExpressionUUID->"856f1746-1107-4509-a5ce-ac9c7f56cdb1"], -Cell[CellGroupData[{ -Cell[25880, 762, 536, 16, 30, "Input",ExpressionUUID->"8674484a-8543-434f-b177-3b27f9353212"], -Cell[26419, 780, 1705, 35, 87, "Output",ExpressionUUID->"c3b3f84d-91f6-41af-af6b-a394ca020511"] -}, Open ]], -Cell[28139, 818, 170, 3, 35, "Text",ExpressionUUID->"518a3040-54b1-4d43-8947-5c7d12efa94d"], -Cell[CellGroupData[{ -Cell[28334, 825, 536, 14, 30, "Input",ExpressionUUID->"61a2e974-2b39-4a07-8043-2dfd39a70569"], -Cell[28873, 841, 6754, 167, 303, "Output",ExpressionUUID->"73480ac0-3043-4077-80cc-b952a94c822a"] +Cell[21388, 597, 536, 14, 30, "Input",ExpressionUUID->"61a2e974-2b39-4a07-8043-2dfd39a70569"], +Cell[21927, 613, 6754, 167, 303, "Output",ExpressionUUID->"73480ac0-3043-4077-80cc-b952a94c822a"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[35676, 1014, 226, 4, 67, "Section",ExpressionUUID->"4e833cd6-9f0e-4aa3-a873-3d579e874720"], -Cell[35905, 1020, 188, 4, 44, "Text",ExpressionUUID->"6d27fc04-3a60-4e03-8df7-3dd3aeee35b4"], -Cell[36096, 1026, 2980, 53, 703, "Input",ExpressionUUID->"c7103bd6-b539-4495-b98c-d4d12ac6cad8"], -Cell[39079, 1081, 221, 4, 44, "Text",ExpressionUUID->"0625593d-290f-4a39-9d80-8e2c6fdbc94e"], -Cell[39303, 1087, 4936, 150, 682, "Input",ExpressionUUID->"1ad4904c-352f-4b1d-a7c7-91e1b0549409"], -Cell[44242, 1239, 2645, 56, 199, "Input",ExpressionUUID->"0221674f-9b63-4662-91bc-ccc8c6ae9589"], -Cell[46890, 1297, 209, 4, 44, "Text",ExpressionUUID->"d2d2257a-487b-416f-bc40-abd4482225f7"], -Cell[47102, 1303, 15306, 397, 2131, "Input",ExpressionUUID->"daea68a9-c9e8-46ab-9bc8-5186e2cf477c"], -Cell[62411, 1702, 137, 2, 44, "Text",ExpressionUUID->"76ba9d5a-7ee3-4888-be7e-6377003275e8"], -Cell[62551, 1706, 521, 12, 30, "Input",ExpressionUUID->"4ec61f4c-3fd3-49ea-b5ef-6f7f04a16b34"] +Cell[28730, 786, 226, 4, 67, "Section",ExpressionUUID->"4e833cd6-9f0e-4aa3-a873-3d579e874720"], +Cell[28959, 792, 188, 4, 44, "Text",ExpressionUUID->"6d27fc04-3a60-4e03-8df7-3dd3aeee35b4"], +Cell[29150, 798, 3104, 55, 724, "Input",ExpressionUUID->"c7103bd6-b539-4495-b98c-d4d12ac6cad8"], +Cell[32257, 855, 221, 4, 44, "Text",ExpressionUUID->"0625593d-290f-4a39-9d80-8e2c6fdbc94e"], +Cell[32481, 861, 4936, 150, 682, "Input",ExpressionUUID->"1ad4904c-352f-4b1d-a7c7-91e1b0549409"], +Cell[37420, 1013, 2645, 56, 199, "Input",ExpressionUUID->"0221674f-9b63-4662-91bc-ccc8c6ae9589"], +Cell[40068, 1071, 209, 4, 44, "Text",ExpressionUUID->"d2d2257a-487b-416f-bc40-abd4482225f7"], +Cell[40280, 1077, 15306, 397, 2131, "Input",ExpressionUUID->"daea68a9-c9e8-46ab-9bc8-5186e2cf477c"], +Cell[55589, 1476, 137, 2, 44, "Text",ExpressionUUID->"76ba9d5a-7ee3-4888-be7e-6377003275e8"], +Cell[55729, 1480, 521, 12, 30, "Input",ExpressionUUID->"4ec61f4c-3fd3-49ea-b5ef-6f7f04a16b34"] }, Open ]], Cell[CellGroupData[{ -Cell[63109, 1723, 167, 2, 67, "Section",ExpressionUUID->"a4458b3a-09b5-4e36-a1fc-781d6702b2dc"], -Cell[63279, 1727, 5693, 122, 829, "Input",ExpressionUUID->"b1b309f8-a3a7-4081-a781-c3845e3cd372"], -Cell[68975, 1851, 448, 10, 30, "Input",ExpressionUUID->"cba42949-b0f2-42ce-aebd-ffadfd83ef88"], -Cell[69426, 1863, 94, 1, 30, "Input",ExpressionUUID->"6175b72c-af9f-43c2-b4ca-bd84c48a456d"] +Cell[56287, 1497, 167, 2, 67, "Section",ExpressionUUID->"a4458b3a-09b5-4e36-a1fc-781d6702b2dc"], +Cell[56457, 1501, 6464, 133, 1207, "Input",ExpressionUUID->"b1b309f8-a3a7-4081-a781-c3845e3cd372"], +Cell[62924, 1636, 448, 10, 30, "Input",ExpressionUUID->"cba42949-b0f2-42ce-aebd-ffadfd83ef88"], +Cell[63375, 1648, 94, 1, 30, "Input",ExpressionUUID->"6175b72c-af9f-43c2-b4ca-bd84c48a456d"] }, Open ]] } ] From 3692c7f1efc0371ed9a944a2afe27490455cb1d5 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:21:51 +0000 Subject: [PATCH 02/29] Hadrons: type alias cleaning and global correlator class (need to propagate) --- Hadrons/Global.hpp | 18 +++++++++++++++--- Hadrons/Module.hpp | 1 - 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Hadrons/Global.hpp b/Hadrons/Global.hpp index aaf03427..7ee55c49 100644 --- a/Hadrons/Global.hpp +++ b/Hadrons/Global.hpp @@ -44,6 +44,8 @@ See the full license in the file "LICENSE" in the top level distribution directo #define DEFAULT_ASCII_PREC 16 #endif +#define ARG(...) __VA_ARGS__ + /* the 'using Grid::operator<<;' statement prevents a very nasty compilation * error with GCC 5 (clang & GCC 6 compile fine without it). */ @@ -101,15 +103,16 @@ BEGIN_HADRONS_NAMESPACE typedef typename Impl::Field ScalarField##suffix;\ typedef typename Impl::PropagatorField PropagatorField##suffix;\ typedef typename Impl::SitePropagator::scalar_object SitePropagator##suffix;\ -typedef std::vector SlicedPropagator##suffix; +typedef typename Impl::ComplexField ComplexField##suffix;\ +typedef std::vector SlicedPropagator##suffix;\ +typedef std::vector SlicedComplex##suffix; #define FERM_TYPE_ALIASES(FImpl, suffix)\ BASIC_TYPE_ALIASES(FImpl, suffix);\ typedef FermionOperator FMat##suffix;\ typedef typename FImpl::FermionField FermionField##suffix;\ typedef typename FImpl::GaugeField GaugeField##suffix;\ -typedef typename FImpl::DoubledGaugeField DoubledGaugeField##suffix;\ -typedef typename FImpl::ComplexField ComplexField##suffix; +typedef typename FImpl::DoubledGaugeField DoubledGaugeField##suffix; #define GAUGE_TYPE_ALIASES(GImpl, suffix)\ typedef typename GImpl::GaugeField GaugeField##suffix; @@ -263,6 +266,15 @@ void tokenReplace(std::string &str, const std::string token, } } +// generic correlator class +template +struct Correlator: Serializable +{ + GRID_SERIALIZABLE_CLASS_MEMBERS(ARG(Correlator), + Metadata, info, + std::vector, corr); +}; + END_HADRONS_NAMESPACE #include diff --git a/Hadrons/Module.hpp b/Hadrons/Module.hpp index 8d59d06c..07765884 100644 --- a/Hadrons/Module.hpp +++ b/Hadrons/Module.hpp @@ -65,7 +65,6 @@ static ns##mod##ModuleRegistrar ns##mod##ModuleRegistrarInstance; extern template class base;\ MODULE_REGISTER(mod, ARG(base), ns); -#define ARG(...) __VA_ARGS__ #define HADRONS_MACRO_REDIRECT_12(arg1, arg2, macro, ...) macro #define HADRONS_MACRO_REDIRECT_23(arg1, arg2, arg3, macro, ...) macro From 6b46834af8c9e52d92c147dfd42b5b0ec2868449 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:23:30 +0000 Subject: [PATCH 03/29] Hadrons: archiving unmaintained or exotic modules --- .../MScalar => Archive/Modules}/ScalarVP.cc | 0 .../MScalar => Archive/Modules}/ScalarVP.hpp | 0 .../Modules}/TestSeqConserved.cc | 0 .../Modules}/TestSeqConserved.hpp | 0 .../Modules}/TestSeqGamma.cc | 0 .../Modules}/TestSeqGamma.hpp | 0 .../Modules}/VPCounterTerms.cc | 0 .../Modules}/VPCounterTerms.hpp | 0 .../Modules}/WardIdentity.cc | 0 .../Modules}/WardIdentity.hpp | 0 .../Modules}/WeakHamiltonian.hpp | 0 .../Modules}/WeakHamiltonianEye.cc | 0 .../Modules}/WeakHamiltonianEye.hpp | 0 .../Modules}/WeakHamiltonianNonEye.cc | 0 .../Modules}/WeakHamiltonianNonEye.hpp | 0 .../Modules}/WeakNeutral4ptDisc.cc | 0 .../Modules}/WeakNeutral4ptDisc.hpp | 0 Hadrons/Modules.hpp | 14 +- Hadrons/Modules/MScalarSUN/ShiftProbe.cc | 39 ---- Hadrons/Modules/MScalarSUN/ShiftProbe.hpp | 177 ------------------ Hadrons/modules.inc | 28 +-- 21 files changed, 7 insertions(+), 251 deletions(-) rename Hadrons/{Modules/MScalar => Archive/Modules}/ScalarVP.cc (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/ScalarVP.hpp (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqConserved.cc (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqConserved.hpp (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqGamma.cc (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqGamma.hpp (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/VPCounterTerms.cc (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/VPCounterTerms.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WardIdentity.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WardIdentity.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonian.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianEye.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianEye.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianNonEye.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianNonEye.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakNeutral4ptDisc.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakNeutral4ptDisc.hpp (100%) delete mode 100644 Hadrons/Modules/MScalarSUN/ShiftProbe.cc delete mode 100644 Hadrons/Modules/MScalarSUN/ShiftProbe.hpp diff --git a/Hadrons/Modules/MScalar/ScalarVP.cc b/Hadrons/Archive/Modules/ScalarVP.cc similarity index 100% rename from Hadrons/Modules/MScalar/ScalarVP.cc rename to Hadrons/Archive/Modules/ScalarVP.cc diff --git a/Hadrons/Modules/MScalar/ScalarVP.hpp b/Hadrons/Archive/Modules/ScalarVP.hpp similarity index 100% rename from Hadrons/Modules/MScalar/ScalarVP.hpp rename to Hadrons/Archive/Modules/ScalarVP.hpp diff --git a/Hadrons/Modules/MUtilities/TestSeqConserved.cc b/Hadrons/Archive/Modules/TestSeqConserved.cc similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqConserved.cc rename to Hadrons/Archive/Modules/TestSeqConserved.cc diff --git a/Hadrons/Modules/MUtilities/TestSeqConserved.hpp b/Hadrons/Archive/Modules/TestSeqConserved.hpp similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqConserved.hpp rename to Hadrons/Archive/Modules/TestSeqConserved.hpp diff --git a/Hadrons/Modules/MUtilities/TestSeqGamma.cc b/Hadrons/Archive/Modules/TestSeqGamma.cc similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqGamma.cc rename to Hadrons/Archive/Modules/TestSeqGamma.cc diff --git a/Hadrons/Modules/MUtilities/TestSeqGamma.hpp b/Hadrons/Archive/Modules/TestSeqGamma.hpp similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqGamma.hpp rename to Hadrons/Archive/Modules/TestSeqGamma.hpp diff --git a/Hadrons/Modules/MScalar/VPCounterTerms.cc b/Hadrons/Archive/Modules/VPCounterTerms.cc similarity index 100% rename from Hadrons/Modules/MScalar/VPCounterTerms.cc rename to Hadrons/Archive/Modules/VPCounterTerms.cc diff --git a/Hadrons/Modules/MScalar/VPCounterTerms.hpp b/Hadrons/Archive/Modules/VPCounterTerms.hpp similarity index 100% rename from Hadrons/Modules/MScalar/VPCounterTerms.hpp rename to Hadrons/Archive/Modules/VPCounterTerms.hpp diff --git a/Hadrons/Modules/MContraction/WardIdentity.cc b/Hadrons/Archive/Modules/WardIdentity.cc similarity index 100% rename from Hadrons/Modules/MContraction/WardIdentity.cc rename to Hadrons/Archive/Modules/WardIdentity.cc diff --git a/Hadrons/Modules/MContraction/WardIdentity.hpp b/Hadrons/Archive/Modules/WardIdentity.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WardIdentity.hpp rename to Hadrons/Archive/Modules/WardIdentity.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonian.hpp b/Hadrons/Archive/Modules/WeakHamiltonian.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonian.hpp rename to Hadrons/Archive/Modules/WeakHamiltonian.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianEye.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianEye.cc rename to Hadrons/Archive/Modules/WeakHamiltonianEye.cc diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp rename to Hadrons/Archive/Modules/WeakHamiltonianEye.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc rename to Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp rename to Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp diff --git a/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc rename to Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc diff --git a/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp rename to Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 787fecea..0dc5fda9 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -2,13 +2,8 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include @@ -21,28 +16,24 @@ #include #include #include +#include #include #include #include -#include #include #include #include -#include #include #include #include #include +#include #include #include #include #include -#include -#include #include #include -#include -#include #include #include #include @@ -56,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/Hadrons/Modules/MScalarSUN/ShiftProbe.cc b/Hadrons/Modules/MScalarSUN/ShiftProbe.cc deleted file mode 100644 index 83454941..00000000 --- a/Hadrons/Modules/MScalarSUN/ShiftProbe.cc +++ /dev/null @@ -1,39 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MScalarSUN/ShiftProbe.cc - -Copyright (C) 2015-2018 - -Author: Antonin Portelli - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ -#include - -using namespace Grid; -using namespace Hadrons; -using namespace MScalarSUN; - -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; - diff --git a/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp b/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp deleted file mode 100644 index dcd56252..00000000 --- a/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MScalarSUN/ShiftProbe.hpp - -Copyright (C) 2015-2018 - -Author: Antonin Portelli - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ -#ifndef Hadrons_MScalarSUN_ShiftProbe_hpp_ -#define Hadrons_MScalarSUN_ShiftProbe_hpp_ - -#include -#include -#include -#include - -BEGIN_HADRONS_NAMESPACE - -/****************************************************************************** - * Ward identity phi^n probe with fields at different positions * - ******************************************************************************/ -BEGIN_MODULE_NAMESPACE(MScalarSUN) - -typedef std::pair ShiftPair; - -class ShiftProbePar: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(ShiftProbePar, - std::string, field, - std::string, shifts, - std::string, output); -}; - -class ShiftProbeResult: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(ShiftProbeResult, - std::string, shifts, - Complex, value); -}; - -template -class TShiftProbe: public Module -{ -public: - typedef typename SImpl::Field Field; - typedef typename SImpl::ComplexField ComplexField; -public: - // constructor - TShiftProbe(const std::string name); - // destructor - virtual ~TShiftProbe(void) {}; - // dependency relation - virtual std::vector getInput(void); - virtual std::vector getOutput(void); - // setup - virtual void setup(void); - // execution - virtual void execute(void); -}; - -MODULE_REGISTER_TMP(ShiftProbeSU2, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU3, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU4, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU5, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU6, TShiftProbe>, MScalarSUN); - -/****************************************************************************** - * TShiftProbe implementation * - ******************************************************************************/ -// constructor ///////////////////////////////////////////////////////////////// -template -TShiftProbe::TShiftProbe(const std::string name) -: Module(name) -{} - -// dependencies/products /////////////////////////////////////////////////////// -template -std::vector TShiftProbe::getInput(void) -{ - std::vector in = {par().field}; - - return in; -} - -template -std::vector TShiftProbe::getOutput(void) -{ - std::vector out = {getName()}; - - return out; -} - -// setup /////////////////////////////////////////////////////////////////////// -template -void TShiftProbe::setup(void) -{ - envTmpLat(Field, "acc"); - envCreateLat(ComplexField, getName()); -} - -// execution /////////////////////////////////////////////////////////////////// -template -void TShiftProbe::execute(void) -{ - LOG(Message) << "Creating shift probe for shifts " << par().shifts - << std::endl; - - std::vector shift; - double sign; - auto &phi = envGet(Field, par().field); - auto &probe = envGet(ComplexField, getName()); - - shift = strToVec(par().shifts); - if (shift.size() % 2 != 0) - { - HADRONS_ERROR(Size, "the number of shifts is odd"); - } - sign = (shift.size() % 4 == 0) ? 1. : -1.; - for (auto &s: shift) - { - if (s.first >= env().getNd()) - { - HADRONS_ERROR(Size, "dimension to large for shift <" - + std::to_string(s.first) + " " - + std::to_string(s.second) + ">" ); - } - } - envGetTmp(Field, acc); - acc = 1.; - for (unsigned int i = 0; i < shift.size(); ++i) - { - if (shift[i].second == 0) - { - acc *= phi; - } - else - { - acc *= Cshift(phi, shift[i].first, shift[i].second); - } - } - probe = sign*trace(acc); - if (!par().output.empty()) - { - ShiftProbeResult r; - - r.shifts = par().shifts; - r.value = TensorRemove(sum(probe)); - saveResult(par().output, "probe", r); - } -} - -END_MODULE_NAMESPACE - -END_HADRONS_NAMESPACE - -#endif // Hadrons_MScalarSUN_ShiftProbe_hpp_ diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index 88cfea88..c620302f 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -1,11 +1,7 @@ modules_cc =\ - Modules/MContraction/WeakHamiltonianEye.cc \ Modules/MContraction/Baryon.cc \ Modules/MContraction/Meson.cc \ - Modules/MContraction/WeakNeutral4ptDisc.cc \ - Modules/MContraction/WeakHamiltonianNonEye.cc \ Modules/MContraction/A2AAslashField.cc \ - Modules/MContraction/WardIdentity.cc \ Modules/MContraction/A2AMesonField.cc \ Modules/MContraction/DiscLoop.cc \ Modules/MContraction/Gamma3pt.cc \ @@ -26,23 +22,19 @@ modules_cc =\ Modules/MSolver/LocalCoherenceLanczos.cc \ Modules/MGauge/StoutSmearing.cc \ Modules/MGauge/Unit.cc \ - Modules/MGauge/Electrify.cc \ Modules/MGauge/UnitEm.cc \ Modules/MGauge/StochEm.cc \ Modules/MGauge/Random.cc \ + Modules/MGauge/Electrify.cc \ Modules/MGauge/FundtoHirep.cc \ Modules/MGauge/GaugeFix.cc \ - Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \ Modules/MNoise/FullVolumeSpinColorDiagonal.cc \ + Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \ Modules/MUtilities/RandomVectors.cc \ - Modules/MUtilities/TestSeqGamma.cc \ Modules/MUtilities/PrecisionCast.cc \ - Modules/MUtilities/TestSeqConserved.cc \ Modules/MLoop/NoiseLoop.cc \ Modules/MScalar/FreeProp.cc \ - Modules/MScalar/VPCounterTerms.cc \ Modules/MScalar/ChargedProp.cc \ - Modules/MScalar/ScalarVP.cc \ Modules/MNPR/Amputate.cc \ Modules/MNPR/Bilinear.cc \ Modules/MNPR/FourQuark.cc \ @@ -57,7 +49,6 @@ modules_cc =\ Modules/MScalarSUN/TrMag.cc \ Modules/MScalarSUN/TrKinetic.cc \ Modules/MScalarSUN/EMT.cc \ - Modules/MScalarSUN/ShiftProbe.cc \ Modules/MScalarSUN/TransProj.cc \ Modules/MScalarSUN/StochFreeField.cc \ Modules/MScalarSUN/TwoPoint.cc \ @@ -75,13 +66,9 @@ modules_hpp =\ Modules/MContraction/A2AAslashField.hpp \ Modules/MContraction/A2AMesonField.hpp \ Modules/MContraction/Meson.hpp \ - Modules/MContraction/WeakHamiltonian.hpp \ - Modules/MContraction/WeakHamiltonianNonEye.hpp \ Modules/MContraction/DiscLoop.hpp \ - Modules/MContraction/WeakNeutral4ptDisc.hpp \ Modules/MContraction/Gamma3pt.hpp \ - Modules/MContraction/WardIdentity.hpp \ - Modules/MContraction/WeakHamiltonianEye.hpp \ + Modules/MContraction/WeakNonEye3pt.hpp \ Modules/MFermion/FreeProp.hpp \ Modules/MFermion/GaugeProp.hpp \ Modules/MSource/SeqGamma.hpp \ @@ -94,28 +81,24 @@ modules_hpp =\ Modules/MSink/Point.hpp \ Modules/MSolver/MixedPrecisionRBPrecCG.hpp \ Modules/MSolver/LocalCoherenceLanczos.hpp \ + Modules/MSolver/A2AAslashVectors.hpp \ Modules/MSolver/Guesser.hpp \ Modules/MSolver/RBPrecCG.hpp \ Modules/MSolver/A2AVectors.hpp \ - Modules/MSolver/A2AAslashVectors.hpp \ Modules/MGauge/UnitEm.hpp \ Modules/MGauge/StoutSmearing.hpp \ Modules/MGauge/Unit.hpp \ - Modules/MGauge/Electrify.hpp \ Modules/MGauge/Random.hpp \ Modules/MGauge/GaugeFix.hpp \ Modules/MGauge/FundtoHirep.hpp \ Modules/MGauge/StochEm.hpp \ + Modules/MGauge/Electrify.hpp \ Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp \ Modules/MNoise/FullVolumeSpinColorDiagonal.hpp \ Modules/MUtilities/PrecisionCast.hpp \ Modules/MUtilities/RandomVectors.hpp \ - Modules/MUtilities/TestSeqGamma.hpp \ - Modules/MUtilities/TestSeqConserved.hpp \ Modules/MLoop/NoiseLoop.hpp \ Modules/MScalar/FreeProp.hpp \ - Modules/MScalar/VPCounterTerms.hpp \ - Modules/MScalar/ScalarVP.hpp \ Modules/MScalar/Scalar.hpp \ Modules/MScalar/ChargedProp.hpp \ Modules/MNPR/Bilinear.hpp \ @@ -129,7 +112,6 @@ modules_hpp =\ Modules/MAction/ScaledDWF.hpp \ Modules/MScalarSUN/StochFreeField.hpp \ Modules/MScalarSUN/TwoPointNPR.hpp \ - Modules/MScalarSUN/ShiftProbe.hpp \ Modules/MScalarSUN/Div.hpp \ Modules/MScalarSUN/TrMag.hpp \ Modules/MScalarSUN/EMT.hpp \ From 2eb584fdf034702b5cd9f5a09c01067099b4d274 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:24:07 +0000 Subject: [PATCH 04/29] Hadrons: 4-quark non-eye 3-pt contractions --- Hadrons/Modules.hpp | 1 + Hadrons/Modules/MContraction/WeakNonEye3pt.cc | 7 + .../Modules/MContraction/WeakNonEye3pt.hpp | 169 ++++++++++++++++++ Hadrons/modules.inc | 1 + 4 files changed, 178 insertions(+) create mode 100644 Hadrons/Modules/MContraction/WeakNonEye3pt.cc create mode 100644 Hadrons/Modules/MContraction/WeakNonEye3pt.hpp diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 0dc5fda9..3fc1dd81 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/Hadrons/Modules/MContraction/WeakNonEye3pt.cc b/Hadrons/Modules/MContraction/WeakNonEye3pt.cc new file mode 100644 index 00000000..84560710 --- /dev/null +++ b/Hadrons/Modules/MContraction/WeakNonEye3pt.cc @@ -0,0 +1,7 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TWeakNonEye3pt; diff --git a/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp new file mode 100644 index 00000000..dc74192b --- /dev/null +++ b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp @@ -0,0 +1,169 @@ +#ifndef Hadrons_MContraction_WeakNonEye3pt_hpp_ +#define Hadrons_MContraction_WeakNonEye3pt_hpp_ + +#include +#include +#include + +BEGIN_HADRONS_NAMESPACE + +/* + * Weak Hamiltonian meson 3-pt diagrams, non-eye-topologies. + * + * + * Schematic: + * qbl qbr | qbl qbr + * /--<--¬ /--<--¬ | /--<--¬ /--<--¬ + * / \ / \ | / \ / \ + * / \ / \ | / \ / \ + * / \ / \ | / \ / \ + * gIn * * G * gOut | gIn * G * * G * gOut + * \ * G | | \ / \ / + * \ / \ / | \ / \ / + * \ / \ / | \ / \ / + * \ / \ / | \-->--/ \-->--/ + * \-->--/ \-->--/ | ql qr + * ql qr | + * One trace | Two traces + * + * One trace : tr(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G) + * Two traces: tr(ql*adj(gIn)*g5*adj(qbl)*g5*G)*tr(qbr*gOut*g5*adj(qr)*g5*G) + * + */ + +BEGIN_MODULE_NAMESPACE(MContraction) + +class WeakNonEye3ptPar: Serializable +{ +public: + GRID_SERIALIZABLE_CLASS_MEMBERS(WeakNonEye3ptPar, + std::string, qLeft, + std::string, qBarLeft, + std::string, qRight, + std::string, qBarRight, + Gamma::Algebra, gammaIn, + Gamma::Algebra, gammaOut, + std::string, output); +}; + +template +class TWeakNonEye3pt: public Module +{ +public: + FERM_TYPE_ALIASES(FImpl,); + class Metadata: Serializable + { + public: + GRID_SERIALIZABLE_CLASS_MEMBERS(Metadata, + Gamma::Algebra, in, + Gamma::Algebra, out, + Gamma::Algebra, op, + unsigned int, trace); + }; + typedef Correlator Result; +public: + // constructor + TWeakNonEye3pt(const std::string name); + // destructor + virtual ~TWeakNonEye3pt(void) {}; + // dependency relation + virtual std::vector getInput(void); + virtual std::vector getOutput(void); + // setup + virtual void setup(void); + // execution + virtual void execute(void); +}; + +MODULE_REGISTER_TMP(WeakNonEye3pt, TWeakNonEye3pt, MContraction); + +/****************************************************************************** + * TWeakNonEye3pt implementation * + ******************************************************************************/ +// constructor ///////////////////////////////////////////////////////////////// +template +TWeakNonEye3pt::TWeakNonEye3pt(const std::string name) +: Module(name) +{} + +// dependencies/products /////////////////////////////////////////////////////// +template +std::vector TWeakNonEye3pt::getInput(void) +{ + std::vector in = {par().qLeft, par().qBarLeft, + par().qRight, par().qBarRight}; + + return in; +} + +template +std::vector TWeakNonEye3pt::getOutput(void) +{ + std::vector out = {}; + + return out; +} + +// setup /////////////////////////////////////////////////////////////////////// +template +void TWeakNonEye3pt::setup(void) +{ + envTmpLat(ComplexField, "corr"); +} + +// execution /////////////////////////////////////////////////////////////////// +template +void TWeakNonEye3pt::execute(void) +{ + LOG(Message) << "Computing mesonic weak 3pt contractions, non-eye topologies" << std::endl; + LOG(Message) << "gIn : " << par().gammaIn << std::endl; + LOG(Message) << "gOut: " << par().gammaIn << std::endl; + LOG(Message) << "ql : " << par().qLeft << std::endl; + LOG(Message) << "qbl : " << par().qBarLeft << std::endl; + LOG(Message) << "qr : " << par().qRight << std::endl; + LOG(Message) << "qbr : " << par().qBarRight << std::endl; + + std::vector result; + Result r; + auto &ql = envGet(PropagatorField, par().qLeft); + auto &qbl = envGet(PropagatorField, par().qBarLeft); + auto &qr = envGet(PropagatorField, par().qRight); + auto &qbr = envGet(PropagatorField, par().qBarRight); + Gamma gIn(par().gammaIn), gOut(par().gammaOut); + Gamma g5(Gamma::Algebra::Gamma5); + + envGetTmp(ComplexField, corr); + r.info.in = par().gammaIn; + r.info.out = par().gammaOut; + for (auto &G: Gamma::gall) + { + SlicedComplex buf; + + r.info.op = G.g; + // one trace + corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G); + sliceSum(corr, buf, Tp); + for (unsigned int t = 0; t < buf.size(); ++t) + { + r.corr.push_back(TensorRemove(buf[t])); + } + r.info.trace = 1; + result.push_back(r); + // two traces + corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G)*trace(qbr*gOut*g5*adj(qr)*g5*G); + sliceSum(corr, buf, Tp); + for (unsigned int t = 0; t < buf.size(); ++t) + { + r.corr.push_back(TensorRemove(buf[t])); + } + r.info.trace = 2; + result.push_back(r); + } + saveResult(par().output, "weakNonEye3pt", result); +} + +END_MODULE_NAMESPACE + +END_HADRONS_NAMESPACE + +#endif // Hadrons_MContraction_WeakNonEye3pt_hpp_ diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index c620302f..c307a5de 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -1,6 +1,7 @@ modules_cc =\ Modules/MContraction/Baryon.cc \ Modules/MContraction/Meson.cc \ + Modules/MContraction/WeakNonEye3pt.cc \ Modules/MContraction/A2AAslashField.cc \ Modules/MContraction/A2AMesonField.cc \ Modules/MContraction/DiscLoop.cc \ From 9c31305b8dc59b6e1dc8ee5079200b161f06d87c Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:26:25 +0000 Subject: [PATCH 05/29] Hadrons: test cleaning --- tests/hadrons/Test_hadrons.hpp | 665 ------------------ .../hadrons/Test_hadrons_3pt_contractions.cc | 123 ---- .../hadrons/Test_hadrons_conserved_current.cc | 151 ---- .../Test_hadrons_meson_conserved_3pt.cc | 116 --- tests/hadrons/Test_hadrons_seq_gamma.cc | 90 --- tests/hadrons/Test_hadrons_wilsonFund.cc | 159 ----- 6 files changed, 1304 deletions(-) delete mode 100644 tests/hadrons/Test_hadrons.hpp delete mode 100644 tests/hadrons/Test_hadrons_3pt_contractions.cc delete mode 100644 tests/hadrons/Test_hadrons_conserved_current.cc delete mode 100644 tests/hadrons/Test_hadrons_meson_conserved_3pt.cc delete mode 100644 tests/hadrons/Test_hadrons_seq_gamma.cc delete mode 100644 tests/hadrons/Test_hadrons_wilsonFund.cc diff --git a/tests/hadrons/Test_hadrons.hpp b/tests/hadrons/Test_hadrons.hpp deleted file mode 100644 index 7f07bea5..00000000 --- a/tests/hadrons/Test_hadrons.hpp +++ /dev/null @@ -1,665 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons.hpp - -Copyright (C) 2015-2018 - - Author: Andrew Lawson - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include -#include - -using namespace Grid; -using namespace Hadrons; - -/******************************************************************************* - * Macros to reduce code duplication. - ******************************************************************************/ -// Common initialisation -#define HADRONS_DEFAULT_INIT \ - Grid_init(&argc, &argv); \ - HadronsLogError.Active(GridLogError.isActive()); \ - HadronsLogWarning.Active(GridLogWarning.isActive()); \ - HadronsLogMessage.Active(GridLogMessage.isActive()); \ - HadronsLogIterative.Active(GridLogIterative.isActive()); \ - HadronsLogDebug.Active(GridLogDebug.isActive()); \ - LOG(Message) << "Grid initialized" << std::endl; - -#define HADRONS_DEFAULT_GLOBALS(application) \ -{ \ - Application::GlobalPar globalPar; \ - globalPar.trajCounter.start = 1500; \ - globalPar.trajCounter.end = 1520; \ - globalPar.trajCounter.step = 20; \ - globalPar.runId = "test"; \ - globalPar.genetic.maxGen = 1000; \ - globalPar.genetic.maxCstGen = 200; \ - globalPar.genetic.popSize = 20; \ - globalPar.genetic.mutationRate = .1; \ - application.setPar(globalPar); \ -} - -// Useful definitions -#define ZERO_MOM "0. 0. 0. 0." -#define INIT_INDEX(s, n) (std::string(s) + "_" + std::to_string(n)) -#define ADD_INDEX(s, n) (s + "_" + std::to_string(n)) -#define LABEL_3PT(s, t1, t2) ADD_INDEX(INIT_INDEX(s, t1), t2) -#define LABEL_4PT(s, t1, t2, t3) ADD_INDEX(ADD_INDEX(INIT_INDEX(s, t1), t2), t3) -#define LABEL_4PT_NOISE(s, t1, t2, t3, nn) ADD_INDEX(ADD_INDEX(ADD_INDEX(INIT_INDEX(s, t1), t2), t3), nn) -#define LABEL_5D(s) s + "_5d"; - -// Wall source/sink macros -#define NAME_3MOM_WALL_SOURCE(t, mom) ("wall_" + std::to_string(t) + "_" + mom) -#define NAME_WALL_SOURCE(t) NAME_3MOM_WALL_SOURCE(t, ZERO_MOM) -#define NAME_POINT_SOURCE(pos) ("point_" + pos) - -// Meson module "gammas" special values -#define ALL_GAMMAS "all" - -#define MAKE_3MOM_WALL_PROP(tW, mom, propName, solver)\ -{\ - std::string srcName = NAME_3MOM_WALL_SOURCE(tW, mom);\ - makeWallSource(application, srcName, tW, mom);\ - makePropagator(application, propName, srcName, solver);\ -} - -#define MAKE_WALL_PROP(tW, propName, solver)\ - MAKE_3MOM_WALL_PROP(tW, ZERO_MOM, propName, solver) - -// Sequential source macros -#define MAKE_SEQUENTIAL_PROP(tS, qSrc, mom, seqPropName, solver, gamma)\ -{\ - std::string srcName = seqPropName + "_src";\ - makeSequentialSource(application, srcName, qSrc, tS, gamma, mom);\ - makePropagator(application, seqPropName, srcName, solver);\ -} - -// Point source macros -#define MAKE_POINT_PROP(pos, propName, solver)\ -{\ - std::string srcName = NAME_POINT_SOURCE(pos);\ - makePointSource(application, srcName, pos);\ - makePropagator(application, propName, srcName, solver);\ -} - -/******************************************************************************* - * Action setups. - ******************************************************************************/ - -/******************************************************************************* - * Name: makeWilsonAction - * Parameters: application - main application that stores modules. - * actionName - name of action module to create. - * gaugeField - gauge field module. - * mass - quark mass. - * boundary - fermion boundary conditions (default to periodic - * space, antiperiodic time). - * Returns: None. - ******************************************************************************/ -inline void makeWilsonAction(Application &application, std::string actionName, - std::string &gaugeField, double mass, - std::string boundary = "1 1 1 -1") -{ - if (!(VirtualMachine::getInstance().hasModule(actionName))) - { - MAction::Wilson::Par actionPar; - actionPar.gauge = gaugeField; - actionPar.mass = mass; - actionPar.boundary = boundary; - actionPar.twist = "0. 0. 0. 0."; - application.createModule(actionName, actionPar); - } -} - -/******************************************************************************* - * Name: makeDWFAction - * Parameters: application - main application that stores modules. - * actionName - name of action module to create. - * gaugeField - gauge field module. - * mass - quark mass. - * M5 - domain wall height. - * Ls - fifth dimension extent. - * boundary - fermion boundary conditions (default to periodic - * space, antiperiodic time). - * Returns: None. - ******************************************************************************/ -inline void makeDWFAction(Application &application, std::string actionName, - std::string &gaugeField, double mass, double M5, - unsigned int Ls, std::string boundary = "1 1 1 -1") -{ - if (!(VirtualMachine::getInstance().hasModule(actionName))) - { - MAction::DWF::Par actionPar; - actionPar.gauge = gaugeField; - actionPar.Ls = Ls; - actionPar.M5 = M5; - actionPar.mass = mass; - actionPar.boundary = boundary; - actionPar.twist = "0. 0. 0. 0."; - application.createModule(actionName, actionPar); - } -} - -/******************************************************************************* - * Functions for propagator construction. - ******************************************************************************/ - -/******************************************************************************* - * Name: makeRBPrecCGSolver - * Purpose: Make RBPrecCG solver module for specified action. - * Parameters: application - main application that stores modules. - * solverName - name of solver module to create. - * actionName - action module corresponding to propagators to be - * computed. - * residual - CG target residual. - * Returns: None. - ******************************************************************************/ -inline void makeRBPrecCGSolver(Application &application, std::string &solverName, - std::string &actionName, double residual = 1e-8) -{ - if (!(VirtualMachine::getInstance().hasModule(solverName))) - { - MSolver::RBPrecCG::Par solverPar; - solverPar.action = actionName; - solverPar.residual = residual; - solverPar.maxIteration = 10000; - application.createModule(solverName, - solverPar); - } -} - -/******************************************************************************* - * Name: makePointSource - * Purpose: Construct point source and add to application module. - * Parameters: application - main application that stores modules. - * srcName - name of source module to create. - * pos - Position of point source. - * Returns: None. - ******************************************************************************/ -inline void makePointSource(Application &application, std::string srcName, - std::string pos) -{ - // If the source already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(srcName))) - { - MSource::Point::Par pointPar; - pointPar.position = pos; - application.createModule(srcName, pointPar); - } -} - -/******************************************************************************* - * Name: makeSequentialSource - * Purpose: Construct sequential source and add to application module. - * Parameters: application - main application that stores modules. - * srcName - name of source module to create. - * qSrc - Input quark for sequential inversion. - * tS - sequential source timeslice. - * mom - momentum insertion (default is zero). - * Returns: None. - ******************************************************************************/ -inline void makeSequentialSource(Application &application, std::string srcName, - std::string qSrc, unsigned int tS, - Gamma::Algebra gamma = Gamma::Algebra::GammaT, - std::string mom = ZERO_MOM) -{ - // If the source already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(srcName))) - { - MSource::SeqGamma::Par seqPar; - seqPar.q = qSrc; - seqPar.tA = tS; - seqPar.tB = tS; - seqPar.mom = mom; - seqPar.gamma = gamma; - application.createModule(srcName, seqPar); - } -} - -/******************************************************************************* - * Name: makeConservedSequentialSource - * Purpose: Construct sequential source with conserved current insertion and - * add to application module. - * Parameters: application - main application that stores modules. - * srcName - name of source module to create. - * qSrc - Input quark for sequential inversion. - * actionName - action corresponding to quark. - * tS - sequential source timeslice. - * curr - conserved current type to insert. - * mu - Lorentz index of current to insert. - * mom - momentum insertion (default is zero). - * Returns: None. - ******************************************************************************/ -inline void makeConservedSequentialSource(Application &application, - std::string &srcName, - std::string &qSrc, - std::string &actionName, - unsigned int tS, - Current curr, - unsigned int mu, - std::string mom = ZERO_MOM) -{ - // If the source already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(srcName))) - { - MSource::SeqConserved::Par seqPar; - seqPar.q = qSrc; - seqPar.action = actionName; - seqPar.tA = tS; - seqPar.tB = tS; - seqPar.curr_type = curr; - seqPar.mu_min = mu; - seqPar.mu_min = mu; - seqPar.mom = mom; - application.createModule(srcName, seqPar); - } -} - -/******************************************************************************* - * Name: makeNoiseSource - * Parameters: application - main application that stores modules. - * srcName - name of source module to create. - * tA - lower source timeslice limit. - * tB - upper source timeslice limit. - * Returns: None. - ******************************************************************************/ -inline void makeNoiseSource(Application &application, std::string &srcName, - unsigned int tA, unsigned int tB) -{ - if (!(VirtualMachine::getInstance().hasModule(srcName))) - { - MSource::Z2::Par noisePar; - noisePar.tA = tA; - noisePar.tB = tB; - application.createModule(srcName, noisePar); - } - } - -/******************************************************************************* - * Name: makeWallSource - * Purpose: Construct wall source and add to application module. - * Parameters: application - main application that stores modules. - * srcName - name of source module to create. - * tW - wall source timeslice. - * mom - momentum insertion (default is zero). - * Returns: None. - ******************************************************************************/ -inline void makeWallSource(Application &application, std::string &srcName, - unsigned int tW, std::string mom = ZERO_MOM) -{ - // If the source already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(srcName))) - { - MSource::Wall::Par wallPar; - wallPar.tW = tW; - wallPar.mom = mom; - application.createModule(srcName, wallPar); - } -} - -/******************************************************************************* - * Name: makePointSink - * Purpose: Create function for point sink smearing of a propagator. - * Parameters: application - main application that stores modules. - * propName - name of input propagator. - * sinkFnct - name of output sink smearing module. - * mom - momentum insertion (default is zero). - * Returns: None. - ******************************************************************************/ -inline void makePointSink(Application &application, std::string &sinkFnct, - std::string mom = ZERO_MOM) -{ - // If the sink function already exists, don't make it again. - if (!(VirtualMachine::getInstance().hasModule(sinkFnct))) - { - MSink::Point::Par pointPar; - pointPar.mom = mom; - application.createModule(sinkFnct, pointPar); - } -} - -/******************************************************************************* - * Name: sinkSmear - * Purpose: Perform sink smearing of a propagator. - * Parameters: application - main application that stores modules. - * sinkFnct - sink smearing module. - * propName - propagator to smear. - * smearedProp - name of output smeared propagator. - * Returns: None. - ******************************************************************************/ -inline void sinkSmear(Application &application, std::string &sinkFnct, - std::string &propName, std::string &smearedProp) -{ - // If the propagator has already been smeared, don't smear it again. - if (!(VirtualMachine::getInstance().hasModule(smearedProp))) - { - MSink::Smear::Par smearPar; - smearPar.q = propName; - smearPar.sink = sinkFnct; - application.createModule(smearedProp, smearPar); - } -} - -/******************************************************************************* - * Name: makePropagator - * Purpose: Construct source and propagator then add to application module. - * Parameters: application - main application that stores modules. - * propName - name of propagator module to create. - * srcName - name of source module to use. - * solver - solver to use (default is CG). - * Returns: None. - ******************************************************************************/ -inline void makePropagator(Application &application, std::string &propName, - std::string &srcName, std::string &solver) -{ - // If the propagator already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(propName))) - { - MFermion::GaugeProp::Par quarkPar; - quarkPar.source = srcName; - quarkPar.solver = solver; - application.createModule(propName, quarkPar); - } -} - -/******************************************************************************* - * Name: makeLoop - * Purpose: Use noise source and inversion result to make loop propagator, then - * add to application module. - * Parameters: application - main application that stores modules. - * propName - name of propagator module to create. - * srcName - name of noise source module to use. - * resName - name of inversion result on given noise source. - * Returns: None. - ******************************************************************************/ -inline void makeLoop(Application &application, std::string &propName, - std::string &srcName, std::string &resName) -{ - // If the loop propagator already exists, don't make the module again. - if (!(VirtualMachine::getInstance().hasModule(propName))) - { - MLoop::NoiseLoop::Par loopPar; - loopPar.q = resName; - loopPar.eta = srcName; - application.createModule(propName, loopPar); - } -} - -/******************************************************************************* - * Contraction module creation. - ******************************************************************************/ - -/******************************************************************************* - * Name: mesonContraction - * Purpose: Create meson contraction module and add to application module. - * Parameters: application - main application that stores modules. - * modName - unique module name. - * output - name of output files. - * q1 - quark propagator 1. - * q2 - quark propagator 2. - * sink - sink smearing module. - * gammas - gamma insertions at source and sink. - * Returns: None. - ******************************************************************************/ -inline void mesonContraction(Application &application, - std::string &modName, std::string &output, - std::string &q1, std::string &q2, - std::string &sink, - std::string gammas = "") -{ - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MContraction::Meson::Par mesPar; - mesPar.output = output; - mesPar.q1 = q1; - mesPar.q2 = q2; - mesPar.sink = sink; - mesPar.gammas = gammas; - application.createModule(modName, mesPar); - } - } - -/******************************************************************************* - * Name: gamma3ptContraction - * Purpose: Create gamma3pt contraction module and add to application module. - * Parameters: application - main application that stores modules. - * npt - specify n-point correlator (for labelling). - * q1 - quark propagator 1, sink smeared. - * q2 - quark propagator 2. - * q3 - quark propagator 3. - * label - unique label to construct module name. - * tSnk - sink position of sink for q1. - * gamma - gamma insertions between q2 and q3. - * Returns: None. - ******************************************************************************/ -inline void gamma3ptContraction(Application &application, unsigned int npt, - std::string &q1, std::string &q2, - std::string &q3, std::string &label, - unsigned int tSnk = 0, - Gamma::Algebra gamma = Gamma::Algebra::Identity) -{ - std::string modName = std::to_string(npt) + "pt_" + label; - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MContraction::Gamma3pt::Par gamma3ptPar; - gamma3ptPar.output = std::to_string(npt) + "pt/" + label; - gamma3ptPar.q1 = q1; - gamma3ptPar.q2 = q2; - gamma3ptPar.q3 = q3; - gamma3ptPar.tSnk = tSnk; - gamma3ptPar.gamma = gamma; - application.createModule(modName, gamma3ptPar); - } - } - -/******************************************************************************* - * Name: weakContraction[Eye,NonEye] - * Purpose: Create Weak Hamiltonian contraction module for Eye/NonEye topology - * and add to application module. - * Parameters: application - main application that stores modules. - * npt - specify n-point correlator (for labelling). - * q1 - quark propagator 1. - * q2 - quark propagator 2. - * q3 - quark propagator 3. - * q4 - quark propagator 4. - * label - unique label to construct module name. - * tSnk - time position of sink (for sink smearing). - * Returns: None. - ******************************************************************************/ -#define HW_CONTRACTION(top) \ -inline void weakContraction##top(Application &application, unsigned int npt,\ - std::string &q1, std::string &q2, \ - std::string &q3, std::string &q4, \ - std::string &label, unsigned int tSnk = 0)\ -{\ - std::string modName = std::to_string(npt) + "pt_" + label;\ - if (!(VirtualMachine::getInstance().hasModule(modName)))\ - {\ - MContraction::WeakHamiltonian##top::Par weakPar;\ - weakPar.output = std::to_string(npt) + "pt/" + label;\ - weakPar.q1 = q1;\ - weakPar.q2 = q2;\ - weakPar.q3 = q3;\ - weakPar.q4 = q4;\ - weakPar.tSnk = tSnk;\ - application.createModule(modName, weakPar);\ - }\ -} -HW_CONTRACTION(Eye) // weakContractionEye -HW_CONTRACTION(NonEye) // weakContractionNonEye - -/******************************************************************************* - * Name: disc0Contraction - * Purpose: Create contraction module for 4pt Weak Hamiltonian + current - * disconnected topology for neutral mesons and add to application - * module. - * Parameters: application - main application that stores modules. - * q1 - quark propagator 1. - * q2 - quark propagator 2. - * q3 - quark propagator 3. - * q4 - quark propagator 4. - * label - unique label to construct module name. - * Returns: None. - ******************************************************************************/ -inline void disc0Contraction(Application &application, - std::string &q1, std::string &q2, - std::string &q3, std::string &q4, - std::string &label) -{ - std::string modName = "4pt_" + label; - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MContraction::WeakNeutral4ptDisc::Par disc0Par; - disc0Par.output = "4pt/" + label; - disc0Par.q1 = q1; - disc0Par.q2 = q2; - disc0Par.q3 = q3; - disc0Par.q4 = q4; - application.createModule(modName, disc0Par); - } - } - -/******************************************************************************* - * Name: discLoopContraction - * Purpose: Create contraction module for disconnected loop and add to - * application module. - * Parameters: application - main application that stores modules. - * q_loop - loop quark propagator. - * modName - unique module name. - * gamma - gamma matrix to use in contraction. - * Returns: None. - ******************************************************************************/ -inline void discLoopContraction(Application &application, - std::string &q_loop, std::string &modName, - Gamma::Algebra gamma = Gamma::Algebra::Identity) -{ - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MContraction::DiscLoop::Par discPar; - discPar.output = "disc/" + modName; - discPar.q_loop = q_loop; - discPar.gamma = gamma; - application.createModule(modName, discPar); - } -} - -/******************************************************************************* - * Name: makeWITest - * Purpose: Create module to test Ward Identities for conserved current - * contractions and add to application module. - * Parameters: application - main application that stores modules. - * modName - name of module to create. - * propName - 4D quark propagator. - * actionName - action used to compute quark propagator. - * mass - mass of quark. - * Ls - length of 5th dimension (default = 1). - * test_axial - whether or not to check PCAC relation. - * Returns: None. - ******************************************************************************/ -inline void makeWITest(Application &application, std::string &modName, - std::string &propName, std::string &actionName, - double mass, unsigned int Ls = 1, bool test_axial = false) -{ - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MContraction::WardIdentity::Par wiPar; - if (Ls > 1) - { - wiPar.q = LABEL_5D(propName); - } - else - { - wiPar.q = propName; - } - wiPar.action = actionName; - wiPar.mass = mass; - wiPar.test_axial = test_axial; - application.createModule(modName, wiPar); - } -} - -/******************************************************************************* - * Name: makeSeqCurrComparison - * Purpose: Create module to compare sequential insertion of conserved current - * against sink contraction and add to application module. - * Parameters: application - main application that stores modules. - * modName - name of module to create. - * propName - quark propagator (point source), 5D if available. - * seqName - 4D quark propagator with sequential insertion of - * conserved current. - * actionName - action used to compute quark propagators. - * origin - origin of point source propagator. - * t_J - time at which sequential current is inserted. - * mu - Lorentz index of sequential current. - * curr - type of conserved current inserted. - * Returns: None. - ******************************************************************************/ -inline void makeSeqCurrComparison(Application &application, std::string &modName, - std::string &propName, std::string &seqName, - std::string &actionName, std::string &origin, - unsigned int t_J, unsigned int mu, Current curr) -{ - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MUtilities::TestSeqConserved::Par seqPar; - seqPar.q = propName; - seqPar.qSeq = seqName; - seqPar.action = actionName; - seqPar.origin = origin; - seqPar.t_J = t_J; - seqPar.mu = mu; - seqPar.curr = curr; - application.createModule(modName, seqPar); - } -} - -/******************************************************************************* - * Name: makeSeqGamComparison - * Purpose: Create module to compare sequential insertion of gamma matrix - * against sink contraction and add to application module. - * Parameters: application - main application that stores modules. - * modName - name of module to create. - * propName - 4D quark propagator. - * seqProp - 4D quark propagator with sequential insertion of - * gamma matrix. - * gamma - Inserted gamma matrix. - * t_g - time at which gamma matrix is inserted - * sequentially. - * Returns: None. - ******************************************************************************/ -inline void makeSeqGamComparison(Application &application, std::string &modName, - std::string &propName, std::string &seqProp, - std::string &origin, Gamma::Algebra gamma, - unsigned int t_g) -{ - if (!(VirtualMachine::getInstance().hasModule(modName))) - { - MUtilities::TestSeqGamma::Par seqPar; - seqPar.q = propName; - seqPar.qSeq = seqProp; - seqPar.origin = origin; - seqPar.t_g = t_g; - seqPar.gamma = gamma; - application.createModule(modName, seqPar); - } -} diff --git a/tests/hadrons/Test_hadrons_3pt_contractions.cc b/tests/hadrons/Test_hadrons_3pt_contractions.cc deleted file mode 100644 index 09c478bb..00000000 --- a/tests/hadrons/Test_hadrons_3pt_contractions.cc +++ /dev/null @@ -1,123 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons_3pt_contractions.cc - -Copyright (C) 2015-2018 - - Author: Andrew Lawson - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include "Test_hadrons.hpp" - -using namespace Grid; -using namespace Hadrons; - -int main(int argc, char *argv[]) -{ - // initialization ////////////////////////////////////////////////////////// - HADRONS_DEFAULT_INIT; - - // run setup /////////////////////////////////////////////////////////////// - Application application; - double mass = 0.04; - double M5 = 1.8; - unsigned int Ls = 12; - unsigned int nt = GridDefaultLatt()[Tp]; - unsigned int t_i = 0; - unsigned int t_f = nt / 2; - std::string mom = "1. 0. 0. 0."; - - // global parameters - HADRONS_DEFAULT_GLOBALS(application); - - // gauge field - std::string gaugeField = "gauge"; - application.createModule(gaugeField); - - // Action & solver setup. - std::string action = "DWF"; - std::string solver = "CG"; - makeDWFAction(application, action, gaugeField, mass, M5, Ls); - makeRBPrecCGSolver(application, solver, action); - - /*************************************************************************** - * Weak Contraction test: Non-Eye class. - **************************************************************************/ - // Make wall source propagators for each leg of 4-quark vertex. - std::string q_i_0 = "q_i_0"; - std::string q_i_p = "q_i_p"; - std::string q_f_0 = "q_f_0"; - std::string q_f_p = "q_f_p"; - MAKE_WALL_PROP(t_i, q_i_0, solver); - MAKE_WALL_PROP(t_f, q_f_0, solver); - MAKE_3MOM_WALL_PROP(t_i, mom, q_i_p, solver); - MAKE_3MOM_WALL_PROP(t_f, mom, q_f_p, solver); - - // Perform contractions, zero and non-zero momentum. - std::string HW_CW_0 = LABEL_3PT("HW_CW_0", t_i, t_f); - std::string HW_CW_p = LABEL_3PT("HW_CW_p", t_i, t_f); - weakContractionNonEye(application, 3, q_i_0, q_i_0, q_f_0, q_f_0, HW_CW_0); - weakContractionNonEye(application, 3, q_i_0, q_i_p, q_f_p, q_f_0, HW_CW_p); - - /*************************************************************************** - * Weak Contraction test: Eye-class. - **************************************************************************/ - // Create random propagator for loop. - std::string eta = "noise_source"; - makeNoiseSource(application, eta, 0, nt - 1); - std::string loopProp = "loop"; - std::string loopRes = loopProp + "_res"; - makePropagator(application, loopRes, eta, solver); - makeLoop(application, loopProp, eta, loopRes); - - // Wall sink smear the propagator directly connecting the source & sink. - // (i.e. make point sink but smear before the contraction) - std::string wallSink = "wall_sink"; - std::string qWall = "q_wall"; - makePointSink(application, wallSink); - sinkSmear(application, wallSink, q_i_0, qWall); - - // Perform contractions, zero and non-zero momentum. - std::string HW_SE_0 = LABEL_3PT("HW_SE_0", t_i, t_f); - std::string HW_SE_p = LABEL_3PT("HW_SE_p", t_i, t_f); - weakContractionEye(application, 3, qWall, q_i_0, q_f_p, loopProp, HW_SE_0, t_f); - weakContractionEye(application, 3, qWall, q_i_p, q_f_p, loopProp, HW_SE_p, t_f); - - /*************************************************************************** - * Gamma insertion test. - **************************************************************************/ - Gamma::Algebra gamma = Gamma::Algebra::GammaT; - std::string sd_0 = LABEL_3PT("sd_0", t_i, t_f); - std::string sd_p = LABEL_3PT("sd_p", t_i, t_f); - gamma3ptContraction(application, 3, qWall, q_i_0, q_f_0, sd_0, t_f, gamma); - gamma3ptContraction(application, 3, qWall, q_i_p, q_f_p, sd_p, t_f, gamma); - - // execution - application.saveParameterFile("ContractionTest3pt.xml"); - application.run(); - - // epilogue - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); - - return EXIT_SUCCESS; -} diff --git a/tests/hadrons/Test_hadrons_conserved_current.cc b/tests/hadrons/Test_hadrons_conserved_current.cc deleted file mode 100644 index b8345af7..00000000 --- a/tests/hadrons/Test_hadrons_conserved_current.cc +++ /dev/null @@ -1,151 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons_conserved_current.cc - -Copyright (C) 2015-2018 - - Author: Andrew Lawson - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include "Test_hadrons.hpp" - -using namespace Grid; -using namespace Hadrons; - -inline void setupSeqCurrTests(Application &application, std::string modStem, - std::string &pointProp, std::string &seqStem, - std::string &actionName, std::string &solverName, - std::string &origin, Current curr, - unsigned int t_J, unsigned int mu, - unsigned int Ls = 1) -{ - std::string modName = ADD_INDEX(modStem, mu); - std::string seqProp = ADD_INDEX(seqStem, mu); - std::string seqSrc = seqProp + "_src"; - - // 5D actions require 5D propagator as input for conserved current - // insertions. - std::string propIn; - if (Ls > 1) - { - propIn = LABEL_5D(pointProp); - } - else - { - propIn = pointProp; - } - - makeConservedSequentialSource(application, seqSrc, propIn, - actionName, t_J, curr, mu); - makePropagator(application, seqProp, seqSrc, solverName); - makeSeqCurrComparison(application, modName, propIn, seqProp, - actionName, origin, t_J, mu, curr); -} - -inline void setupWardIdentityTests(Application &application, - std::string &actionName, - double mass, - unsigned int Ls = 1, - bool perform_axial_tests = false) -{ - // solver - std::string solverName = actionName + "_CG"; - makeRBPrecCGSolver(application, solverName, actionName); - - unsigned int nt = GridDefaultLatt()[Tp]; - unsigned int t_J = nt/2; - - /*************************************************************************** - * Conserved current sink contractions: use a single point propagator for - * the Ward Identity test. - **************************************************************************/ - std::string pointProp = actionName + "_q_0"; - std::string origin = "0 0 0 0"; - std::string modName = actionName + " Ward Identity Test"; - MAKE_POINT_PROP(origin, pointProp, solverName); - makeWITest(application, modName, pointProp, actionName, mass, Ls, - perform_axial_tests); - - /*************************************************************************** - * Conserved current tests with sequential insertion of vector/axial - * current. If above Ward Identity passes, sufficient to test sequential - * insertion of conserved current agrees with contracted version. - **************************************************************************/ - // Compare sequential insertion to contraction. Should be enough to perform - // for time and one space component. - std::string seqStem = ADD_INDEX(pointProp + "seq_V", t_J); - std::string modStem = actionName + " Vector Sequential Test mu"; - setupSeqCurrTests(application, modStem, pointProp, seqStem, actionName, - solverName, origin, Current::Vector, t_J, Tp, Ls); - setupSeqCurrTests(application, modStem, pointProp, seqStem, actionName, - solverName, origin, Current::Vector, t_J, Xp, Ls); - - // Perform axial tests only if partially-conserved axial current exists for - // the action. - if (perform_axial_tests) - { - seqStem = ADD_INDEX(pointProp + "seq_A", t_J); - modStem = actionName + " Axial Sequential Test mu"; - setupSeqCurrTests(application, modStem, pointProp, seqStem, actionName, - solverName, origin, Current::Axial, t_J, Tp, Ls); - setupSeqCurrTests(application, modStem, pointProp, seqStem, actionName, - solverName, origin, Current::Axial, t_J, Xp, Ls); - } -} - -int main(int argc, char *argv[]) -{ - // initialization ////////////////////////////////////////////////////////// - HADRONS_DEFAULT_INIT; - - // run setup /////////////////////////////////////////////////////////////// - Application application; - double mass = 0.04; - double M5 = 1.8; - unsigned int Ls = 12; - - // global parameters - HADRONS_DEFAULT_GLOBALS(application); - - // gauge field - std::string gaugeField = "gauge"; - application.createModule(gaugeField); - - // Setup each action and the conserved current tests relevant to it. - std::string actionName = "DWF"; - makeDWFAction(application, actionName, gaugeField, mass, M5, Ls); - setupWardIdentityTests(application, actionName, mass, Ls, true); - - actionName = "Wilson"; - makeWilsonAction(application, actionName, gaugeField, mass); - setupWardIdentityTests(application, actionName, mass); - - // execution - application.saveParameterFile("ConservedCurrentTest.xml"); - application.run(); - - // epilogue - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); - - return EXIT_SUCCESS; -} diff --git a/tests/hadrons/Test_hadrons_meson_conserved_3pt.cc b/tests/hadrons/Test_hadrons_meson_conserved_3pt.cc deleted file mode 100644 index 1246de02..00000000 --- a/tests/hadrons/Test_hadrons_meson_conserved_3pt.cc +++ /dev/null @@ -1,116 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons_meson_conserved_3pt.cc - -Copyright (C) 2015-2018 - - Author: Andrew Lawson - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include "Test_hadrons.hpp" - -using namespace Grid; -using namespace Hadrons; - -int main(int argc, char *argv[]) -{ - // initialization ////////////////////////////////////////////////////////// - HADRONS_DEFAULT_INIT; - - // run setup /////////////////////////////////////////////////////////////// - Application application; - - // actions parameters - double mass = 0.04; - unsigned int Ls = 16; - double M5 = 1.8; - - // kinematics - unsigned int nt = GridDefaultLatt()[Tp]; - unsigned int tSrc = 0; - unsigned int tJ = nt / 4; - std::string kmom = "0. 0. 0. 0."; - std::string pmom = "1. 0. 0. 0."; - - // Global parameters. - HADRONS_DEFAULT_GLOBALS(application); - - // Unit gauge field. - std::string gaugeField = "Unit gauge"; - application.createModule(gaugeField); - - // DWF action - std::string actionName = "DWF"; - makeDWFAction(application, actionName, gaugeField, mass, M5, Ls); - - // Solver - std::string solver = "CG"; - makeRBPrecCGSolver(application, solver, actionName); - - // main test body ////////////////////////////////////////////////////////// - // Point sink modules. - std::string sink_0 = "sink_0"; - std::string sink_p = "sink_p"; - MSink::Point::Par sinkPar; - sinkPar.mom = kmom; - application.createModule(sink_0, sinkPar); - sinkPar.mom = pmom; - application.createModule(sink_p, sinkPar); - - // 2pt pion contraction, zero momentum. - std::string q_0 = "Q_0"; - MAKE_WALL_PROP(tSrc, q_0, solver); - std::string modName = INIT_INDEX("2pt_pion_WP", tSrc); - std::string output = "2pt/pion_WP_0"; - mesonContraction(application, modName, output, q_0, q_0, sink_0); - - // 2pt pion contraction, with momentum p. - std::string q_p = "Q_p"; - MAKE_3MOM_WALL_PROP(tSrc, pmom, q_p, solver); - modName = INIT_INDEX("2pt_pion_WP_p", tSrc); - output = "2pt/pion_WP_p"; - mesonContraction(application, modName, output, q_0, q_p, sink_p); - - // 3pt pion(0) -> pion(p), with sequentially inserted vector current in - // time direction. - std::string qSeq = q_0 + INIT_INDEX("_seq_Vc3", tJ); - std::string q5d = LABEL_5D(q_0); // Need 5D prop for DWF conserved current. - std::string srcName = qSeq + "_src"; - modName = LABEL_3PT("3pt_pion_Vc3", tSrc, tJ); - output = "3pt/pion_Vc3_p"; - makeConservedSequentialSource(application, srcName, q5d, actionName, - tJ, Current::Vector, Tp, pmom); - makePropagator(application, qSeq, srcName, solver); - mesonContraction(application, modName, output, q_0, qSeq, sink_p); - - std::string par_file_name = "conserved_3pt.xml"; - application.saveParameterFile(par_file_name); - application.run(); - - // epilogue - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); - - return EXIT_SUCCESS; -} - - diff --git a/tests/hadrons/Test_hadrons_seq_gamma.cc b/tests/hadrons/Test_hadrons_seq_gamma.cc deleted file mode 100644 index 5e10b9f5..00000000 --- a/tests/hadrons/Test_hadrons_seq_gamma.cc +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons_seq_gamma.cc - -Copyright (C) 2015-2018 - - Author: Andrew Lawson - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include "Test_hadrons.hpp" - -using namespace Grid; -using namespace QCD; -using namespace Hadrons; - -/******************************************************************************* - * Consistency test for sequential gamma insertion. - ******************************************************************************/ - -int main(int argc, char *argv[]) -{ - // initialization ////////////////////////////////////////////////////////// - HADRONS_DEFAULT_INIT; - - // run setup /////////////////////////////////////////////////////////////// - Application application; - unsigned int nt = GridDefaultLatt()[Tp]; - unsigned int tS = nt / 2; - unsigned int Ls = 12; - double mass = 0.04; - double M5 = 1.8; - - // global parameters - HADRONS_DEFAULT_GLOBALS(application); - - // gauge field - std::string gaugeField = "gauge"; - application.createModule(gaugeField); - - // action - std::string actionName = "DWF"; - makeDWFAction(application, actionName, gaugeField, mass, M5, Ls); - - // solver - std::string solverName = "CG"; - makeRBPrecCGSolver(application, solverName, actionName); - - // test sequential propagator, with g5 insertion. - Gamma::Algebra g = Gamma::Algebra::Gamma5; - std::string pointProp = "q_0"; - std::string point5d = LABEL_5D(pointProp); - std::string origin = "0 0 0 0"; - MAKE_POINT_PROP(origin, pointProp, solverName); - - std::string seqProp = ADD_INDEX(pointProp + "_seqg5", tS); - std::string seqSrc = seqProp + "_src"; - MAKE_SEQUENTIAL_PROP(tS, pointProp, ZERO_MOM, seqProp, solverName, g); - - std::string modName = "Test g5 sequential insertion"; - makeSeqGamComparison(application, modName, pointProp, seqProp, origin, g, tS); - - // execution - application.saveParameterFile("SeqGamma5Test.xml"); - application.run(); - - // epilogue - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); - - return EXIT_SUCCESS; -} diff --git a/tests/hadrons/Test_hadrons_wilsonFund.cc b/tests/hadrons/Test_hadrons_wilsonFund.cc deleted file mode 100644 index df621812..00000000 --- a/tests/hadrons/Test_hadrons_wilsonFund.cc +++ /dev/null @@ -1,159 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Tests/Hadrons/Test_hadrons_wilsonFund.cc - -Copyright (C) 2015-2018 - - Author: Antonin Portelli - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#include -#include - -using namespace Grid; -using namespace Hadrons; - -int main(int argc, char *argv[]) -{ - // initialization ////////////////////////////////////////////////////////// - Grid_init(&argc, &argv); - HadronsLogError.Active(GridLogError.isActive()); - HadronsLogWarning.Active(GridLogWarning.isActive()); - HadronsLogMessage.Active(GridLogMessage.isActive()); - HadronsLogIterative.Active(GridLogIterative.isActive()); - HadronsLogDebug.Active(GridLogDebug.isActive()); - LOG(Message) << "Grid initialized" << std::endl; - - // run setup /////////////////////////////////////////////////////////////// - Application application; - std::vector flavour = {"l"}; - std::vector mass = {-0.1}; - double csw = 0.0; - - // global parameters - Application::GlobalPar globalPar; - - globalPar.trajCounter.start = 309; - globalPar.trajCounter.end = 310; - globalPar.trajCounter.step = 1; - globalPar.runId = "test"; - - application.setPar(globalPar); - // gauge field - application.createModule("gauge"); - - // sources - //MSource::Z2::Par z2Par; - //z2Par.tA = 0; - //z2Par.tB = 0; - //application.createModule("z2", z2Par); - MSource::Point::Par ptPar; - ptPar.position = "0 0 0 0"; - application.createModule("pt", ptPar); - // sink - MSink::Point::Par sinkPar; - sinkPar.mom = "0 0 0"; - application.createModule("sink", sinkPar); - - // set fermion boundary conditions to be periodic space, antiperiodic time. - std::string boundary = "1 1 1 -1"; - - for (unsigned int i = 0; i < flavour.size(); ++i) - { - // actions - MAction::WilsonClover::Par actionPar; - actionPar.gauge = "gauge"; - actionPar.mass = mass[i]; - actionPar.boundary = boundary; - actionPar.csw_r = csw; - actionPar.csw_t = csw; - - // !!!!! Check if Anisotropy works !!!!! - actionPar.clover_anisotropy.isAnisotropic= false; - actionPar.clover_anisotropy.t_direction = 3 ; // Explicit for D=4 - actionPar.clover_anisotropy.xi_0 = 1.0 ; - actionPar.clover_anisotropy.nu = 1.0 ; - - application.createModule("WilsonClover_" + flavour[i], actionPar); - - // solvers - MSolver::RBPrecCG::Par solverPar; - solverPar.action = "WilsonClover_" + flavour[i]; - solverPar.residual = 1.0e-8; - solverPar.maxIteration = 10000; - application.createModule("CG_" + flavour[i], - solverPar); - - // propagators - MFermion::GaugeProp::Par quarkPar; - quarkPar.solver = "CG_" + flavour[i]; - quarkPar.source = "pt"; - application.createModule("Qpt_" + flavour[i], quarkPar); - // quarkPar.source = "z2"; - // application.createModule("QZ2_" + flavour[i], quarkPar); - } - for (unsigned int i = 0; i < flavour.size(); ++i) - for (unsigned int j = i; j < flavour.size(); ++j) - { - MContraction::Meson::Par mesPar; - - mesPar.output = "Fund_mesons/pt_" + flavour[i] + flavour[j]; - mesPar.q1 = "Qpt_" + flavour[i]; - mesPar.q2 = "Qpt_" + flavour[j]; - mesPar.gammas = "all"; - mesPar.sink = "sink"; - application.createModule("meson_pt_" - + flavour[i] + flavour[j], - mesPar); - // mesPar.output = "mesons/Z2_" + flavour[i] + flavour[j]; - // mesPar.q1 = "QZ2_" + flavour[i]; - // mesPar.q2 = "QZ2_" + flavour[j]; - // mesPar.gammas = "all"; - // mesPar.sink = "sink"; - // application.createModule("meson_Z2_" - // + flavour[i] + flavour[j], - // mesPar); - } - for (unsigned int i = 0; i < flavour.size(); ++i) - for (unsigned int j = i; j < flavour.size(); ++j) - for (unsigned int k = j; k < flavour.size(); ++k) - { - MContraction::Baryon::Par barPar; - - barPar.output = "Fund_baryons/pt_" + flavour[i] + flavour[j] + flavour[k]; - barPar.q1 = "Qpt_" + flavour[i]; - barPar.q2 = "Qpt_" + flavour[j]; - barPar.q3 = "Qpt_" + flavour[k]; - application.createModule( - "baryon_pt_" + flavour[i] + flavour[j] + flavour[k], barPar); - } - - // execution - application.saveParameterFile("WilsonClover_spectrum.xml"); - application.run(); - - // epilogue - LOG(Message) << "Grid is finalizing now" << std::endl; - Grid_finalize(); - - return EXIT_SUCCESS; -} From 90d6d2854769f1867d080d4de12c06de26f47244 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 11:35:10 +0000 Subject: [PATCH 06/29] Hadrons: non-eye weak 3pt fix --- Hadrons/Modules/MContraction/WeakNonEye3pt.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp index dc74192b..b755bf88 100644 --- a/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp +++ b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp @@ -8,8 +8,7 @@ BEGIN_HADRONS_NAMESPACE /* - * Weak Hamiltonian meson 3-pt diagrams, non-eye-topologies. - * + * Weak Hamiltonian meson 3-pt diagrams, non-eye topologies. * * Schematic: * qbl qbr | qbl qbr @@ -24,10 +23,10 @@ BEGIN_HADRONS_NAMESPACE * \ / \ / | \-->--/ \-->--/ * \-->--/ \-->--/ | ql qr * ql qr | - * One trace | Two traces + * one trace | two traces * - * One trace : tr(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G) - * Two traces: tr(ql*adj(gIn)*g5*adj(qbl)*g5*G)*tr(qbr*gOut*g5*adj(qr)*g5*G) + * one trace : tr(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G) + * two traces: tr(ql*adj(gIn)*g5*adj(qbl)*g5*G)*tr(qbr*gOut*g5*adj(qr)*g5*G) * */ @@ -143,6 +142,7 @@ void TWeakNonEye3pt::execute(void) // one trace corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G); sliceSum(corr, buf, Tp); + r.corr.clear(); for (unsigned int t = 0; t < buf.size(); ++t) { r.corr.push_back(TensorRemove(buf[t])); @@ -152,6 +152,7 @@ void TWeakNonEye3pt::execute(void) // two traces corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G)*trace(qbr*gOut*g5*adj(qr)*g5*G); sliceSum(corr, buf, Tp); + r.corr.clear(); for (unsigned int t = 0; t < buf.size(); ++t) { r.corr.push_back(TensorRemove(buf[t])); From 08d8b1d5fb75318d3e6ae29b021428ff41d48e26 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 18:53:20 +0000 Subject: [PATCH 07/29] Hadrons: 4-quark eye 3-pt contractions --- Hadrons/Modules.hpp | 1 + Hadrons/Modules/MContraction/WeakEye3pt.cc | 7 + Hadrons/Modules/MContraction/WeakEye3pt.hpp | 172 ++++++++++++++++++++ Hadrons/modules.inc | 2 + 4 files changed, 182 insertions(+) create mode 100644 Hadrons/Modules/MContraction/WeakEye3pt.cc create mode 100644 Hadrons/Modules/MContraction/WeakEye3pt.hpp diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 3fc1dd81..a3aedf8a 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/Hadrons/Modules/MContraction/WeakEye3pt.cc b/Hadrons/Modules/MContraction/WeakEye3pt.cc new file mode 100644 index 00000000..f6596fa4 --- /dev/null +++ b/Hadrons/Modules/MContraction/WeakEye3pt.cc @@ -0,0 +1,7 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TWeakEye3pt; diff --git a/Hadrons/Modules/MContraction/WeakEye3pt.hpp b/Hadrons/Modules/MContraction/WeakEye3pt.hpp new file mode 100644 index 00000000..b1fef401 --- /dev/null +++ b/Hadrons/Modules/MContraction/WeakEye3pt.hpp @@ -0,0 +1,172 @@ +#ifndef Hadrons_MContraction_WeakEye3pt_hpp_ +#define Hadrons_MContraction_WeakEye3pt_hpp_ + +#include +#include +#include + +BEGIN_HADRONS_NAMESPACE + +/* + * Weak Hamiltonian meson 3-pt diagrams, eye topologies. + * + * Schematics: loop | + * /-<-¬ | + * / \ | qbl G qbr + * \ / | /----<------*------<----¬ + * qbl \ / qbr | / /-*-¬ \ + * /-----<-----* *-----<----¬ | / / G \ \ + * gIn * G G * gOut | gIn * \ / loop * gOut + * \ / | \ \->-/ / + * \ / | \ / + * \---------->---------/ | \----------->----------/ + * qs | qs + * | + * one trace | two traces + * + * one trace : tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut) + * two traces: tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G)*tr(loop*G) + * + */ + +BEGIN_MODULE_NAMESPACE(MContraction) + +class WeakEye3ptPar: Serializable +{ +public: + GRID_SERIALIZABLE_CLASS_MEMBERS(WeakEye3ptPar, + std::string, qBarLeft, + std::string, qBarRight, + std::string, qSpectator, + std::string, loop, + unsigned int, tOut, + Gamma::Algebra, gammaIn, + Gamma::Algebra, gammaOut, + std::string, output); +}; + +template +class TWeakEye3pt: public Module +{ +public: + FERM_TYPE_ALIASES(FImpl,); + class Metadata: Serializable + { + public: + GRID_SERIALIZABLE_CLASS_MEMBERS(Metadata, + Gamma::Algebra, in, + Gamma::Algebra, out, + Gamma::Algebra, op, + unsigned int, trace); + }; + typedef Correlator Result; +public: + // constructor + TWeakEye3pt(const std::string name); + // destructor + virtual ~TWeakEye3pt(void) {}; + // dependency relation + virtual std::vector getInput(void); + virtual std::vector getOutput(void); + // setup + virtual void setup(void); + // execution + virtual void execute(void); +}; + +MODULE_REGISTER_TMP(WeakEye3pt, TWeakEye3pt, MContraction); + +/****************************************************************************** + * TWeakEye3pt implementation * + ******************************************************************************/ +// constructor ///////////////////////////////////////////////////////////////// +template +TWeakEye3pt::TWeakEye3pt(const std::string name) +: Module(name) +{} + +// dependencies/products /////////////////////////////////////////////////////// +template +std::vector TWeakEye3pt::getInput(void) +{ + std::vector in = {par().qBarLeft, par().qBarRight, + par().qSpectator}; + + return in; +} + +template +std::vector TWeakEye3pt::getOutput(void) +{ + std::vector out = {}; + + return out; +} + +// setup /////////////////////////////////////////////////////////////////////// +template +void TWeakEye3pt::setup(void) +{ + envTmpLat(ComplexField, "corr"); +} + +// execution /////////////////////////////////////////////////////////////////// +template +void TWeakEye3pt::execute(void) +{ + LOG(Message) << "Computing mesonic weak 3pt contractions, non-eye topologies" << std::endl; + LOG(Message) << "gIn : " << par().gammaIn << std::endl; + LOG(Message) << "gOut: " << par().gammaIn << std::endl; + LOG(Message) << "tOut: " << par().tOut << std::endl; + LOG(Message) << "qbl : " << par().qBarLeft << std::endl; + LOG(Message) << "qbr : " << par().qBarRight << std::endl; + LOG(Message) << "qs : " << par().qSpectator << std::endl; + LOG(Message) << "loop: " << par().loop << std::endl; + + std::vector result; + Result r; + auto &qbl = envGet(PropagatorField, par().qBarLeft); + auto &qbr = envGet(PropagatorField, par().qBarRight); + auto &loop = envGet(PropagatorField, par().loop); + auto &qs = envGet(SlicedPropagator, par().qSpectator); + auto qst = qs[par().tOut]; + Gamma gIn(par().gammaIn), gOut(par().gammaOut); + Gamma g5(Gamma::Algebra::Gamma5); + + envGetTmp(ComplexField, corr); + r.info.in = par().gammaIn; + r.info.out = par().gammaOut; + for (auto &G: Gamma::gall) + { + SlicedComplex buf; + + r.info.op = G.g; + // one trace + corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut); + sliceSum(corr, buf, Tp); + r.corr.clear(); + for (unsigned int t = 0; t < buf.size(); ++t) + { + r.corr.push_back(TensorRemove(buf[t])); + } + r.info.trace = 1; + result.push_back(r); + // two traces + corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G)*trace(loop*G); + sliceSum(corr, buf, Tp); + r.corr.clear(); + for (unsigned int t = 0; t < buf.size(); ++t) + { + r.corr.push_back(TensorRemove(buf[t])); + } + r.info.trace = 2; + result.push_back(r); + } + saveResult(par().output, "weakEye3pt", result); +} + +END_MODULE_NAMESPACE + +END_HADRONS_NAMESPACE + +#endif // Hadrons_MContraction_WeakEye3pt_hpp_ diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index c307a5de..3dd90878 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -1,6 +1,7 @@ modules_cc =\ Modules/MContraction/Baryon.cc \ Modules/MContraction/Meson.cc \ + Modules/MContraction/WeakEye3pt.cc \ Modules/MContraction/WeakNonEye3pt.cc \ Modules/MContraction/A2AAslashField.cc \ Modules/MContraction/A2AMesonField.cc \ @@ -63,6 +64,7 @@ modules_cc =\ Modules/MIO/LoadA2AVectors.cc modules_hpp =\ + Modules/MContraction/WeakEye3pt.hpp \ Modules/MContraction/Baryon.hpp \ Modules/MContraction/A2AAslashField.hpp \ Modules/MContraction/A2AMesonField.hpp \ From c60e50e3cb5252fcf19a61014b2541acec6fc8a8 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 18:55:24 +0000 Subject: [PATCH 08/29] Hadrons: copyright update --- Hadrons/A2AMatrix.hpp | 2 +- Hadrons/A2AVectors.hpp | 2 +- Hadrons/Application.cc | 2 +- Hadrons/Application.hpp | 2 +- Hadrons/Archive/Modules/ScalarVP.cc | 4 +-- Hadrons/Archive/Modules/ScalarVP.hpp | 4 +-- Hadrons/Archive/Modules/TestSeqConserved.cc | 4 +-- Hadrons/Archive/Modules/TestSeqConserved.hpp | 4 +-- Hadrons/Archive/Modules/TestSeqGamma.cc | 4 +-- Hadrons/Archive/Modules/TestSeqGamma.hpp | 4 +-- Hadrons/Archive/Modules/VPCounterTerms.cc | 4 +-- Hadrons/Archive/Modules/VPCounterTerms.hpp | 4 +-- Hadrons/Archive/Modules/WardIdentity.cc | 4 +-- Hadrons/Archive/Modules/WardIdentity.hpp | 4 +-- Hadrons/Archive/Modules/WeakHamiltonian.hpp | 4 +-- Hadrons/Archive/Modules/WeakHamiltonianEye.cc | 4 +-- .../Archive/Modules/WeakHamiltonianEye.hpp | 4 +-- .../Archive/Modules/WeakHamiltonianNonEye.cc | 4 +-- .../Archive/Modules/WeakHamiltonianNonEye.hpp | 4 +-- Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc | 4 +-- .../Archive/Modules/WeakNeutral4ptDisc.hpp | 4 +-- Hadrons/DilutedNoise.hpp | 3 +- Hadrons/DiskVector.hpp | 2 +- Hadrons/EigenPack.hpp | 2 +- Hadrons/Environment.cc | 2 +- Hadrons/Environment.hpp | 2 +- Hadrons/Exceptions.cc | 2 +- Hadrons/Exceptions.hpp | 2 +- Hadrons/Factory.hpp | 2 +- Hadrons/GeneticScheduler.hpp | 2 +- Hadrons/Global.cc | 2 +- Hadrons/Global.hpp | 2 +- Hadrons/Graph.hpp | 2 +- Hadrons/Module.cc | 2 +- Hadrons/Module.hpp | 2 +- Hadrons/ModuleFactory.hpp | 2 +- Hadrons/Modules.hpp | 29 ++++++++++++++++++ Hadrons/Modules/MAction/DWF.cc | 2 +- Hadrons/Modules/MAction/DWF.hpp | 2 +- Hadrons/Modules/MAction/MobiusDWF.cc | 2 +- Hadrons/Modules/MAction/MobiusDWF.hpp | 2 +- Hadrons/Modules/MAction/ScaledDWF.cc | 2 +- Hadrons/Modules/MAction/ScaledDWF.hpp | 2 +- Hadrons/Modules/MAction/Wilson.cc | 2 +- Hadrons/Modules/MAction/Wilson.hpp | 2 +- Hadrons/Modules/MAction/WilsonClover.cc | 2 +- Hadrons/Modules/MAction/WilsonClover.hpp | 2 +- Hadrons/Modules/MAction/ZMobiusDWF.cc | 2 +- Hadrons/Modules/MAction/ZMobiusDWF.hpp | 2 +- .../Modules/MContraction/A2AAslashField.cc | 2 +- .../Modules/MContraction/A2AAslashField.hpp | 2 +- Hadrons/Modules/MContraction/A2AMesonField.cc | 2 +- .../Modules/MContraction/A2AMesonField.hpp | 2 +- Hadrons/Modules/MContraction/Baryon.cc | 2 +- Hadrons/Modules/MContraction/Baryon.hpp | 2 +- Hadrons/Modules/MContraction/DiscLoop.cc | 2 +- Hadrons/Modules/MContraction/DiscLoop.hpp | 2 +- Hadrons/Modules/MContraction/Gamma3pt.cc | 2 +- Hadrons/Modules/MContraction/Gamma3pt.hpp | 2 +- Hadrons/Modules/MContraction/Meson.cc | 2 +- Hadrons/Modules/MContraction/Meson.hpp | 2 +- Hadrons/Modules/MContraction/WeakEye3pt.cc | 27 +++++++++++++++++ Hadrons/Modules/MContraction/WeakEye3pt.hpp | 30 ++++++++++++++++++- Hadrons/Modules/MContraction/WeakNonEye3pt.cc | 27 +++++++++++++++++ .../Modules/MContraction/WeakNonEye3pt.hpp | 28 +++++++++++++++++ Hadrons/Modules/MFermion/FreeProp.cc | 2 +- Hadrons/Modules/MFermion/FreeProp.hpp | 2 +- Hadrons/Modules/MFermion/GaugeProp.cc | 2 +- Hadrons/Modules/MFermion/GaugeProp.hpp | 2 +- Hadrons/Modules/MGauge/Electrify.cc | 3 +- Hadrons/Modules/MGauge/Electrify.hpp | 3 +- Hadrons/Modules/MGauge/FundtoHirep.cc | 2 +- Hadrons/Modules/MGauge/FundtoHirep.hpp | 2 +- Hadrons/Modules/MGauge/GaugeFix.cc | 2 +- Hadrons/Modules/MGauge/GaugeFix.hpp | 2 +- Hadrons/Modules/MGauge/Random.cc | 2 +- Hadrons/Modules/MGauge/Random.hpp | 2 +- Hadrons/Modules/MGauge/StochEm.cc | 2 +- Hadrons/Modules/MGauge/StochEm.hpp | 2 +- Hadrons/Modules/MGauge/StoutSmearing.cc | 2 +- Hadrons/Modules/MGauge/StoutSmearing.hpp | 2 +- Hadrons/Modules/MGauge/Unit.cc | 2 +- Hadrons/Modules/MGauge/Unit.hpp | 2 +- Hadrons/Modules/MGauge/UnitEm.cc | 2 +- Hadrons/Modules/MGauge/UnitEm.hpp | 2 +- Hadrons/Modules/MIO/LoadA2AVectors.cc | 2 +- Hadrons/Modules/MIO/LoadA2AVectors.hpp | 2 +- Hadrons/Modules/MIO/LoadBinary.cc | 2 +- Hadrons/Modules/MIO/LoadBinary.hpp | 2 +- Hadrons/Modules/MIO/LoadCoarseEigenPack.cc | 2 +- Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp | 2 +- Hadrons/Modules/MIO/LoadCosmHol.cc | 2 +- Hadrons/Modules/MIO/LoadCosmHol.hpp | 2 +- Hadrons/Modules/MIO/LoadEigenPack.cc | 2 +- Hadrons/Modules/MIO/LoadEigenPack.hpp | 2 +- Hadrons/Modules/MIO/LoadNersc.cc | 2 +- Hadrons/Modules/MIO/LoadNersc.hpp | 2 +- Hadrons/Modules/MLoop/NoiseLoop.cc | 2 +- Hadrons/Modules/MLoop/NoiseLoop.hpp | 2 +- Hadrons/Modules/MNPR/Amputate.cc | 2 +- Hadrons/Modules/MNPR/Amputate.hpp | 2 +- Hadrons/Modules/MNPR/Bilinear.cc | 2 +- Hadrons/Modules/MNPR/Bilinear.hpp | 2 +- Hadrons/Modules/MNPR/FourQuark.cc | 2 +- Hadrons/Modules/MNPR/FourQuark.hpp | 2 +- .../MNoise/FullVolumeSpinColorDiagonal.cc | 3 +- .../MNoise/FullVolumeSpinColorDiagonal.hpp | 3 +- .../MNoise/TimeDilutedSpinColorDiagonal.cc | 2 +- .../MNoise/TimeDilutedSpinColorDiagonal.hpp | 2 +- Hadrons/Modules/MScalar/ChargedProp.cc | 2 +- Hadrons/Modules/MScalar/ChargedProp.hpp | 2 +- Hadrons/Modules/MScalar/FreeProp.cc | 2 +- Hadrons/Modules/MScalar/FreeProp.hpp | 2 +- Hadrons/Modules/MScalar/Scalar.hpp | 2 +- Hadrons/Modules/MScalarSUN/Div.cc | 2 +- Hadrons/Modules/MScalarSUN/Div.hpp | 2 +- Hadrons/Modules/MScalarSUN/EMT.cc | 2 +- Hadrons/Modules/MScalarSUN/EMT.hpp | 2 +- Hadrons/Modules/MScalarSUN/Grad.cc | 2 +- Hadrons/Modules/MScalarSUN/Grad.hpp | 2 +- Hadrons/Modules/MScalarSUN/StochFreeField.cc | 2 +- Hadrons/Modules/MScalarSUN/StochFreeField.hpp | 2 +- Hadrons/Modules/MScalarSUN/TrKinetic.cc | 2 +- Hadrons/Modules/MScalarSUN/TrKinetic.hpp | 2 +- Hadrons/Modules/MScalarSUN/TrMag.cc | 2 +- Hadrons/Modules/MScalarSUN/TrMag.hpp | 2 +- Hadrons/Modules/MScalarSUN/TrPhi.cc | 2 +- Hadrons/Modules/MScalarSUN/TrPhi.hpp | 2 +- Hadrons/Modules/MScalarSUN/TransProj.cc | 2 +- Hadrons/Modules/MScalarSUN/TransProj.hpp | 2 +- Hadrons/Modules/MScalarSUN/TwoPoint.cc | 2 +- Hadrons/Modules/MScalarSUN/TwoPoint.hpp | 2 +- Hadrons/Modules/MScalarSUN/TwoPointNPR.cc | 2 +- Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp | 2 +- Hadrons/Modules/MScalarSUN/Utils.hpp | 2 +- Hadrons/Modules/MSink/Point.cc | 2 +- Hadrons/Modules/MSink/Point.hpp | 2 +- Hadrons/Modules/MSink/Smear.cc | 2 +- Hadrons/Modules/MSink/Smear.hpp | 2 +- Hadrons/Modules/MSolver/A2AAslashVectors.cc | 3 +- Hadrons/Modules/MSolver/A2AAslashVectors.hpp | 3 +- Hadrons/Modules/MSolver/A2AVectors.cc | 2 +- Hadrons/Modules/MSolver/A2AVectors.hpp | 2 +- Hadrons/Modules/MSolver/Guesser.hpp | 2 +- .../Modules/MSolver/LocalCoherenceLanczos.cc | 2 +- .../Modules/MSolver/LocalCoherenceLanczos.hpp | 2 +- .../Modules/MSolver/MixedPrecisionRBPrecCG.cc | 2 +- .../MSolver/MixedPrecisionRBPrecCG.hpp | 2 +- Hadrons/Modules/MSolver/RBPrecCG.cc | 2 +- Hadrons/Modules/MSolver/RBPrecCG.hpp | 2 +- Hadrons/Modules/MSource/Momentum.cc | 2 +- Hadrons/Modules/MSource/Momentum.hpp | 2 +- Hadrons/Modules/MSource/Point.cc | 2 +- Hadrons/Modules/MSource/Point.hpp | 2 +- Hadrons/Modules/MSource/SeqConserved.cc | 2 +- Hadrons/Modules/MSource/SeqConserved.hpp | 2 +- Hadrons/Modules/MSource/SeqGamma.cc | 2 +- Hadrons/Modules/MSource/SeqGamma.hpp | 2 +- Hadrons/Modules/MSource/Wall.cc | 2 +- Hadrons/Modules/MSource/Wall.hpp | 2 +- Hadrons/Modules/MSource/Z2.cc | 2 +- Hadrons/Modules/MSource/Z2.hpp | 2 +- Hadrons/Modules/MUtilities/PrecisionCast.cc | 2 +- Hadrons/Modules/MUtilities/PrecisionCast.hpp | 2 +- Hadrons/Modules/MUtilities/RandomVectors.cc | 2 +- Hadrons/Modules/MUtilities/RandomVectors.hpp | 2 +- Hadrons/Solver.hpp | 2 +- Hadrons/TimerArray.cc | 2 +- Hadrons/TimerArray.hpp | 2 +- Hadrons/Utilities/Contractor.cc | 3 +- Hadrons/Utilities/Contractor.hpp | 27 +++++++++++++++++ Hadrons/Utilities/ContractorBenchmark.cc | 27 +++++++++++++++++ Hadrons/Utilities/EigenPackCast.cc | 2 +- Hadrons/Utilities/HadronsXmlRun.cc | 2 +- Hadrons/VirtualMachine.cc | 2 +- Hadrons/VirtualMachine.hpp | 2 +- scripts/copyright | 2 +- 177 files changed, 389 insertions(+), 188 deletions(-) diff --git a/Hadrons/A2AMatrix.hpp b/Hadrons/A2AMatrix.hpp index ed2f5d36..29b30a7a 100644 --- a/Hadrons/A2AMatrix.hpp +++ b/Hadrons/A2AMatrix.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/A2AMatrix.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/A2AVectors.hpp b/Hadrons/A2AVectors.hpp index f55eb6d7..ecc1497f 100644 --- a/Hadrons/A2AVectors.hpp +++ b/Hadrons/A2AVectors.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/A2AVectors.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: fionnoh diff --git a/Hadrons/Application.cc b/Hadrons/Application.cc index d04c9a50..be2e87a1 100644 --- a/Hadrons/Application.cc +++ b/Hadrons/Application.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Application.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Application.hpp b/Hadrons/Application.hpp index 3578c919..1fc8c146 100644 --- a/Hadrons/Application.hpp +++ b/Hadrons/Application.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Application.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Archive/Modules/ScalarVP.cc b/Hadrons/Archive/Modules/ScalarVP.cc index b62ec380..f2696a19 100644 --- a/Hadrons/Archive/Modules/ScalarVP.cc +++ b/Hadrons/Archive/Modules/ScalarVP.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MScalar/ScalarVP.cc +Source file: Hadrons/Archive/Modules/ScalarVP.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Archive/Modules/ScalarVP.hpp b/Hadrons/Archive/Modules/ScalarVP.hpp index 3cd01249..310299a1 100644 --- a/Hadrons/Archive/Modules/ScalarVP.hpp +++ b/Hadrons/Archive/Modules/ScalarVP.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MScalar/ScalarVP.hpp +Source file: Hadrons/Archive/Modules/ScalarVP.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Archive/Modules/TestSeqConserved.cc b/Hadrons/Archive/Modules/TestSeqConserved.cc index e15eea2a..46227b99 100644 --- a/Hadrons/Archive/Modules/TestSeqConserved.cc +++ b/Hadrons/Archive/Modules/TestSeqConserved.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MUtilities/TestSeqConserved.cc +Source file: Hadrons/Archive/Modules/TestSeqConserved.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Archive/Modules/TestSeqConserved.hpp b/Hadrons/Archive/Modules/TestSeqConserved.hpp index c1c84105..fde8cfcd 100644 --- a/Hadrons/Archive/Modules/TestSeqConserved.hpp +++ b/Hadrons/Archive/Modules/TestSeqConserved.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MUtilities/TestSeqConserved.hpp +Source file: Hadrons/Archive/Modules/TestSeqConserved.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/TestSeqGamma.cc b/Hadrons/Archive/Modules/TestSeqGamma.cc index db9c824d..e52d0ade 100644 --- a/Hadrons/Archive/Modules/TestSeqGamma.cc +++ b/Hadrons/Archive/Modules/TestSeqGamma.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MUtilities/TestSeqGamma.cc +Source file: Hadrons/Archive/Modules/TestSeqGamma.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Archive/Modules/TestSeqGamma.hpp b/Hadrons/Archive/Modules/TestSeqGamma.hpp index 728dda05..3e1cdb6c 100644 --- a/Hadrons/Archive/Modules/TestSeqGamma.hpp +++ b/Hadrons/Archive/Modules/TestSeqGamma.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MUtilities/TestSeqGamma.hpp +Source file: Hadrons/Archive/Modules/TestSeqGamma.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/VPCounterTerms.cc b/Hadrons/Archive/Modules/VPCounterTerms.cc index 974d2171..4fa90d6a 100644 --- a/Hadrons/Archive/Modules/VPCounterTerms.cc +++ b/Hadrons/Archive/Modules/VPCounterTerms.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MScalar/VPCounterTerms.cc +Source file: Hadrons/Archive/Modules/VPCounterTerms.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Archive/Modules/VPCounterTerms.hpp b/Hadrons/Archive/Modules/VPCounterTerms.hpp index 8bbc3e20..d8e6cc9a 100644 --- a/Hadrons/Archive/Modules/VPCounterTerms.hpp +++ b/Hadrons/Archive/Modules/VPCounterTerms.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MScalar/VPCounterTerms.hpp +Source file: Hadrons/Archive/Modules/VPCounterTerms.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Archive/Modules/WardIdentity.cc b/Hadrons/Archive/Modules/WardIdentity.cc index 98c06d12..07e5b222 100644 --- a/Hadrons/Archive/Modules/WardIdentity.cc +++ b/Hadrons/Archive/Modules/WardIdentity.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WardIdentity.cc +Source file: Hadrons/Archive/Modules/WardIdentity.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Archive/Modules/WardIdentity.hpp b/Hadrons/Archive/Modules/WardIdentity.hpp index a0f82590..34819afc 100644 --- a/Hadrons/Archive/Modules/WardIdentity.hpp +++ b/Hadrons/Archive/Modules/WardIdentity.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WardIdentity.hpp +Source file: Hadrons/Archive/Modules/WardIdentity.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakHamiltonian.hpp b/Hadrons/Archive/Modules/WeakHamiltonian.hpp index a721e419..a8916325 100644 --- a/Hadrons/Archive/Modules/WeakHamiltonian.hpp +++ b/Hadrons/Archive/Modules/WeakHamiltonian.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakHamiltonian.hpp +Source file: Hadrons/Archive/Modules/WeakHamiltonian.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakHamiltonianEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianEye.cc index 2183d992..df4d494c 100644 --- a/Hadrons/Archive/Modules/WeakHamiltonianEye.cc +++ b/Hadrons/Archive/Modules/WeakHamiltonianEye.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakHamiltonianEye.cc +Source file: Hadrons/Archive/Modules/WeakHamiltonianEye.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp index 37d37022..9d8db9a6 100644 --- a/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp +++ b/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp +Source file: Hadrons/Archive/Modules/WeakHamiltonianEye.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc index 5c1d8a1c..3b5ab2e9 100644 --- a/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc +++ b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc +Source file: Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp index 19c0ebaa..ce74642e 100644 --- a/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp +++ b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp +Source file: Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc index 2273dd3d..52fce3f6 100644 --- a/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc +++ b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc +Source file: Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp index 3e20633f..7a1d1451 100644 --- a/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp +++ b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp @@ -2,9 +2,9 @@ Grid physics library, www.github.com/paboyle/Grid -Source file: Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp +Source file: Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/DilutedNoise.hpp b/Hadrons/DilutedNoise.hpp index 1eb7ff40..b91dbc40 100644 --- a/Hadrons/DilutedNoise.hpp +++ b/Hadrons/DilutedNoise.hpp @@ -4,10 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/DilutedNoise.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Vera Guelpers +Author: Vera Guelpers This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/DiskVector.hpp b/Hadrons/DiskVector.hpp index 70a00b16..7410f1c3 100644 --- a/Hadrons/DiskVector.hpp +++ b/Hadrons/DiskVector.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/DiskVector.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/EigenPack.hpp b/Hadrons/EigenPack.hpp index 44dd84ff..a0f8b2c1 100644 --- a/Hadrons/EigenPack.hpp +++ b/Hadrons/EigenPack.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/EigenPack.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Environment.cc b/Hadrons/Environment.cc index d184ac0b..e7a7ac55 100644 --- a/Hadrons/Environment.cc +++ b/Hadrons/Environment.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Environment.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Environment.hpp b/Hadrons/Environment.hpp index 9841d665..b77345c8 100644 --- a/Hadrons/Environment.hpp +++ b/Hadrons/Environment.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Environment.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Exceptions.cc b/Hadrons/Exceptions.cc index c9800610..bb489cdf 100644 --- a/Hadrons/Exceptions.cc +++ b/Hadrons/Exceptions.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Exceptions.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Exceptions.hpp b/Hadrons/Exceptions.hpp index 2a8b0f8c..9974e33d 100644 --- a/Hadrons/Exceptions.hpp +++ b/Hadrons/Exceptions.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Exceptions.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Factory.hpp b/Hadrons/Factory.hpp index 8a3c20ba..cfb609e9 100644 --- a/Hadrons/Factory.hpp +++ b/Hadrons/Factory.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Factory.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/GeneticScheduler.hpp b/Hadrons/GeneticScheduler.hpp index 3e6b7fa4..f36a0f50 100644 --- a/Hadrons/GeneticScheduler.hpp +++ b/Hadrons/GeneticScheduler.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/GeneticScheduler.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Global.cc b/Hadrons/Global.cc index d72dbbd6..7645e956 100644 --- a/Hadrons/Global.cc +++ b/Hadrons/Global.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Global.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Global.hpp b/Hadrons/Global.hpp index 7ee55c49..947d962c 100644 --- a/Hadrons/Global.hpp +++ b/Hadrons/Global.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Global.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Graph.hpp b/Hadrons/Graph.hpp index 10e3bc60..65c74106 100644 --- a/Hadrons/Graph.hpp +++ b/Hadrons/Graph.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Graph.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Module.cc b/Hadrons/Module.cc index 3d4e834a..c5057f8f 100644 --- a/Hadrons/Module.cc +++ b/Hadrons/Module.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Module.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Module.hpp b/Hadrons/Module.hpp index 07765884..6f923867 100644 --- a/Hadrons/Module.hpp +++ b/Hadrons/Module.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Module.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/ModuleFactory.hpp b/Hadrons/ModuleFactory.hpp index 7dcbac75..4cb39983 100644 --- a/Hadrons/ModuleFactory.hpp +++ b/Hadrons/ModuleFactory.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/ModuleFactory.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index a3aedf8a..043f750b 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -1,3 +1,32 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules.hpp + +Copyright (C) 2015-2019 + +Author: Antonin Portelli +Author: Peter Boyle +Author: Vera Guelpers + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #include #include #include diff --git a/Hadrons/Modules/MAction/DWF.cc b/Hadrons/Modules/MAction/DWF.cc index 38d25cb9..1cb89602 100644 --- a/Hadrons/Modules/MAction/DWF.cc +++ b/Hadrons/Modules/MAction/DWF.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/DWF.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/DWF.hpp b/Hadrons/Modules/MAction/DWF.hpp index a7104b42..bac70ae8 100644 --- a/Hadrons/Modules/MAction/DWF.hpp +++ b/Hadrons/Modules/MAction/DWF.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/DWF.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MAction/MobiusDWF.cc b/Hadrons/Modules/MAction/MobiusDWF.cc index 879452d8..00819632 100644 --- a/Hadrons/Modules/MAction/MobiusDWF.cc +++ b/Hadrons/Modules/MAction/MobiusDWF.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/MobiusDWF.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/MobiusDWF.hpp b/Hadrons/Modules/MAction/MobiusDWF.hpp index 0ba9c4c3..6b960e2e 100644 --- a/Hadrons/Modules/MAction/MobiusDWF.hpp +++ b/Hadrons/Modules/MAction/MobiusDWF.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/MobiusDWF.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/ScaledDWF.cc b/Hadrons/Modules/MAction/ScaledDWF.cc index 7008bf5d..81b254b1 100644 --- a/Hadrons/Modules/MAction/ScaledDWF.cc +++ b/Hadrons/Modules/MAction/ScaledDWF.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/ScaledDWF.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/ScaledDWF.hpp b/Hadrons/Modules/MAction/ScaledDWF.hpp index 3b8066e6..8742a820 100644 --- a/Hadrons/Modules/MAction/ScaledDWF.hpp +++ b/Hadrons/Modules/MAction/ScaledDWF.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/ScaledDWF.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/Wilson.cc b/Hadrons/Modules/MAction/Wilson.cc index 1e801ed6..8d0f8b2f 100644 --- a/Hadrons/Modules/MAction/Wilson.cc +++ b/Hadrons/Modules/MAction/Wilson.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/Wilson.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/Wilson.hpp b/Hadrons/Modules/MAction/Wilson.hpp index b5e53837..3ce5569e 100644 --- a/Hadrons/Modules/MAction/Wilson.hpp +++ b/Hadrons/Modules/MAction/Wilson.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/Wilson.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MAction/WilsonClover.cc b/Hadrons/Modules/MAction/WilsonClover.cc index eed1582c..95f5abe6 100644 --- a/Hadrons/Modules/MAction/WilsonClover.cc +++ b/Hadrons/Modules/MAction/WilsonClover.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/WilsonClover.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/WilsonClover.hpp b/Hadrons/Modules/MAction/WilsonClover.hpp index ad301380..a9ea8de5 100644 --- a/Hadrons/Modules/MAction/WilsonClover.hpp +++ b/Hadrons/Modules/MAction/WilsonClover.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/WilsonClover.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Guido Cossu diff --git a/Hadrons/Modules/MAction/ZMobiusDWF.cc b/Hadrons/Modules/MAction/ZMobiusDWF.cc index 609b76cc..778db139 100644 --- a/Hadrons/Modules/MAction/ZMobiusDWF.cc +++ b/Hadrons/Modules/MAction/ZMobiusDWF.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/ZMobiusDWF.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MAction/ZMobiusDWF.hpp b/Hadrons/Modules/MAction/ZMobiusDWF.hpp index 12ad82ea..e780bd73 100644 --- a/Hadrons/Modules/MAction/ZMobiusDWF.hpp +++ b/Hadrons/Modules/MAction/ZMobiusDWF.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MAction/ZMobiusDWF.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/A2AAslashField.cc b/Hadrons/Modules/MContraction/A2AAslashField.cc index 65c49198..47c39cca 100644 --- a/Hadrons/Modules/MContraction/A2AAslashField.cc +++ b/Hadrons/Modules/MContraction/A2AAslashField.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/A2AAslashField.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/A2AAslashField.hpp b/Hadrons/Modules/MContraction/A2AAslashField.hpp index 8b99692b..520df0de 100644 --- a/Hadrons/Modules/MContraction/A2AAslashField.hpp +++ b/Hadrons/Modules/MContraction/A2AAslashField.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/A2AAslashField.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/A2AMesonField.cc b/Hadrons/Modules/MContraction/A2AMesonField.cc index c71f8ef2..0b4f79a9 100644 --- a/Hadrons/Modules/MContraction/A2AMesonField.cc +++ b/Hadrons/Modules/MContraction/A2AMesonField.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/A2AMesonField.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: paboyle diff --git a/Hadrons/Modules/MContraction/A2AMesonField.hpp b/Hadrons/Modules/MContraction/A2AMesonField.hpp index 1b3e7d8f..f01df09f 100644 --- a/Hadrons/Modules/MContraction/A2AMesonField.hpp +++ b/Hadrons/Modules/MContraction/A2AMesonField.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/A2AMesonField.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MContraction/Baryon.cc b/Hadrons/Modules/MContraction/Baryon.cc index f597a858..84e0f984 100644 --- a/Hadrons/Modules/MContraction/Baryon.cc +++ b/Hadrons/Modules/MContraction/Baryon.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Baryon.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/Baryon.hpp b/Hadrons/Modules/MContraction/Baryon.hpp index 01db09e0..fc78ab80 100644 --- a/Hadrons/Modules/MContraction/Baryon.hpp +++ b/Hadrons/Modules/MContraction/Baryon.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Baryon.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MContraction/DiscLoop.cc b/Hadrons/Modules/MContraction/DiscLoop.cc index fa4cd235..659593c6 100644 --- a/Hadrons/Modules/MContraction/DiscLoop.cc +++ b/Hadrons/Modules/MContraction/DiscLoop.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/DiscLoop.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/DiscLoop.hpp b/Hadrons/Modules/MContraction/DiscLoop.hpp index f8b88eb2..b28cc742 100644 --- a/Hadrons/Modules/MContraction/DiscLoop.hpp +++ b/Hadrons/Modules/MContraction/DiscLoop.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/DiscLoop.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MContraction/Gamma3pt.cc b/Hadrons/Modules/MContraction/Gamma3pt.cc index ca1ca441..044d7c65 100644 --- a/Hadrons/Modules/MContraction/Gamma3pt.cc +++ b/Hadrons/Modules/MContraction/Gamma3pt.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Gamma3pt.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/Gamma3pt.hpp b/Hadrons/Modules/MContraction/Gamma3pt.hpp index 2a0da43a..d36e184b 100644 --- a/Hadrons/Modules/MContraction/Gamma3pt.hpp +++ b/Hadrons/Modules/MContraction/Gamma3pt.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Gamma3pt.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MContraction/Meson.cc b/Hadrons/Modules/MContraction/Meson.cc index 7fac7e95..ddb7c3ae 100644 --- a/Hadrons/Modules/MContraction/Meson.cc +++ b/Hadrons/Modules/MContraction/Meson.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Meson.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MContraction/Meson.hpp b/Hadrons/Modules/MContraction/Meson.hpp index 514a6bb9..ee923341 100644 --- a/Hadrons/Modules/MContraction/Meson.hpp +++ b/Hadrons/Modules/MContraction/Meson.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MContraction/Meson.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MContraction/WeakEye3pt.cc b/Hadrons/Modules/MContraction/WeakEye3pt.cc index f6596fa4..4942bbe4 100644 --- a/Hadrons/Modules/MContraction/WeakEye3pt.cc +++ b/Hadrons/Modules/MContraction/WeakEye3pt.cc @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/WeakEye3pt.cc + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #include using namespace Grid; diff --git a/Hadrons/Modules/MContraction/WeakEye3pt.hpp b/Hadrons/Modules/MContraction/WeakEye3pt.hpp index b1fef401..22af2501 100644 --- a/Hadrons/Modules/MContraction/WeakEye3pt.hpp +++ b/Hadrons/Modules/MContraction/WeakEye3pt.hpp @@ -1,3 +1,31 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/WeakEye3pt.hpp + +Copyright (C) 2015-2019 + +Author: Antonin Portelli +Author: Lanny91 + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #ifndef Hadrons_MContraction_WeakEye3pt_hpp_ #define Hadrons_MContraction_WeakEye3pt_hpp_ @@ -114,7 +142,7 @@ void TWeakEye3pt::setup(void) template void TWeakEye3pt::execute(void) { - LOG(Message) << "Computing mesonic weak 3pt contractions, non-eye topologies" << std::endl; + LOG(Message) << "Computing mesonic weak 3pt contractions, eye topologies" << std::endl; LOG(Message) << "gIn : " << par().gammaIn << std::endl; LOG(Message) << "gOut: " << par().gammaIn << std::endl; LOG(Message) << "tOut: " << par().tOut << std::endl; diff --git a/Hadrons/Modules/MContraction/WeakNonEye3pt.cc b/Hadrons/Modules/MContraction/WeakNonEye3pt.cc index 84560710..59ada976 100644 --- a/Hadrons/Modules/MContraction/WeakNonEye3pt.cc +++ b/Hadrons/Modules/MContraction/WeakNonEye3pt.cc @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/WeakNonEye3pt.cc + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #include using namespace Grid; diff --git a/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp index b755bf88..08a1188b 100644 --- a/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp +++ b/Hadrons/Modules/MContraction/WeakNonEye3pt.hpp @@ -1,3 +1,31 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/WeakNonEye3pt.hpp + +Copyright (C) 2015-2019 + +Author: Antonin Portelli +Author: Lanny91 + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #ifndef Hadrons_MContraction_WeakNonEye3pt_hpp_ #define Hadrons_MContraction_WeakNonEye3pt_hpp_ diff --git a/Hadrons/Modules/MFermion/FreeProp.cc b/Hadrons/Modules/MFermion/FreeProp.cc index 1256f19c..e35afd2d 100644 --- a/Hadrons/Modules/MFermion/FreeProp.cc +++ b/Hadrons/Modules/MFermion/FreeProp.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MFermion/FreeProp.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Vera Guelpers diff --git a/Hadrons/Modules/MFermion/FreeProp.hpp b/Hadrons/Modules/MFermion/FreeProp.hpp index b5d7b1a3..5cb168c3 100644 --- a/Hadrons/Modules/MFermion/FreeProp.hpp +++ b/Hadrons/Modules/MFermion/FreeProp.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MFermion/FreeProp.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Vera Guelpers diff --git a/Hadrons/Modules/MFermion/GaugeProp.cc b/Hadrons/Modules/MFermion/GaugeProp.cc index f3881e0f..23291714 100644 --- a/Hadrons/Modules/MFermion/GaugeProp.cc +++ b/Hadrons/Modules/MFermion/GaugeProp.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MFermion/GaugeProp.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MFermion/GaugeProp.hpp b/Hadrons/Modules/MFermion/GaugeProp.hpp index e779ae68..f11113b4 100644 --- a/Hadrons/Modules/MFermion/GaugeProp.hpp +++ b/Hadrons/Modules/MFermion/GaugeProp.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MFermion/GaugeProp.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Guido Cossu diff --git a/Hadrons/Modules/MGauge/Electrify.cc b/Hadrons/Modules/MGauge/Electrify.cc index 1feea9ec..b7d3bac9 100644 --- a/Hadrons/Modules/MGauge/Electrify.cc +++ b/Hadrons/Modules/MGauge/Electrify.cc @@ -4,9 +4,10 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Electrify.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Vera Guelpers +Author: Vera Guelpers This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/Modules/MGauge/Electrify.hpp b/Hadrons/Modules/MGauge/Electrify.hpp index 58d65eba..31fa6b8d 100644 --- a/Hadrons/Modules/MGauge/Electrify.hpp +++ b/Hadrons/Modules/MGauge/Electrify.hpp @@ -4,9 +4,10 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Electrify.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Vera Guelpers +Author: Vera Guelpers This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/Modules/MGauge/FundtoHirep.cc b/Hadrons/Modules/MGauge/FundtoHirep.cc index 11b4aed5..f5b1385f 100644 --- a/Hadrons/Modules/MGauge/FundtoHirep.cc +++ b/Hadrons/Modules/MGauge/FundtoHirep.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/FundtoHirep.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Guido Cossu diff --git a/Hadrons/Modules/MGauge/FundtoHirep.hpp b/Hadrons/Modules/MGauge/FundtoHirep.hpp index 893383d2..345520f4 100644 --- a/Hadrons/Modules/MGauge/FundtoHirep.hpp +++ b/Hadrons/Modules/MGauge/FundtoHirep.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/FundtoHirep.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: pretidav diff --git a/Hadrons/Modules/MGauge/GaugeFix.cc b/Hadrons/Modules/MGauge/GaugeFix.cc index 53aa16da..3a90ec36 100644 --- a/Hadrons/Modules/MGauge/GaugeFix.cc +++ b/Hadrons/Modules/MGauge/GaugeFix.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/GaugeFix.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MGauge/GaugeFix.hpp b/Hadrons/Modules/MGauge/GaugeFix.hpp index ece8c19d..87822a7e 100644 --- a/Hadrons/Modules/MGauge/GaugeFix.hpp +++ b/Hadrons/Modules/MGauge/GaugeFix.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/GaugeFix.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MGauge/Random.cc b/Hadrons/Modules/MGauge/Random.cc index 040cd91a..b5fa4b94 100644 --- a/Hadrons/Modules/MGauge/Random.cc +++ b/Hadrons/Modules/MGauge/Random.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Random.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/Random.hpp b/Hadrons/Modules/MGauge/Random.hpp index 84b8dba0..358e3b79 100644 --- a/Hadrons/Modules/MGauge/Random.hpp +++ b/Hadrons/Modules/MGauge/Random.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Random.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/StochEm.cc b/Hadrons/Modules/MGauge/StochEm.cc index 574387e4..3b718c9f 100644 --- a/Hadrons/Modules/MGauge/StochEm.cc +++ b/Hadrons/Modules/MGauge/StochEm.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/StochEm.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MGauge/StochEm.hpp b/Hadrons/Modules/MGauge/StochEm.hpp index b549387b..2b521b17 100644 --- a/Hadrons/Modules/MGauge/StochEm.hpp +++ b/Hadrons/Modules/MGauge/StochEm.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/StochEm.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MGauge/StoutSmearing.cc b/Hadrons/Modules/MGauge/StoutSmearing.cc index e7fb43d1..a17efb39 100644 --- a/Hadrons/Modules/MGauge/StoutSmearing.cc +++ b/Hadrons/Modules/MGauge/StoutSmearing.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/StoutSmearing.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/StoutSmearing.hpp b/Hadrons/Modules/MGauge/StoutSmearing.hpp index 973ac38d..661e0944 100644 --- a/Hadrons/Modules/MGauge/StoutSmearing.hpp +++ b/Hadrons/Modules/MGauge/StoutSmearing.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/StoutSmearing.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/Unit.cc b/Hadrons/Modules/MGauge/Unit.cc index 02ad7c0b..087132b5 100644 --- a/Hadrons/Modules/MGauge/Unit.cc +++ b/Hadrons/Modules/MGauge/Unit.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Unit.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/Unit.hpp b/Hadrons/Modules/MGauge/Unit.hpp index f123f25b..ff0d116d 100644 --- a/Hadrons/Modules/MGauge/Unit.hpp +++ b/Hadrons/Modules/MGauge/Unit.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/Unit.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MGauge/UnitEm.cc b/Hadrons/Modules/MGauge/UnitEm.cc index 97da8224..d551e0fe 100644 --- a/Hadrons/Modules/MGauge/UnitEm.cc +++ b/Hadrons/Modules/MGauge/UnitEm.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/UnitEm.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MGauge/UnitEm.hpp b/Hadrons/Modules/MGauge/UnitEm.hpp index 725147b1..3277f211 100644 --- a/Hadrons/Modules/MGauge/UnitEm.hpp +++ b/Hadrons/Modules/MGauge/UnitEm.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MGauge/UnitEm.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MIO/LoadA2AVectors.cc b/Hadrons/Modules/MIO/LoadA2AVectors.cc index 7a40a6f5..ba1df2ad 100644 --- a/Hadrons/Modules/MIO/LoadA2AVectors.cc +++ b/Hadrons/Modules/MIO/LoadA2AVectors.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadA2AVectors.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadA2AVectors.hpp b/Hadrons/Modules/MIO/LoadA2AVectors.hpp index 5b194c16..997fc107 100644 --- a/Hadrons/Modules/MIO/LoadA2AVectors.hpp +++ b/Hadrons/Modules/MIO/LoadA2AVectors.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadA2AVectors.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadBinary.cc b/Hadrons/Modules/MIO/LoadBinary.cc index 3f1f4fba..48a909e2 100644 --- a/Hadrons/Modules/MIO/LoadBinary.cc +++ b/Hadrons/Modules/MIO/LoadBinary.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadBinary.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadBinary.hpp b/Hadrons/Modules/MIO/LoadBinary.hpp index ec5539b4..48dfccdc 100644 --- a/Hadrons/Modules/MIO/LoadBinary.hpp +++ b/Hadrons/Modules/MIO/LoadBinary.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadBinary.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc b/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc index ac8f2c4a..22c00843 100644 --- a/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc +++ b/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadCoarseEigenPack.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp b/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp index 94c1ff40..2e17356e 100644 --- a/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp +++ b/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadCosmHol.cc b/Hadrons/Modules/MIO/LoadCosmHol.cc index 9214165f..79dc6119 100644 --- a/Hadrons/Modules/MIO/LoadCosmHol.cc +++ b/Hadrons/Modules/MIO/LoadCosmHol.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadCosmHol.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadCosmHol.hpp b/Hadrons/Modules/MIO/LoadCosmHol.hpp index cd940309..a8faa608 100644 --- a/Hadrons/Modules/MIO/LoadCosmHol.hpp +++ b/Hadrons/Modules/MIO/LoadCosmHol.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadCosmHol.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadEigenPack.cc b/Hadrons/Modules/MIO/LoadEigenPack.cc index 28fdeb01..15153871 100644 --- a/Hadrons/Modules/MIO/LoadEigenPack.cc +++ b/Hadrons/Modules/MIO/LoadEigenPack.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadEigenPack.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadEigenPack.hpp b/Hadrons/Modules/MIO/LoadEigenPack.hpp index 016675c9..9751073a 100644 --- a/Hadrons/Modules/MIO/LoadEigenPack.hpp +++ b/Hadrons/Modules/MIO/LoadEigenPack.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadEigenPack.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadNersc.cc b/Hadrons/Modules/MIO/LoadNersc.cc index ce7276f9..c624ce31 100644 --- a/Hadrons/Modules/MIO/LoadNersc.cc +++ b/Hadrons/Modules/MIO/LoadNersc.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadNersc.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MIO/LoadNersc.hpp b/Hadrons/Modules/MIO/LoadNersc.hpp index c0e69511..facc2ecb 100644 --- a/Hadrons/Modules/MIO/LoadNersc.hpp +++ b/Hadrons/Modules/MIO/LoadNersc.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MIO/LoadNersc.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MLoop/NoiseLoop.cc b/Hadrons/Modules/MLoop/NoiseLoop.cc index a21372fb..613642c3 100644 --- a/Hadrons/Modules/MLoop/NoiseLoop.cc +++ b/Hadrons/Modules/MLoop/NoiseLoop.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MLoop/NoiseLoop.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MLoop/NoiseLoop.hpp b/Hadrons/Modules/MLoop/NoiseLoop.hpp index 8da172d4..30bbcd57 100644 --- a/Hadrons/Modules/MLoop/NoiseLoop.hpp +++ b/Hadrons/Modules/MLoop/NoiseLoop.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MLoop/NoiseLoop.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MNPR/Amputate.cc b/Hadrons/Modules/MNPR/Amputate.cc index ec7c5940..a8cb7eb6 100644 --- a/Hadrons/Modules/MNPR/Amputate.cc +++ b/Hadrons/Modules/MNPR/Amputate.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/Amputate.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MNPR/Amputate.hpp b/Hadrons/Modules/MNPR/Amputate.hpp index 953bb354..46a148c4 100644 --- a/Hadrons/Modules/MNPR/Amputate.hpp +++ b/Hadrons/Modules/MNPR/Amputate.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/Amputate.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Julia Kettle J.R.Kettle-2@sms.ed.ac.uk diff --git a/Hadrons/Modules/MNPR/Bilinear.cc b/Hadrons/Modules/MNPR/Bilinear.cc index c5b38d37..82086d5a 100644 --- a/Hadrons/Modules/MNPR/Bilinear.cc +++ b/Hadrons/Modules/MNPR/Bilinear.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/Bilinear.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MNPR/Bilinear.hpp b/Hadrons/Modules/MNPR/Bilinear.hpp index 66cd22a6..f9f3320a 100644 --- a/Hadrons/Modules/MNPR/Bilinear.hpp +++ b/Hadrons/Modules/MNPR/Bilinear.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/Bilinear.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Julia Kettle J.R.Kettle-2@sms.ed.ac.uk diff --git a/Hadrons/Modules/MNPR/FourQuark.cc b/Hadrons/Modules/MNPR/FourQuark.cc index 1943c25b..20ed2d7d 100644 --- a/Hadrons/Modules/MNPR/FourQuark.cc +++ b/Hadrons/Modules/MNPR/FourQuark.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/FourQuark.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MNPR/FourQuark.hpp b/Hadrons/Modules/MNPR/FourQuark.hpp index f961a366..ebf169c5 100644 --- a/Hadrons/Modules/MNPR/FourQuark.hpp +++ b/Hadrons/Modules/MNPR/FourQuark.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNPR/FourQuark.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Julia Kettle J.R.Kettle-2@sms.ed.ac.uk diff --git a/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.cc b/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.cc index b909bf92..b58fdc9c 100644 --- a/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.cc +++ b/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.cc @@ -4,10 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Vera Guelpers +Author: Vera Guelpers This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp b/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp index 93990882..c7f3afa0 100644 --- a/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp +++ b/Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp @@ -4,10 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Vera Guelpers +Author: Vera Guelpers This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.cc b/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.cc index 52d2b62d..c680a44b 100644 --- a/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.cc +++ b/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp b/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp index da634d6c..306efa10 100644 --- a/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp +++ b/Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalar/ChargedProp.cc b/Hadrons/Modules/MScalar/ChargedProp.cc index 51cfd585..7d623a8f 100644 --- a/Hadrons/Modules/MScalar/ChargedProp.cc +++ b/Hadrons/Modules/MScalar/ChargedProp.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalar/ChargedProp.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MScalar/ChargedProp.hpp b/Hadrons/Modules/MScalar/ChargedProp.hpp index 443c38a6..ec7f641b 100644 --- a/Hadrons/Modules/MScalar/ChargedProp.hpp +++ b/Hadrons/Modules/MScalar/ChargedProp.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalar/ChargedProp.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: James Harrison diff --git a/Hadrons/Modules/MScalar/FreeProp.cc b/Hadrons/Modules/MScalar/FreeProp.cc index 4b25fbd0..cbae8219 100644 --- a/Hadrons/Modules/MScalar/FreeProp.cc +++ b/Hadrons/Modules/MScalar/FreeProp.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalar/FreeProp.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalar/FreeProp.hpp b/Hadrons/Modules/MScalar/FreeProp.hpp index 5ed6756d..68e8a8e6 100644 --- a/Hadrons/Modules/MScalar/FreeProp.hpp +++ b/Hadrons/Modules/MScalar/FreeProp.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalar/FreeProp.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalar/Scalar.hpp b/Hadrons/Modules/MScalar/Scalar.hpp index afdb1713..69ca47a7 100644 --- a/Hadrons/Modules/MScalar/Scalar.hpp +++ b/Hadrons/Modules/MScalar/Scalar.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalar/Scalar.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/Div.cc b/Hadrons/Modules/MScalarSUN/Div.cc index c5d67579..9819a453 100644 --- a/Hadrons/Modules/MScalarSUN/Div.cc +++ b/Hadrons/Modules/MScalarSUN/Div.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/Div.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/Div.hpp b/Hadrons/Modules/MScalarSUN/Div.hpp index e6f38921..5d623fa0 100644 --- a/Hadrons/Modules/MScalarSUN/Div.hpp +++ b/Hadrons/Modules/MScalarSUN/Div.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/Div.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/EMT.cc b/Hadrons/Modules/MScalarSUN/EMT.cc index 08ba2a83..65859244 100644 --- a/Hadrons/Modules/MScalarSUN/EMT.cc +++ b/Hadrons/Modules/MScalarSUN/EMT.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/EMT.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/EMT.hpp b/Hadrons/Modules/MScalarSUN/EMT.hpp index c5fd10a5..bb6a5e7c 100644 --- a/Hadrons/Modules/MScalarSUN/EMT.hpp +++ b/Hadrons/Modules/MScalarSUN/EMT.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/EMT.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/Grad.cc b/Hadrons/Modules/MScalarSUN/Grad.cc index 15904af1..03160857 100644 --- a/Hadrons/Modules/MScalarSUN/Grad.cc +++ b/Hadrons/Modules/MScalarSUN/Grad.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/Grad.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/Grad.hpp b/Hadrons/Modules/MScalarSUN/Grad.hpp index 93a8ddda..a8b3911f 100644 --- a/Hadrons/Modules/MScalarSUN/Grad.hpp +++ b/Hadrons/Modules/MScalarSUN/Grad.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/Grad.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/StochFreeField.cc b/Hadrons/Modules/MScalarSUN/StochFreeField.cc index 70e8356d..7166d179 100644 --- a/Hadrons/Modules/MScalarSUN/StochFreeField.cc +++ b/Hadrons/Modules/MScalarSUN/StochFreeField.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/StochFreeField.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/StochFreeField.hpp b/Hadrons/Modules/MScalarSUN/StochFreeField.hpp index 141eeafd..2c53a7d3 100644 --- a/Hadrons/Modules/MScalarSUN/StochFreeField.hpp +++ b/Hadrons/Modules/MScalarSUN/StochFreeField.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/StochFreeField.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrKinetic.cc b/Hadrons/Modules/MScalarSUN/TrKinetic.cc index f3823264..10ae8a39 100644 --- a/Hadrons/Modules/MScalarSUN/TrKinetic.cc +++ b/Hadrons/Modules/MScalarSUN/TrKinetic.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrKinetic.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrKinetic.hpp b/Hadrons/Modules/MScalarSUN/TrKinetic.hpp index 8c82075f..ff68e314 100644 --- a/Hadrons/Modules/MScalarSUN/TrKinetic.hpp +++ b/Hadrons/Modules/MScalarSUN/TrKinetic.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrKinetic.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrMag.cc b/Hadrons/Modules/MScalarSUN/TrMag.cc index 88c8f547..45fbf1bf 100644 --- a/Hadrons/Modules/MScalarSUN/TrMag.cc +++ b/Hadrons/Modules/MScalarSUN/TrMag.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrMag.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrMag.hpp b/Hadrons/Modules/MScalarSUN/TrMag.hpp index b9602be3..84eb2231 100644 --- a/Hadrons/Modules/MScalarSUN/TrMag.hpp +++ b/Hadrons/Modules/MScalarSUN/TrMag.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrMag.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrPhi.cc b/Hadrons/Modules/MScalarSUN/TrPhi.cc index bb16f1bf..ee112f46 100644 --- a/Hadrons/Modules/MScalarSUN/TrPhi.cc +++ b/Hadrons/Modules/MScalarSUN/TrPhi.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrPhi.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TrPhi.hpp b/Hadrons/Modules/MScalarSUN/TrPhi.hpp index ecc0b8d3..b92a1343 100644 --- a/Hadrons/Modules/MScalarSUN/TrPhi.hpp +++ b/Hadrons/Modules/MScalarSUN/TrPhi.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TrPhi.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TransProj.cc b/Hadrons/Modules/MScalarSUN/TransProj.cc index 46de6307..697b72fd 100644 --- a/Hadrons/Modules/MScalarSUN/TransProj.cc +++ b/Hadrons/Modules/MScalarSUN/TransProj.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TransProj.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TransProj.hpp b/Hadrons/Modules/MScalarSUN/TransProj.hpp index 516410c2..7be37f33 100644 --- a/Hadrons/Modules/MScalarSUN/TransProj.hpp +++ b/Hadrons/Modules/MScalarSUN/TransProj.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TransProj.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TwoPoint.cc b/Hadrons/Modules/MScalarSUN/TwoPoint.cc index 9cb8b7ad..dd485515 100644 --- a/Hadrons/Modules/MScalarSUN/TwoPoint.cc +++ b/Hadrons/Modules/MScalarSUN/TwoPoint.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TwoPoint.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TwoPoint.hpp b/Hadrons/Modules/MScalarSUN/TwoPoint.hpp index df0d2cba..b22e38c9 100644 --- a/Hadrons/Modules/MScalarSUN/TwoPoint.hpp +++ b/Hadrons/Modules/MScalarSUN/TwoPoint.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TwoPoint.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TwoPointNPR.cc b/Hadrons/Modules/MScalarSUN/TwoPointNPR.cc index a7b4cd4f..b94d331f 100644 --- a/Hadrons/Modules/MScalarSUN/TwoPointNPR.cc +++ b/Hadrons/Modules/MScalarSUN/TwoPointNPR.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TwoPointNPR.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp b/Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp index 6a18f6cb..dd1e7215 100644 --- a/Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp +++ b/Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MScalarSUN/Utils.hpp b/Hadrons/Modules/MScalarSUN/Utils.hpp index 7eba5900..869bc8e7 100644 --- a/Hadrons/Modules/MScalarSUN/Utils.hpp +++ b/Hadrons/Modules/MScalarSUN/Utils.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MScalarSUN/Utils.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSink/Point.cc b/Hadrons/Modules/MSink/Point.cc index b1deaa64..333e56b1 100644 --- a/Hadrons/Modules/MSink/Point.cc +++ b/Hadrons/Modules/MSink/Point.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSink/Point.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSink/Point.hpp b/Hadrons/Modules/MSink/Point.hpp index 02189296..2785ba86 100644 --- a/Hadrons/Modules/MSink/Point.hpp +++ b/Hadrons/Modules/MSink/Point.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSink/Point.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Guido Cossu diff --git a/Hadrons/Modules/MSink/Smear.cc b/Hadrons/Modules/MSink/Smear.cc index aacceedf..b7a99025 100644 --- a/Hadrons/Modules/MSink/Smear.cc +++ b/Hadrons/Modules/MSink/Smear.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSink/Smear.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSink/Smear.hpp b/Hadrons/Modules/MSink/Smear.hpp index 59a8b9cd..47f91d3a 100644 --- a/Hadrons/Modules/MSink/Smear.hpp +++ b/Hadrons/Modules/MSink/Smear.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSink/Smear.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MSolver/A2AAslashVectors.cc b/Hadrons/Modules/MSolver/A2AAslashVectors.cc index 74e9f59f..d7e60db5 100644 --- a/Hadrons/Modules/MSolver/A2AAslashVectors.cc +++ b/Hadrons/Modules/MSolver/A2AAslashVectors.cc @@ -4,8 +4,9 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/A2AAslashVectors.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 +Author: Antonin Portelli Author: Vera Guelpers This program is free software; you can redistribute it and/or modify diff --git a/Hadrons/Modules/MSolver/A2AAslashVectors.hpp b/Hadrons/Modules/MSolver/A2AAslashVectors.hpp index 08c16729..7c745f10 100644 --- a/Hadrons/Modules/MSolver/A2AAslashVectors.hpp +++ b/Hadrons/Modules/MSolver/A2AAslashVectors.hpp @@ -4,8 +4,9 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/A2AAslashVectors.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 +Author: Antonin Portelli Author: Vera Guelpers This program is free software; you can redistribute it and/or modify diff --git a/Hadrons/Modules/MSolver/A2AVectors.cc b/Hadrons/Modules/MSolver/A2AVectors.cc index f5e9fd6c..c7d92006 100644 --- a/Hadrons/Modules/MSolver/A2AVectors.cc +++ b/Hadrons/Modules/MSolver/A2AVectors.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/A2AVectors.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: fionnoh diff --git a/Hadrons/Modules/MSolver/A2AVectors.hpp b/Hadrons/Modules/MSolver/A2AVectors.hpp index f9980ee3..0d419f85 100644 --- a/Hadrons/Modules/MSolver/A2AVectors.hpp +++ b/Hadrons/Modules/MSolver/A2AVectors.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/A2AVectors.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: fionnoh diff --git a/Hadrons/Modules/MSolver/Guesser.hpp b/Hadrons/Modules/MSolver/Guesser.hpp index 7063198d..9e2c68c3 100644 --- a/Hadrons/Modules/MSolver/Guesser.hpp +++ b/Hadrons/Modules/MSolver/Guesser.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/Guesser.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc index dacc871f..38bea68e 100644 --- a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc +++ b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp index 492ff39e..bde6d065 100644 --- a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp +++ b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.cc b/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.cc index 36dc7c94..a5286af6 100644 --- a/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.cc +++ b/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp b/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp index 67e1be19..808e1cb0 100644 --- a/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp +++ b/Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/RBPrecCG.cc b/Hadrons/Modules/MSolver/RBPrecCG.cc index 6d26532b..bf3b0868 100644 --- a/Hadrons/Modules/MSolver/RBPrecCG.cc +++ b/Hadrons/Modules/MSolver/RBPrecCG.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/RBPrecCG.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSolver/RBPrecCG.hpp b/Hadrons/Modules/MSolver/RBPrecCG.hpp index 8c83c6a1..a1ef2f7f 100644 --- a/Hadrons/Modules/MSolver/RBPrecCG.hpp +++ b/Hadrons/Modules/MSolver/RBPrecCG.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSolver/RBPrecCG.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: fionnoh diff --git a/Hadrons/Modules/MSource/Momentum.cc b/Hadrons/Modules/MSource/Momentum.cc index 9bcf65ae..ca72092f 100644 --- a/Hadrons/Modules/MSource/Momentum.cc +++ b/Hadrons/Modules/MSource/Momentum.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Momentum.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MSource/Momentum.hpp b/Hadrons/Modules/MSource/Momentum.hpp index 8336ea5c..d47146e8 100644 --- a/Hadrons/Modules/MSource/Momentum.hpp +++ b/Hadrons/Modules/MSource/Momentum.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Momentum.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Peter Boyle diff --git a/Hadrons/Modules/MSource/Point.cc b/Hadrons/Modules/MSource/Point.cc index 43cea943..52fc9399 100644 --- a/Hadrons/Modules/MSource/Point.cc +++ b/Hadrons/Modules/MSource/Point.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Point.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSource/Point.hpp b/Hadrons/Modules/MSource/Point.hpp index 2cc1bcd1..93f14030 100644 --- a/Hadrons/Modules/MSource/Point.hpp +++ b/Hadrons/Modules/MSource/Point.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Point.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MSource/SeqConserved.cc b/Hadrons/Modules/MSource/SeqConserved.cc index 1802993b..73dec85c 100644 --- a/Hadrons/Modules/MSource/SeqConserved.cc +++ b/Hadrons/Modules/MSource/SeqConserved.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/SeqConserved.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSource/SeqConserved.hpp b/Hadrons/Modules/MSource/SeqConserved.hpp index d34e427e..0bdd7f39 100644 --- a/Hadrons/Modules/MSource/SeqConserved.hpp +++ b/Hadrons/Modules/MSource/SeqConserved.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/SeqConserved.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MSource/SeqGamma.cc b/Hadrons/Modules/MSource/SeqGamma.cc index 64d31478..d901d5af 100644 --- a/Hadrons/Modules/MSource/SeqGamma.cc +++ b/Hadrons/Modules/MSource/SeqGamma.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/SeqGamma.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSource/SeqGamma.hpp b/Hadrons/Modules/MSource/SeqGamma.hpp index b9fb9b1b..1ab5f9b9 100644 --- a/Hadrons/Modules/MSource/SeqGamma.hpp +++ b/Hadrons/Modules/MSource/SeqGamma.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/SeqGamma.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MSource/Wall.cc b/Hadrons/Modules/MSource/Wall.cc index dbc46293..4b36145f 100644 --- a/Hadrons/Modules/MSource/Wall.cc +++ b/Hadrons/Modules/MSource/Wall.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Wall.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSource/Wall.hpp b/Hadrons/Modules/MSource/Wall.hpp index 3dfbc199..e43c61bb 100644 --- a/Hadrons/Modules/MSource/Wall.hpp +++ b/Hadrons/Modules/MSource/Wall.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Wall.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli Author: Lanny91 diff --git a/Hadrons/Modules/MSource/Z2.cc b/Hadrons/Modules/MSource/Z2.cc index 2fc95532..bd63d02a 100644 --- a/Hadrons/Modules/MSource/Z2.cc +++ b/Hadrons/Modules/MSource/Z2.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Z2.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MSource/Z2.hpp b/Hadrons/Modules/MSource/Z2.hpp index e16114e0..f943072f 100644 --- a/Hadrons/Modules/MSource/Z2.hpp +++ b/Hadrons/Modules/MSource/Z2.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MSource/Z2.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MUtilities/PrecisionCast.cc b/Hadrons/Modules/MUtilities/PrecisionCast.cc index 556ededc..d1235070 100644 --- a/Hadrons/Modules/MUtilities/PrecisionCast.cc +++ b/Hadrons/Modules/MUtilities/PrecisionCast.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MUtilities/PrecisionCast.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MUtilities/PrecisionCast.hpp b/Hadrons/Modules/MUtilities/PrecisionCast.hpp index 39a5ff73..ce3321a1 100644 --- a/Hadrons/Modules/MUtilities/PrecisionCast.hpp +++ b/Hadrons/Modules/MUtilities/PrecisionCast.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MUtilities/PrecisionCast.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MUtilities/RandomVectors.cc b/Hadrons/Modules/MUtilities/RandomVectors.cc index eb3b9cad..9676ddc0 100644 --- a/Hadrons/Modules/MUtilities/RandomVectors.cc +++ b/Hadrons/Modules/MUtilities/RandomVectors.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MUtilities/RandomVectors.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Modules/MUtilities/RandomVectors.hpp b/Hadrons/Modules/MUtilities/RandomVectors.hpp index 65126eb7..c5c6c687 100644 --- a/Hadrons/Modules/MUtilities/RandomVectors.hpp +++ b/Hadrons/Modules/MUtilities/RandomVectors.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Modules/MUtilities/RandomVectors.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Solver.hpp b/Hadrons/Solver.hpp index adba9665..22af6309 100644 --- a/Hadrons/Solver.hpp +++ b/Hadrons/Solver.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Solver.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/TimerArray.cc b/Hadrons/TimerArray.cc index 2b85bc7e..1274f4d5 100644 --- a/Hadrons/TimerArray.cc +++ b/Hadrons/TimerArray.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/TimerArray.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/TimerArray.hpp b/Hadrons/TimerArray.hpp index 77cc2b8c..a4a5b3a4 100644 --- a/Hadrons/TimerArray.hpp +++ b/Hadrons/TimerArray.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/TimerArray.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Utilities/Contractor.cc b/Hadrons/Utilities/Contractor.cc index 11ea0bc1..cfa4492e 100644 --- a/Hadrons/Utilities/Contractor.cc +++ b/Hadrons/Utilities/Contractor.cc @@ -4,8 +4,9 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Utilities/Contractor.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 +Author: Antonin Portelli This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Hadrons/Utilities/Contractor.hpp b/Hadrons/Utilities/Contractor.hpp index 9640c7c8..decd13aa 100644 --- a/Hadrons/Utilities/Contractor.hpp +++ b/Hadrons/Utilities/Contractor.hpp @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Utilities/Contractor.hpp + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #ifndef Hadrons_Contractor_hpp_ #define Hadrons_Contractor_hpp_ diff --git a/Hadrons/Utilities/ContractorBenchmark.cc b/Hadrons/Utilities/ContractorBenchmark.cc index 1ec4657b..37c410db 100644 --- a/Hadrons/Utilities/ContractorBenchmark.cc +++ b/Hadrons/Utilities/ContractorBenchmark.cc @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Utilities/ContractorBenchmark.cc + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #include #include #ifdef USE_MKL diff --git a/Hadrons/Utilities/EigenPackCast.cc b/Hadrons/Utilities/EigenPackCast.cc index 8c3a2b3f..d76dc6d2 100644 --- a/Hadrons/Utilities/EigenPackCast.cc +++ b/Hadrons/Utilities/EigenPackCast.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Utilities/EigenPackCast.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/Utilities/HadronsXmlRun.cc b/Hadrons/Utilities/HadronsXmlRun.cc index 9b8fc901..a69de7d7 100644 --- a/Hadrons/Utilities/HadronsXmlRun.cc +++ b/Hadrons/Utilities/HadronsXmlRun.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/Utilities/HadronsXmlRun.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/VirtualMachine.cc b/Hadrons/VirtualMachine.cc index 48c2cbf6..0d2e7de2 100644 --- a/Hadrons/VirtualMachine.cc +++ b/Hadrons/VirtualMachine.cc @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/VirtualMachine.cc -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/Hadrons/VirtualMachine.hpp b/Hadrons/VirtualMachine.hpp index 9d0357f5..dff72aa6 100644 --- a/Hadrons/VirtualMachine.hpp +++ b/Hadrons/VirtualMachine.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: Hadrons/VirtualMachine.hpp -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 Author: Antonin Portelli diff --git a/scripts/copyright b/scripts/copyright index 2401f4aa..30187653 100755 --- a/scripts/copyright +++ b/scripts/copyright @@ -11,7 +11,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: $1 -Copyright (C) 2015-2018 +Copyright (C) 2015-2019 EOF From d5b053f86f24d50cb5e57d1a1b5a87ed70755664 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 19:12:38 +0000 Subject: [PATCH 09/29] Hadrons: 1 propagator loop construction now using A2A vectors --- Hadrons/Modules.hpp | 31 +----- Hadrons/Modules/MContraction/A2ALoop.cc | 7 ++ Hadrons/Modules/MContraction/A2ALoop.hpp | 96 ++++++++++++++++ Hadrons/Modules/MLoop/NoiseLoop.cc | 35 ------ Hadrons/Modules/MLoop/NoiseLoop.hpp | 134 ----------------------- Hadrons/modules.inc | 4 +- 6 files changed, 106 insertions(+), 201 deletions(-) create mode 100644 Hadrons/Modules/MContraction/A2ALoop.cc create mode 100644 Hadrons/Modules/MContraction/A2ALoop.hpp delete mode 100644 Hadrons/Modules/MLoop/NoiseLoop.cc delete mode 100644 Hadrons/Modules/MLoop/NoiseLoop.hpp diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 043f750b..8d92580a 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -1,35 +1,7 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules.hpp - -Copyright (C) 2015-2019 - -Author: Antonin Portelli -Author: Peter Boyle -Author: Vera Guelpers - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ #include #include #include +#include #include #include #include @@ -63,7 +35,6 @@ See the full license in the file "LICENSE" in the top level distribution directo #include #include #include -#include #include #include #include diff --git a/Hadrons/Modules/MContraction/A2ALoop.cc b/Hadrons/Modules/MContraction/A2ALoop.cc new file mode 100644 index 00000000..fd4b088c --- /dev/null +++ b/Hadrons/Modules/MContraction/A2ALoop.cc @@ -0,0 +1,7 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TA2ALoop; diff --git a/Hadrons/Modules/MContraction/A2ALoop.hpp b/Hadrons/Modules/MContraction/A2ALoop.hpp new file mode 100644 index 00000000..9b7f303b --- /dev/null +++ b/Hadrons/Modules/MContraction/A2ALoop.hpp @@ -0,0 +1,96 @@ +#ifndef Hadrons_MContraction_A2ALoop_hpp_ +#define Hadrons_MContraction_A2ALoop_hpp_ + +#include +#include +#include + +BEGIN_HADRONS_NAMESPACE + +/****************************************************************************** + * From closed loop from all-to-all vectors * + ******************************************************************************/ +BEGIN_MODULE_NAMESPACE(MContraction) + +class A2ALoopPar: Serializable +{ +public: + GRID_SERIALIZABLE_CLASS_MEMBERS(A2ALoopPar, + std::string, left, + std::string, right); +}; + +template +class TA2ALoop: public Module +{ +public: + FERM_TYPE_ALIASES(FImpl,); +public: + // constructor + TA2ALoop(const std::string name); + // destructor + virtual ~TA2ALoop(void) {}; + // dependency relation + virtual std::vector getInput(void); + virtual std::vector getOutput(void); + // setup + virtual void setup(void); + // execution + virtual void execute(void); +}; + +MODULE_REGISTER_TMP(A2ALoop, TA2ALoop, MContraction); + +/****************************************************************************** + * TA2ALoop implementation * + ******************************************************************************/ +// constructor ///////////////////////////////////////////////////////////////// +template +TA2ALoop::TA2ALoop(const std::string name) +: Module(name) +{} + +// dependencies/products /////////////////////////////////////////////////////// +template +std::vector TA2ALoop::getInput(void) +{ + std::vector in = {par().left, par().right}; + + return in; +} + +template +std::vector TA2ALoop::getOutput(void) +{ + std::vector out = {}; + + return out; +} + +// setup /////////////////////////////////////////////////////////////////////// +template +void TA2ALoop::setup(void) +{ + envCreateLat(PropagatorField, getName()); +} + +// execution /////////////////////////////////////////////////////////////////// +template +void TA2ALoop::execute(void) +{ + auto &loop = envGet(PropagatorField, getName()); + auto &left = envGet(std::vector, par().left); + auto &right = envGet(std::vector, par().right); + + loop = zero; + for (unsigned int i = 0; i < left.size(); ++i) + { + loop += outerProduct(adj(left[i]), right[i]); + } +} + +END_MODULE_NAMESPACE + +END_HADRONS_NAMESPACE + +#endif // Hadrons_MContraction_A2ALoop_hpp_ diff --git a/Hadrons/Modules/MLoop/NoiseLoop.cc b/Hadrons/Modules/MLoop/NoiseLoop.cc deleted file mode 100644 index 613642c3..00000000 --- a/Hadrons/Modules/MLoop/NoiseLoop.cc +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MLoop/NoiseLoop.cc - -Copyright (C) 2015-2019 - -Author: Antonin Portelli - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ -#include - -using namespace Grid; -using namespace Hadrons; -using namespace MLoop; - -template class Grid::Hadrons::MLoop::TNoiseLoop; - diff --git a/Hadrons/Modules/MLoop/NoiseLoop.hpp b/Hadrons/Modules/MLoop/NoiseLoop.hpp deleted file mode 100644 index 30bbcd57..00000000 --- a/Hadrons/Modules/MLoop/NoiseLoop.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MLoop/NoiseLoop.hpp - -Copyright (C) 2015-2019 - -Author: Antonin Portelli -Author: Lanny91 - -This program 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 2 of the License, or -(at your option) any later version. - -This program 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 this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ - -#ifndef Hadrons_MLoop_NoiseLoop_hpp_ -#define Hadrons_MLoop_NoiseLoop_hpp_ - -#include -#include -#include - -BEGIN_HADRONS_NAMESPACE - -/* - - Noise loop propagator - ----------------------------- - * loop_x = q_x * adj(eta_x) - - * options: - - q = Result of inversion on noise source. - - eta = noise source. - - */ - - -/****************************************************************************** - * NoiseLoop * - ******************************************************************************/ -BEGIN_MODULE_NAMESPACE(MLoop) - -class NoiseLoopPar: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(NoiseLoopPar, - std::string, q, - std::string, eta); -}; - -template -class TNoiseLoop: public Module -{ -public: - FERM_TYPE_ALIASES(FImpl,); -public: - // constructor - TNoiseLoop(const std::string name); - // destructor - virtual ~TNoiseLoop(void) {}; - // dependency relation - virtual std::vector getInput(void); - virtual std::vector getOutput(void); -protected: - // setup - virtual void setup(void); - // execution - virtual void execute(void); -}; - -MODULE_REGISTER_TMP(NoiseLoop, TNoiseLoop, MLoop); - -/****************************************************************************** - * TNoiseLoop implementation * - ******************************************************************************/ -// constructor ///////////////////////////////////////////////////////////////// -template -TNoiseLoop::TNoiseLoop(const std::string name) -: Module(name) -{} - -// dependencies/products /////////////////////////////////////////////////////// -template -std::vector TNoiseLoop::getInput(void) -{ - std::vector in = {par().q, par().eta}; - - return in; -} - -template -std::vector TNoiseLoop::getOutput(void) -{ - std::vector out = {getName()}; - - return out; -} - -// setup /////////////////////////////////////////////////////////////////////// -template -void TNoiseLoop::setup(void) -{ - envCreateLat(PropagatorField, getName()); -} - -// execution /////////////////////////////////////////////////////////////////// -template -void TNoiseLoop::execute(void) -{ - auto &loop = envGet(PropagatorField, getName()); - auto &q = envGet(PropagatorField, par().q); - auto &eta = envGet(PropagatorField, par().eta); - loop = q*adj(eta); -} - -END_MODULE_NAMESPACE - -END_HADRONS_NAMESPACE - -#endif // Hadrons_MLoop_NoiseLoop_hpp_ diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index 3dd90878..44bd4311 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -2,6 +2,7 @@ modules_cc =\ Modules/MContraction/Baryon.cc \ Modules/MContraction/Meson.cc \ Modules/MContraction/WeakEye3pt.cc \ + Modules/MContraction/A2ALoop.cc \ Modules/MContraction/WeakNonEye3pt.cc \ Modules/MContraction/A2AAslashField.cc \ Modules/MContraction/A2AMesonField.cc \ @@ -34,7 +35,6 @@ modules_cc =\ Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \ Modules/MUtilities/RandomVectors.cc \ Modules/MUtilities/PrecisionCast.cc \ - Modules/MLoop/NoiseLoop.cc \ Modules/MScalar/FreeProp.cc \ Modules/MScalar/ChargedProp.cc \ Modules/MNPR/Amputate.cc \ @@ -67,6 +67,7 @@ modules_hpp =\ Modules/MContraction/WeakEye3pt.hpp \ Modules/MContraction/Baryon.hpp \ Modules/MContraction/A2AAslashField.hpp \ + Modules/MContraction/A2ALoop.hpp \ Modules/MContraction/A2AMesonField.hpp \ Modules/MContraction/Meson.hpp \ Modules/MContraction/DiscLoop.hpp \ @@ -100,7 +101,6 @@ modules_hpp =\ Modules/MNoise/FullVolumeSpinColorDiagonal.hpp \ Modules/MUtilities/PrecisionCast.hpp \ Modules/MUtilities/RandomVectors.hpp \ - Modules/MLoop/NoiseLoop.hpp \ Modules/MScalar/FreeProp.hpp \ Modules/MScalar/Scalar.hpp \ Modules/MScalar/ChargedProp.hpp \ From 318c64adc284fb8e345d04915cd01b3ea9bd57a1 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 19:13:37 +0000 Subject: [PATCH 10/29] Hadrons: copyright update --- Hadrons/Modules/MContraction/A2ALoop.cc | 27 ++++++++++++++++++++++++ Hadrons/Modules/MContraction/A2ALoop.hpp | 27 ++++++++++++++++++++++++ Hadrons/Modules/MGauge/Electrify.cc | 1 + Hadrons/Modules/MGauge/Electrify.hpp | 1 + 4 files changed, 56 insertions(+) diff --git a/Hadrons/Modules/MContraction/A2ALoop.cc b/Hadrons/Modules/MContraction/A2ALoop.cc index fd4b088c..3dfcd66d 100644 --- a/Hadrons/Modules/MContraction/A2ALoop.cc +++ b/Hadrons/Modules/MContraction/A2ALoop.cc @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/A2ALoop.cc + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #include using namespace Grid; diff --git a/Hadrons/Modules/MContraction/A2ALoop.hpp b/Hadrons/Modules/MContraction/A2ALoop.hpp index 9b7f303b..8ae129e3 100644 --- a/Hadrons/Modules/MContraction/A2ALoop.hpp +++ b/Hadrons/Modules/MContraction/A2ALoop.hpp @@ -1,3 +1,30 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Modules/MContraction/A2ALoop.hpp + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ #ifndef Hadrons_MContraction_A2ALoop_hpp_ #define Hadrons_MContraction_A2ALoop_hpp_ diff --git a/Hadrons/Modules/MGauge/Electrify.cc b/Hadrons/Modules/MGauge/Electrify.cc index b7d3bac9..1ad98ab2 100644 --- a/Hadrons/Modules/MGauge/Electrify.cc +++ b/Hadrons/Modules/MGauge/Electrify.cc @@ -6,6 +6,7 @@ Source file: Hadrons/Modules/MGauge/Electrify.cc Copyright (C) 2015-2019 +Author: Antonin Portelli Author: Vera Guelpers Author: Vera Guelpers diff --git a/Hadrons/Modules/MGauge/Electrify.hpp b/Hadrons/Modules/MGauge/Electrify.hpp index 31fa6b8d..4f34eef3 100644 --- a/Hadrons/Modules/MGauge/Electrify.hpp +++ b/Hadrons/Modules/MGauge/Electrify.hpp @@ -6,6 +6,7 @@ Source file: Hadrons/Modules/MGauge/Electrify.hpp Copyright (C) 2015-2019 +Author: Antonin Portelli Author: Vera Guelpers Author: Vera Guelpers From 74c38822ed563ac6e0c1e42757570b8860595b20 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 5 Feb 2019 21:56:51 +0000 Subject: [PATCH 11/29] Hadrons: 32 bit I/O directly in Lanczos module --- Hadrons/EigenPack.hpp | 4 ++- Hadrons/Module.hpp | 9 ++++++ Hadrons/Modules/MIO/LoadCoarseEigenPack.cc | 4 ++- Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp | 32 +++++++++++++++---- .../Modules/MSolver/LocalCoherenceLanczos.hpp | 21 +++++++++--- 5 files changed, 57 insertions(+), 13 deletions(-) diff --git a/Hadrons/EigenPack.hpp b/Hadrons/EigenPack.hpp index a0f8b2c1..1c7497f2 100644 --- a/Hadrons/EigenPack.hpp +++ b/Hadrons/EigenPack.hpp @@ -308,7 +308,9 @@ template { public: - typedef CoarseF CoarseField; + typedef CoarseF CoarseField; + typedef CoarseFIo CoarseFieldIo; +public: std::vector evecCoarse; std::vector evalCoarse; public: diff --git a/Hadrons/Module.hpp b/Hadrons/Module.hpp index 6f923867..95db9511 100644 --- a/Hadrons/Module.hpp +++ b/Hadrons/Module.hpp @@ -77,6 +77,15 @@ env().template getGrid(Ls) #define envGetGrid(...)\ HADRONS_MACRO_REDIRECT_12(__VA_ARGS__, envGetGrid5, envGetGrid4)(__VA_ARGS__) +#define envGetCoarseGrid4(latticeType, blockSize)\ +env().template getCoarseGrid(blockSize) + +#define envGetCoarseGrid5(latticeType, blockSize, Ls)\ +env().template getCoarseGrid(blockSize, Ls) + +#define envGetCoarseGrid(...)\ +HADRONS_MACRO_REDIRECT_23(__VA_ARGS__, envGetCoarseGrid5, envGetCoarseGrid4)(__VA_ARGS__) + #define envGetRbGrid4(latticeType)\ env().template getRbGrid() diff --git a/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc b/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc index 22c00843..22bc55a6 100644 --- a/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc +++ b/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc @@ -32,4 +32,6 @@ using namespace Hadrons; using namespace MIO; template class Grid::Hadrons::MIO::TLoadCoarseEigenPack>; - +#ifdef GRID_DEFAULT_PRECISION_DOUBLE +template class Grid::Hadrons::MIO::TLoadCoarseEigenPack>; +#endif diff --git a/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp b/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp index 2e17356e..521b4814 100644 --- a/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp +++ b/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp @@ -56,7 +56,11 @@ template class TLoadCoarseEigenPack: public Module { public: - typedef CoarseEigenPack BasePack; + typedef typename Pack::Field Field; + typedef typename Pack::FieldIo FieldIo; + typedef typename Pack::CoarseField CoarseField; + typedef typename Pack::CoarseFieldIo CoarseFieldIo; + typedef CoarseEigenPack BasePack; template using iImplScalar = iScalar>>; typedef iImplScalar SiteComplex; @@ -74,7 +78,12 @@ public: virtual void execute(void); }; -MODULE_REGISTER_TMP(LoadCoarseFermionEigenPack, ARG(TLoadCoarseEigenPack>), MIO); +MODULE_REGISTER_TMP(LoadCoarseFermionEigenPack, + ARG(TLoadCoarseEigenPack>), MIO); +#ifdef GRID_DEFAULT_PRECISION_DOUBLE +MODULE_REGISTER_TMP(LoadCoarseFermionEigenPackIo32, + ARG(TLoadCoarseEigenPack>), MIO); +#endif /****************************************************************************** * TLoadCoarseEigenPack implementation * @@ -106,18 +115,27 @@ std::vector TLoadCoarseEigenPack::getOutput(void) template void TLoadCoarseEigenPack::setup(void) { - env().createGrid(par().Ls); - env().createCoarseGrid(par().blockSize, par().Ls); + GridBase *gridIo = nullptr, *gridCoarseIo = nullptr; + + if (typeHash() != typeHash()) + { + gridIo = envGetRbGrid(FieldIo, par().Ls); + } + if (typeHash() != typeHash()) + { + gridCoarseIo = envGetCoarseGrid(CoarseFieldIo, par().blockSize, par().Ls); + } envCreateDerived(BasePack, Pack, getName(), par().Ls, par().sizeFine, - par().sizeCoarse, env().getRbGrid(par().Ls), - env().getCoarseGrid(par().blockSize, par().Ls)); + par().sizeCoarse, envGetRbGrid(Field, par().Ls), + envGetCoarseGrid(CoarseField, par().blockSize, par().Ls), + gridIo, gridCoarseIo); } // execution /////////////////////////////////////////////////////////////////// template void TLoadCoarseEigenPack::execute(void) { - auto cg = env().getCoarseGrid(par().blockSize, par().Ls); + auto cg = envGetCoarseGrid(CoarseField, par().blockSize, par().Ls); auto &epack = envGetDerived(BasePack, Pack, getName()); Lattice dummy(cg); diff --git a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp index bde6d065..72045313 100644 --- a/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp +++ b/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp @@ -65,6 +65,10 @@ public: nBasis> LCL; typedef BaseFermionEigenPack BasePack; typedef CoarseFermionEigenPack CoarsePack; + typedef typename CoarsePack::Field Field; + typedef typename CoarsePack::FieldIo FieldIo; + typedef typename CoarsePack::CoarseField CoarseField; + typedef typename CoarsePack::CoarseFieldIo CoarseFieldIo; typedef HADRONS_DEFAULT_SCHUR_OP SchurFMat; public: // constructor @@ -123,21 +127,30 @@ void TLocalCoherenceLanczos::setup(void) unsigned int Ls = env().getObjectLs(par().action); auto blockSize = strToVec(par().blockSize); + GridBase *gridIo = nullptr, *gridCoarseIo = nullptr; - env().createCoarseGrid(blockSize, Ls); + if (typeHash() != typeHash()) + { + gridIo = envGetRbGrid(FieldIo, Ls); + } + if (typeHash() != typeHash()) + { + gridCoarseIo = envGetCoarseGrid(CoarseFieldIo, blockSize, Ls); + } - auto cg = env().getCoarseGrid(blockSize, Ls); + auto cg = envGetCoarseGrid(CoarseField, blockSize, Ls); int cNm = (par().doCoarse) ? par().coarseParams.Nm : 0; LOG(Message) << "Coarse grid: " << cg->GlobalDimensions() << std::endl; envCreateDerived(BasePack, CoarsePack, getName(), Ls, - par().fineParams.Nm, cNm, env().getRbGrid(Ls), cg); + par().fineParams.Nm, cNm, envGetRbGrid(Field, Ls), cg, + gridIo, gridCoarseIo); auto &epack = envGetDerived(BasePack, CoarsePack, getName()); envTmp(SchurFMat, "mat", Ls, envGet(FMat, par().action)); envGetTmp(SchurFMat, mat); - envTmp(LCL, "solver", Ls, env().getRbGrid(Ls), cg, mat, + envTmp(LCL, "solver", Ls, envGetRbGrid(Field, Ls), cg, mat, Odd, epack.evec, epack.evecCoarse, epack.eval, epack.evalCoarse); } From c1257208e227536f47e25c0149afcf4eff411680 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 5 Feb 2019 23:43:00 +0000 Subject: [PATCH 12/29] Mres changes and gauge xform mat changes --- Grid/qcd/action/fermion/FermionOperator.h | 7 +++ Grid/qcd/action/fermion/WilsonFermion5D.cc | 71 +++++++++++++++++++++- Grid/qcd/action/fermion/WilsonFermion5D.h | 4 ++ Grid/qcd/utils/GaugeFix.h | 31 ++++++---- Grid/qcd/utils/SUn.h | 16 +++-- tests/core/Test_fft_gfix.cc | 20 +++++- 6 files changed, 129 insertions(+), 20 deletions(-) diff --git a/Grid/qcd/action/fermion/FermionOperator.h b/Grid/qcd/action/fermion/FermionOperator.h index 281c077e..55942dea 100644 --- a/Grid/qcd/action/fermion/FermionOperator.h +++ b/Grid/qcd/action/fermion/FermionOperator.h @@ -136,6 +136,7 @@ namespace Grid { ////////////////////////////////////////////////////////////////////// // Conserved currents, either contract at sink or insert sequentially. ////////////////////////////////////////////////////////////////////// + virtual void ContractConservedCurrent(PropagatorField &q_in_1, PropagatorField &q_in_2, PropagatorField &q_out, @@ -148,6 +149,12 @@ namespace Grid { unsigned int tmin, unsigned int tmax, ComplexField &lattice_cmplx)=0; + + // Only reimplemented in Wilson5D + // Default to just a zero correlation function + virtual void ContractJ5q(FermionField &q_in ,ComplexField &J5q) { J5q=zero; }; + virtual void ContractJ5q(PropagatorField &q_in,ComplexField &J5q) { J5q=zero; }; + /////////////////////////////////////////////// // Physical field import/export /////////////////////////////////////////////// diff --git a/Grid/qcd/action/fermion/WilsonFermion5D.cc b/Grid/qcd/action/fermion/WilsonFermion5D.cc index 47c9cbb5..fb3fd861 100644 --- a/Grid/qcd/action/fermion/WilsonFermion5D.cc +++ b/Grid/qcd/action/fermion/WilsonFermion5D.cc @@ -939,6 +939,75 @@ void WilsonFermion5D::MomentumSpacePropagatorHw(FermionField &out,const Fe merge(qSiteRev, qSiteVec); \ } +// psi = chiralProjectPlus(Result_s[Ls/2-1]); +// psi+= chiralProjectMinus(Result_s[Ls/2]); +// PJ5q+=localInnerProduct(psi,psi); + +template +Lattice spProj5p(const Lattice & in) +{ + GridBase *grid=in._grid; + Gamma G5(Gamma::Algebra::Gamma5); + Lattice ret(grid); + parallel_for(int ss=0;ssoSites();ss++){ + ret._odata[ss] = in._odata[ss] + G5*in._odata[ss]; + } + return ret; +} +template +Lattice spProj5m(const Lattice & in) +{ + Gamma G5(Gamma::Algebra::Gamma5); + GridBase *grid=in._grid; + Lattice ret(grid); + parallel_for(int ss=0;ssoSites();ss++){ + ret._odata[ss] = in._odata[ss] - G5*in._odata[ss]; + } + return ret; +} + +template +void WilsonFermion5D::ContractJ5q(FermionField &q_in,ComplexField &J5q) +{ + conformable(GaugeGrid(), J5q._grid); + conformable(q_in._grid, FermionGrid()); + + // 4d field + int Ls = this->Ls; + FermionField psi(GaugeGrid()); + FermionField p_plus (GaugeGrid()); + FermionField p_minus(GaugeGrid()); + FermionField p(GaugeGrid()); + + ExtractSlice(p_plus , q_in, Ls/2 , 0); + ExtractSlice(p_minus, q_in, Ls/2-1 , 0); + p_plus = spProj5p(p_plus ); + p_minus= spProj5m(p_minus); + p=p_plus+p_minus; + J5q = localInnerProduct(p,p); +} + +template +void WilsonFermion5D::ContractJ5q(PropagatorField &q_in,ComplexField &J5q) +{ + conformable(GaugeGrid(), J5q._grid); + conformable(q_in._grid, FermionGrid()); + + // 4d field + int Ls = this->Ls; + PropagatorField psi(GaugeGrid()); + PropagatorField p_plus (GaugeGrid()); + PropagatorField p_minus(GaugeGrid()); + PropagatorField p(GaugeGrid()); + + ExtractSlice(p_plus , q_in, Ls/2 , 0); + ExtractSlice(p_minus, q_in, Ls/2-1 , 0); + p_plus = spProj5p(p_plus ); + p_minus= spProj5m(p_minus); + p=p_plus+p_minus; + J5q = localInnerProduct(p,p); +} + template void WilsonFermion5D::ContractConservedCurrent(PropagatorField &q_in_1, PropagatorField &q_in_2, @@ -949,6 +1018,7 @@ void WilsonFermion5D::ContractConservedCurrent(PropagatorField &q_in_1, conformable(q_in_1._grid, FermionGrid()); conformable(q_in_1._grid, q_in_2._grid); conformable(_FourDimGrid, q_out._grid); + PropagatorField tmp1(FermionGrid()), tmp2(FermionGrid()); unsigned int LLs = q_in_1._grid->_rdimensions[0]; q_out = zero; @@ -995,7 +1065,6 @@ void WilsonFermion5D::ContractConservedCurrent(PropagatorField &q_in_1, } - template void WilsonFermion5D::SeqConservedCurrent(PropagatorField &q_in, PropagatorField &q_out, diff --git a/Grid/qcd/action/fermion/WilsonFermion5D.h b/Grid/qcd/action/fermion/WilsonFermion5D.h index d22b5d6f..4a31bb43 100644 --- a/Grid/qcd/action/fermion/WilsonFermion5D.h +++ b/Grid/qcd/action/fermion/WilsonFermion5D.h @@ -230,6 +230,10 @@ namespace QCD { unsigned int tmin, unsigned int tmax, ComplexField &lattice_cmplx); + + void ContractJ5q(PropagatorField &q_in,ComplexField &J5q); + void ContractJ5q(FermionField &q_in,ComplexField &J5q); + }; }} diff --git a/Grid/qcd/utils/GaugeFix.h b/Grid/qcd/utils/GaugeFix.h index c4ea31aa..2b0cd7f2 100644 --- a/Grid/qcd/utils/GaugeFix.h +++ b/Grid/qcd/utils/GaugeFix.h @@ -53,21 +53,32 @@ class FourierAcceleratedGaugeFixer : public Gimpl { } static void SteepestDescentGaugeFix(GaugeLorentz &Umu,Real & alpha,int maxiter,Real Omega_tol, Real Phi_tol,bool Fourier=false) { GridBase *grid = Umu._grid; + GaugeMat xform(grid); + SteepestDescentGaugeFix(Umu,xform,alpha,maxiter,Omega_tol,Phi_tol,Fourier); + } + static void SteepestDescentGaugeFix(GaugeLorentz &Umu,GaugeMat &xform,Real & alpha,int maxiter,Real Omega_tol, Real Phi_tol,bool Fourier=false) { + + GridBase *grid = Umu._grid; Real org_plaq =WilsonLoops::avgPlaquette(Umu); Real org_link_trace=WilsonLoops::linkTrace(Umu); Real old_trace = org_link_trace; Real trG; + + xform=1.0; std::vector U(Nd,grid); - GaugeMat dmuAmu(grid); + + GaugeMat dmuAmu(grid); for(int i=0;i(Umu,mu); + if ( Fourier==false ) { - trG = SteepestDescentStep(U,alpha,dmuAmu); + trG = SteepestDescentStep(U,xform,alpha,dmuAmu); } else { - trG = FourierAccelSteepestDescentStep(U,alpha,dmuAmu); + trG = FourierAccelSteepestDescentStep(U,xform,alpha,dmuAmu); } for(int mu=0;mu(Umu,U[mu],mu); // Monitor progress and convergence test @@ -84,7 +95,6 @@ class FourierAcceleratedGaugeFixer : public Gimpl { Real Phi = 1.0 - old_trace / link_trace ; Real Omega= 1.0 - trG; - std::cout << GridLogMessage << " Iteration "< &U,Real & alpha, GaugeMat & dmuAmu) { + static Real SteepestDescentStep(std::vector &U,GaugeMat &xform,Real & alpha, GaugeMat & dmuAmu) { GridBase *grid = U[0]._grid; std::vector A(Nd,grid); @@ -109,12 +119,13 @@ class FourierAcceleratedGaugeFixer : public Gimpl { Real vol = grid->gSites(); Real trG = TensorRemove(sum(trace(g))).real()/vol/Nc; + xform = g*xform ; SU::GaugeTransform(U,g); return trG; } - static Real FourierAccelSteepestDescentStep(std::vector &U,Real & alpha, GaugeMat & dmuAmu) { + static Real FourierAccelSteepestDescentStep(std::vector &U,GaugeMat &xform,Real & alpha, GaugeMat & dmuAmu) { GridBase *grid = U[0]._grid; @@ -153,13 +164,6 @@ class FourierAcceleratedGaugeFixer : public Gimpl { Complex psqMax(16.0); Fp = psqMax*one/psq; - /* - static int once; - if ( once == 0 ) { - std::cout << " Fp " << Fp <::GaugeTransform(U,g); return trG; diff --git a/Grid/qcd/utils/SUn.h b/Grid/qcd/utils/SUn.h index cdc6c961..5cb564bd 100644 --- a/Grid/qcd/utils/SUn.h +++ b/Grid/qcd/utils/SUn.h @@ -676,10 +676,18 @@ class SU { } } /* - add GaugeTrans -*/ - -template + * Fundamental rep gauge xform + */ + template + static void GaugeTransformFundamental( Fundamental &ferm, GaugeMat &g){ + GridBase *grid = ferm._grid; + conformable(grid,g._grid); + ferm = g*ferm; + } +/* + * Adjoint rep gauge xform + */ + template static void GaugeTransform( GaugeField &Umu, GaugeMat &g){ GridBase *grid = Umu._grid; conformable(grid,g._grid); diff --git a/tests/core/Test_fft_gfix.cc b/tests/core/Test_fft_gfix.cc index 916c4b0b..7fdf5f73 100644 --- a/tests/core/Test_fft_gfix.cc +++ b/tests/core/Test_fft_gfix.cc @@ -63,8 +63,11 @@ int main (int argc, char ** argv) LatticeGaugeField Umu(&GRID); LatticeGaugeField Urnd(&GRID); LatticeGaugeField Uorg(&GRID); + LatticeGaugeField Utmp(&GRID); LatticeColourMatrix g(&GRID); // Gauge xform + LatticeColourMatrix xform1(&GRID); // Gauge xform + LatticeColourMatrix xform2(&GRID); // Gauge xform SU3::ColdConfiguration(pRNG,Umu); // Unit gauge Uorg=Umu; @@ -78,7 +81,14 @@ int main (int argc, char ** argv) Real alpha=0.1; Umu = Urnd; - FourierAcceleratedGaugeFixer::SteepestDescentGaugeFix(Umu,alpha,10000,1.0e-12, 1.0e-12,false); + FourierAcceleratedGaugeFixer::SteepestDescentGaugeFix(Umu,xform1,alpha,10000,1.0e-12, 1.0e-12,false); + + // Check the gauge xform matrices + Utmp=Urnd; + SU::GaugeTransform(Utmp,xform1); + Utmp = Utmp - Umu; + std::cout << " Norm Difference of xformed gauge "<< norm2(Utmp) << std::endl; + plaq=WilsonLoops::avgPlaquette(Umu); std::cout << " Final plaquette "<::SteepestDescentGaugeFix(Umu,alpha,10000,1.0e-12, 1.0e-12,true); + FourierAcceleratedGaugeFixer::SteepestDescentGaugeFix(Umu,xform2,alpha,10000,1.0e-12, 1.0e-12,true); + + Utmp=Urnd; + SU::GaugeTransform(Utmp,xform2); + Utmp = Utmp - Umu; + std::cout << " Norm Difference of xformed gauge "<< norm2(Utmp) << std::endl; + plaq=WilsonLoops::avgPlaquette(Umu); std::cout << " Final plaquette "< Date: Wed, 6 Feb 2019 11:25:51 +0000 Subject: [PATCH 13/29] fix patch command for eigen in bootstrap.sh --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index cffe1b8c..e7495096 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -8,7 +8,7 @@ wget ${EIGEN_URL} --no-check-certificate && ./scripts/update_eigen.sh ${ARC} && # patch for non-portable includes in Eigen 3.3.5 # apparently already fixed in Eigen HEAD so it should not be # a problem in the future (A.P.) -patch Grid/Eigen/unsupported/CXX11/Tensor scripts/eigen-3.3.5.Tensor.patch +patch Eigen/unsupported/Eigen/CXX11/Tensor scripts/eigen-3.3.5.Tensor.patch echo '-- generating Make.inc files...' ./scripts/filelist From f80c5483657fad0655320c667648f4393cfa34f9 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sun, 10 Feb 2019 20:47:35 +0000 Subject: [PATCH 14/29] quieter initialisation --- Grid/communicator/Communicator_mpi3.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Grid/communicator/Communicator_mpi3.cc b/Grid/communicator/Communicator_mpi3.cc index e6800afe..69cfefb8 100644 --- a/Grid/communicator/Communicator_mpi3.cc +++ b/Grid/communicator/Communicator_mpi3.cc @@ -53,10 +53,12 @@ void CartesianCommunicator::Init(int *argc, char ***argv) // Never clean up as done once. MPI_Comm_dup (MPI_COMM_WORLD,&communicator_world); + Grid_quiesce_nodes(); GlobalSharedMemory::Init(communicator_world); GlobalSharedMemory::SharedMemoryAllocate( GlobalSharedMemory::MAX_MPI_SHM_BYTES, GlobalSharedMemory::Hugepages); + Grid_unquiesce_nodes(); } /////////////////////////////////////////////////////////////////////////// From 7672bb6434827924beef29bfc161d28138c3fb9b Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sun, 10 Feb 2019 21:25:25 +0000 Subject: [PATCH 15/29] Hadrons: random vector utility module I/O --- Hadrons/Modules/MUtilities/RandomVectors.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Hadrons/Modules/MUtilities/RandomVectors.hpp b/Hadrons/Modules/MUtilities/RandomVectors.hpp index c5c6c687..9bb4bdce 100644 --- a/Hadrons/Modules/MUtilities/RandomVectors.hpp +++ b/Hadrons/Modules/MUtilities/RandomVectors.hpp @@ -31,6 +31,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include #include #include +#include BEGIN_HADRONS_NAMESPACE @@ -44,7 +45,9 @@ class RandomVectorsPar: Serializable public: GRID_SERIALIZABLE_CLASS_MEMBERS(RandomVectorsPar, unsigned int, size, - unsigned int, Ls); + unsigned int, Ls, + std::string, output, + bool, multiFile); }; template @@ -119,6 +122,11 @@ void TRandomVectors::execute(void) { random(rng4d(), vec[i]); } + // I/O if necessary + if (!par().output.empty()) + { + A2AVectorsIo::write(par().output, vec, par().multiFile, vm().getTrajectory()); + } } END_MODULE_NAMESPACE From b540dc1cee9ae34bab5c58b7eff589cd10cb4e72 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sun, 10 Feb 2019 21:41:17 +0000 Subject: [PATCH 16/29] Output field norm check during IO --- Grid/parallelIO/IldgIO.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grid/parallelIO/IldgIO.h b/Grid/parallelIO/IldgIO.h index 85800af0..e5ca48b5 100644 --- a/Grid/parallelIO/IldgIO.h +++ b/Grid/parallelIO/IldgIO.h @@ -248,7 +248,7 @@ class GridLimeReader : public BinaryIO { ///////////////////////////////////////////// if(FieldNormMetaData_.norm2 != 0.0){ RealD n2ck = norm2(field); - // std::cout << GridLogMessage << "checking field norm: metadata "< Date: Sun, 10 Feb 2019 22:12:47 +0000 Subject: [PATCH 17/29] IO norm check on relative norm --- Grid/parallelIO/IldgIO.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Grid/parallelIO/IldgIO.h b/Grid/parallelIO/IldgIO.h index e5ca48b5..15017be3 100644 --- a/Grid/parallelIO/IldgIO.h +++ b/Grid/parallelIO/IldgIO.h @@ -47,7 +47,8 @@ namespace Grid { namespace QCD { #define GRID_FIELD_NORM "FieldNormMetaData" -#define GRID_FIELD_NORM_CHECK(FieldNormMetaData_,n2ck) assert(fabs(FieldNormMetaData_.norm2 - n2ck < 1.0e-5 )); +#define GRID_FIELD_NORM_CHECK(FieldNormMetaData_,n2ck) \ +assert(0.5*fabs(FieldNormMetaData_.norm2 - n2ck)/(FieldNormMetaData_.norm2 + n2ck) < 1.0e-5 ); ///////////////////////////////// // Encode word types as strings From 042bad2ced86798f04bad4215aa5171158f77579 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Thu, 14 Feb 2019 13:58:17 +0000 Subject: [PATCH 18/29] possibility to set a build number --- Grid/util/Init.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Grid/util/Init.cc b/Grid/util/Init.cc index aed62ed3..e15f9e4f 100644 --- a/Grid/util/Init.cc +++ b/Grid/util/Init.cc @@ -289,6 +289,11 @@ void Grid_init(int *argc,char ***argv) std::cout << "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"< Date: Thu, 14 Feb 2019 16:23:50 +0000 Subject: [PATCH 19/29] display relative norm during field IO norm check --- Grid/parallelIO/IldgIO.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Grid/parallelIO/IldgIO.h b/Grid/parallelIO/IldgIO.h index 15017be3..db07cac0 100644 --- a/Grid/parallelIO/IldgIO.h +++ b/Grid/parallelIO/IldgIO.h @@ -47,8 +47,10 @@ namespace Grid { namespace QCD { #define GRID_FIELD_NORM "FieldNormMetaData" -#define GRID_FIELD_NORM_CHECK(FieldNormMetaData_,n2ck) \ -assert(0.5*fabs(FieldNormMetaData_.norm2 - n2ck)/(FieldNormMetaData_.norm2 + n2ck) < 1.0e-5 ); +#define GRID_FIELD_NORM_CALC(FieldNormMetaData_, n2ck) \ +0.5*fabs(FieldNormMetaData_.norm2 - n2ck)/(FieldNormMetaData_.norm2 + n2ck) +#define GRID_FIELD_NORM_CHECK(FieldNormMetaData_, n2ck) \ +assert(GRID_FIELD_NORM_CALC(FieldNormMetaData_, n2ck) < 1.0e-5); ///////////////////////////////// // Encode word types as strings @@ -249,9 +251,9 @@ class GridLimeReader : public BinaryIO { ///////////////////////////////////////////// if(FieldNormMetaData_.norm2 != 0.0){ RealD n2ck = norm2(field); - std::cout << GridLogMessage << "Field norm: metadata= "< Date: Fri, 22 Feb 2019 18:41:26 +0000 Subject: [PATCH 20/29] Hadrons: XML validator utility --- Hadrons/Application.cc | 44 +++++++++-------- Hadrons/Environment.cc | 13 +++-- Hadrons/Environment.hpp | 2 +- Hadrons/Utilities/HadronsXmlValidate.cc | 64 +++++++++++++++++++++++++ Hadrons/Utilities/Makefile.am | 5 +- 5 files changed, 101 insertions(+), 27 deletions(-) create mode 100644 Hadrons/Utilities/HadronsXmlValidate.cc diff --git a/Hadrons/Application.cc b/Hadrons/Application.cc index be2e87a1..e6fb85fa 100644 --- a/Hadrons/Application.cc +++ b/Hadrons/Application.cc @@ -48,28 +48,32 @@ Application::Application(void) { initLogger(); auto dim = GridDefaultLatt(), mpi = GridDefaultMpi(), loc(dim); - locVol_ = 1; - for (unsigned int d = 0; d < dim.size(); ++d) + + if (dim.size()) { - loc[d] /= mpi[d]; - locVol_ *= loc[d]; + locVol_ = 1; + for (unsigned int d = 0; d < dim.size(); ++d) + { + loc[d] /= mpi[d]; + locVol_ *= loc[d]; + } + LOG(Message) << "====== HADRONS APPLICATION INITIALISATION ======" << std::endl; + LOG(Message) << "** Dimensions" << std::endl; + LOG(Message) << "Global lattice: " << dim << std::endl; + LOG(Message) << "MPI partition : " << mpi << std::endl; + LOG(Message) << "Local lattice : " << loc << std::endl; + LOG(Message) << std::endl; + LOG(Message) << "** Default parameters (and associated C macros)" << std::endl; + LOG(Message) << "ASCII output precision : " << MACOUT(DEFAULT_ASCII_PREC) << std::endl; + LOG(Message) << "Fermion implementation : " << MACOUTS(FIMPLBASE) << std::endl; + LOG(Message) << "z-Fermion implementation: " << MACOUTS(ZFIMPLBASE) << std::endl; + LOG(Message) << "Scalar implementation : " << MACOUTS(SIMPLBASE) << std::endl; + LOG(Message) << "Gauge implementation : " << MACOUTS(GIMPLBASE) << std::endl; + LOG(Message) << "Eigenvector base size : " + << MACOUT(HADRONS_DEFAULT_LANCZOS_NBASIS) << std::endl; + LOG(Message) << "Schur decomposition : " << MACOUTS(HADRONS_DEFAULT_SCHUR) << std::endl; + LOG(Message) << std::endl; } - LOG(Message) << "====== HADRONS APPLICATION INITIALISATION ======" << std::endl; - LOG(Message) << "** Dimensions" << std::endl; - LOG(Message) << "Global lattice: " << dim << std::endl; - LOG(Message) << "MPI partition : " << mpi << std::endl; - LOG(Message) << "Local lattice : " << loc << std::endl; - LOG(Message) << std::endl; - LOG(Message) << "** Default parameters (and associated C macros)" << std::endl; - LOG(Message) << "ASCII output precision : " << MACOUT(DEFAULT_ASCII_PREC) << std::endl; - LOG(Message) << "Fermion implementation : " << MACOUTS(FIMPLBASE) << std::endl; - LOG(Message) << "z-Fermion implementation: " << MACOUTS(ZFIMPLBASE) << std::endl; - LOG(Message) << "Scalar implementation : " << MACOUTS(SIMPLBASE) << std::endl; - LOG(Message) << "Gauge implementation : " << MACOUTS(GIMPLBASE) << std::endl; - LOG(Message) << "Eigenvector base size : " - << MACOUT(HADRONS_DEFAULT_LANCZOS_NBASIS) << std::endl; - LOG(Message) << "Schur decomposition : " << MACOUTS(HADRONS_DEFAULT_SCHUR) << std::endl; - LOG(Message) << std::endl; } Application::Application(const Application::GlobalPar &par) diff --git a/Hadrons/Environment.cc b/Hadrons/Environment.cc index e7a7ac55..540b3620 100644 --- a/Hadrons/Environment.cc +++ b/Hadrons/Environment.cc @@ -43,15 +43,13 @@ HADRONS_ERROR_REF(ObjectDefinition, "no object with address " + std::to_string(a // constructor ///////////////////////////////////////////////////////////////// Environment::Environment(void) { - dim_ = GridDefaultLatt(); - nd_ = dim_.size(); - createGrid(1); + dim_ = GridDefaultLatt(); + nd_ = dim_.size(); vol_ = 1.; for (auto d: dim_) { vol_ *= d; } - rng4d_.reset(new GridParallelRNG(getGrid())); } // grids /////////////////////////////////////////////////////////////////////// @@ -76,8 +74,13 @@ double Environment::getVolume(void) const } // random number generator ///////////////////////////////////////////////////// -GridParallelRNG * Environment::get4dRng(void) const +GridParallelRNG * Environment::get4dRng(void) { + if (rng4d_ == nullptr) + { + rng4d_.reset(new GridParallelRNG(getGrid())); + } + return rng4d_.get(); } diff --git a/Hadrons/Environment.hpp b/Hadrons/Environment.hpp index b77345c8..05d3d8dd 100644 --- a/Hadrons/Environment.hpp +++ b/Hadrons/Environment.hpp @@ -113,7 +113,7 @@ public: unsigned int getNd(void) const; double getVolume(void) const; // random number generator - GridParallelRNG * get4dRng(void) const; + GridParallelRNG * get4dRng(void); // general memory management void addObject(const std::string name, const int moduleAddress = -1); diff --git a/Hadrons/Utilities/HadronsXmlValidate.cc b/Hadrons/Utilities/HadronsXmlValidate.cc new file mode 100644 index 00000000..73cf3139 --- /dev/null +++ b/Hadrons/Utilities/HadronsXmlValidate.cc @@ -0,0 +1,64 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: Hadrons/Utilities/HadronsXmlValidate.cc + +Copyright (C) 2015-2019 + +Author: Antonin Portelli + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution directory +*************************************************************************************/ +/* END LEGAL */ + +#include + +using namespace Grid; +using namespace QCD; +using namespace Hadrons; + +int main(int argc, char *argv[]) +{ + // parse command line + std::string parameterFileName; + + if (argc != 2) + { + std::cerr << "usage: " << argv[0] << " "; + std::cerr << std::endl; + std::exit(EXIT_FAILURE); + } + parameterFileName = argv[1]; + + try + { + Application application(parameterFileName); + + application.parseParameterFile(parameterFileName); + auto &vm = VirtualMachine::getInstance(); + vm.getModuleGraph(); + LOG(Message) << "Application valid (check XML warnings though)" + << std::endl; + } + catch (const std::exception& e) + { + Exceptions::abort(e); + } + + return EXIT_SUCCESS; +} diff --git a/Hadrons/Utilities/Makefile.am b/Hadrons/Utilities/Makefile.am index 4f324d6d..6c48d966 100644 --- a/Hadrons/Utilities/Makefile.am +++ b/Hadrons/Utilities/Makefile.am @@ -1,8 +1,11 @@ -bin_PROGRAMS = HadronsXmlRun HadronsFermionEP64To32 HadronsContractor HadronsContractorBenchmark +bin_PROGRAMS = HadronsXmlRun HadronsXmlValidate HadronsFermionEP64To32 HadronsContractor HadronsContractorBenchmark HadronsXmlRun_SOURCES = HadronsXmlRun.cc HadronsXmlRun_LDADD = ../libHadrons.a ../../Grid/libGrid.a +HadronsXmlValidate_SOURCES = HadronsXmlValidate.cc +HadronsXmlValidate_LDADD = ../libHadrons.a ../../Grid/libGrid.a + HadronsFermionEP64To32_SOURCES = EigenPackCast.cc HadronsFermionEP64To32_CXXFLAGS = $(AM_CXXFLAGS) -DFIN=WilsonImplD::FermionField -DFOUT=WilsonImplF::FermionField HadronsFermionEP64To32_LDADD = ../libHadrons.a ../../Grid/libGrid.a From ae9e248c95be15afd376dfed52f0374c3ff6fca0 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Tue, 26 Feb 2019 11:29:12 +0000 Subject: [PATCH 21/29] Smearing --- Grid/Grid.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Grid/Grid.h b/Grid/Grid.h index 9dcc207b..70859c81 100644 --- a/Grid/Grid.h +++ b/Grid/Grid.h @@ -42,6 +42,7 @@ Author: paboyle #include #include #include +#include #include #include #include From 8f661f6c05bc4ad7117d39f74e7ca8b7cf297ca8 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Tue, 26 Feb 2019 11:31:00 +0000 Subject: [PATCH 22/29] Smearing for quark observables --- Grid/qcd/utils/CovariantSmearing.h | 87 ++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Grid/qcd/utils/CovariantSmearing.h diff --git a/Grid/qcd/utils/CovariantSmearing.h b/Grid/qcd/utils/CovariantSmearing.h new file mode 100644 index 00000000..eae5ed71 --- /dev/null +++ b/Grid/qcd/utils/CovariantSmearing.h @@ -0,0 +1,87 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: ./lib/qcd/action/scalar/CovariantLaplacian.h + +Copyright (C) 2016 + +Author: Azusa Yamaguchi + +This program 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 2 of the License, or +(at your option) any later version. + +This program 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 this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +See the full license in the file "LICENSE" in the top level distribution +directory +*************************************************************************************/ +#pragma once + +namespace Grid { +namespace QCD { + +template class CovariantSmearing : public Gimpl +{ +public: + INHERIT_GIMPL_TYPES(Gimpl); + + typedef typename Gimpl::GaugeLinkField GaugeMat; + typedef typename Gimpl::GaugeField GaugeLorentz; + + template + static void GaussianSmear(const std::vector& U, + T& chi, + const Real& width, int Iterations, int orthog) + { + GridBase *grid = chi._grid; + T psi(grid); + + //////////////////////////////////////////////////////////////////////////////////// + // Follow Chroma conventions for width to keep compatibility with previous data + // Free field iterates + // chi = (1 - w^2/4N p^2)^N chi + // + // ~ (e^(-w^2/4N p^2)^N chi + // ~ (e^(-w^2/4 p^2) chi + // ~ (e^(-w'^2/2 p^2) chi [ w' = w/sqrt(2) ] + // + // Which in coordinate space is proportional to + // + // e^(-x^2/w^2) = e^(-x^2/2w'^2) + // + // The 4 is a bit unconventional from Gaussian width perspective, but... it's Chroma convention. + // 2nd derivative approx d^2/dx^2 = x+mu + x-mu - 2x + // + // d^2/dx^2 = - p^2 + // + // chi = ( 1 + w^2/4N d^2/dx^2 )^N chi + // + //////////////////////////////////////////////////////////////////////////////////// + Real coeff = (width*width) / Real(4*Iterations); + + int dims = Nd; + if( orthog < Nd ) dims=Nd-1; + + for(int n = 0; n < Iterations; ++n) { + psi = (-2.0*dims)*chi; + for(int mu=0;mu Date: Tue, 26 Feb 2019 11:31:17 +0000 Subject: [PATCH 23/29] Smearing test. Test on free field. --- tests/smearing/Test_smearing.cc | 73 +++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 tests/smearing/Test_smearing.cc diff --git a/tests/smearing/Test_smearing.cc b/tests/smearing/Test_smearing.cc new file mode 100644 index 00000000..996671f0 --- /dev/null +++ b/tests/smearing/Test_smearing.cc @@ -0,0 +1,73 @@ +/* + * + + Grid physics library, www.github.com/paboyle/Grid + + Source file: ./tests/Test_wilson_cg_prec.cc + + Copyright (C) 2015 + +Author: Peter Boyle + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + See the full license in the file "LICENSE" in the top level distribution directory + *************************************************************************************/ + /* END LEGAL */ +#include + +using namespace std; +using namespace Grid; +using namespace Grid::QCD; + + +int main (int argc, char ** argv) +{ + Grid_init(&argc,&argv); + + + std::vector latt_size = GridDefaultLatt(); + std::vector simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd()); + std::vector mpi_layout = GridDefaultMpi(); + GridCartesian Grid(latt_size,simd_layout,mpi_layout); + + std::vector seeds({1,2,3,4}); + GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); + + LatticeFermion src(&Grid); random(pRNG,src); + RealD nrm = norm2(src); + LatticeFermion result(&Grid); result=zero; + LatticeGaugeField Umu(&Grid); + // SU3::HotConfiguration(pRNG,Umu); + SU3::ColdConfiguration(Umu); + std::vector U(4,&Grid); + + for(int mu=0;mu(Umu,mu); + } + + std::vector site({4,4,0,0}); + src=zero; + SpinColourVector scv; + scv=zero; + scv()(0)(0) = 1.0; + pokeSite(scv,src,site); + + CovariantSmearing::GaussianSmear(U, src, 2.0, 50, Tdir); + + std::cout << src < Date: Wed, 27 Feb 2019 02:27:09 +0000 Subject: [PATCH 24/29] Hadrons: beware of the nasty uninitialised twists --- Hadrons/Modules/MAction/DWF.hpp | 24 ++++++++++++++++++---- Hadrons/Modules/MAction/MobiusDWF.hpp | 26 +++++++++++++++++++----- Hadrons/Modules/MAction/ScaledDWF.hpp | 24 ++++++++++++++++++---- Hadrons/Modules/MAction/Wilson.hpp | 24 ++++++++++++++++++---- Hadrons/Modules/MAction/WilsonClover.hpp | 25 +++++++++++++++++++---- Hadrons/Modules/MAction/ZMobiusDWF.hpp | 25 ++++++++++++++++++----- 6 files changed, 122 insertions(+), 26 deletions(-) diff --git a/Hadrons/Modules/MAction/DWF.hpp b/Hadrons/Modules/MAction/DWF.hpp index bac70ae8..21024a4f 100644 --- a/Hadrons/Modules/MAction/DWF.hpp +++ b/Hadrons/Modules/MAction/DWF.hpp @@ -112,8 +112,6 @@ void TDWF::setup(void) << par().mass << ", M5= " << par().M5 << " and Ls= " << par().Ls << " using gauge field '" << par().gauge << "'" << std::endl; - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; auto &U = envGet(GaugeField, par().gauge); auto &g4 = *envGetGrid(FermionField); @@ -121,8 +119,26 @@ void TDWF::setup(void) auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); typename DomainWallFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, DomainWallFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, implParams); } diff --git a/Hadrons/Modules/MAction/MobiusDWF.hpp b/Hadrons/Modules/MAction/MobiusDWF.hpp index 6b960e2e..3ce02b91 100644 --- a/Hadrons/Modules/MAction/MobiusDWF.hpp +++ b/Hadrons/Modules/MAction/MobiusDWF.hpp @@ -112,17 +112,33 @@ void TMobiusDWF::setup(void) << ", b= " << par().b << ", c= " << par().c << " using gauge field '" << par().gauge << "'" << std::endl; - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; - + auto &U = envGet(GaugeField, par().gauge); auto &g4 = *envGetGrid(FermionField); auto &grb4 = *envGetRbGrid(FermionField); auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); typename MobiusFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, MobiusFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, par().b, par().c, implParams); diff --git a/Hadrons/Modules/MAction/ScaledDWF.hpp b/Hadrons/Modules/MAction/ScaledDWF.hpp index 8742a820..3e052225 100644 --- a/Hadrons/Modules/MAction/ScaledDWF.hpp +++ b/Hadrons/Modules/MAction/ScaledDWF.hpp @@ -111,8 +111,6 @@ void TScaledDWF::setup(void) << ", scale= " << par().scale << " using gauge field '" << par().gauge << "'" << std::endl; - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; auto &U = envGet(GaugeField, par().gauge); auto &g4 = *envGetGrid(FermionField); @@ -120,8 +118,26 @@ void TScaledDWF::setup(void) auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); typename ScaledShamirFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, ScaledShamirFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, par().scale, implParams); diff --git a/Hadrons/Modules/MAction/Wilson.hpp b/Hadrons/Modules/MAction/Wilson.hpp index 3ce5569e..11df89c3 100644 --- a/Hadrons/Modules/MAction/Wilson.hpp +++ b/Hadrons/Modules/MAction/Wilson.hpp @@ -109,15 +109,31 @@ void TWilson::setup(void) { LOG(Message) << "Setting up Wilson fermion matrix with m= " << par().mass << " using gauge field '" << par().gauge << "'" << std::endl; - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; auto &U = envGet(GaugeField, par().gauge); auto &grid = *envGetGrid(FermionField); auto &gridRb = *envGetRbGrid(FermionField); typename WilsonFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, WilsonFermion, getName(), 1, U, grid, gridRb, par().mass, implParams); } diff --git a/Hadrons/Modules/MAction/WilsonClover.hpp b/Hadrons/Modules/MAction/WilsonClover.hpp index a9ea8de5..d80bccdf 100644 --- a/Hadrons/Modules/MAction/WilsonClover.hpp +++ b/Hadrons/Modules/MAction/WilsonClover.hpp @@ -112,17 +112,34 @@ void TWilsonClover::setup(void) { LOG(Message) << "Setting up Wilson clover fermion matrix with m= " << par().mass << " using gauge field '" << par().gauge << "'" << std::endl; - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; LOG(Message) << "Clover term csw_r: " << par().csw_r << " csw_t: " << par().csw_t << std::endl; + auto &U = envGet(GaugeField, par().gauge); auto &grid = *envGetGrid(FermionField); auto &gridRb = *envGetRbGrid(FermionField); typename WilsonCloverFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, WilsonCloverFermion, getName(), 1, U, grid, gridRb, par().mass, par().csw_r, par().csw_t, par().clover_anisotropy, implParams); diff --git a/Hadrons/Modules/MAction/ZMobiusDWF.hpp b/Hadrons/Modules/MAction/ZMobiusDWF.hpp index e780bd73..56efe1a2 100644 --- a/Hadrons/Modules/MAction/ZMobiusDWF.hpp +++ b/Hadrons/Modules/MAction/ZMobiusDWF.hpp @@ -118,10 +118,7 @@ void TZMobiusDWF::setup(void) { LOG(Message) << " omega[" << i << "]= " << par().omega[i] << std::endl; } - LOG(Message) << "Fermion boundary conditions: " << par().boundary - << std::endl; - env().createGrid(par().Ls); auto &U = envGet(GaugeField, par().gauge); auto &g4 = *envGetGrid(FermionField); auto &grb4 = *envGetRbGrid(FermionField); @@ -129,8 +126,26 @@ void TZMobiusDWF::setup(void) auto &grb5 = *envGetRbGrid(FermionField, par().Ls); auto omega = par().omega; typename ZMobiusFermion::ImplParams implParams; - implParams.boundary_phases = strToVec(par().boundary); - implParams.twist_n_2pi_L = strToVec(par().twist); + if (!par().boundary.empty()) + { + implParams.boundary_phases = strToVec(par().boundary); + } + if (!par().twist.empty()) + { + implParams.twist_n_2pi_L = strToVec(par().twist); + } + LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases + << std::endl; + LOG(Message) << "Twists: " << implParams.twist_n_2pi_L + << std::endl; + if (implParams.boundary_phases.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of boundary phase"); + } + if (implParams.twist_n_2pi_L.size() != env().getNd()) + { + HADRONS_ERROR(Size, "Wrong number of twist"); + } envCreateDerived(FMat, ZMobiusFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, omega, par().b, par().c, implParams); From 7852181c2c532ab25ab2ae69b1ad71ce5df56482 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Wed, 27 Feb 2019 02:27:40 +0000 Subject: [PATCH 25/29] Hadrons: uninitialised pointer fix (might have been harmless) --- Hadrons/Environment.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hadrons/Environment.hpp b/Hadrons/Environment.hpp index 05d3d8dd..24f6b31e 100644 --- a/Hadrons/Environment.hpp +++ b/Hadrons/Environment.hpp @@ -182,7 +182,7 @@ private: std::map gridCoarse5d_; unsigned int nd_; // random number generator - RngPt rng4d_; + RngPt rng4d_{nullptr}; // object store std::vector object_; std::map objectAddress_; From b7db99967a1cbbe84964caea41606f3d523aa74f Mon Sep 17 00:00:00 2001 From: Michael Marshall Date: Thu, 28 Feb 2019 20:06:59 +0000 Subject: [PATCH 26/29] Recommendations for Traits classes --- Grid/simd/Grid_vector_types.h | 20 ++-- Grid/tensors/Tensor_class.h | 100 +++++++++++++++++- Grid/tensors/Tensor_traits.h | 194 ++++++++++++++++------------------ 3 files changed, 201 insertions(+), 113 deletions(-) diff --git a/Grid/simd/Grid_vector_types.h b/Grid/simd/Grid_vector_types.h index c67e74cb..b34e056d 100644 --- a/Grid/simd/Grid_vector_types.h +++ b/Grid/simd/Grid_vector_types.h @@ -89,17 +89,25 @@ template using NotEnableIf = Invoke struct is_complex : public std::false_type {}; -template <> struct is_complex > : public std::true_type {}; -template <> struct is_complex > : public std::true_type {}; +template <> struct is_complex : public std::true_type {}; +template <> struct is_complex : public std::true_type {}; -template using IfReal = Invoke::value, int> >; +template struct is_real : public std::false_type {}; +template struct is_real::value, + void>::type> : public std::true_type {}; + +template struct is_integer : public std::false_type {}; +template struct is_integer::value, + void>::type> : public std::true_type {}; + +template using IfReal = Invoke::value, int> >; template using IfComplex = Invoke::value, int> >; -template using IfInteger = Invoke::value, int> >; +template using IfInteger = Invoke::value, int> >; template using IfSame = Invoke::value, int> >; -template using IfNotReal = Invoke::value, int> >; +template using IfNotReal = Invoke::value, int> >; template using IfNotComplex = Invoke::value, int> >; -template using IfNotInteger = Invoke::value, int> >; +template using IfNotInteger = Invoke::value, int> >; template using IfNotSame = Invoke::value, int> >; //////////////////////////////////////////////////////// diff --git a/Grid/tensors/Tensor_class.h b/Grid/tensors/Tensor_class.h index c7f868db..c87503c6 100644 --- a/Grid/tensors/Tensor_class.h +++ b/Grid/tensors/Tensor_class.h @@ -62,7 +62,7 @@ class iScalar { // get double precision version typedef iScalar::DoublePrecision> DoublePrecision; - enum { TensorLevel = GridTypeMapper::TensorLevel + 1 }; + static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; // Scalar no action // template using tensor_reduce_level = typename @@ -173,7 +173,37 @@ class iScalar { return stream; }; + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return &_internal; } + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return _internal.begin(); } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return (&_internal) + 1; } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return _internal.begin() + sizeof(_internal)/sizeof(scalar_type); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return &_internal; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return _internal.begin(); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return (&_internal) + 1; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return _internal.begin() + sizeof(_internal)/sizeof(scalar_type); } }; /////////////////////////////////////////////////////////// // Allows to turn scalar>>> back to double. @@ -218,7 +248,7 @@ class iVector { return *this; } - enum { TensorLevel = GridTypeMapper::TensorLevel + 1 }; + static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; iVector(const Zero &z) { *this = zero; }; iVector() = default; /* @@ -303,6 +333,38 @@ class iVector { // strong_inline vtype && operator ()(int i) { // return _internal[i]; // } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return _internal; } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return _internal[0].begin(); } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return _internal + N; } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return _internal[0].begin() + sizeof(_internal)/sizeof(scalar_type); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return _internal; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return _internal[0].begin(); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return _internal + N; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return _internal[0].begin() + sizeof(_internal)/sizeof(scalar_type); } }; template @@ -328,7 +390,7 @@ class iMatrix { typedef iScalar tensor_reduced; typedef iMatrix scalar_object; - enum { TensorLevel = GridTypeMapper::TensorLevel + 1 }; + static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; iMatrix(const Zero &z) { *this = zero; }; iMatrix() = default; @@ -458,6 +520,38 @@ class iMatrix { // strong_inline vtype && operator ()(int i,int j) { // return _internal[i][j]; // } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return _internal[0]; } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline begin() const { return _internal[0][0].begin(); } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return _internal[0] + N * N; } + + template + typename std::enable_if::value, const scalar_type *>::type + strong_inline end() const { return _internal[0][0].begin() + sizeof(_internal)/sizeof(scalar_type); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return _internal[0]; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline begin() { return _internal[0][0].begin(); } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return _internal[0] + N * N; } + + template + typename std::enable_if::value, scalar_type *>::type + strong_inline end() { return _internal[0][0].begin() + sizeof(_internal)/sizeof(scalar_type); } }; template diff --git a/Grid/tensors/Tensor_traits.h b/Grid/tensors/Tensor_traits.h index c1ef397a..d4854768 100644 --- a/Grid/tensors/Tensor_traits.h +++ b/Grid/tensors/Tensor_traits.h @@ -26,6 +26,21 @@ Author: Christopher Kelly namespace Grid { + // Forward declarations + template class iScalar; + template class iVector; + template class iMatrix; + + // These are the Grid tensors + template struct isGridTensor + : public std::false_type { static constexpr bool notvalue = true; }; + template struct isGridTensor> + : public std::true_type { static constexpr bool notvalue = false; }; + template struct isGridTensor> + : public std::true_type { static constexpr bool notvalue = false; }; + template struct isGridTensor> + : public std::true_type { static constexpr bool notvalue = false; }; + ////////////////////////////////////////////////////////////////////////////////// // Want to recurse: GridTypeMapper >::scalar_type == ComplexD. // Use of a helper class like this allows us to template specialise and "dress" @@ -40,25 +55,31 @@ namespace Grid { // to study C++11's type_traits.h file. (std::enable_if >) // ////////////////////////////////////////////////////////////////////////////////// - - template class GridTypeMapper { - public: - typedef typename T::scalar_type scalar_type; - typedef typename T::vector_type vector_type; - typedef typename T::vector_typeD vector_typeD; - typedef typename T::tensor_reduced tensor_reduced; - typedef typename T::scalar_object scalar_object; - typedef typename T::Complexified Complexified; - typedef typename T::Realified Realified; - typedef typename T::DoublePrecision DoublePrecision; - enum { TensorLevel = T::TensorLevel }; + + // This saves repeating common properties for supported Grid Scalar types + template struct GridTypeMapper_Base {}; + // TensorLevel How many nested grid tensors + // Rank Rank of the grid tensor + // count Total number of elements, i.e. product of dimensions + // scalar_size Size of the underlying fundamental object (tensor_reduced) in bytes + // size Total size of all elements in bytes + // Dimension(dim) Size of dimension dim + template struct GridTypeMapper_Base { + static constexpr int TensorLevel = 0; + static constexpr int Rank = 0; + static constexpr std::size_t count = 1; + static constexpr std::size_t scalar_size = sizeof(T); + static constexpr std::size_t size = scalar_size * count; + static constexpr int Dimension(unsigned int dim) { return 0; } }; ////////////////////////////////////////////////////////////////////////////////// // Recursion stops with these template specialisations ////////////////////////////////////////////////////////////////////////////////// - template<> class GridTypeMapper { - public: + + template struct GridTypeMapper {}; + + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealF scalar_type; typedef RealF vector_type; typedef RealD vector_typeD; @@ -67,10 +88,8 @@ namespace Grid { typedef ComplexF Complexified; typedef RealF Realified; typedef RealD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealD scalar_type; typedef RealD vector_type; typedef RealD vector_typeD; @@ -79,10 +98,8 @@ namespace Grid { typedef ComplexD Complexified; typedef RealD Realified; typedef RealD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef ComplexF vector_type; typedef ComplexD vector_typeD; @@ -91,10 +108,8 @@ namespace Grid { typedef ComplexF Complexified; typedef RealF Realified; typedef ComplexD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexD scalar_type; typedef ComplexD vector_type; typedef ComplexD vector_typeD; @@ -103,10 +118,8 @@ namespace Grid { typedef ComplexD Complexified; typedef RealD Realified; typedef ComplexD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef Integer scalar_type; typedef Integer vector_type; typedef Integer vector_typeD; @@ -115,11 +128,9 @@ namespace Grid { typedef void Complexified; typedef void Realified; typedef void DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealF scalar_type; typedef vRealF vector_type; typedef vRealD vector_typeD; @@ -128,10 +139,8 @@ namespace Grid { typedef vComplexF Complexified; typedef vRealF Realified; typedef vRealD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealD scalar_type; typedef vRealD vector_type; typedef vRealD vector_typeD; @@ -140,10 +149,8 @@ namespace Grid { typedef vComplexD Complexified; typedef vRealD Realified; typedef vRealD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef vComplexH vector_type; typedef vComplexD vector_typeD; @@ -152,10 +159,8 @@ namespace Grid { typedef vComplexH Complexified; typedef vRealH Realified; typedef vComplexD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef vComplexF vector_type; typedef vComplexD vector_typeD; @@ -164,10 +169,8 @@ namespace Grid { typedef vComplexF Complexified; typedef vRealF Realified; typedef vComplexD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexD scalar_type; typedef vComplexD vector_type; typedef vComplexD vector_typeD; @@ -176,10 +179,8 @@ namespace Grid { typedef vComplexD Complexified; typedef vRealD Realified; typedef vComplexD DoublePrecision; - enum { TensorLevel = 0 }; }; - template<> class GridTypeMapper { - public: + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef Integer scalar_type; typedef vInteger vector_type; typedef vInteger vector_typeD; @@ -188,57 +189,49 @@ namespace Grid { typedef void Complexified; typedef void Realified; typedef void DoublePrecision; - enum { TensorLevel = 0 }; }; - // First some of my own traits - template struct isGridTensor { - static const bool value = true; - static const bool notvalue = false; +#define GridTypeMapper_RepeatedTypes \ + typedef typename ObjectTraits::scalar_type scalar_type; \ + typedef typename ObjectTraits::vector_type vector_type; \ + typedef typename ObjectTraits::vector_typeD vector_typeD; \ + typedef typename ObjectTraits::tensor_reduced tensor_reduced; \ + typedef typename ObjectTraits::scalar_object scalar_object; \ + typedef typename ObjectTraits::Complexified Complexified; \ + typedef typename ObjectTraits::Realified Realified; \ + typedef typename ObjectTraits::DoublePrecision DoublePrecision; \ + static constexpr int TensorLevel = BaseTraits::TensorLevel + 1; \ + static constexpr std::size_t scalar_size = BaseTraits::scalar_size; \ + static constexpr std::size_t size = scalar_size * count + + template struct GridTypeMapper> { + using ObjectTraits = iScalar; + using BaseTraits = GridTypeMapper; + static constexpr int Rank = 1 + BaseTraits::Rank; + static constexpr std::size_t count = 1 * BaseTraits::count; + static constexpr int Dimension(unsigned int dim) { + return ( dim == 0 ) ? 1 : BaseTraits::Dimension(dim - 1); } + GridTypeMapper_RepeatedTypes; }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; + + template struct GridTypeMapper> { + using ObjectTraits = iVector; + using BaseTraits = GridTypeMapper; + static constexpr int Rank = 1 + BaseTraits::Rank; + static constexpr std::size_t count = N * BaseTraits::count; + static constexpr int Dimension(unsigned int dim) { + return ( dim == 0 ) ? N : BaseTraits::Dimension(dim - 1); } + GridTypeMapper_RepeatedTypes; }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; - }; - template<> struct isGridTensor { - static const bool value = false; - static const bool notvalue = true; + + template struct GridTypeMapper> { + using ObjectTraits = iMatrix; + using BaseTraits = GridTypeMapper; + static constexpr int Rank = 2 + BaseTraits::Rank; + static constexpr std::size_t count = N * N * BaseTraits::count; + static constexpr int Dimension(unsigned int dim) { + return ( dim == 0 || dim == 1 ) ? N : BaseTraits::Dimension(dim - 2); } + GridTypeMapper_RepeatedTypes; }; // Match the index @@ -263,20 +256,13 @@ namespace Grid { typedef T type; }; - //Query if a tensor or Lattice is SIMD vector or scalar - template - class isSIMDvectorized{ - template - static typename std::enable_if< !std::is_same< typename GridTypeMapper::type>::scalar_type, - typename GridTypeMapper::type>::vector_type>::value, char>::type test(void *); + //Query whether a tensor or Lattice is SIMD vector or scalar + template struct isSIMDvectorized : public std::false_type {}; + template struct isSIMDvectorized::type>::scalar_type, + typename GridTypeMapper::type>::vector_type>::value, void>::type> + : public std::true_type {}; - template - static double test(...); - - public: - enum {value = sizeof(test(0)) == sizeof(char) }; - }; - //Get the precision of a Lattice, tensor or scalar type in units of sizeof(float) template class getPrecision{ From acd25d0d01c678d1bfad72135dad8bb57a935b55 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Mon, 4 Mar 2019 11:30:15 +0000 Subject: [PATCH 27/29] Wilson clover multi grid for lime lattice --- tests/solver/Test_wilsonclover_mg_lime.cc | 194 ++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 tests/solver/Test_wilsonclover_mg_lime.cc diff --git a/tests/solver/Test_wilsonclover_mg_lime.cc b/tests/solver/Test_wilsonclover_mg_lime.cc new file mode 100644 index 00000000..687ec83f --- /dev/null +++ b/tests/solver/Test_wilsonclover_mg_lime.cc @@ -0,0 +1,194 @@ +/************************************************************************************* + + Grid physics library, www.github.com/paboyle/Grid + + Source file: ./tests/solver/Test_wilsonclover_mg_mp.cc + + Copyright (C) 2015-2018 + + Author: Daniel Richtmann + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + See the full license in the file "LICENSE" in the top level distribution directory + *************************************************************************************/ +/* */ + + +#include +#include + +using namespace std; +using namespace Grid; +using namespace Grid::QCD; + +int main(int argc, char **argv) { + + + Grid_init(&argc, &argv); + + // clang-format off + GridCartesian *FGrid_d = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd, vComplexD::Nsimd()), GridDefaultMpi()); + GridCartesian *FGrid_f = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd, vComplexF::Nsimd()), GridDefaultMpi()); + GridRedBlackCartesian *FrbGrid_d = SpaceTimeGrid::makeFourDimRedBlackGrid(FGrid_d); + GridRedBlackCartesian *FrbGrid_f = SpaceTimeGrid::makeFourDimRedBlackGrid(FGrid_f); + // clang-format on + + std::vector fSeeds({1, 2, 3, 4}); + GridParallelRNG fPRNG(FGrid_d); + fPRNG.SeedFixedIntegers(fSeeds); + + // clang-format off + LatticeFermionD src_d(FGrid_d); gaussian(fPRNG, src_d); + LatticeFermionD resultMGD_d(FGrid_d); resultMGD_d = zero; + LatticeFermionD resultMGF_d(FGrid_d); resultMGF_d = zero; + LatticeGaugeFieldD Umu_d(FGrid_d); + +#if 0 + { + FieldMetaData header; + std::string file("./qcdsf.769.00399.lime"); + std::cout < MdagMOpDwc_d(Dwc_d); + MdagMLinearOperator MdagMOpDwc_f(Dwc_f); + + std::cout << GridLogMessage << "**************************************************" << std::endl; + std::cout << GridLogMessage << "Testing single-precision Multigrid for Wilson Clover" << std::endl; + std::cout << GridLogMessage << "**************************************************" << std::endl; + + auto MGPreconDwc_f = createMGInstance(mgParams, levelInfo_f, Dwc_f, Dwc_f); + + MGPreconDwc_f->setup(); + + if(GridCmdOptionExists(argv, argv + argc, "--runchecks")) { + MGPreconDwc_f->runChecks(1e-6); + } + + MixedPrecisionFlexibleGeneralisedMinimalResidual MPFGMRESPREC( + 1.0e-12, 50000, FGrid_f, *MGPreconDwc_f, 100, false); + + std::cout << std::endl << "Starting with a new solver" << std::endl; + MPFGMRESPREC(MdagMOpDwc_d, src_d, resultMGF_d); + + MGPreconDwc_f->reportTimings(); + + if(GridCmdOptionExists(argv, argv + argc, "--docomparison")) { + + std::cout << GridLogMessage << "**************************************************" << std::endl; + std::cout << GridLogMessage << "Testing double-precision Multigrid for Wilson Clover" << std::endl; + std::cout << GridLogMessage << "**************************************************" << std::endl; + + auto MGPreconDwc_d = createMGInstance(mgParams, levelInfo_d, Dwc_d, Dwc_d); + + MGPreconDwc_d->setup(); + + if(GridCmdOptionExists(argv, argv + argc, "--runchecks")) { + MGPreconDwc_d->runChecks(1e-13); + } + + FlexibleGeneralisedMinimalResidual FGMRESPREC(1.0e-12, 50000, *MGPreconDwc_d, 100, false); + + std::cout << std::endl << "Starting with a new solver" << std::endl; + FGMRESPREC(MdagMOpDwc_d, src_d, resultMGD_d); + + MGPreconDwc_d->reportTimings(); + + std::cout << GridLogMessage << "**************************************************" << std::endl; + std::cout << GridLogMessage << "Comparing single-precision Multigrid with double-precision one for Wilson Clover" << std::endl; + std::cout << GridLogMessage << "**************************************************" << std::endl; + + LatticeFermionD diffFullSolver(FGrid_d); + + RealD deviationFullSolver = axpy_norm(diffFullSolver, -1.0, resultMGF_d, resultMGD_d); + + // clang-format off + LatticeFermionF src_f(FGrid_f); precisionChange(src_f, src_d); + LatticeFermionF resMGF_f(FGrid_f); resMGF_f = zero; + LatticeFermionD resMGD_d(FGrid_d); resMGD_d = zero; + // clang-format on + + (*MGPreconDwc_f)(src_f, resMGF_f); + (*MGPreconDwc_d)(src_d, resMGD_d); + + LatticeFermionD diffOnlyMG(FGrid_d); + LatticeFermionD resMGF_d(FGrid_d); + precisionChange(resMGF_d, resMGF_f); + + RealD deviationOnlyPrec = axpy_norm(diffOnlyMG, -1.0, resMGF_d, resMGD_d); + + // clang-format off + std::cout << GridLogMessage << "Absolute difference between FGMRES preconditioned by double and single precicision MG: " << deviationFullSolver << std::endl; + std::cout << GridLogMessage << "Relative deviation between FGMRES preconditioned by double and single precicision MG: " << deviationFullSolver / norm2(resultMGD_d) << std::endl; + std::cout << GridLogMessage << "Absolute difference between one iteration of MG Prec in double and single precision: " << deviationOnlyPrec << std::endl; + std::cout << GridLogMessage << "Relative deviation between one iteration of MG Prec in double and single precision: " << deviationOnlyPrec / norm2(resMGD_d) << std::endl; + // clang-format on + } + + Grid_finalize(); +} From 91cffef883a60f83058142404b1166e467a70d56 Mon Sep 17 00:00:00 2001 From: Michael Marshall Date: Thu, 7 Mar 2019 14:30:35 +0000 Subject: [PATCH 28/29] Updates after review with Peter. --- Grid/simd/Grid_vector_types.h | 3 + Grid/tensors/Tensor_class.h | 179 ++++++---------------------------- Grid/tensors/Tensor_traits.h | 115 +++++++++++----------- 3 files changed, 95 insertions(+), 202 deletions(-) diff --git a/Grid/simd/Grid_vector_types.h b/Grid/simd/Grid_vector_types.h index b34e056d..707af211 100644 --- a/Grid/simd/Grid_vector_types.h +++ b/Grid/simd/Grid_vector_types.h @@ -10,6 +10,7 @@ Author: Azusa Yamaguchi Author: Guido Cossu Author: Peter Boyle Author: neo +Author: Michael Marshall This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -865,8 +866,10 @@ template struct is_simd : public std::false_type {}; template <> struct is_simd : public std::true_type {}; template <> struct is_simd : public std::true_type {}; +template <> struct is_simd : public std::true_type {}; template <> struct is_simd : public std::true_type {}; template <> struct is_simd : public std::true_type {}; +template <> struct is_simd : public std::true_type {}; template <> struct is_simd : public std::true_type {}; template using IfSimd = Invoke::value, int> >; diff --git a/Grid/tensors/Tensor_class.h b/Grid/tensors/Tensor_class.h index c87503c6..d59640df 100644 --- a/Grid/tensors/Tensor_class.h +++ b/Grid/tensors/Tensor_class.h @@ -5,6 +5,7 @@ Copyright (C) 2015 Author: Azusa Yamaguchi Author: Peter Boyle +Author: Michael Marshall This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,27 +43,26 @@ namespace Grid { // class GridTensorBase {}; +// Too late to remove these traits from Grid Tensors, so inherit from GridTypeMapper +#define GridVector_CopyTraits \ + using element = vtype; \ + using scalar_type = typename Traits::scalar_type; \ + using vector_type = typename Traits::vector_type; \ + using vector_typeD = typename Traits::vector_typeD; \ + using tensor_reduced = typename Traits::tensor_reduced; \ + using scalar_object = typename Traits::scalar_object; \ + using Complexified = typename Traits::Complexified; \ + using Realified = typename Traits::Realified; \ + using DoublePrecision = typename Traits::DoublePrecision; \ + static constexpr int TensorLevel = Traits::TensorLevel + template class iScalar { public: vtype _internal; - typedef vtype element; - typedef typename GridTypeMapper::scalar_type scalar_type; - typedef typename GridTypeMapper::vector_type vector_type; - typedef typename GridTypeMapper::vector_typeD vector_typeD; - typedef typename GridTypeMapper::tensor_reduced tensor_reduced_v; - typedef typename GridTypeMapper::scalar_object recurse_scalar_object; - typedef iScalar tensor_reduced; - typedef iScalar scalar_object; - // substitutes a real or complex version with same tensor structure - typedef iScalar::Complexified> Complexified; - typedef iScalar::Realified> Realified; - - // get double precision version - typedef iScalar::DoublePrecision> DoublePrecision; - - static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; + using Traits = GridTypeMapper >; + GridVector_CopyTraits; // Scalar no action // template using tensor_reduce_level = typename @@ -173,37 +173,10 @@ class iScalar { return stream; }; - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return &_internal; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return _internal.begin(); } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return (&_internal) + 1; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return _internal.begin() + sizeof(_internal)/sizeof(scalar_type); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return &_internal; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return _internal.begin(); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return (&_internal) + 1; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return _internal.begin() + sizeof(_internal)/sizeof(scalar_type); } + strong_inline const scalar_type * begin() const { return reinterpret_cast(&_internal); } + strong_inline scalar_type * begin() { return reinterpret_cast< scalar_type *>(&_internal); } + strong_inline const scalar_type * end() const { return begin() + Traits::count; } + strong_inline scalar_type * end() { return begin() + Traits::count; } }; /////////////////////////////////////////////////////////// // Allows to turn scalar>>> back to double. @@ -224,22 +197,9 @@ class iVector { public: vtype _internal[N]; - typedef vtype element; - typedef typename GridTypeMapper::scalar_type scalar_type; - typedef typename GridTypeMapper::vector_type vector_type; - typedef typename GridTypeMapper::vector_typeD vector_typeD; - typedef typename GridTypeMapper::tensor_reduced tensor_reduced_v; - typedef typename GridTypeMapper::scalar_object recurse_scalar_object; - typedef iScalar tensor_reduced; - typedef iVector scalar_object; + using Traits = GridTypeMapper >; + GridVector_CopyTraits; - // substitutes a real or complex version with same tensor structure - typedef iVector::Complexified, N> Complexified; - typedef iVector::Realified, N> Realified; - - // get double precision version - typedef iVector::DoublePrecision, N> DoublePrecision; - template ::value, T>::type * = nullptr> strong_inline auto operator=(T arg) -> iVector { @@ -248,7 +208,6 @@ class iVector { return *this; } - static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; iVector(const Zero &z) { *this = zero; }; iVector() = default; /* @@ -334,37 +293,10 @@ class iVector { // return _internal[i]; // } - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return _internal; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return _internal[0].begin(); } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return _internal + N; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return _internal[0].begin() + sizeof(_internal)/sizeof(scalar_type); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return _internal; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return _internal[0].begin(); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return _internal + N; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return _internal[0].begin() + sizeof(_internal)/sizeof(scalar_type); } + strong_inline const scalar_type * begin() const { return reinterpret_cast(_internal); } + strong_inline scalar_type * begin() { return reinterpret_cast< scalar_type *>(_internal); } + strong_inline const scalar_type * end() const { return begin() + Traits::count; } + strong_inline scalar_type * end() { return begin() + Traits::count; } }; template @@ -372,25 +304,8 @@ class iMatrix { public: vtype _internal[N][N]; - typedef vtype element; - typedef typename GridTypeMapper::scalar_type scalar_type; - typedef typename GridTypeMapper::vector_type vector_type; - typedef typename GridTypeMapper::vector_typeD vector_typeD; - typedef typename GridTypeMapper::tensor_reduced tensor_reduced_v; - typedef typename GridTypeMapper::scalar_object recurse_scalar_object; - - // substitutes a real or complex version with same tensor structure - typedef iMatrix::Complexified, N> Complexified; - typedef iMatrix::Realified, N> Realified; - - // get double precision version - typedef iMatrix::DoublePrecision, N> DoublePrecision; - - // Tensor removal - typedef iScalar tensor_reduced; - typedef iMatrix scalar_object; - - static constexpr int TensorLevel = GridTypeMapper::TensorLevel + 1; + using Traits = GridTypeMapper >; + GridVector_CopyTraits; iMatrix(const Zero &z) { *this = zero; }; iMatrix() = default; @@ -521,37 +436,10 @@ class iMatrix { // return _internal[i][j]; // } - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return _internal[0]; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline begin() const { return _internal[0][0].begin(); } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return _internal[0] + N * N; } - - template - typename std::enable_if::value, const scalar_type *>::type - strong_inline end() const { return _internal[0][0].begin() + sizeof(_internal)/sizeof(scalar_type); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return _internal[0]; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline begin() { return _internal[0][0].begin(); } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return _internal[0] + N * N; } - - template - typename std::enable_if::value, scalar_type *>::type - strong_inline end() { return _internal[0][0].begin() + sizeof(_internal)/sizeof(scalar_type); } + strong_inline const scalar_type * begin() const { return reinterpret_cast(_internal[0]); } + strong_inline scalar_type * begin() { return reinterpret_cast< scalar_type *>(_internal[0]); } + strong_inline const scalar_type * end() const { return begin() + Traits::count; } + strong_inline scalar_type * end() { return begin() + Traits::count; } }; template @@ -574,6 +462,3 @@ void vprefetch(const iMatrix &vv) { } } #endif - - - diff --git a/Grid/tensors/Tensor_traits.h b/Grid/tensors/Tensor_traits.h index d4854768..9cb93e17 100644 --- a/Grid/tensors/Tensor_traits.h +++ b/Grid/tensors/Tensor_traits.h @@ -5,6 +5,7 @@ Author: Azusa Yamaguchi Author: Peter Boyle Author: Christopher Kelly +Author: Michael Marshall This program 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 2 of the License, or @@ -32,14 +33,10 @@ namespace Grid { template class iMatrix; // These are the Grid tensors - template struct isGridTensor - : public std::false_type { static constexpr bool notvalue = true; }; - template struct isGridTensor> - : public std::true_type { static constexpr bool notvalue = false; }; - template struct isGridTensor> - : public std::true_type { static constexpr bool notvalue = false; }; - template struct isGridTensor> - : public std::true_type { static constexpr bool notvalue = false; }; + template struct isGridTensor : public std::false_type { static constexpr bool notvalue = true; }; + template struct isGridTensor> : public std::true_type { static constexpr bool notvalue = false; }; + template struct isGridTensor> : public std::true_type { static constexpr bool notvalue = false; }; + template struct isGridTensor> : public std::true_type { static constexpr bool notvalue = false; }; ////////////////////////////////////////////////////////////////////////////////// // Want to recurse: GridTypeMapper >::scalar_type == ComplexD. @@ -57,20 +54,15 @@ namespace Grid { ////////////////////////////////////////////////////////////////////////////////// // This saves repeating common properties for supported Grid Scalar types - template struct GridTypeMapper_Base {}; // TensorLevel How many nested grid tensors // Rank Rank of the grid tensor // count Total number of elements, i.e. product of dimensions - // scalar_size Size of the underlying fundamental object (tensor_reduced) in bytes - // size Total size of all elements in bytes // Dimension(dim) Size of dimension dim - template struct GridTypeMapper_Base { + struct GridTypeMapper_Base { static constexpr int TensorLevel = 0; static constexpr int Rank = 0; static constexpr std::size_t count = 1; - static constexpr std::size_t scalar_size = sizeof(T); - static constexpr std::size_t size = scalar_size * count; - static constexpr int Dimension(unsigned int dim) { return 0; } + static constexpr int Dimension(int dim) { return 0; } }; ////////////////////////////////////////////////////////////////////////////////// @@ -79,7 +71,7 @@ namespace Grid { template struct GridTypeMapper {}; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealF scalar_type; typedef RealF vector_type; typedef RealD vector_typeD; @@ -89,7 +81,7 @@ namespace Grid { typedef RealF Realified; typedef RealD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealD scalar_type; typedef RealD vector_type; typedef RealD vector_typeD; @@ -99,7 +91,7 @@ namespace Grid { typedef RealD Realified; typedef RealD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef ComplexF vector_type; typedef ComplexD vector_typeD; @@ -109,7 +101,7 @@ namespace Grid { typedef RealF Realified; typedef ComplexD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexD scalar_type; typedef ComplexD vector_type; typedef ComplexD vector_typeD; @@ -119,7 +111,7 @@ namespace Grid { typedef RealD Realified; typedef ComplexD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef Integer scalar_type; typedef Integer vector_type; typedef Integer vector_typeD; @@ -130,7 +122,7 @@ namespace Grid { typedef void DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealF scalar_type; typedef vRealF vector_type; typedef vRealD vector_typeD; @@ -140,7 +132,7 @@ namespace Grid { typedef vRealF Realified; typedef vRealD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef RealD scalar_type; typedef vRealD vector_type; typedef vRealD vector_typeD; @@ -150,7 +142,17 @@ namespace Grid { typedef vRealD Realified; typedef vRealD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { + typedef RealF scalar_type; + typedef vRealH vector_type; + typedef vRealD vector_typeD; + typedef vRealH tensor_reduced; + typedef RealF scalar_object; + typedef vComplexH Complexified; + typedef vRealH Realified; + typedef vRealD DoublePrecision; + }; + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef vComplexH vector_type; typedef vComplexD vector_typeD; @@ -160,7 +162,7 @@ namespace Grid { typedef vRealH Realified; typedef vComplexD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexF scalar_type; typedef vComplexF vector_type; typedef vComplexD vector_typeD; @@ -170,7 +172,7 @@ namespace Grid { typedef vRealF Realified; typedef vComplexD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef ComplexD scalar_type; typedef vComplexD vector_type; typedef vComplexD vector_typeD; @@ -180,7 +182,7 @@ namespace Grid { typedef vRealD Realified; typedef vComplexD DoublePrecision; }; - template<> struct GridTypeMapper : public GridTypeMapper_Base { + template<> struct GridTypeMapper : public GridTypeMapper_Base { typedef Integer scalar_type; typedef vInteger vector_type; typedef vInteger vector_typeD; @@ -192,46 +194,49 @@ namespace Grid { }; #define GridTypeMapper_RepeatedTypes \ - typedef typename ObjectTraits::scalar_type scalar_type; \ - typedef typename ObjectTraits::vector_type vector_type; \ - typedef typename ObjectTraits::vector_typeD vector_typeD; \ - typedef typename ObjectTraits::tensor_reduced tensor_reduced; \ - typedef typename ObjectTraits::scalar_object scalar_object; \ - typedef typename ObjectTraits::Complexified Complexified; \ - typedef typename ObjectTraits::Realified Realified; \ - typedef typename ObjectTraits::DoublePrecision DoublePrecision; \ - static constexpr int TensorLevel = BaseTraits::TensorLevel + 1; \ - static constexpr std::size_t scalar_size = BaseTraits::scalar_size; \ - static constexpr std::size_t size = scalar_size * count + using BaseTraits = GridTypeMapper; \ + using scalar_type = typename BaseTraits::scalar_type; \ + using vector_type = typename BaseTraits::vector_type; \ + using vector_typeD = typename BaseTraits::vector_typeD; \ + static constexpr int TensorLevel = BaseTraits::TensorLevel + 1 template struct GridTypeMapper> { - using ObjectTraits = iScalar; - using BaseTraits = GridTypeMapper; - static constexpr int Rank = 1 + BaseTraits::Rank; - static constexpr std::size_t count = 1 * BaseTraits::count; - static constexpr int Dimension(unsigned int dim) { - return ( dim == 0 ) ? 1 : BaseTraits::Dimension(dim - 1); } GridTypeMapper_RepeatedTypes; + using tensor_reduced = iScalar; + using scalar_object = iScalar; + using Complexified = iScalar; + using Realified = iScalar; + using DoublePrecision = iScalar; + static constexpr int Rank = BaseTraits::Rank + 1; + static constexpr std::size_t count = BaseTraits::count; + static constexpr int Dimension(int dim) { + return ( dim == 0 ) ? 1 : BaseTraits::Dimension(dim - 1); } }; template struct GridTypeMapper> { - using ObjectTraits = iVector; - using BaseTraits = GridTypeMapper; - static constexpr int Rank = 1 + BaseTraits::Rank; - static constexpr std::size_t count = N * BaseTraits::count; - static constexpr int Dimension(unsigned int dim) { - return ( dim == 0 ) ? N : BaseTraits::Dimension(dim - 1); } GridTypeMapper_RepeatedTypes; + using tensor_reduced = iScalar; + using scalar_object = iVector; + using Complexified = iVector; + using Realified = iVector; + using DoublePrecision = iVector; + static constexpr int Rank = BaseTraits::Rank + 1; + static constexpr std::size_t count = BaseTraits::count * N; + static constexpr int Dimension(int dim) { + return ( dim == 0 ) ? N : BaseTraits::Dimension(dim - 1); } }; template struct GridTypeMapper> { - using ObjectTraits = iMatrix; - using BaseTraits = GridTypeMapper; - static constexpr int Rank = 2 + BaseTraits::Rank; - static constexpr std::size_t count = N * N * BaseTraits::count; - static constexpr int Dimension(unsigned int dim) { - return ( dim == 0 || dim == 1 ) ? N : BaseTraits::Dimension(dim - 2); } GridTypeMapper_RepeatedTypes; + using tensor_reduced = iScalar; + using scalar_object = iMatrix; + using Complexified = iMatrix; + using Realified = iMatrix; + using DoublePrecision = iMatrix; + static constexpr int Rank = BaseTraits::Rank + 2; + static constexpr std::size_t count = BaseTraits::count * N * N; + static constexpr int Dimension(int dim) { + return ( dim == 0 || dim == 1 ) ? N : BaseTraits::Dimension(dim - 2); } }; // Match the index From d921a99b1a02a5bf75d45e73b5549683193f8664 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 19 Mar 2019 17:07:40 +0000 Subject: [PATCH 29/29] precision fix --- Grid/qcd/action/fermion/FermionOperator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grid/qcd/action/fermion/FermionOperator.h b/Grid/qcd/action/fermion/FermionOperator.h index 55942dea..20079fc5 100644 --- a/Grid/qcd/action/fermion/FermionOperator.h +++ b/Grid/qcd/action/fermion/FermionOperator.h @@ -113,7 +113,7 @@ namespace Grid { LatticeCoordinate(coor, nu); ph = ph + twist[nu]*coor*((1./(in._grid->_fdimensions[nu]))); } - in_buf = exp((Real)(2.0*M_PI)*ci*ph*(-1.0))*in; + in_buf = exp((Real)(-2.0*M_PI)*ci*ph)*in; theFFT.FFT_all_dim(in_k,in_buf,FFT::forward); this->MomentumSpacePropagator(prop_k,in_k,mass,twist);