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
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