Reply To: Modifying field values for neighboring cells inside a postprocessor
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 › 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
Anonymous
Inactive
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);
