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
September 12, 2024 at 7:21 pm
#9235
Danial.Khazaeipoul
Participant
Dear Adrian,
Is it possible to perform atomic operations within the operators?
I am attempting to do atomicMin within the apply() operator as below but I get a compile time error that no instances of the overloaded function “atomicMin” matches the argument provided:
reducedID = atomicMin(cell.template getFieldPointer<FreeSurface::TEST_ID>(), nbrID);
Note that, nbrID and the TEST_ID fields are of the type CellID. Moreover, the function itself requires a memory address and a value as below:
int atomicMin(int* address, int val);
unsigned int atomicMin(unsigned int* address, unsigned int val);
unsigned long long int atomicMin(unsigned long long int* address, unsigned long long int val);
long long int atomicMin(long long int* address, long long int val);
- This reply was modified 3 weeks, 2 days ago by Danial.Khazaeipoul.