37
37
#include < pmacc/particles/traits/FilterByFlag.hpp>
38
38
#include < pmacc/traits/GetUniqueTypeId.hpp>
39
39
40
- #include < boost/mpl/accumulate.hpp>
41
-
42
40
#include < cstdint>
43
41
#include < memory>
44
42
#include < type_traits>
45
43
46
-
47
44
namespace picongpu
48
45
{
49
46
namespace fields
50
47
{
48
+ template <typename A, typename B>
49
+ using LowerMarginInterpolationOp =
50
+ typename pmacc::math::CT::max<A, typename GetLowerMargin<typename GetInterpolation<B>::type>::type>::type;
51
+ template <typename A, typename B>
52
+ using UpperMarginInterpolationOp =
53
+ typename pmacc::math::CT::max<A, typename GetUpperMargin<typename GetInterpolation<B>::type>::type>::type;
54
+ template <typename A, typename B>
55
+ using LowerMarginOp = typename pmacc::math::CT::max<A, typename GetLowerMarginPusher<B>::type>::type;
56
+ template <typename A, typename B>
57
+ using UpperMarginOp = typename pmacc::math::CT::max<A, typename GetUpperMarginPusher<B>::type>::type;
58
+
51
59
template <typename T_DerivedField>
52
60
EMFieldBase<T_DerivedField>::EMFieldBase(MappingDesc const & cellDescription, pmacc::SimulationDataId const & id)
53
61
: SimulationFieldHelper<MappingDesc>(cellDescription)
@@ -57,14 +65,15 @@ namespace picongpu
57
65
58
66
using VectorSpeciesWithInterpolation =
59
67
typename pmacc::particles::traits::FilterByFlag<VectorAllSpecies, interpolation<>>::type;
60
- using LowerMarginInterpolation = bmpl::accumulate<
68
+
69
+ using LowerMarginInterpolation = pmacc::mp_fold<
61
70
VectorSpeciesWithInterpolation,
62
71
typename pmacc::math::CT::make_Int<simDim, 0 >::type,
63
- pmacc::math::CT::max<bmpl::_1, GetLowerMargin<GetInterpolation<bmpl::_2>>>>::type ;
64
- using UpperMarginInterpolation = bmpl::accumulate <
72
+ LowerMarginInterpolationOp> ;
73
+ using UpperMarginInterpolation = pmacc::mp_fold <
65
74
VectorSpeciesWithInterpolation,
66
75
typename pmacc::math::CT::make_Int<simDim, 0 >::type,
67
- pmacc::math::CT::max<bmpl::_1, GetUpperMargin<GetInterpolation<bmpl::_2>>>>::type ;
76
+ UpperMarginInterpolationOp> ;
68
77
69
78
/* Calculate the maximum Neighbors we need from MAX(ParticleShape, FieldSolver) */
70
79
using LowerMarginSolver = typename traits::GetLowerMargin<fields::Solver, DerivedField>::type;
@@ -80,15 +89,11 @@ namespace picongpu
80
89
*/
81
90
using VectorSpeciesWithPusherAndInterpolation = typename pmacc::particles::traits::
82
91
FilterByFlag<VectorSpeciesWithInterpolation, particlePusher<>>::type;
83
- using LowerMargin = typename bmpl::accumulate<
84
- VectorSpeciesWithPusherAndInterpolation,
85
- LowerMarginInterpolationAndSolver,
86
- pmacc::math::CT::max<bmpl::_1, GetLowerMarginPusher<bmpl::_2>>>::type;
87
-
88
- using UpperMargin = typename bmpl::accumulate<
89
- VectorSpeciesWithPusherAndInterpolation,
90
- UpperMarginInterpolationAndSolver,
91
- pmacc::math::CT::max<bmpl::_1, GetUpperMarginPusher<bmpl::_2>>>::type;
92
+
93
+ using LowerMargin = pmacc::
94
+ mp_fold<VectorSpeciesWithPusherAndInterpolation, LowerMarginInterpolationAndSolver, LowerMarginOp>;
95
+ using UpperMargin = pmacc::
96
+ mp_fold<VectorSpeciesWithPusherAndInterpolation, UpperMarginInterpolationAndSolver, UpperMarginOp>;
92
97
93
98
const DataSpace<simDim> originGuard (LowerMargin ().toRT ());
94
99
const DataSpace<simDim> endGuard (UpperMargin ().toRT ());
0 commit comments