Skip to content

Reply To: Modifying field values for neighboring cells inside a postprocessor

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Modifying field values for neighboring cells inside a postprocessor Reply To: Modifying field values for neighboring cells inside a postprocessor

#9322
Danial.Khazaeipoul
Participant

Thank you, Mathias, for the explanation. The code I’ve implemented works well in a single partition setup where localCellID == globalCellID. However, in configurations with multiple partitions or blocks, localCellID != globalCellID, leading to non-unique IDs.

For local cell IDs, which are of type CellID or std::uint32_t, there’s an advantage in CCL algorithms as these IDs are unique and remain consistent throughout the simulation. Because of this, I’m looking for a way to generate global cell IDs with similar characteristics. For example, I am thinking about a method like the following which creates a unique global CellID for each cell:

std::uint32_t globalCellID = blockID × cellsPerBlock + localCellID