From 184adeedb83c716b879d2026d1af902aa2457d02 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 26 Oct 2022 12:53:46 +0100 Subject: [PATCH] feat: renamed open_boundaries to fixedBoundaries --- Grid/qcd/action/fermion/CloverHelpers.h | 6 ++-- .../fermion/CompactWilsonCloverFermion.h | 2 +- ...CompactWilsonCloverFermionImplementation.h | 32 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Grid/qcd/action/fermion/CloverHelpers.h b/Grid/qcd/action/fermion/CloverHelpers.h index b8b4fa59..cd469ea7 100644 --- a/Grid/qcd/action/fermion/CloverHelpers.h +++ b/Grid/qcd/action/fermion/CloverHelpers.h @@ -213,7 +213,7 @@ public: const CloverTriangleField& triangle, CloverDiagonalField& diagonalInv, CloverTriangleField& triangleInv, - bool open_boundaries) { + bool fixedBoundaries) { CompactHelpers::Invert(diagonal, triangle, diagonalInv, triangleInv); } @@ -310,9 +310,9 @@ public: const CloverTriangleField& triangle, CloverDiagonalField& diagonalInv, CloverTriangleField& triangleInv, - bool open_boundaries) { + bool fixedBoundaries) { - if (open_boundaries) + if (fixedBoundaries) { CompactHelpers::Invert(diagonal, triangle, diagonalInv, triangleInv); } diff --git a/Grid/qcd/action/fermion/CompactWilsonCloverFermion.h b/Grid/qcd/action/fermion/CompactWilsonCloverFermion.h index 249b20bd..d79b34d4 100644 --- a/Grid/qcd/action/fermion/CompactWilsonCloverFermion.h +++ b/Grid/qcd/action/fermion/CompactWilsonCloverFermion.h @@ -225,7 +225,7 @@ public: RealD csw_t; RealD cF; - bool open_boundaries; + bool fixedBoundaries; CloverDiagonalField Diagonal, DiagonalEven, DiagonalOdd; CloverDiagonalField DiagonalInv, DiagonalInvEven, DiagonalInvOdd; diff --git a/Grid/qcd/action/fermion/implementation/CompactWilsonCloverFermionImplementation.h b/Grid/qcd/action/fermion/implementation/CompactWilsonCloverFermionImplementation.h index c8d1ca30..7e3b7f00 100644 --- a/Grid/qcd/action/fermion/implementation/CompactWilsonCloverFermionImplementation.h +++ b/Grid/qcd/action/fermion/implementation/CompactWilsonCloverFermionImplementation.h @@ -48,7 +48,7 @@ CompactWilsonCloverFermion::CompactWilsonCloverFermion(Gaug , csw_r(_csw_r) , csw_t(_csw_t) , cF(_cF) - , open_boundaries(impl_p.boundary_phases[Nd-1] == 0.0) + , fixedBoundaries(impl_p.boundary_phases[Nd-1] == 0.0) , Diagonal(&Fgrid), Triangle(&Fgrid) , DiagonalEven(&Hgrid), TriangleEven(&Hgrid) , DiagonalOdd(&Hgrid), TriangleOdd(&Hgrid) @@ -67,7 +67,7 @@ CompactWilsonCloverFermion::CompactWilsonCloverFermion(Gaug csw_r /= clover_anisotropy.xi_0; ImportGauge(_Umu); - if (open_boundaries) { + if (fixedBoundaries) { this->BoundaryMaskEven.Checkerboard() = Even; this->BoundaryMaskOdd.Checkerboard() = Odd; CompactHelpers::SetupMasks(this->BoundaryMask, this->BoundaryMaskEven, this->BoundaryMaskOdd); @@ -77,31 +77,31 @@ CompactWilsonCloverFermion::CompactWilsonCloverFermion(Gaug template void CompactWilsonCloverFermion::Dhop(const FermionField& in, FermionField& out, int dag) { WilsonBase::Dhop(in, out, dag); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::DhopOE(const FermionField& in, FermionField& out, int dag) { WilsonBase::DhopOE(in, out, dag); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::DhopEO(const FermionField& in, FermionField& out, int dag) { WilsonBase::DhopEO(in, out, dag); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::DhopDir(const FermionField& in, FermionField& out, int dir, int disp) { WilsonBase::DhopDir(in, out, dir, disp); - if(this->open_boundaries) ApplyBoundaryMask(out); + if(this->fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::DhopDirAll(const FermionField& in, std::vector& out) { WilsonBase::DhopDirAll(in, out); - if(this->open_boundaries) { + if(this->fixedBoundaries) { for(auto& o : out) ApplyBoundaryMask(o); } } @@ -112,7 +112,7 @@ void CompactWilsonCloverFermion::M(const FermionField& in, WilsonBase::Dhop(in, out, DaggerNo); // call base to save applying bc Mooee(in, Tmp); axpy(out, 1.0, out, Tmp); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template @@ -121,19 +121,19 @@ void CompactWilsonCloverFermion::Mdag(const FermionField& i WilsonBase::Dhop(in, out, DaggerYes); // call base to save applying bc MooeeDag(in, Tmp); axpy(out, 1.0, out, Tmp); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::Meooe(const FermionField& in, FermionField& out) { WilsonBase::Meooe(in, out); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template void CompactWilsonCloverFermion::MeooeDag(const FermionField& in, FermionField& out) { WilsonBase::MeooeDag(in, out); - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template @@ -147,7 +147,7 @@ void CompactWilsonCloverFermion::Mooee(const FermionField& } else { MooeeInternal(in, out, Diagonal, Triangle); } - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template @@ -166,7 +166,7 @@ void CompactWilsonCloverFermion::MooeeInv(const FermionFiel } else { MooeeInternal(in, out, DiagonalInv, TriangleInv); } - if(open_boundaries) ApplyBoundaryMask(out); + if(fixedBoundaries) ApplyBoundaryMask(out); } template @@ -186,7 +186,7 @@ void CompactWilsonCloverFermion::MdirAll(const FermionField template void CompactWilsonCloverFermion::MDeriv(GaugeField& force, const FermionField& X, const FermionField& Y, int dag) { - assert(!open_boundaries); // TODO check for changes required for open bc + assert(!fixedBoundaries); // TODO check for changes required for open bc // NOTE: code copied from original clover term conformable(X.Grid(), Y.Grid()); @@ -338,14 +338,14 @@ void CompactWilsonCloverFermion::ImportGauge(const GaugeFie // Modify the clover term at the temporal boundaries in case of open boundary conditions double t6 = usecond(); - if(open_boundaries) CompactHelpers::ModifyBoundaries(Diagonal, Triangle, csw_t, cF, this->diag_mass); + if(fixedBoundaries) CompactHelpers::ModifyBoundaries(Diagonal, Triangle, csw_t, cF, this->diag_mass); // Invert the Clover term // In case of the exponential clover with (anti-)periodic boundary conditions exp(-Clover) saved // in TmpInverse can be used. In all other cases the clover term has to be explictly inverted. // TODO: For now this inversion is explictly done on the CPU double t7 = usecond(); - CloverHelpers::InvertClover(TmpInverse, Diagonal, Triangle, DiagonalInv, TriangleInv, open_boundaries); + CloverHelpers::InvertClover(TmpInverse, Diagonal, Triangle, DiagonalInv, TriangleInv, fixedBoundaries); // Fill the remaining clover fields double t8 = usecond();