Skip to content

Reply To: Extract Lattice data

#5831
achodankar
Participant

Hello Adrian,
I am trying to store the physical coordinates using the following code, but it is not working. All values are zero in output. Also, is it correct to use the getMaxLatticeVolume() and getMinLatticeVolume() functions to obtain the no of points in x and y direction i.e nx and ny? I tried using the getNx and getNy functions, but it didn’t work. I would really appreciate your feedback.

!!!———————————————————————————————-

int latticeE[3] { };
T output[2]{ };

cuboidGeometry.getPhysR(output,latticeE);
//superGeometry.getPhysR(output,latticeE);

for (latticeE[0]=0; latticeE[0] < cuboidGeometry.getMaxLatticeVolume(); ++latticeE[0])
{
for (latticeE[1]=0; latticeE[1] < cuboidGeometry.getMinLatticeVolume(); ++latticeE[1])
{
cout << latticeE[0] << “,” << latticeE[1] << “,”<< output[0] << “,”<< output[1] << std::endl;
}
cout<<std::endl;
}

!!!———————————————————————————————-

Thank you.

Yours sincerely,

Abhijeet