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

#9555
Adrian
Keymaster

Sure, the overlap communication only happens at discrete and configurable stages. i.e. you can move all communication related to the CCL implementation into a distinct (or more than one) communicator stage fully within your control. See e.g. User Guide Section 2.2.3.

You can create a new communicator stage for CCL simply by requesting it:


namespace stage { struct CCL { }; }

{
  auto& comm = sLattice.getCommunicator(stage::CCL{});
  comm.template requestField<descriptors::POPULATION>();
  comm.requestOverlap(1);
  comm.exchangeRequests();
}

this stage will only be triggered if you explicitly call sLattice.getCommunicator(stage::CCL{}).communicate(). It is also possible to request more than one field or other subsets of the overlap than just a constant width if necessary.