Reply To: IndicatorCuboid2D : Need extra Explanation
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › IndicatorCuboid2D : Need extra Explanation › Reply To: IndicatorCuboid2D : Need extra Explanation
December 21, 2020 at 10:36 am
#5429
Adrian
Keymaster
This is an oversight in the documentation. Functor and indicator arithmetic use std::shared_ptr
since version 1.3. See section 10.3.2 of the userguide for an introduction.
Basically you can write any indicator as
`
std::shared_ptr<IndicatorF2D<T>> box1 = std::make_shared<IndicatorCuboid2D<T>>(extend1, origin1);
std::shared_ptr<IndicatorF2D<T>> box2 = std::make_shared<IndicatorCuboid2D<T>>(extend2, origin2);
auto unified_box = box1 + box2;
`
and so on. This also works for functors.