/* define how to combine microphysical processes */ template struct CombinedMicrophysicalProcess { M1 a; /**< First microphysical process. */ M2 b; /**< Second microphysical process. */ unsigned int next_step(const unsigned int t) const { return Kokkos::min(a.next_step(t), b.next_step(t)); } bool on_step(const unsigned int t) const { return a.on_step(t) || b.on_step(t); } void run_step(const TeamMember &tm, const unsigned int t, view_supers supers, State &state, const Monitor auto mo) const { a.run_step(tm, t, supers, state, mo); b.run_step(tm, t, supers, state, mo); } }; auto operator>>(const MicrophysicalProcess auto a, const MicrophysicalProcess auto b) { return CombinedMicrophysicalProcess{a, b}; } // ... /// /* use a combination of microphysical processes */ const MicrophysicalProcess auto mphys1 = condensation(config); const MicrophysicalProcess auto mphys2 = collision_coalescence(config); const MicrophysicalProcess auto mphys3 = collision_breakup(config); const MicrophysicalProcess auto microphysics = mphys3 >> mphys2 >> mphys1; // change this line to change microphysics }