1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

HMC runs but does not accept with smearing on

This commit is contained in:
neo 2016-04-07 16:45:11 +09:00
parent 97d0d56bcb
commit a87b744621
5 changed files with 12 additions and 25 deletions

13
configure vendored
View File

@ -2569,7 +2569,7 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
am__api_version='1.15'
am__api_version='1.14'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@ -2741,8 +2741,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@ -2761,7 +2761,7 @@ else
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh+set}" != xset; then
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@ -3089,8 +3089,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
@ -3149,7 +3149,6 @@ END
fi
ac_config_headers="$ac_config_headers lib/Config.h"
# Check whether --enable-silent-rules was given.

View File

@ -116,8 +116,7 @@ namespace Grid{
for(int a=0; a<as[level].actions.size(); ++a){
GaugeField force(U._grid);
as[level].actions.at(a)->deriv(U,force); // deriv should not include Ta
std::cout<<GridLogMessage<< "P Level: "<< level<< " action: "<<a<< " Smeared: "
<<as[level].actions.at(a)->is_smeared <<std::endl;
std::cout<<GridLogIntegrator<< "Smearing (on/off): "<<as[level].actions.at(a)->is_smeared <<std::endl;
if (as[level].actions.at(a)->is_smeared) Smearer.smeared_force(force);
force = Ta(force);
Mom = Mom - force*ep;
@ -176,9 +175,6 @@ namespace Grid{
for(int actionID=0; actionID<as[level].actions.size(); ++actionID){
// get gauge field from the SmearingPolicy and
// based on the boolean is_smeared in actionID
std::cout<<GridLogMessage<< "Refresh Level: "<< level<< " action: "<<actionID<< " Smeared: "
<<as[level].actions.at(actionID)->is_smeared <<std::endl;
GaugeField& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
as[level].actions.at(actionID)->refresh(Us, pRNG);
}
@ -206,8 +202,8 @@ namespace Grid{
// get gauge field from the SmearingPolicy and
// based on the boolean is_smeared in actionID
GaugeField& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
std::cout<<GridLogMessage << "S Level "<<level<<" term "<<actionID<<" H = "<<Hterm<<std::endl;
Hterm = as[level].actions.at(actionID)->S(Us);
std::cout<<GridLogMessage << "S Level "<<level<<" term "<<actionID<<" H = "<<Hterm<<std::endl;
H += Hterm;
}
}

View File

@ -43,13 +43,10 @@ namespace Grid {
if (smearingLevels > 0){
std::cout<< GridLogDebug << "[SmearedConfiguration] Filling SmearedSet\n";
GaugeField previous_u(ThinLinks->_grid);
std::cout<< GridLogDebug << "[SmearedConfiguration] Loop\n";
previous_u = *ThinLinks;
for(int smearLvl = 0; smearLvl < smearingLevels; ++smearLvl){
std::cout<< GridLogDebug << "[SmearedConfiguration] Loop: "<< smearLvl << "\n";
StoutSmearing.smear(SmearedSet[smearLvl],previous_u);
std::cout<< GridLogDebug << "[SmearedConfiguration] Loop assign: "<< smearLvl << "\n";
previous_u = SmearedSet[smearLvl];
}

View File

@ -68,7 +68,7 @@ namespace Grid {
// only one Lorentz direction at a time
std::cout<< GridLogDebug << "Stout smearing exponentiate iQ\n";
GridBase *grid = iQ._grid;
GaugeLinkField unity(grid);
unity=1.0;
@ -94,8 +94,6 @@ namespace Grid {
GridBase *grid = u._grid;
LatticeReal c0(grid), c1(grid), tmp(grid), c0max(grid), theta(grid);
std::cout<< GridLogDebug << "Stout smearing set uw\n";
c0 = - toReal(imag(trace(iQ3))) * one_over_three;
c1 = - toReal(real(trace(iQ2))) * one_over_two;
tmp = c1 * one_over_three;
@ -109,7 +107,6 @@ namespace Grid {
void set_fj(LatticeComplex& f0, LatticeComplex& f1, LatticeComplex& f2,
const LatticeReal& u, const LatticeReal& w) const{
std::cout<< GridLogDebug << "Stout smearing set fj\n";
GridBase *grid = u._grid;
LatticeReal xi0(grid), u2(grid), w2(grid), cosw(grid), tmp(grid);
LatticeComplex fden(grid);
@ -121,9 +118,7 @@ namespace Grid {
w2 = w * w;
cosw = cos(w);
std::cout<< GridLogDebug << "Stout smearing first toComplex\n";
ixi0 = timesI(toComplex(xi0));
std::cout<< GridLogDebug << "Stout smearing others toComplex\n";
emiu = toComplex(cos(u)) - timesI(toComplex(u));
e2iu = toComplex(cos(2.0*u)) + timesI(toComplex(2.0*u));
@ -144,13 +139,13 @@ namespace Grid {
}
LatticeReal func_xi0(LatticeReal w) const{
LatticeReal func_xi0(const LatticeReal& w) const{
// Define a function to do the check
//if( w < 1e-4 ) std::cout << GridLogWarning<< "[Smear_stout] w too small: "<< w <<"\n";
return sin(w)/w;
}
LatticeReal func_xi1(LatticeReal w) const{
LatticeReal func_xi1(const LatticeReal& w) const{
// Define a function to do the check
//if( w < 1e-4 ) std::cout << GridLogWarning << "[Smear_stout] w too small: "<< w <<"\n";
return cos(w)/(w*w) - sin(w)/(w*w*w);

View File

@ -66,7 +66,7 @@ public:
TwoFlavourEvenOddPseudoFermionAction<ImplPolicy> Nf2(FermOp,CG,CG);
Nf2.is_smeared=true;
Nf2.is_smeared=false;
//Collect actions
ActionLevel<LatticeGaugeField> Level1(1);