mirror of
https://github.com/paboyle/Grid.git
synced 2025-10-13 12:44:42 +01:00
IcosahedralVerted() checks
This commit is contained in:
@@ -107,9 +107,9 @@ public:
|
|||||||
int northPoleOsites;
|
int northPoleOsites;
|
||||||
int southPoleOsites;
|
int southPoleOsites;
|
||||||
|
|
||||||
virtual int Icosahedral(void) override { return 1;}
|
virtual int isIcosahedral(void) override { return 1;}
|
||||||
virtual int IcosahedralVertices(void) override { return meshType==IcosahedralVertices;}
|
virtual int isIcosahedralVertex(void) override { return meshType==IcosahedralVertices;}
|
||||||
virtual int IcosahedralEdges (void) override { return meshType==IcosahedralEdges;}
|
virtual int isIcosahedralEdge (void) override { return meshType==IcosahedralEdges;}
|
||||||
virtual int ownsNorthPole(void) const override { return hasNorthPole; };
|
virtual int ownsNorthPole(void) const override { return hasNorthPole; };
|
||||||
virtual int NorthPoleOsite(void) const override { return northPoleOsite; };
|
virtual int NorthPoleOsite(void) const override { return northPoleOsite; };
|
||||||
virtual int NorthPoleOsites(void) const override { return northPoleOsites; };
|
virtual int NorthPoleOsites(void) const override { return northPoleOsites; };
|
||||||
|
@@ -87,9 +87,9 @@ public:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Icosahedral decisions
|
// Icosahedral decisions
|
||||||
virtual int Icosahedral(void) { return 0;}
|
virtual int isIcosahedral(void) { return 0;}
|
||||||
virtual int IcosahedralVertices(void) { return 0;}
|
virtual int isIcosahedralVertex(void) { return 0;}
|
||||||
virtual int IcosahedralEdges (void) { return 0;}
|
virtual int isIcosahedralEdge (void) { return 0;}
|
||||||
virtual int ownsNorthPole(void) const { return 0; };
|
virtual int ownsNorthPole(void) const { return 0; };
|
||||||
virtual int ownsSouthPole(void) const { return 0; };
|
virtual int ownsSouthPole(void) const { return 0; };
|
||||||
virtual int NorthPoleOsite(void) const { return 0; };
|
virtual int NorthPoleOsite(void) const { return 0; };
|
||||||
|
@@ -34,7 +34,7 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
const int Cshift_verbose=0;
|
const int Cshift_verbose=0;
|
||||||
template<class vobj> Lattice<vobj> Cshift(const Lattice<vobj> &rhs,int dimension,int shift)
|
template<class vobj> Lattice<vobj> Cshift(const Lattice<vobj> &rhs,int dimension,int shift)
|
||||||
{
|
{
|
||||||
assert(!rhs.Grid()->Icosahedral());
|
assert(!rhs.Grid()->isIcosahedral());
|
||||||
|
|
||||||
typedef typename vobj::vector_type vector_type;
|
typedef typename vobj::vector_type vector_type;
|
||||||
typedef typename vobj::scalar_type scalar_type;
|
typedef typename vobj::scalar_type scalar_type;
|
||||||
|
@@ -30,7 +30,7 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
|||||||
NAMESPACE_BEGIN(Grid);
|
NAMESPACE_BEGIN(Grid);
|
||||||
template<class vobj> Lattice<vobj> Cshift(const Lattice<vobj> &rhs,int dimension,int shift)
|
template<class vobj> Lattice<vobj> Cshift(const Lattice<vobj> &rhs,int dimension,int shift)
|
||||||
{
|
{
|
||||||
assert(!rhs.Grid()->Icosahedral());
|
assert(!rhs.Grid()->isIcosahedral());
|
||||||
Lattice<vobj> ret(rhs.Grid());
|
Lattice<vobj> ret(rhs.Grid());
|
||||||
ret.Checkerboard() = rhs.Grid()->CheckerBoardDestination(rhs.Checkerboard(),shift,dimension);
|
ret.Checkerboard() = rhs.Grid()->CheckerBoardDestination(rhs.Checkerboard(),shift,dimension);
|
||||||
Cshift_local(ret,rhs,dimension,shift);
|
Cshift_local(ret,rhs,dimension,shift);
|
||||||
|
@@ -391,7 +391,7 @@ template<class vobj> std::ostream& operator<< (std::ostream& stream, const Latti
|
|||||||
stream<<"]\t";
|
stream<<"]\t";
|
||||||
stream<<ss<<std::endl;
|
stream<<ss<<std::endl;
|
||||||
}
|
}
|
||||||
if ( o.Grid()->Icosahedral() ) {
|
if ( o.Grid()->isIcosahedral() ) {
|
||||||
uint64_t psites=1;
|
uint64_t psites=1;
|
||||||
Coordinate perpdims;
|
Coordinate perpdims;
|
||||||
for(int d=2;d<o.Grid()->_ndimension-1;d++){
|
for(int d=2;d<o.Grid()->_ndimension-1;d++){
|
||||||
|
@@ -40,7 +40,7 @@ template<class iobj> inline void LatticeCoordinate(Lattice<iobj> &l,int mu)
|
|||||||
int Nsimd = grid->iSites();
|
int Nsimd = grid->iSites();
|
||||||
|
|
||||||
int cartesian_vol = grid->oSites();
|
int cartesian_vol = grid->oSites();
|
||||||
if ( grid->Icosahedral() ) {
|
if ( grid->isIcosahedral() ) {
|
||||||
cartesian_vol = cartesian_vol - grid->NorthPoleOsites()-grid->SouthPoleOsites();
|
cartesian_vol = cartesian_vol - grid->NorthPoleOsites()-grid->SouthPoleOsites();
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -58,7 +58,7 @@ template<class iobj> inline void LatticeCoordinate(Lattice<iobj> &l,int mu)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grid->IcosahedralVertices()) {
|
if (grid->isIcosahedralVertex()) {
|
||||||
uint64_t psites=1;
|
uint64_t psites=1;
|
||||||
Coordinate perpdims;
|
Coordinate perpdims;
|
||||||
typename iobj::scalar_object ss;
|
typename iobj::scalar_object ss;
|
||||||
@@ -95,9 +95,9 @@ template<class iobj> inline void LatticePole(Lattice<iobj> &l,NorthSouth pole)
|
|||||||
|
|
||||||
l=Zero();
|
l=Zero();
|
||||||
|
|
||||||
assert(grid->IcosahedralVertices());
|
assert(grid->isIcosahedralVertex());
|
||||||
|
|
||||||
if (grid->IcosahedralVertices()) {
|
if (grid->isIcosahedralVertex()) {
|
||||||
uint64_t psites=1;
|
uint64_t psites=1;
|
||||||
Coordinate perpdims;
|
Coordinate perpdims;
|
||||||
sobj ss;
|
sobj ss;
|
||||||
|
@@ -159,8 +159,8 @@ void peekPole(sobj &s,const Lattice<vobj> &l,const Coordinate &orthog,NorthSouth
|
|||||||
|
|
||||||
GridBase *grid=l.Grid();
|
GridBase *grid=l.Grid();
|
||||||
|
|
||||||
assert(grid->Icosahedral());
|
assert(grid->isIcosahedral());
|
||||||
assert(grid->IcosahedralVertices());
|
assert(grid->isIcosahedralVertex());
|
||||||
|
|
||||||
int Nsimd = grid->Nsimd();
|
int Nsimd = grid->Nsimd();
|
||||||
|
|
||||||
@@ -220,8 +220,8 @@ void pokePole(const sobj &s,Lattice<vobj> &l,const Coordinate &orthog,NorthSouth
|
|||||||
{
|
{
|
||||||
GridBase *grid=l.Grid();
|
GridBase *grid=l.Grid();
|
||||||
|
|
||||||
assert(grid->Icosahedral());
|
assert(grid->isIcosahedral());
|
||||||
assert(grid->IcosahedralVertices());
|
assert(grid->isIcosahedralVertex());
|
||||||
|
|
||||||
grid->Broadcast(grid->BossRank(),s);
|
grid->Broadcast(grid->BossRank(),s);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user