critical fix in GetYeeCoords

this was affecting the correct snapping/weighting of current excitations
pull/1/head
Thorsten Liebig 2011-09-13 10:51:11 +02:00
parent 4edc50b981
commit c4b7ecb88e
1 changed files with 2 additions and 2 deletions

View File

@ -148,10 +148,10 @@ bool Operator::GetYeeCoords(int ny, unsigned int pos[3], double* coords, bool du
}
else //dual grid
{
coords[ny]-=0.5*fabs(GetRawDiscDelta(ny, pos[ny]-1));
int nP = (ny+1)%3;
int nPP = (ny+2)%3;
coords[nP] +=0.5*fabs(GetRawDiscDelta(nP ,pos[nP] ));
coords[nPP]+=0.5*fabs(GetRawDiscDelta(nPP,pos[nPP]));
if ((pos[nP]>=numLines[nP]-1) || (pos[nPP]>=numLines[nPP]-1))
return false;
}