ENH: glboal file handling: initial commit

Moved file path handling to regIOobject and made it type specific so
now every object can have its own rules. Examples:
- faceZones are now processor local (and don't search up anymore)
- timeStampMaster is now no longer hardcoded inside IOdictionary
  (e.g. uniformDimensionedFields support it as well)
- the distributedTriSurfaceMesh is properly processor-local; no need
  for fileModificationChecking manipulation.
This commit is contained in:
mattijs
2016-01-25 13:03:15 +00:00
parent 9fd840c12a
commit e424059208
188 changed files with 3487 additions and 1364 deletions

View File

@ -44,13 +44,12 @@ void MapConsistentVolFields
const CombineOp& cop
)
{
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
const fvMesh& meshSource = meshToMesh0Interp.fromMesh();
const fvMesh& meshTarget = meshToMesh0Interp.toMesh();
word fieldClassName
(
GeometricField<Type, fvPatchField, volMesh>::typeName
);
word fieldClassName(fieldType::typeName);
IOobjectList fields = objects.lookupClass(fieldClassName);
@ -60,11 +59,7 @@ void MapConsistentVolFields
<< endl;
// Read field
GeometricField<Type, fvPatchField, volMesh> fieldSource
(
*fieldIter(),
meshSource
);
fieldType fieldSource(*fieldIter(), meshSource);
IOobject fieldTargetIOobject
(
@ -75,14 +70,10 @@ void MapConsistentVolFields
IOobject::AUTO_WRITE
);
if (fieldTargetIOobject.headerOk())
if (fieldTargetIOobject.typeHeaderOk<fieldType>(true))
{
// Read fieldTarget
GeometricField<Type, fvPatchField, volMesh> fieldTarget
(
fieldTargetIOobject,
meshTarget
);
fieldType fieldTarget(fieldTargetIOobject, meshTarget);
// Interpolate field
meshToMesh0Interp.interpolate
@ -101,7 +92,7 @@ void MapConsistentVolFields
fieldTargetIOobject.readOpt() = IOobject::NO_READ;
// Interpolate field
GeometricField<Type, fvPatchField, volMesh> fieldTarget
fieldType fieldTarget
(
fieldTargetIOobject,
meshToMesh0Interp.interpolate