Skip to content

Commit d2a2f5d

Browse files
committed
Added: Remove the rotational DOFs before exporting the primary solution
1 parent adf95ca commit d2a2f5d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Utility/HDF5Writer.C

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

0 commit comments

Comments
 (0)