Reply To: Implementing Surface-directed spinodal decomposition
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Implementing Surface-directed spinodal decomposition › Reply To: Implementing Surface-directed spinodal decomposition
February 8, 2023 at 12:09 pm
#7182
Adrian
Keymaster
Yes, you can write a new post processor to do that. Your outlined approach looks workable.
However, I would suggest to not use the legacy (non-GPU-supported) post processors used by setFreeEnergyWallBoundary
as a blueprint but e.g. the style used in setInterpolatedVelocityBoundary
. Such a new post processor is more simple and runs on all supported platforms with good performance:
struct ExamplePostProcessor {
static constexpr OperatorScope scope = OperatorScope::PerCell;
int getPriority() const {
return 0;
}
template <typename CELL>
void apply(CELL& cell) any_platform {
// do something with the cell
// neighbors can be accessed via <code>cell.neighbor(c_i)</code>
}
};