@@ -70,16 +70,26 @@ struct ConditionCheck<DirSplitting, T_Dummy>
70
70
class DirSplitting : private ConditionCheck <fieldSolver::FieldSolver>
71
71
{
72
72
private:
73
- template <typename CursorE, typename CursorB, typename GridSize>
73
+ template <typename OrientationTwist, typename CursorE, typename CursorB, typename GridSize>
74
74
void propagate (CursorE cursorE, CursorB cursorB, GridSize gridSize) const
75
75
{
76
- typedef SuperCellSize BlockDim;
76
+ using namespace cursor ::tools;
77
+ using namespace PMacc ::math::tools;
78
+
79
+ PMACC_AUTO (gridSizeTwisted,twistVectorAxes<OrientationTwist>(gridSize));
80
+
81
+ /* twist components of the supercell */
82
+ typedef PMacc::math::CT::Int<
83
+ PMacc::math::CT::At<SuperCellSize,typename OrientationTwist::x>::type::value,
84
+ PMacc::math::CT::At<SuperCellSize,typename OrientationTwist::y>::type::value,
85
+ PMacc::math::CT::At<SuperCellSize,typename OrientationTwist::z>::type::value
86
+ > BlockDim;
77
87
78
88
algorithm::kernel::ForeachBlock<BlockDim> foreach;
79
- foreach (zone::SphericZone<3 >(PMacc::math::Size_t<3 >(BlockDim::x::value, gridSize .y (), gridSize .z ())),
80
- cursor::make_NestedCursor (cursorE),
81
- cursor::make_NestedCursor (cursorB),
82
- DirSplittingKernel<BlockDim>((int )gridSize .x ()));
89
+ foreach (zone::SphericZone<3 >(PMacc::math::Size_t<3 >(BlockDim::x::value, gridSizeTwisted .y (), gridSizeTwisted .z ())),
90
+ cursor::make_NestedCursor (twistVectorFieldAxes<OrientationTwist>( cursorE) ),
91
+ cursor::make_NestedCursor (twistVectorFieldAxes<OrientationTwist>( cursorB) ),
92
+ DirSplittingKernel<BlockDim>((int )gridSizeTwisted .x ()));
83
93
}
84
94
public:
85
95
DirSplitting (MappingDesc) {}
@@ -107,25 +117,30 @@ class DirSplitting : private ConditionCheck<fieldSolver::FieldSolver>
107
117
108
118
PMacc::math::Size_t<3 > gridSize = fieldE_coreBorder.size ();
109
119
110
- propagate (fieldE_coreBorder.origin (),
120
+
121
+ typedef PMacc::math::CT::Int<0 ,1 ,2 > Orientation_X;
122
+ propagate<Orientation_X>(
123
+ fieldE_coreBorder.origin (),
111
124
fieldB_coreBorder.origin (),
112
- fieldE_coreBorder. size () );
125
+ gridSize );
113
126
114
127
__setTransactionEvent (fieldE.asyncCommunication (__getTransactionEvent ()));
115
128
__setTransactionEvent (fieldB.asyncCommunication (__getTransactionEvent ()));
116
129
117
130
typedef PMacc::math::CT::Int<1 ,2 ,0 > Orientation_Y;
118
- propagate (twistVectorFieldAxes<Orientation_Y>(fieldE_coreBorder.origin ()),
119
- twistVectorFieldAxes<Orientation_Y>(fieldB_coreBorder.origin ()),
120
- twistVectorAxes<Orientation_Y>(gridSize));
131
+ propagate<Orientation_Y>(
132
+ fieldE_coreBorder.origin (),
133
+ fieldB_coreBorder.origin (),
134
+ gridSize);
121
135
122
136
__setTransactionEvent (fieldE.asyncCommunication (__getTransactionEvent ()));
123
137
__setTransactionEvent (fieldB.asyncCommunication (__getTransactionEvent ()));
124
138
125
139
typedef PMacc::math::CT::Int<2 ,0 ,1 > Orientation_Z;
126
- propagate (twistVectorFieldAxes<Orientation_Z>(fieldE_coreBorder.origin ()),
127
- twistVectorFieldAxes<Orientation_Z>(fieldB_coreBorder.origin ()),
128
- twistVectorAxes<Orientation_Z>(gridSize));
140
+ propagate<Orientation_Z>(
141
+ fieldE_coreBorder.origin (),
142
+ fieldB_coreBorder.origin (),
143
+ gridSize);
129
144
130
145
if (laserProfile::INIT_TIME > float_X (0.0 ))
131
146
dc.getData <FieldE > (FieldE::getName (), true ).laserManipulation (currentStep);
0 commit comments