ENH: old-time field: avoid reading in postprocessing mode. Fixes #1228.

This commit is contained in:
mattijs 2019-03-06 11:35:16 +00:00 committed by Andrew Heather
parent ebb6a0272e
commit aafbca93b2
4 changed files with 11 additions and 10 deletions

View File

@ -58,8 +58,8 @@ void MapConsistentVolFields
Info<< " interpolating " << fieldIter()->name()
<< endl;
// Read field
fieldType fieldSource(*fieldIter(), meshSource);
// Read field. Do not auto-load old-time field
fieldType fieldSource(*fieldIter(), meshSource, false);
IOobject fieldTargetIOobject
(
@ -73,7 +73,7 @@ void MapConsistentVolFields
if (fieldTargetIOobject.typeHeaderOk<fieldType>(true))
{
// Read fieldTarget
fieldType fieldTarget(fieldTargetIOobject, meshTarget);
fieldType fieldTarget(fieldTargetIOobject, meshTarget, false);
// Interpolate field
meshToMesh0Interp.interpolate

View File

@ -68,14 +68,15 @@ void MapVolFields
{
Info<< " interpolating " << fieldIter()->name() << endl;
// Read field fieldSource
fieldType fieldSource(*fieldIter(), meshSource);
// Read field fieldSource. Do not auto-load old-time fields
fieldType fieldSource(*fieldIter(), meshSource, false);
// Read fieldTarget
// Read fieldTarget. Do not auto-load old-time fields
fieldType fieldTarget
(
fieldTargetIOobject,
meshTarget
meshTarget,
false
);
// Interpolate field

View File

@ -143,7 +143,7 @@ void MapVolFields
for (const word& fieldName : fieldNames)
{
const fieldType fieldSource(*(objects[fieldName]), meshSource);
const fieldType fieldSource(*(objects[fieldName]), meshSource, false);
IOobject targetIO
(
@ -158,7 +158,7 @@ void MapVolFields
Info<< " interpolating onto existing field "
<< fieldName << endl;
fieldType fieldTarget(targetIO, meshTarget);
fieldType fieldTarget(targetIO, meshTarget, false);
interp.mapSrcToTgt(fieldSource, cop, fieldTarget);

View File

@ -90,7 +90,7 @@ bool setCellFieldType
<< fieldHeader.headerClassName()
<< " " << fieldName << endl;
fieldType field(fieldHeader, mesh);
fieldType field(fieldHeader, mesh, false);
const Type& value = pTraits<Type>(fieldValueStream);