@@ -122,6 +122,11 @@ static void setupOutput(seissol::SeisSol& seissolInstance) {
122
122
backupTimeStamp);
123
123
}
124
124
125
+ // TODO(David): change Yateto/TensorForge interface to make padded sizes more accessible
126
+ constexpr auto QDofSizePadded = tensor::Q::Size / tensor::Q::Shape[1 ];
127
+ constexpr auto FaceDisplacementPadded =
128
+ tensor::faceDisplacement::Size / tensor::faceDisplacement::Shape[1 ];
129
+
125
130
if (seissolParams.output .waveFieldParameters .enabled &&
126
131
seissolParams.output .waveFieldParameters .vtkorder >= 0 ) {
127
132
auto order = seissolParams.output .waveFieldParameters .vtkorder ;
@@ -181,7 +186,7 @@ static void setupOutput(seissol::SeisSol& seissolInstance) {
181
186
writer.addPointData <real>(
182
187
quantityLabels[quantity], {}, [=](real* target, std::size_t index) {
183
188
const auto * dofsAllQuantities = ltsLut->lookup (lts->dofs , index);
184
- const auto * dofsSingleQuantity = dofsAllQuantities + tensor::Q::Shape[ 0 ] * quantity;
189
+ const auto * dofsSingleQuantity = dofsAllQuantities + QDofSizePadded * quantity;
185
190
kernel::projectBasisToVtkVolume vtkproj;
186
191
vtkproj.qb = dofsSingleQuantity;
187
192
vtkproj.xv (order) = target;
@@ -197,8 +202,7 @@ static void setupOutput(seissol::SeisSol& seissolInstance) {
197
202
writer.addPointData <real>(
198
203
plasticityLabels[quantity], {}, [=](real* target, std::size_t index) {
199
204
const auto * dofsAllQuantities = ltsLut->lookup (lts->pstrain , index);
200
- const auto * dofsSingleQuantity =
201
- dofsAllQuantities + tensor::QStress::Shape[0 ] * quantity;
205
+ const auto * dofsSingleQuantity = dofsAllQuantities + QDofSizePadded * quantity;
202
206
kernel::projectBasisToVtkVolume vtkproj;
203
207
vtkproj.qb = dofsSingleQuantity;
204
208
vtkproj.xv (order) = target;
@@ -275,13 +279,12 @@ static void setupOutput(seissol::SeisSol& seissolInstance) {
275
279
auto side = surfaceMeshSides[index];
276
280
const auto * dofsAllQuantities = ltsLut->lookup (lts->dofs , meshId);
277
281
const auto * dofsSingleQuantity =
278
- dofsAllQuantities + tensor::Q::Shape[ 0 ] * (6 + quantity); // velocities
282
+ dofsAllQuantities + QDofSizePadded * (6 + quantity); // velocities
279
283
kernel::projectBasisToVtkFaceFromVolume vtkproj;
280
284
vtkproj.qb = dofsSingleQuantity;
281
285
vtkproj.xf (order) = target;
282
286
vtkproj.collvf (CONVERGENCE_ORDER, order, side) =
283
- init::collvf::Values[CONVERGENCE_ORDER + (CONVERGENCE_ORDER + 1 ) *
284
- (order + 8 * side)];
287
+ init::collvf::Values[CONVERGENCE_ORDER + (CONVERGENCE_ORDER + 1 ) * (order + 8 * side)];
285
288
vtkproj.execute (order, side);
286
289
});
287
290
}
@@ -294,7 +297,7 @@ static void setupOutput(seissol::SeisSol& seissolInstance) {
294
297
auto side = surfaceMeshSides[index];
295
298
const auto * faceDisplacements = ltsLut->lookup (lts->faceDisplacements , meshId);
296
299
const auto * faceDisplacementVariable =
297
- faceDisplacements[side] + tensor::faceDisplacement::Shape[ 0 ] * quantity;
300
+ faceDisplacements[side] + FaceDisplacementPadded * quantity;
298
301
kernel::projectNodalToVtkFace vtkproj;
299
302
vtkproj.pn = faceDisplacementVariable;
300
303
vtkproj.MV2nTo2m = nodal::init::MV2nTo2m::Values;
0 commit comments