Skip to content

Reply To: Extract Lattice data

#5860
achodankar
Participant

Hello Adrian,
I employed your suggestion, however, the same issue shows up again. Here is the code snippet:

//——————Convert physical coordinates to lattice coordinates————–
//std::vector<int> latticeR(2,T());
int latticeNew[2];
T physNew[2];

cout<<“——-Convert Physical coordinates to Lattice coordinates———-“<<endl;

for (int iC=0; iC < cuboidGeometry.getNc(); ++iC)
{
for (int iX=0; iX < cuboidGeometry.get(iC).getNx(); ++iX)
{
for (int iY=0; iY < cuboidGeometry.get(iC).getNy(); ++iY)
{
// physCord[0] = x_phys[iX][iY][iC];
// physCord[1] = y_phys[iX][iY][iC];
// cuboidGeometry.getLatticeR(physCord, latticeR);
physNew[0] = x_phys[iX][iY][iC];
physNew[1] = y_phys[iX][iY][iC];
cuboidGeometry.getLatticeR(latticeNew, physNew);
// cout<<physCord[0]<<“,”<<physCord[1]<<“,”<<latticeR[0]<<“,”<<latticeR[1]<<endl;
cout<<physNew[0]<<“,”<<physNew[1]<<“,”<<latticeNew[0]<<“,”<<latticeNew[1]<<endl;
}
cout<<endl;
}
cout<<endl;
}
cout<<“—————————————————————“<<endl;
//———————————————————————————–

Thank you.

Yours sincerely,

Abhijeet