ENH: direct ensight output of float/double

- since ensight format is always float and also always written
  component-wise, perform the double -> float narrowing when
  extracting the components.  This reduces the amount of data
  transferred between processors.

ENH: avoid vtk/ensight parallel communication of empty messages

- since ensight writes by element type (eg, tet, hex, polyhedral) the
  individual written field sections will tend to be relatively sparse.
  Skip zero-size messages, which should help reduce some of the
  synchronization bottlenecks.

ENH: use 'data chunking' when writing ensight files in parallel

- since ensight fields are written on a per-element basis, the
  corresponding segment can become rather sparsely distributed. With
  'data chunking', we attempt to get as many send/recv messages in
  before flushing the buffer for writing. This should make the
  sequential send/recv less affected by the IO time.

ENH: allow use of an external buffer when writing ensight components

STYLE: remove last vestiges of autoPtr<ensightFile> for output routines
This commit is contained in:
Mark Olesen
2022-11-11 15:59:06 +01:00
parent 5338e56c73
commit 0fabbcb404
33 changed files with 1698 additions and 517 deletions

View File

@ -45,10 +45,10 @@ if (doLagrangian)
ensightOutput::writeCloudPositions
(
os.ref(),
mesh,
cloudName,
cloudExists,
os
cloudExists
);
Info<< " positions";
@ -86,26 +86,34 @@ if (doLagrangian)
}
bool wrote = false;
if (fieldType == scalarIOField::typeName)
do
{
autoPtr<ensightFile> os =
ensCase.newCloudData<scalar>(cloudName, fieldName);
#undef ensight_WRITE_CLOUD_FIELD
#define ensight_WRITE_CLOUD_FIELD(PrimitiveType) \
\
if (fieldType == IOField<PrimitiveType>::typeName) \
{ \
autoPtr<ensightFile> os = \
ensCase.newCloudData<PrimitiveType> \
( \
cloudName, \
fieldName \
); \
\
wrote = ensightOutput::readWriteCloudField<PrimitiveType> \
( \
os.ref(), \
fieldObject, \
fieldExists \
); \
break; \
}
wrote = ensightOutput::writeCloudField<scalar>
(
fieldObject, fieldExists, os
);
}
else if (fieldType == vectorIOField::typeName)
{
autoPtr<ensightFile> os =
ensCase.newCloudData<vector>(cloudName, fieldName);
ensight_WRITE_CLOUD_FIELD(scalar);
ensight_WRITE_CLOUD_FIELD(vector);
wrote = ensightOutput::writeCloudField<vector>
(
fieldObject, fieldExists, os
);
}
#undef ensight_WRITE_CLOUD_FIELD
} while (false);
if (wrote)
{