Skip to content

Reply To: Extract Lattice data

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.

Forums OpenLB General Topics Extract Lattice data 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