Skip to content

Commit f46b448

Browse files
committed
Added: Remove the rotational DOFs before exporting the primary solution
1 parent 74dab6a commit f46b448

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Utility/HDF5Writer.C

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,15 @@ void HDF5Writer::writeSIM (int level, const DataEntry& entry,
365365
ndof1 = psol.size();
366366
}
367367
}
368+
if (entry.second.ncmps == 6)
369+
{
370+
// This is a model with rotational degrees of freedom.
371+
// We want the translations only.
372+
for (size_t i = 1; 6*i < psol.size(); i++)
373+
memcpy(psol.ptr()+3*i,psol.ptr()+6*i,3*sizeof(double));
374+
ndof1 /= 2;
375+
psol.resize(ndof1,utl::RETAIN);
376+
}
368377
const double* data = psol.ptr();
369378
if (usedescription)
370379
// Field assumed to be on basis 1 for now

0 commit comments

Comments
 (0)