Skip to content

Reply To: Extract Lattice data


The call to getPhysR has to be inside to loop – currently the listing only calls it once at the beginning.

Independently of this “get(Min/Max)LatticeVolume” is not what you want here (they compute the minimum and maximum number of cells over the set of cuboids in the decomposition).

If you want the physical coordinates of all cells that are actually covered by cuboids in the geometry you can:

1. Iterate over all cuboids for (int iC=0; iC < cGeometry.getNc(); ++iC) {

2. Access the i-th cuboid cuboid = cGeometry.get(iC)

3. Iterate over the nodes of the cuboid cuboid.getNx() resp. cuboid.getNy()

4. Translate the lattice location [iC, iX, iY] to its physical embedding via cGeometry.getPhysR