mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hiding internals
This commit is contained in:
parent
912b50f6fa
commit
3f9654e397
@ -82,9 +82,9 @@ int main (int argc, char ** argv)
|
|||||||
LatticeFermionD result_o(FrbGrid);
|
LatticeFermionD result_o(FrbGrid);
|
||||||
LatticeFermionD result_o_2(FrbGrid);
|
LatticeFermionD result_o_2(FrbGrid);
|
||||||
pickCheckerboard(Odd,src_o,src);
|
pickCheckerboard(Odd,src_o,src);
|
||||||
result_o.checkerboard = Odd;
|
result_o.Checkerboard() = Odd;
|
||||||
result_o = zero;
|
result_o = zero;
|
||||||
result_o_2.checkerboard = Odd;
|
result_o_2.Checkerboard() = Odd;
|
||||||
result_o_2 = zero;
|
result_o_2 = zero;
|
||||||
|
|
||||||
SchurDiagMooeeOperator<DomainWallFermionD,LatticeFermionD> HermOpEO(Ddwf);
|
SchurDiagMooeeOperator<DomainWallFermionD,LatticeFermionD> HermOpEO(Ddwf);
|
||||||
|
@ -82,7 +82,7 @@ int main (int argc, char ** argv)
|
|||||||
LatticeFermionD src_o(FrbGrid);
|
LatticeFermionD src_o(FrbGrid);
|
||||||
LatticeFermionD result_cg(FrbGrid);
|
LatticeFermionD result_cg(FrbGrid);
|
||||||
pickCheckerboard(Odd,src_o,src);
|
pickCheckerboard(Odd,src_o,src);
|
||||||
result_cg.checkerboard = Odd;
|
result_cg.Checkerboard() = Odd;
|
||||||
result_cg = zero;
|
result_cg = zero;
|
||||||
LatticeFermionD result_mcg(result_cg);
|
LatticeFermionD result_mcg(result_cg);
|
||||||
LatticeFermionD result_rlcg(result_cg);
|
LatticeFermionD result_rlcg(result_cg);
|
||||||
|
@ -110,13 +110,13 @@ int main(int argc, char ** argv) {
|
|||||||
SE = myStencil.GetEntry(permute_type,0,i);
|
SE = myStencil.GetEntry(permute_type,0,i);
|
||||||
|
|
||||||
if ( SE->_is_local && SE->_permute )
|
if ( SE->_is_local && SE->_permute )
|
||||||
permute(Check._odata[i],Foo._odata[SE->_offset],permute_type);
|
permute(Check[i],Foo[SE->_offset],permute_type);
|
||||||
else if (SE->_is_local)
|
else if (SE->_is_local)
|
||||||
Check._odata[i] = Foo._odata[SE->_offset];
|
Check[i] = Foo[SE->_offset];
|
||||||
else {
|
else {
|
||||||
Check._odata[i] = myStencil.CommBuf()[SE->_offset];
|
Check[i] = myStencil.CommBuf()[SE->_offset];
|
||||||
// std::cout << " receive "<<i<<" " << Check._odata[i]<<std::endl;
|
// std::cout << " receive "<<i<<" " << Check[i]<<std::endl;
|
||||||
// std::cout << " Foo "<<i<<" " << Foo._odata[i]<<std::endl;
|
// std::cout << " Foo "<<i<<" " << Foo[i]<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +149,8 @@ int main(int argc, char ** argv) {
|
|||||||
}}}}
|
}}}}
|
||||||
|
|
||||||
if (nrm > 1.0e-4) {
|
if (nrm > 1.0e-4) {
|
||||||
for(int i=0;i<Check._odata_size;i++){
|
for(int i=0;i<Check.size();i++){
|
||||||
std::cout << i<<" Check.odata "<<Check._odata[i]<< "\n"<<i<<" Bar.odata "<<Bar._odata[i]<<std::endl;
|
std::cout << i<<" Check.odata "<<Check[i]<< "\n"<<i<<" Bar.odata "<<Bar[i]<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nrm > 1.0e-4) exit(-1);
|
if (nrm > 1.0e-4) exit(-1);
|
||||||
@ -191,11 +191,11 @@ int main(int argc, char ** argv) {
|
|||||||
Bar = Cshift(Foo,dir,disp);
|
Bar = Cshift(Foo,dir,disp);
|
||||||
|
|
||||||
if ( disp & 0x1 ) {
|
if ( disp & 0x1 ) {
|
||||||
ECheck.checkerboard = Even;
|
ECheck.Checkerboard() = Even;
|
||||||
OCheck.checkerboard = Odd;
|
OCheck.Checkerboard() = Odd;
|
||||||
} else {
|
} else {
|
||||||
ECheck.checkerboard = Odd;
|
ECheck.Checkerboard() = Odd;
|
||||||
OCheck.checkerboard = Even;
|
OCheck.Checkerboard() = Even;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implement a stencil code that should agree with that darn cshift!
|
// Implement a stencil code that should agree with that darn cshift!
|
||||||
@ -207,11 +207,11 @@ int main(int argc, char ** argv) {
|
|||||||
// std::cout << "Even source "<< i<<" -> " <<SE->_offset << " "<< SE->_is_local<<std::endl;
|
// std::cout << "Even source "<< i<<" -> " <<SE->_offset << " "<< SE->_is_local<<std::endl;
|
||||||
|
|
||||||
if ( SE->_is_local && SE->_permute )
|
if ( SE->_is_local && SE->_permute )
|
||||||
permute(OCheck._odata[i],EFoo._odata[SE->_offset],permute_type);
|
permute(OCheck[i],EFoo[SE->_offset],permute_type);
|
||||||
else if (SE->_is_local)
|
else if (SE->_is_local)
|
||||||
OCheck._odata[i] = EFoo._odata[SE->_offset];
|
OCheck[i] = EFoo[SE->_offset];
|
||||||
else
|
else
|
||||||
OCheck._odata[i] = EStencil.CommBuf()[SE->_offset];
|
OCheck[i] = EStencil.CommBuf()[SE->_offset];
|
||||||
}
|
}
|
||||||
OStencil.HaloExchange(OFoo,compress);
|
OStencil.HaloExchange(OFoo,compress);
|
||||||
for(int i=0;i<ECheck._grid->oSites();i++){
|
for(int i=0;i<ECheck._grid->oSites();i++){
|
||||||
@ -221,11 +221,11 @@ int main(int argc, char ** argv) {
|
|||||||
// std::cout << "ODD source "<< i<<" -> " <<SE->_offset << " "<< SE->_is_local<<std::endl;
|
// std::cout << "ODD source "<< i<<" -> " <<SE->_offset << " "<< SE->_is_local<<std::endl;
|
||||||
|
|
||||||
if ( SE->_is_local && SE->_permute )
|
if ( SE->_is_local && SE->_permute )
|
||||||
permute(ECheck._odata[i],OFoo._odata[SE->_offset],permute_type);
|
permute(ECheck[i],OFoo[SE->_offset],permute_type);
|
||||||
else if (SE->_is_local)
|
else if (SE->_is_local)
|
||||||
ECheck._odata[i] = OFoo._odata[SE->_offset];
|
ECheck[i] = OFoo[SE->_offset];
|
||||||
else
|
else
|
||||||
ECheck._odata[i] = OStencil.CommBuf()[SE->_offset];
|
ECheck[i] = OStencil.CommBuf()[SE->_offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
setCheckerboard(Check,ECheck);
|
setCheckerboard(Check,ECheck);
|
||||||
|
@ -81,10 +81,10 @@ class LinearOperatorJacobi : public LinearOperator<vobj>
|
|||||||
|
|
||||||
vobj *nbr;
|
vobj *nbr;
|
||||||
if ( local && perm ){
|
if ( local && perm ){
|
||||||
permute(tmp,src._odata[offset],ptype);
|
permute(tmp,src[offset],ptype);
|
||||||
nbr = &tmp;
|
nbr = &tmp;
|
||||||
} else if (local) {
|
} else if (local) {
|
||||||
nbr = &src._odata[offset];
|
nbr = &src[offset];
|
||||||
} else {
|
} else {
|
||||||
nbr = &comm_buf[offset];
|
nbr = &comm_buf[offset];
|
||||||
}
|
}
|
||||||
@ -189,11 +189,11 @@ int main (int argc, char ** argv)
|
|||||||
int permute_type = myStencil._permute_type[0];
|
int permute_type = myStencil._permute_type[0];
|
||||||
int perm =myStencil._permute[0][i];
|
int perm =myStencil._permute[0][i];
|
||||||
if ( local && perm )
|
if ( local && perm )
|
||||||
permute(Check._odata[i],Foo._odata[offset],permute_type);
|
permute(Check[i],Foo[offset],permute_type);
|
||||||
else if (local)
|
else if (local)
|
||||||
Check._odata[i] = Foo._odata[offset];
|
Check[i] = Foo[offset];
|
||||||
else
|
else
|
||||||
Check._odata[i] = comm_buf[offset];
|
Check[i] = comm_buf[offset];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -265,12 +265,12 @@ int main (int argc,char **argv )
|
|||||||
std::cout << "Norm of Grid Asqtad multiply "<<Grid::norm2(res_grid)<<std::endl;
|
std::cout << "Norm of Grid Asqtad multiply "<<Grid::norm2(res_grid)<<std::endl;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
std::cout << " site 0 of Uthin "<<uthin._odata[0] <<std::endl;
|
std::cout << " site 0 of Uthin "<<uthin[0] <<std::endl;
|
||||||
std::cout << " site 0 of Utriple"<<utriple._odata[0] <<std::endl;
|
std::cout << " site 0 of Utriple"<<utriple[0] <<std::endl;
|
||||||
std::cout << " site 0 of Ufat "<<ufat._odata[0] <<std::endl;
|
std::cout << " site 0 of Ufat "<<ufat[0] <<std::endl;
|
||||||
|
|
||||||
std::cout << " site 0 of Grid "<<res_grid._odata[0] <<std::endl;
|
std::cout << " site 0 of Grid "<<res_grid[0] <<std::endl;
|
||||||
std::cout << " site 0 of Chroma "<<res_chroma._odata[0] <<std::endl;
|
std::cout << " site 0 of Chroma "<<res_chroma[0] <<std::endl;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
res_chroma=res_chroma - res_grid;
|
res_chroma=res_chroma - res_grid;
|
||||||
|
@ -137,7 +137,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout << GridLogMessage << "Intialised 4D RNG "<<std::endl;
|
std::cout << GridLogMessage << "Intialised 4D RNG "<<std::endl;
|
||||||
SU3::HotConfiguration(pRNG,Umu);
|
SU3::HotConfiguration(pRNG,Umu);
|
||||||
std::cout << GridLogMessage << "Intialised the HOT Gauge Field"<<std::endl;
|
std::cout << GridLogMessage << "Intialised the HOT Gauge Field"<<std::endl;
|
||||||
// std::cout << " Site zero "<< Umu._odata[0] <<std::endl;
|
// std::cout << " Site zero "<< Umu[0] <<std::endl;
|
||||||
} else {
|
} else {
|
||||||
SU3::ColdConfiguration(Umu);
|
SU3::ColdConfiguration(Umu);
|
||||||
std::cout << GridLogMessage << "Intialised the COLD Gauge Field"<<std::endl;
|
std::cout << GridLogMessage << "Intialised the COLD Gauge Field"<<std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user