Skip to content

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

#9044
Anonymous
Inactive

Thank you for the prompt response, Adrian. Following your suggestion, is then possible to modify the field value of that neighbor cell as below with that same post-processor?

auto nbrCell = cell.neighbor(direction);
nbrCell.template setField<FreeSurface::MASS>(mass_tmp);

By reviewing the cell.h and cell.hh files, it appears to me that the “neighbor()” method returns either of the following types depending on the circumstances:

(1) ConstCell<T,DESCRIPTOR>: Does not provide a setField method
(2) Cell<T,DESCRIPTOR> : Provides a setField method