From b9940cbbb17ca720852cef0198098c7271dd5dee Mon Sep 17 00:00:00 2001
From: Andrew Heather <andy@shelob.opencfd.co.uk>
Date: Fri, 23 Sep 2016 15:36:53 +0100
Subject: [PATCH] COMP: Multiple changes - first clean build after latest merge
 - UNTESTED

---
 .../basic/potentialFoam/potentialFoam.C       |   6 +-
 .../combustion/XiFoam/XiDyMFoam/XiDyMFoam.C   |  15 +-
 .../XiFoam/XiDyMFoam/readControls.H           |   9 +-
 .../buoyantPimpleFoam/createFields.H          |   2 -
 .../heatTransfer/buoyantPimpleFoam/pEqn.H     |   4 +-
 .../heatTransfer/thermoFoam/setAlphaEff.H     |   2 +-
 .../lagrangian/simpleCoalParcelFoam/EEqn.H    |  33 +
 .../simpleCoalParcelFoam/Make/options         |   3 +-
 .../lagrangian/simpleCoalParcelFoam/UEqn.H    |  21 +
 .../lagrangian/simpleCoalParcelFoam/YEqn.H    |  48 ++
 .../simpleCoalParcelFoam/createFieldRefs.H    |   3 +
 .../simpleCoalParcelFoam/createFields.H       | 122 +++
 .../lagrangian/simpleCoalParcelFoam/pEqn.H    |  57 ++
 .../simpleCoalParcelFoam.C                    |  27 +-
 ...pressibleTwoPhaseMixtureTurbulenceModels.C |   9 +
 .../MPPICInterFoam/MPPICInterFoam.C           |  20 +-
 .../multiphase/MPPICInterFoam/Make/options    |   1 +
 .../multiphase/MPPICInterFoam/alphaEqn.H      |   3 +-
 .../multiphase/MPPICInterFoam/createFields.H  |   2 +
 .../twoPhaseMixtureEThermo.C                  |  62 +-
 .../Make/options                              |   2 +-
 .../mesh/advanced/snappyRefineMesh/Make/files |   4 +-
 .../generation/snappyHexMesh/snappyHexMesh.C  |   4 +-
 .../manipulation/checkMesh/checkTopology.C    |   2 +-
 .../mesh/manipulation/subsetMesh/subsetMesh.C |   2 +-
 .../miscellaneous/foamDebugSwitches/Allwmake  |  11 -
 .../decomposePar/decomposePar.C               |   4 -
 .../decomposePar/domainDecomposition.C        |   2 +-
 ...parFvFieldReconstructorReconstructFields.C |  18 +-
 .../redistributePar/redistributePar.C         |  11 +-
 .../foamToEnsight/ensightField.C              |   9 +-
 .../foamToEnsight/ensightField.H              |   4 +-
 .../foamToEnsight/foamToEnsight.C             |  54 +-
 .../dataConversion/foamToVTK/foamToVTK.C      |  12 +-
 .../foamToVTK/foamToVTK/internalWriter.H      |   4 +-
 .../foamToVTK/internalWriterTemplates.C       |   4 +-
 .../foamToVTK/foamToVTK/writeFunsTemplates.C  |   8 +-
 .../steadyParticleTracksTemplates.C           |   6 +-
 .../applyBoundaryLayer/applyBoundaryLayer.C   |  11 +-
 .../applyBoundaryLayer/createFields.H         |   2 +-
 .../Make/options                              |   4 +-
 .../createExternalCoupledPatchGeometry.C      |   6 +-
 .../viewFactorsGen/viewFactorsGen.C           |   4 +-
 .../surface/surfaceCheck/surfaceCheck.C       |  10 +-
 doc/Doxygen/Doxyfile                          |  11 +-
 doc/Doxygen/footer.html                       |  26 +-
 doc/Doxygen/header.html                       |   2 +-
 src/Allwmake                                  |   4 -
 src/OpenFOAM/db/Time/Time.C                   |   2 -
 src/OpenFOAM/db/error/messageStream.H         |  22 +-
 .../IOOutputFilter/IOOutputFilter.C           | 147 ----
 .../IOOutputFilter/IOOutputFilter.H           | 153 ----
 .../functionObjectList/functionObjectList.C   |  43 +-
 .../db/functionObjects/logFiles/logFiles.C    |  21 +-
 .../db/functionObjects/logFiles/logFiles.H    |  16 +-
 .../regionFunctionObject.C                    |   6 +-
 .../regionFunctionObject.H                    |  15 +-
 .../regionFunctionObjectTemplates.C           |  19 +-
 .../stateFunctionObject.C}                    |  73 +-
 .../stateFunctionObject.H}                    |  65 +-
 .../stateFunctionObjectTemplates.C}           |  54 +-
 .../functionObjects/timeControl/timeControl.H |   1 +
 .../db/functionObjects/writeFile/writeFile.C  |   4 +-
 .../db/functionObjects/writeFile/writeFile.H  |  13 +-
 src/OpenFOAM/fields/ReadFields/ReadFields.C   | 145 ----
 .../fields/ReadFields/ReadFieldsTemplates.C   | 145 ++++
 .../mapDistribute/mapDistributeTemplates.C    |   2 +-
 .../polyBoundaryMesh/polyBoundaryMesh.C       |   4 +-
 src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C |   3 +-
 .../polyPatches/polyPatch/polyPatch.C         |   4 +-
 .../CompressibleTurbulenceModel.H             |   2 +-
 ...allHeatFluxTemperatureFvPatchScalarField.C |   8 +-
 ...allHeatFluxTemperatureFvPatchScalarField.H |   4 +-
 ...fixedIncidentRadiationFvPatchScalarField.C |  13 +-
 .../temperatureCoupledBase.C                  |   2 +-
 .../turbulentFluidThermoModels.C              |   3 -
 .../turbulentTransportModels.C                |   3 -
 .../Base/kOmegaSST/kOmegaSSTBase.C            |  26 +-
 .../Base/kOmegaSST/kOmegaSSTBase.H            |  20 +-
 .../SpalartAllmarasIDDES.C                    |   4 +-
 .../DES/kOmegaSSTDDES/kOmegaSSTDDES.C         |   4 +-
 .../DES/kOmegaSSTDES/kOmegaSSTDES.C           |   4 +-
 .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C       |   2 +-
 .../LES/kOmegaSSTDES/kOmegaSSTDES.C           | 156 ----
 .../LES/kOmegaSSTDES/kOmegaSSTDES.H           | 174 ----
 .../linearViscousStress/linearViscousStress.H |   2 +-
 .../diffusionMulticomponent.C                 |  72 +-
 .../fvMeshAdder/fvMeshAdderTemplates.C        | 118 +--
 .../fvMeshDistribute/fvMeshDistribute.C       |  65 +-
 .../velocityDisplacementMotionSolver.C        |  15 +-
 .../polyTopoChange/addPatchCellLayer.C        | 188 ++---
 .../hexRef8/refinementHistory.C               |   7 -
 .../hexRef8/refinementHistory.H               |   6 +-
 .../polyTopoChange/polyTopoChange.C           |   4 +-
 .../turbulentDFSEMInletFvPatchVectorField.C   |  24 +-
 ...entDFSEMInletFvPatchVectorFieldTemplates.C |  28 +-
 .../fvMeshFunctionObject.H                    |   4 +-
 .../functionObjects/volRegion/volRegion.C     |   4 +-
 .../functionObjects/volRegion/volRegion.H     |  16 +-
 .../field/CourantNo/CourantNo.H               |   6 +-
 .../field/DESModelRegions/DESModelRegions.C   | 178 ++++
 .../field}/DESModelRegions/DESModelRegions.H  |  84 +-
 src/functionObjects/field/Make/files          |  13 +-
 src/functionObjects/field/PecletNo/PecletNo.C |  64 +-
 src/functionObjects/field/PecletNo/PecletNo.H |  26 +-
 .../field/blendingFactor/blendingFactor.C     |  37 +-
 .../field/blendingFactor/blendingFactor.H     |  29 +-
 .../blendingFactor/blendingFactorTemplates.C  |  27 +-
 .../field/externalCoupled/externalCoupled.C}  | 162 ++--
 .../field/externalCoupled/externalCoupled.H}  |  79 +-
 .../externalCoupledMixedFvPatchField.C        |   0
 .../externalCoupledMixedFvPatchField.H        |   0
 .../externalCoupledMixedFvPatchFields.C       |   0
 .../externalCoupledMixedFvPatchFields.H       |   0
 .../externalCoupledMixedFvPatchFieldsFwd.H    |   0
 ...oupledTemperatureMixedFvPatchScalarField.C |   2 +-
 ...oupledTemperatureMixedFvPatchScalarField.H |   0
 .../externalCoupledTemplates.C}               |  29 +-
 .../field/fieldAverage/fieldAverage.C         |   4 +-
 .../fieldAverageItem/fieldAverageItem.C       |   3 +
 .../fieldAverageItem/fieldAverageItem.H       |  34 +-
 .../fieldAverageItem/fieldAverageItemIO.C     |  10 +-
 .../fieldAverage/fieldAverageTemplates.C      |   3 +
 .../fieldCoordinateSystemTransformTemplates.C |  29 +-
 .../field/fieldMinMax/fieldMinMax.C           |   7 +-
 .../field/fieldMinMax/fieldMinMax.H           |   6 +-
 .../field/fieldMinMax/fieldMinMaxTemplates.C  |  56 +-
 .../field/fieldValues/fieldValue/fieldValue.C |   1 +
 .../field/fieldValues/fieldValue/fieldValue.H |   8 +-
 .../fieldValueDelta/fieldValueDelta.C         |  17 +-
 .../fieldValueDelta/fieldValueDelta.H         |  65 +-
 .../fieldValueDeltaTemplates.C                |   2 +-
 .../surfaceFieldValue/surfaceFieldValue.C     |  10 +-
 .../surfaceFieldValue/surfaceFieldValue.H     |  56 +-
 .../surfaceFieldValue/surfaceFieldValueI.H    |   3 +-
 .../surfaceFieldValueTemplates.C              |   8 +-
 .../fieldValues/volFieldValue/volFieldValue.C |   2 +-
 .../fieldValues/volFieldValue/volFieldValue.H |   2 +-
 .../volFieldValue/volFieldValueTemplates.C    |   9 +-
 .../field}/fluxSummary/fluxSummary.C          | 256 +++---
 .../field}/fluxSummary/fluxSummary.H          | 100 +--
 .../field/histogram/histogram.C               |  22 +-
 .../field/histogram/histogram.H               |   5 +-
 .../field}/mapFields/mapFields.C              | 116 ++-
 .../field}/mapFields/mapFields.H              |  86 +-
 .../field}/mapFields/mapFieldsTemplates.C     |  30 +-
 src/functionObjects/field/pressure/pressure.C |   2 +-
 src/functionObjects/field/pressure/pressure.H |   6 +-
 .../reactionsSensitivityAnalysis.C            |  85 +-
 .../reactionsSensitivityAnalysis.H            |  80 +-
 .../reactionsSensitivityAnalysisObjects.C}    |  40 +-
 .../field/readFields/readFields.C             |  10 +-
 .../field/readFields/readFields.H             |   5 +-
 .../field/readFields/readFieldsTemplates.C    |  26 +-
 .../regionSizeDistribution.C                  |  23 +-
 .../regionSizeDistribution.H                  |   5 +-
 .../field/streamFunction/streamFunction.C     |   9 +-
 .../field/streamLine/streamLine.C             | 559 +------------
 .../field/streamLine/streamLineBase.C         | 758 ++++++++----------
 .../field/streamLine/streamLineBase.H         |  48 +-
 .../surfaceInterpolate/surfaceInterpolate.H   |   2 +-
 .../surfaceInterpolateTemplates.C             |  11 +-
 .../field/turbulenceFields/turbulenceFields.C |  17 +-
 .../field/turbulenceFields/turbulenceFields.H |   7 +-
 .../field/valueAverage/valueAverage.C         | 116 +--
 .../field/valueAverage/valueAverage.H         |  82 +-
 .../valueAverage/valueAverageTemplates.C      |   6 +-
 .../wallBoundedStreamLine.C                   |  91 +--
 .../field/wallHeatFlux/wallHeatFlux.C         |  67 +-
 .../field/wallHeatFlux/wallHeatFlux.H         |  14 +-
 .../field/wallShearStress/wallShearStress.C   |  11 +-
 src/functionObjects/field/yPlus/yPlus.C       |  72 +-
 src/functionObjects/field/yPlus/yPlus.H       |  22 +-
 .../field/yPlus/yPlusTemplates.C              |  80 --
 .../forces/forceCoeffs/forceCoeffs.C          |  32 +-
 src/functionObjects/forces/forces/forces.C    | 132 +--
 src/functionObjects/forces/forces/forces.H    |   6 +-
 .../IOrunTimePostProcessing.H                 |  49 --
 .../fieldVisualisationBase.C                  |  48 +-
 .../fieldVisualisationBase.H                  |  10 +-
 .../functionObjectCloud.C                     |  26 +-
 .../functionObjectCloud.H                     |  23 +-
 .../functionObjectLine.C                      |  18 +-
 .../functionObjectLine.H                      |  21 +-
 .../functionObjectSurface.C                   |  17 +-
 .../functionObjectSurface.H                   |  25 +-
 .../runTimePostProcessing/geometryBase.C      |  40 +-
 .../runTimePostProcessing/geometryBase.H      |  24 +-
 .../runTimePostProcessing/geometrySurface.C   |  24 +-
 .../runTimePostProcessing/geometrySurface.H   |  19 +-
 .../graphics/runTimePostProcessing/pathline.C |  45 +-
 .../graphics/runTimePostProcessing/pathline.H |  16 +-
 .../runTimePostProcessing/pointData.C         |  41 +-
 .../runTimePostProcessing/pointData.H         |  22 +-
 .../runTimePostProcessing.C                   |  65 +-
 .../runTimePostProcessing.H                   |  79 +-
 .../runTimePostProcessingFunctionObject.C     |  42 -
 .../runTimePostProcessingFunctionObject.H     |  54 --
 .../runTimePostProcessingTemplates.C          |   2 +-
 .../graphics/runTimePostProcessing/scene.C    |  59 +-
 .../graphics/runTimePostProcessing/scene.H    |  12 +-
 .../graphics/runTimePostProcessing/surface.C  |  58 +-
 .../graphics/runTimePostProcessing/surface.H  |  18 +-
 .../graphics/runTimePostProcessing/text.C     |  17 +-
 .../graphics/runTimePostProcessing/text.H     |  18 +-
 .../lagrangian/cloudInfo/cloudInfo.C          |   6 +-
 .../solvers/scalarTransport/scalarTransport.C |  50 +-
 .../solvers/scalarTransport/scalarTransport.H |   8 +-
 src/functionObjects/utilities/Make/files      |  23 +-
 .../removeRegisteredObject.C                  |  17 +-
 .../removeRegisteredObject.H                  |   9 +-
 .../utilities/residuals/residuals.C           |   2 +-
 .../utilities/residuals/residualsTemplates.C  |   2 +-
 .../averageCondition/averageCondition.C       |  18 +-
 .../averageCondition/averageCondition.H       |  12 +-
 .../averageConditionTemplates.C               |   4 +-
 .../equationInitialResidualCondition.C        |  60 +-
 .../equationInitialResidualCondition.H        |  20 +-
 .../equationMaxIterCondition.C                |  20 +-
 .../equationMaxIterCondition.H                |  17 +-
 .../minMaxCondition/minMaxCondition.C         |  31 +-
 .../minMaxCondition/minMaxCondition.H         |  16 +-
 .../minMaxConditionTemplates.C                |   4 +-
 .../minTimeStepCondition.C                    |  18 +-
 .../minTimeStepCondition.H                    |  20 +-
 .../runTimeCondition/runTimeCondition.C       |  32 +-
 .../runTimeCondition/runTimeCondition.H       |  24 +-
 .../runTimeCondition/runTimeConditionNew.C    |   5 +-
 .../runTimeControl/runTimeControl.C           | 160 ++--
 .../runTimeControl/runTimeControl.H           |  58 +-
 .../timeActivatedFileUpdate.C                 |   2 +-
 .../writeDictionary/writeDictionary.C         |  13 +-
 .../writeDictionary/writeDictionary.H         |   9 +-
 .../surfaceAlignedSBRStressFvMotionSolver.C   |  78 +-
 .../surfaceAlignedSBRStressFvMotionSolver.H   |   2 +-
 .../patchCorrectedInterpolationTemplates.C    |  44 +-
 src/fvOptions/Make/files                      |   7 +-
 .../fixedTemperatureConstraint.C              |   0
 .../fixedTemperatureConstraint.H              |   0
 .../FixedValueConstraint.C                    |   0
 .../FixedValueConstraint.H                    |   0
 .../fixedValueConstraints.C                   |   0
 .../acousticDampingSource.C                   |   2 +-
 .../tabulatedNTUHeatTransfer.C                |   4 +-
 .../KinematicParcel/KinematicParcel.C         |   2 +-
 .../PatchInjection/patchInjectionBase.C       |   4 +-
 .../PatchInteractionModel.C                   |   6 +-
 .../shellSurfaces/shellSurfaces.C             |   2 +-
 .../snappyHexMeshDriver/snappyLayerDriver.C   |  10 +-
 .../snappyHexMeshDriver/snappySnapDriver.C    |   5 +-
 .../AMIInterpolation/AMIInterpolation.C       |  18 +-
 .../algorithms/MeshWave/FaceCellWave.C        | 334 ++++----
 .../algorithms/MeshWave/FaceCellWave.H        |   2 +-
 .../indexedOctree/treeDataPrimitivePatch.C    |   4 +-
 .../searchableSurface/triSurfaceMesh.C        |   2 +-
 .../intersectedSurface/intersectedSurface.C   |  12 +-
 .../field/valueAverage/IOvalueAverage.H       |  49 --
 .../valueAverage/valueAverageFunctionObject.C |  42 -
 .../valueAverage/valueAverageFunctionObject.H |  54 --
 .../runTimeControl/IOrunTimeControl.H         |  49 --
 .../runTimeControlFunctionObject.C            |  42 -
 .../runTimeControlFunctionObject.H            |  54 --
 .../DESModelRegions/DESModelRegions.C         | 206 -----
 .../DESModelRegionsFunctionObject.C           |  42 -
 .../DESModelRegionsFunctionObject.H           |  54 --
 .../DESModelRegions/IODESModelRegions.H       |  49 --
 .../utilities/fluxSummary/IOfluxSummary.H     |  49 --
 .../fluxSummary/fluxSummaryFunctionObject.C   |  42 -
 .../fluxSummary/fluxSummaryFunctionObject.H   |  53 --
 .../utilities/mapFields/IOmapFields.H         |  49 --
 .../mapFields/mapFieldsFunctionObject.C       |  42 -
 .../mapFields/mapFieldsFunctionObject.H       |  53 --
 ...actionsSensitivityAnalysisFunctionObject.H |  64 --
 .../regionModel/regionModel1D/regionModel1D.C |  26 +-
 ...linedFilmNusseltHeightFvPatchScalarField.C |   2 +-
 ...lmNusseltInletVelocityFvPatchVectorField.C |  13 +-
 src/renumber/renumberMethods/Make/options     |   1 -
 src/sampling/meshToMesh/meshToMesh.C          |  24 +-
 src/sampling/meshToMesh/meshToMeshTemplates.C |  31 +-
 src/sampling/probes/IOprobes.H                |  51 --
 src/sampling/probes/patchProbes.C             |  48 +-
 src/sampling/probes/patchProbes.H             |  11 +-
 src/sampling/probes/patchProbesTemplates.C    |  12 +-
 src/sampling/probes/probes.C                  |  32 +-
 src/sampling/probes/probes.H                  |  13 +-
 src/sampling/probes/probesGrouping.C          |   5 +-
 .../sampledSet/sampledSets/IOsampledSets.H    |  49 --
 .../sampledSet/sampledSets/sampledSets.C      |  17 +-
 .../sampledSet/sampledSets/sampledSets.H      |   2 +-
 .../sampledSurface/isoSurface/isoSurface.C    |   4 +-
 .../sampledSurface/isoSurface/isoSurface.H    |   2 +-
 .../sampledSurfaces/IOsampledSurfaces.H       |  49 --
 .../sampledSurfaces/sampledSurfaces.C         |  12 +-
 .../sampledSurfaces/sampledSurfaces.H         |   5 +-
 .../boundaryDataSurfaceWriterTemplates.C      |  30 +-
 .../writers/foam/foamSurfaceWriter.C          |  51 +-
 .../writers/foam/foamSurfaceWriter.H          |   4 +-
 .../foamSurfaceWriterTemplates.C}             |   4 +-
 .../TDACChemistryModel/TDACChemistryModel.C   |   4 +-
 .../basicChemistryModel/basicChemistryModel.H |   5 +-
 .../specieReactionRates/specieReactionRates.C |  50 +-
 .../specieReactionRates/specieReactionRates.H |  10 +-
 ...emperatureCoupledMixedFvPatchScalarField.C |  12 +-
 .../MarshakRadiationFvPatchScalarField.C      |   4 +-
 ...iationFixedTemperatureFvPatchScalarField.C |   4 +-
 ...iffusiveRadiationMixedFvPatchScalarField.C |  18 +-
 ...iffusiveRadiationMixedFvPatchScalarField.C |  56 +-
 .../radiationModel/radiationModel.C           |  14 +-
 .../solarLoad/faceShading/faceShading.C       |   5 +-
 .../radiationModels/solarLoad/solarLoad.C     |  23 +-
 .../radiationModels/viewFactor/viewFactor.C   |  14 +-
 311 files changed, 4057 insertions(+), 6478 deletions(-)
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
 create mode 100644 applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
 delete mode 100755 applications/utilities/miscellaneous/foamDebugSwitches/Allwmake
 delete mode 100644 src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C
 delete mode 100644 src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
 rename src/OpenFOAM/db/functionObjects/{functionObjectState/functionObjectState.C => stateFunctionObject/stateFunctionObject.C} (68%)
 rename src/OpenFOAM/db/functionObjects/{functionObjectState/functionObjectState.H => stateFunctionObject/stateFunctionObject.H} (85%)
 rename src/OpenFOAM/db/functionObjects/{functionObjectState/functionObjectStateTemplates.C => stateFunctionObject/stateFunctionObjectTemplates.C} (80%)
 delete mode 100644 src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.C
 delete mode 100644 src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.H
 create mode 100644 src/functionObjects/field/DESModelRegions/DESModelRegions.C
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/DESModelRegions/DESModelRegions.H (65%)
 rename src/{postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C => functionObjects/field/externalCoupled/externalCoupled.C} (86%)
 rename src/{postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H => functionObjects/field/externalCoupled/externalCoupled.H} (84%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C (100%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H (100%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C (100%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.H (100%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFieldsFwd.H (100%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C (99%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/field}/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H (100%)
 rename src/{postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C => functionObjects/field/externalCoupled/externalCoupledTemplates.C} (95%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/fluxSummary/fluxSummary.C (80%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/fluxSummary/fluxSummary.H (75%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/mapFields/mapFields.C (67%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/mapFields/mapFields.H (70%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/mapFields/mapFieldsTemplates.C (82%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C (82%)
 rename src/{postProcessing/functionObjects/utilities => functionObjects/field}/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H (70%)
 rename src/{postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.C => functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C} (80%)
 rename src/{postProcessing => }/functionObjects/field/valueAverage/valueAverage.C (62%)
 rename src/{postProcessing => }/functionObjects/field/valueAverage/valueAverage.H (71%)
 rename src/{postProcessing => }/functionObjects/field/valueAverage/valueAverageTemplates.C (91%)
 delete mode 100644 src/functionObjects/field/yPlus/yPlusTemplates.C
 delete mode 100644 src/functionObjects/graphics/runTimePostProcessing/IOrunTimePostProcessing.H
 delete mode 100644 src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.C
 delete mode 100644 src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.H
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/averageCondition/averageCondition.C (91%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/averageCondition/averageCondition.H (92%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C (94%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C (84%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H (84%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C (89%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H (86%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C (86%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H (90%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C (91%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C (84%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H (82%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C (74%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H (88%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C (92%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeControl.C (64%)
 rename src/{postProcessing/functionObjects/jobControl => functionObjects/utilities}/runTimeControl/runTimeControl.H (73%)
 rename src/fvOptions/constraints/{ => derived}/fixedTemperatureConstraint/fixedTemperatureConstraint.C (100%)
 rename src/fvOptions/constraints/{ => derived}/fixedTemperatureConstraint/fixedTemperatureConstraint.H (100%)
 rename src/fvOptions/constraints/{ => general}/fixedValueConstraint/FixedValueConstraint.C (100%)
 rename src/fvOptions/constraints/{ => general}/fixedValueConstraint/FixedValueConstraint.H (100%)
 rename src/fvOptions/constraints/{ => general}/fixedValueConstraint/fixedValueConstraints.C (100%)
 delete mode 100644 src/postProcessing/functionObjects/field/valueAverage/IOvalueAverage.H
 delete mode 100644 src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.C
 delete mode 100644 src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.H
 delete mode 100644 src/postProcessing/functionObjects/jobControl/runTimeControl/IOrunTimeControl.H
 delete mode 100644 src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.C
 delete mode 100644 src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C
 delete mode 100644 src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.C
 delete mode 100644 src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/DESModelRegions/IODESModelRegions.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/fluxSummary/IOfluxSummary.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.C
 delete mode 100644 src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/mapFields/IOmapFields.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.C
 delete mode 100644 src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.H
 delete mode 100644 src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.H
 delete mode 100644 src/sampling/probes/IOprobes.H
 delete mode 100644 src/sampling/sampledSet/sampledSets/IOsampledSets.H
 delete mode 100644 src/sampling/sampledSurface/sampledSurfaces/IOsampledSurfaces.H
 rename src/sampling/sampledSurface/writers/{foamFile/foamFileSurfaceWriterTemplates.C => foam/foamSurfaceWriterTemplates.C} (94%)

diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C
index 0dbe1b5cad9..f0c04eadb4a 100644
--- a/applications/solvers/basic/potentialFoam/potentialFoam.C
+++ b/applications/solvers/basic/potentialFoam/potentialFoam.C
@@ -28,9 +28,9 @@ Group
     grpBasicSolvers
 
 Description
-    Potential flow solver which solves for the velocity potential
-    from which the flux-field is obtained and velocity field by reconstructing
-    the flux.
+    Potential flow solver which solves for the velocity potential, to
+    calculate the flux-field, from which the velocity field is obtained by
+    reconstructing the flux.
 
     \heading Solver details
     The potential flow solution is typically employed to generate initial fields
diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C b/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C
index 0f6f2976f10..07b52d60d9e 100644
--- a/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C
+++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -67,25 +67,26 @@ Description
 
 int main(int argc, char *argv[])
 {
-    #include "setRootCase.H"
+    #include "postProcess.H"
 
+    #include "setRootCase.H"
     #include "createTime.H"
     #include "createDynamicFvMesh.H"
-    #include "initContinuityErrs.H"
-
-    pimpleControl pimple(mesh);
-
+    #include "createControl.H"
     #include "readCombustionProperties.H"
     #include "readGravitationalAcceleration.H"
     #include "createFields.H"
-    #include "createMRF.H"
+    #include "createFieldRefs.H"
     #include "createFvOptions.H"
+    #include "initContinuityErrs.H"
     #include "createRhoUf.H"
     #include "createControls.H"
     #include "initContinuityErrs.H"
     #include "compressibleCourantNo.H"
     #include "setInitialDeltaT.H"
 
+    turbulence->validate();
+
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
     Info<< "\nStarting time loop\n" << endl;
diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H b/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H
index cf509804604..ed2db49fb4d 100644
--- a/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H
+++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H
@@ -1,7 +1,6 @@
-    #include "readTimeControls.H"
+#include "readTimeControls.H"
 
-    bool correctPhi =
-        pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
+correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
 
-    bool checkMeshCourantNo =
-        pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
+checkMeshCourantNo =
+    pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H
index 5e1644fc97b..cc0bc64f0a1 100644
--- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H
@@ -18,8 +18,6 @@ volScalarField rho
 );
 
 volScalarField& p = thermo.p();
-const volScalarField& psi = thermo.psi();
-
 
 Info<< "Reading field U\n" << endl;
 volVectorField U
diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
index c778ef40a8f..15c87f9c85e 100644
--- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
+++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
@@ -41,8 +41,6 @@
         p_rghDDtEqn =
         (
             fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
-        ==
-            fvOptions(psi, p_rgh, rho.name())
         );
     }
 
@@ -53,6 +51,8 @@
             p_rghDDtEqn()
           + fvc::div(phiHbyA)
           - fvm::laplacian(rhorAUf, p_rgh)
+        ==
+            fvOptions(psi, p_rgh, rho.name())
         );
 
         p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
index 73a157fc127..c760349a6eb 100644
--- a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
+++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
@@ -11,7 +11,7 @@ IOobject turbulencePropertiesHeader
     false
 );
 
-if (turbulencePropertiesHeader.headerOk())
+if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(false))
 {
     autoPtr<compressible::turbulenceModel> turbulence
     (
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
new file mode 100644
index 00000000000..8239d446216
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
@@ -0,0 +1,33 @@
+{
+    volScalarField& he = thermo.he();
+
+    fvScalarMatrix EEqn
+    (
+        mvConvection->fvmDiv(phi, he)
+      + (
+            he.name() == "e"
+          ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
+          : fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
+        )
+      - fvm::laplacian(turbulence->alphaEff(), he)
+     ==
+        rho*(U&g)
+      + parcels.Sh(he)
+      + radiation->Sh(thermo)
+      + combustion->Sh()
+      + fvOptions(rho, he)
+    );
+
+    EEqn.relax();
+
+    fvOptions.constrain(EEqn);
+
+    EEqn.solve();
+
+    fvOptions.correct(he);
+    thermo.correct();
+    radiation->correct();
+
+    Info<< "T gas min/max   = " << min(T).value() << ", "
+        << max(T).value() << endl;
+}
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
index efdf721ee33..d88ca09eae1 100644
--- a/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
@@ -24,8 +24,7 @@ EXE_INC = \
     -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
     -I$(LIB_SRC)/combustionModels/lnInclude \
     -I$(LIB_SRC)/fvOptions/lnInclude \
-    -I$(LIB_SRC)/sampling/lnInclude \
-    -I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam
+    -I$(LIB_SRC)/sampling/lnInclude
 
 
 EXE_LIBS = \
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
new file mode 100644
index 00000000000..a29d4b8c571
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
@@ -0,0 +1,21 @@
+    MRF.correctBoundaryVelocity(U);
+
+    tmp<fvVectorMatrix> tUEqn
+    (
+        fvm::div(phi, U)
+      + MRF.DDt(rho, U)
+      + turbulence->divDevRhoReff(U)
+     ==
+        rho()*g
+      + parcels.SU(U)
+      + fvOptions(rho, U)
+    );
+    fvVectorMatrix& UEqn = tUEqn.ref();
+
+    UEqn.relax();
+
+    fvOptions.constrain(UEqn);
+
+    solve(UEqn == -fvc::grad(p));
+
+    fvOptions.correct(U);
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
new file mode 100644
index 00000000000..7c7cf9a4c0b
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
@@ -0,0 +1,48 @@
+tmp<fv::convectionScheme<scalar>> mvConvection
+(
+    fv::convectionScheme<scalar>::New
+    (
+        mesh,
+        fields,
+        phi,
+        mesh.divScheme("div(phi,Yi_h)")
+    )
+);
+
+{
+    combustion->correct();
+    dQ = combustion->dQ();
+    volScalarField Yt(0.0*Y[0]);
+
+    forAll(Y, i)
+    {
+        if (i != inertIndex && composition.active(i))
+        {
+            volScalarField& Yi = Y[i];
+
+            fvScalarMatrix YEqn
+            (
+                mvConvection->fvmDiv(phi, Yi)
+              - fvm::laplacian(turbulence->muEff(), Yi)
+             ==
+                parcels.SYi(i, Yi)
+              + combustion->R(Yi)
+              + fvOptions(rho, Yi)
+            );
+
+            YEqn.relax();
+
+            fvOptions.constrain(YEqn);
+
+            YEqn.solve(mesh.solver("Yi"));
+
+            fvOptions.correct(Yi);
+
+            Yi.max(0.0);
+            Yt += Yi;
+        }
+    }
+
+    Y[inertIndex] = scalar(1) - Yt;
+    Y[inertIndex].max(0.0);
+}
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
new file mode 100644
index 00000000000..fdc479bc232
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
@@ -0,0 +1,3 @@
+const volScalarField& psi = thermo.psi();
+const volScalarField& T = thermo.T();
+const label inertIndex(composition.species()[inertSpecie]);
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
new file mode 100644
index 00000000000..16f297c9956
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
@@ -0,0 +1,122 @@
+#include "readGravitationalAcceleration.H"
+
+Info<< "Creating combustion model\n" << endl;
+
+autoPtr<combustionModels::rhoCombustionModel> combustion
+(
+    combustionModels::rhoCombustionModel::New(mesh)
+);
+
+rhoReactionThermo& thermo = combustion->thermo();
+thermo.validate(args.executable(), "h", "e");
+
+SLGThermo slgThermo(mesh, thermo);
+
+basicSpecieMixture& composition = thermo.composition();
+PtrList<volScalarField>& Y = composition.Y();
+
+const word inertSpecie(thermo.lookup("inertSpecie"));
+if (!composition.species().found(inertSpecie))
+{
+    FatalIOErrorIn(args.executable().c_str(), thermo)
+        << "Inert specie " << inertSpecie << " not found in available species "
+        << composition.species()
+        << exit(FatalIOError);
+}
+
+volScalarField& p = thermo.p();
+
+volScalarField rho
+(
+    IOobject
+    (
+        "rho",
+        runTime.timeName(),
+        mesh,
+        IOobject::NO_READ,
+        IOobject::AUTO_WRITE
+    ),
+    thermo.rho()
+);
+
+Info<< "\nReading field U\n" << endl;
+volVectorField U
+(
+    IOobject
+    (
+        "U",
+        runTime.timeName(),
+        mesh,
+        IOobject::MUST_READ,
+        IOobject::AUTO_WRITE
+    ),
+    mesh
+);
+
+#include "compressibleCreatePhi.H"
+
+mesh.setFluxRequired(p.name());
+
+dimensionedScalar rhoMax
+(
+    dimensionedScalar::lookupOrDefault
+    (
+        "rhoMax",
+        simple.dict(),
+        dimDensity,
+        GREAT
+    )
+);
+
+dimensionedScalar rhoMin
+(
+    dimensionedScalar::lookupOrDefault
+    (
+        "rhoMin",
+        simple.dict(),
+        dimDensity,
+        0
+    )
+);
+
+Info<< "Creating turbulence model\n" << endl;
+autoPtr<compressible::turbulenceModel> turbulence
+(
+    compressible::turbulenceModel::New
+    (
+        rho,
+        U,
+        phi,
+        thermo
+    )
+);
+
+// Set the turbulence into the combustion model
+combustion->setTurbulence(turbulence());
+
+Info<< "Creating multi-variate interpolation scheme\n" << endl;
+multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
+
+forAll(Y, i)
+{
+    fields.add(Y[i]);
+}
+fields.add(thermo.he());
+
+volScalarField dQ
+(
+    IOobject
+    (
+        "dQ",
+        runTime.timeName(),
+        mesh,
+        IOobject::NO_READ,
+        IOobject::AUTO_WRITE
+    ),
+    mesh,
+    dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
+);
+
+#include "createMRF.H"
+#include "createRadiationModel.H"
+#include "createClouds.H"
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
new file mode 100644
index 00000000000..055eff6f0b3
--- /dev/null
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
@@ -0,0 +1,57 @@
+{
+    // Thermodynamic density needs to be updated by psi*d(p) after the
+    // pressure solution - done in 2 parts. Part 1:
+    thermo.rho() -= psi*p;
+
+    volScalarField rAU(1.0/UEqn.A());
+    surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+    tUEqn.clear();
+    surfaceScalarField phiHbyA
+    (
+        "phiHbyA",
+        fvc::interpolate(rho)*fvc::flux(HbyA)
+    );
+
+    MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
+
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
+    while (simple.correctNonOrthogonal())
+    {
+        fvScalarMatrix pEqn
+        (
+            fvc::div(phiHbyA)
+          - fvm::laplacian(rhorAUf, p)
+         ==
+            parcels.Srho()
+          + fvOptions(psi, p, rho.name())
+        );
+
+        pEqn.solve();
+
+        if (simple.finalNonOrthogonalIter())
+        {
+            phi = phiHbyA + pEqn.flux();
+        }
+    }
+
+    p.relax();
+
+    // Second part of thermodynamic density update
+    thermo.rho() += psi*p;
+
+    #include "compressibleContinuityErrs.H"
+
+    U = HbyA - rAU*fvc::grad(p);
+    U.correctBoundaryConditions();
+    fvOptions.correct(U);
+
+    rho = thermo.rho();
+    rho = max(rho, rhoMin);
+    rho = min(rho, rhoMax);
+    rho.relax();
+
+    Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
+}
diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
index d9932d06dd5..12ac28ccdfd 100644
--- a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
+++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,13 +24,12 @@ License
 Application
     simpleReactingParcelFoam
 
-Description
-    Steady state SIMPLE solver for laminar or turbulent flow with coal
-    Lagrangian parcels.
+Group
+    grpLagrangianSolvers
 
-    Note:
-    - including run-time selectable finite volume options,e.g. sources,
-      constraints
+Description
+    Steady state solver for compressible, turbulent flow with coal particle
+    clouds and optional sources/constraints.
 
 \*---------------------------------------------------------------------------*/
 
@@ -49,21 +48,19 @@ Description
 
 int main(int argc, char *argv[])
 {
-    #include "setRootCase.H"
+    #include "postProcess.H"
 
+    #include "setRootCase.H"
     #include "createTime.H"
     #include "createMesh.H"
-    #include "readGravitationalAcceleration.H"
-
-    simpleControl simple(mesh);
-
+    #include "createControl.H"
     #include "createFields.H"
-    #include "createRadiationModel.H"
-    #include "createClouds.H"
-    #include "createMRF.H"
+    #include "createFieldRefs.H"
     #include "createFvOptions.H"
     #include "initContinuityErrs.H"
 
+    turbulence->validate();
+
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
     Info<< "\nStarting time loop\n" << endl;
diff --git a/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C b/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C
index 193501ea421..86eabba39e6 100644
--- a/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C
+++ b/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C
@@ -32,6 +32,15 @@ License
 #include "turbulentTransportModel.H"
 #include "LESModel.H"
 
+makeTurbulenceModelTypes
+(
+    volScalarField,
+    geometricOneField,
+    incompressibleTurbulenceModel,
+    PhaseCompressibleTurbulenceModel,
+    immiscibleIncompressibleTwoPhaseMixture
+);
+
 makeBaseTurbulenceModel
 (
     volScalarField,
diff --git a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C
index 07a6b062bba..d2cab50beea 100644
--- a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C
+++ b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C
@@ -30,7 +30,7 @@ Description
     The momentum and other fluid properties are of the "mixture" and a single
     momentum equation is solved.
 
-    It includes MRF and MPPIC clouds
+    It includes MRF and an MPPIC cloud.
 
     Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
 
@@ -53,26 +53,22 @@ Description
 
 int main(int argc, char *argv[])
 {
+    #include "postProcess.H"
+
     #include "setRootCase.H"
     #include "createTime.H"
     #include "createMesh.H"
-
-    pimpleControl pimple(mesh);
-
-    #include "createTimeControls.H"
+    #include "createControl.H"
     #include "initContinuityErrs.H"
     #include "createFields.H"
-    #include "createMRF.H"
     #include "createFvOptions.H"
+    #include "createTimeControls.H"
     #include "correctPhi.H"
-
-    turbulence->validate();
-
-
-    #include "readTimeControls.H"
     #include "CourantNo.H"
     #include "setInitialDeltaT.H"
 
+    turbulence->validate();
+
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
     Info<< "\nStarting time loop\n" << endl;
@@ -126,7 +122,7 @@ int main(int argc, char *argv[])
             zeroGradientFvPatchVectorField::typeName
         );
 
-        cloudVolSUSu.internalField() = -cloudSU.source()/mesh.V();
+        cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
         cloudVolSUSu.correctBoundaryConditions();
 
         cloudSU.source() = vector::zero;
diff --git a/applications/solvers/multiphase/MPPICInterFoam/Make/options b/applications/solvers/multiphase/MPPICInterFoam/Make/options
index 8ecd0b4a1ea..e298ad1f599 100644
--- a/applications/solvers/multiphase/MPPICInterFoam/Make/options
+++ b/applications/solvers/multiphase/MPPICInterFoam/Make/options
@@ -1,6 +1,7 @@
 interFoamPath = $(FOAM_SOLVERS)/multiphase/interFoam
 
 EXE_INC =  \
+    -I. \
     -I./IncompressibleTwoPhaseMixtureTurbulenceModels/lnInclude \
     -I$(interFoamPath) \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
diff --git a/applications/solvers/multiphase/MPPICInterFoam/alphaEqn.H b/applications/solvers/multiphase/MPPICInterFoam/alphaEqn.H
index a1773265043..97d1428638b 100644
--- a/applications/solvers/multiphase/MPPICInterFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/MPPICInterFoam/alphaEqn.H
@@ -17,9 +17,10 @@
 
     // Do not compress interface at non-coupled boundary faces
     // (inlets, outlets etc.)
+    surfaceScalarField::Boundary& phicBf = phic.boundaryFieldRef();
     forAll(phic.boundaryField(), patchi)
     {
-        fvsPatchScalarField& phicp = phic.boundaryField()[patchi];
+        fvsPatchScalarField& phicp = phicBf[patchi];
 
         if (!phicp.coupled())
         {
diff --git a/applications/solvers/multiphase/MPPICInterFoam/createFields.H b/applications/solvers/multiphase/MPPICInterFoam/createFields.H
index a7d456f5322..de8ae559cc9 100644
--- a/applications/solvers/multiphase/MPPICInterFoam/createFields.H
+++ b/applications/solvers/multiphase/MPPICInterFoam/createFields.H
@@ -217,3 +217,5 @@
             mixture
         )
     );
+
+    #include "createMRF.H"
diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C
index a2c2b71fcf3..e8ae64ce1de 100644
--- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C
+++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C
@@ -42,7 +42,7 @@ namespace Foam
 
 void Foam::twoPhaseMixtureEThermo::eBoundaryCorrection(volScalarField& h)
 {
-    volScalarField::GeometricBoundaryField& hbf = h.boundaryField();
+    volScalarField::Boundary& hbf = h.boundaryFieldRef();
 
     forAll(hbf, patchi)
     {
@@ -59,6 +59,7 @@ void Foam::twoPhaseMixtureEThermo::eBoundaryCorrection(volScalarField& h)
     }
 }
 
+
 void Foam::twoPhaseMixtureEThermo::init()
 {
     const volScalarField alpha1Rho1(alpha1()*rho1());
@@ -74,6 +75,7 @@ void Foam::twoPhaseMixtureEThermo::init()
     e_.correctBoundaryConditions();
 }
 
+
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 Foam::twoPhaseMixtureEThermo::twoPhaseMixtureEThermo
@@ -117,11 +119,13 @@ Foam::twoPhaseMixtureEThermo::twoPhaseMixtureEThermo
     init();
 }
 
+
 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
 
 Foam::twoPhaseMixtureEThermo::~twoPhaseMixtureEThermo()
 {}
 
+
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void Foam::twoPhaseMixtureEThermo::correct()
@@ -226,10 +230,8 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::he
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::hc() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::hc() const
 {
-
     const fvMesh& mesh = this->T_.mesh();
 
     return tmp<volScalarField>
@@ -277,8 +279,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::THE
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::Cp() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cp() const
 {
     const volScalarField limitedAlpha1
     (
@@ -317,8 +318,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cp
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::rho() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::rho() const
 {
     const volScalarField limitedAlpha1
     (
@@ -337,8 +337,7 @@ Foam::twoPhaseMixtureEThermo::rho() const
 }
 
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::rho
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::rho
 (
     const label patchi
 ) const
@@ -357,8 +356,7 @@ Foam::twoPhaseMixtureEThermo::rho
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::Cv() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cv() const
 {
     const volScalarField limitedAlpha1
     (
@@ -376,8 +374,7 @@ Foam::twoPhaseMixtureEThermo::Cv() const
 }
 
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::Cv
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cv
 (
     const scalarField& p,
     const scalarField& T,
@@ -398,8 +395,7 @@ Foam::twoPhaseMixtureEThermo::Cv
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::gamma() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::gamma() const
 {
     return tmp<volScalarField>
     (
@@ -422,8 +418,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::gamma
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::Cpv() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cpv() const
 {
      // This is an e thermo (Cpv = Cv)
      return Cv();
@@ -442,16 +437,14 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cpv
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::CpByCpv() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::CpByCpv() const
 {
      NotImplemented;
      return tmp<Foam::volScalarField>();
 }
 
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::CpByCpv
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::CpByCpv
 (
     const scalarField& p,
     const scalarField& T,
@@ -463,8 +456,7 @@ Foam::twoPhaseMixtureEThermo::CpByCpv
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::kappa() const
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::kappa() const
 {
     const volScalarField limitedAlpha1
     (
@@ -482,8 +474,10 @@ Foam::twoPhaseMixtureEThermo::kappa() const
 }
 
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::kappa(const label patchi) const
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::kappa
+(
+    const label patchi
+) const
 {
     const volScalarField limitedAlpha1
     (
@@ -496,8 +490,7 @@ Foam::twoPhaseMixtureEThermo::kappa(const label patchi) const
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::kappaEff
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::kappaEff
 (
     const volScalarField& kappat
 ) const
@@ -508,8 +501,7 @@ Foam::twoPhaseMixtureEThermo::kappaEff
 }
 
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::kappaEff
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::kappaEff
 (
     const scalarField& kappat,
     const label patchi
@@ -528,8 +520,7 @@ Foam::twoPhaseMixtureEThermo::kappaEff
 }
 
 
-Foam::tmp<Foam::volScalarField>
-Foam::twoPhaseMixtureEThermo::alphaEff
+Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::alphaEff
 (
     const volScalarField& alphat
 ) const
@@ -539,12 +530,11 @@ Foam::twoPhaseMixtureEThermo::alphaEff
         alpha1_*rho1() + (1.0 - alpha1_)*rho2()
     );
 
-
     return (kappa()/Cp()/rho + alphat);
 }
 
-Foam::tmp<Foam::scalarField>
-Foam::twoPhaseMixtureEThermo::alphaEff
+
+Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::alphaEff
 (
     const scalarField& alphat,
     const label patchi
@@ -575,6 +565,7 @@ Foam::twoPhaseMixtureEThermo::alphaEff
     return kappa/Cp/rho + alphat;
 }
 
+
 bool Foam::twoPhaseMixtureEThermo::read()
 {
     if (basicThermo::read() && thermoIncompressibleTwoPhaseMixture::read())
@@ -589,4 +580,5 @@ bool Foam::twoPhaseMixtureEThermo::read()
     }
 }
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options
index 0194820c91e..1d4880f1baf 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options
@@ -12,7 +12,7 @@ EXE_INC = \
     -I$(LIB_SRC)/meshTools/lnInclude
 
 LIB_LIBS = \
-    -lcompressibleTurbulenceModels
+    -lcompressibleTurbulenceModels \
     -lreactingPhaseSystem \
     -lreactingMultiphaseSystem \
     -lreactingEulerianInterfacialModels \
diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/Make/files b/applications/utilities/mesh/advanced/snappyRefineMesh/Make/files
index 666a1c6b10e..2d0b43d3429 100644
--- a/applications/utilities/mesh/advanced/snappyRefineMesh/Make/files
+++ b/applications/utilities/mesh/advanced/snappyRefineMesh/Make/files
@@ -1,4 +1,4 @@
-autoRefineMesh.C
+snappyRefineMesh.C
 
-EXE = $(FOAM_APPBIN)/autoRefineMesh
+EXE = $(FOAM_APPBIN)/snappyRefineMesh
 
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
index ade260fd9ca..235f81db478 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
@@ -1316,14 +1316,14 @@ int main(int argc, char *argv[])
 
             Info<< surfaces.names()[surfi] << ':' << nl << nl;
 
-            const word& fzName = surfaces.surfZones()[surfI].faceZoneName();
+            const word& fzName = surfaces.surfZones()[surfi].faceZoneName();
 
             if (fzName.empty())
             {
                 // 'Normal' surface
                 forAll(regNames, i)
                 {
-                    label globalRegioni = surfaces.globalRegion(surfI, i);
+                    label globalRegioni = surfaces.globalRegion(surfi, i);
 
                     label patchi;
 
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
index 39da68933e7..11d6cfd523b 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
@@ -392,7 +392,7 @@ Foam::label Foam::checkTopology
                             // Already marked
                             regionDisconnected[regioni] = false;
                         }
-                        else if (pRegion != regionI)
+                        else if (pRegion != regioni)
                         {
                             // Multiple regions
                             regionDisconnected[regioni] = false;
diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
index 988415c4e44..7af8edb75a4 100644
--- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
+++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
@@ -326,7 +326,7 @@ int main(int argc, char *argv[])
     // Create mesh subsetting engine
     fvMeshSubset subsetter(mesh);
 
-    label patchi = -1;
+    labelList exposedPatchIDs;
 
     if (args.optionFound("patch"))
     {
diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake b/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake
deleted file mode 100755
index edc1f5f0dd9..00000000000
--- a/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
-   [ "${FFTW_ARCH_PATH##*-}" = system -a -f "/usr/include/fftw3.h" ]
-then
-    export LINK_FLAGS="-lrandomProcesses"
-fi
-wmake
-
-#------------------------------------------------------------------------------
diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
index 3196fadbd6d..cab70e70762 100644
--- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
+++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
@@ -1151,10 +1151,6 @@ int main(int argc, char *argv[])
                 // For the first region of a multi-region case additionally
                 // decompose the "uniform" directory in the time directory
                 if (regionNames.size() > 1 && regioni == 0)
-
-                    // If no fields have been decomposed the destination
-                    // directory will not have been created so make sure.
-                    mkDir(timePath);
                 {
                     decomposeUniform(copyUniform, mesh, processorDb);
                 }
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
index df8bd3eeb3f..047c68b21a5 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
@@ -615,7 +615,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
 
                 label zonei = faceToZone[curF];
 
-                if (zoneI >= 0)
+                if (zonei >= 0)
                 {
                     // Single zone. Add the face
                     zoneFaces[zonei].append(facei);
diff --git a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
index 5b9dc19431d..3df020099ff 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -125,12 +125,8 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
 
     PtrList<fvPatchField<Type>> patchFields(fld.mesh().boundary().size());
 
-    const typename GeometricField
-    <
-        Type,
-        fvPatchField,
-        volMesh
-    >::GeometricBoundaryField& bfld = fld.boundaryField();
+    const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
+        bfld = fld.boundaryField();
 
     forAll(bfld, patchI)
     {
@@ -292,12 +288,8 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
 
     PtrList<fvsPatchField<Type>> patchFields(fld.mesh().boundary().size());
 
-    const typename GeometricField
-    <
-        Type,
-        fvsPatchField,
-        surfaceMesh
-    >::GeometricBoundaryField& bfld = fld.boundaryField();
+    const typename GeometricField<Type, fvsPatchField, surfaceMesh>::Boundary&
+        bfld = fld.boundaryField();
 
     forAll(bfld, patchI)
     {
diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
index dfe03403472..65ebbc1c6f3 100644
--- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
+++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -716,8 +716,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
     {
         GeoField& fld = *iter();
 
-        typename GeoField::GeometricBoundaryField& bfld =
-            fld.boundaryField();
+        typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
         if
         (
             Pstream::defaultCommsType == Pstream::blocking
@@ -728,7 +727,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
 
             forAll(bfld, patchi)
             {
-                typename GeoField::PatchFieldType& pfld = bfld[patchi];
+                typename GeoField::Patch& pfld = bfld[patchi];
 
                 //if (pfld.coupled())
                 //if (isA<CoupledPatchType>(pfld))
@@ -750,7 +749,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
 
             forAll(bfld, patchi)
             {
-                typename GeoField::PatchFieldType& pfld = bfld[patchi];
+                typename GeoField::Patch& pfld = bfld[patchi];
 
                 //if (pfld.coupled())
                 //if (isA<CoupledPatchType>(pfld))
@@ -768,7 +767,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
             forAll(patchSchedule, patchEvali)
             {
                 label patchi = patchSchedule[patchEvali].patch;
-                typename GeoField::PatchFieldType& pfld = bfld[patchi];
+                typename GeoField::Patch& pfld = bfld[patchi];
 
                 //if (pfld.coupled())
                 //if (isA<CoupledPatchType>(pfld))
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
index b6b058b2b93..6e7a2d24fed 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
@@ -70,12 +70,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>>
 volField
 (
     const fvMeshSubset& meshSubsetter,
-    const typename GeometricField
-    <
-        Type,
-        fvPatchField,
-        volMesh
-    >::DimensionedInternalField& df
+    const typename GeometricField<Type, fvPatchField, volMesh>::Internal& df
 )
 {
     // Construct volField (with zeroGradient) from dimensioned field
@@ -93,7 +88,7 @@ volField
             zeroGradientFvPatchField<scalar>::typeName
         )
     );
-    tvf.ref().internalField() = df;
+    tvf.ref().primitiveFieldRef() = df;
     tvf.ref().correctBoundaryConditions();
     const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
index 813fea468eb..93452d04d38 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -60,7 +60,7 @@ volField
         Type,
         Foam::fvPatchField,
         Foam::volMesh
-    >::DimensionedInternalField& df
+    >::Internal& df
 );
 
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
index 842bc95c79e..d027e7afbba 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
@@ -186,11 +186,11 @@ int main(int argc, char *argv[])
         volSymmTensorField::typeName,
         volTensorField::typeName,
 
-        volScalarField::DimensionedInternalField::typeName,
-        volVectorField::DimensionedInternalField::typeName,
-        volSphericalTensorField::DimensionedInternalField::typeName,
-        volSymmTensorField::DimensionedInternalField::typeName,
-        volTensorField::DimensionedInternalField::typeName
+        volScalarField::Internal::typeName,
+        volVectorField::Internal::typeName,
+        volSphericalTensorField::Internal::typeName,
+        volSymmTensorField::Internal::typeName,
+        volTensorField::Internal::typeName
     };
 
     // Path to EnSight directory at case level only
@@ -562,15 +562,10 @@ int main(int argc, char *argv[])
                 // DimensionedFields
                 else if
                 (
-                    volFieldTypes[i]
-                 == volScalarField::DimensionedInternalField::typeName
+                    volFieldTypes[i] == volScalarField::Internal::typeName
                 )
                 {
-                    volScalarField::DimensionedInternalField df
-                    (
-                        fieldObject,
-                        mesh
-                    );
+                    volScalarField::Internal df(fieldObject, mesh);
                     ensightField<scalar>
                     (
                         volField<scalar>(meshSubsetter, df),
@@ -585,15 +580,10 @@ int main(int argc, char *argv[])
                 }
                 else if
                 (
-                    volFieldTypes[i]
-                 == volVectorField::DimensionedInternalField::typeName
+                    volFieldTypes[i] == volVectorField::Internal::typeName
                 )
                 {
-                    volVectorField::DimensionedInternalField df
-                    (
-                        fieldObject,
-                        mesh
-                    );
+                    volVectorField::Internal df(fieldObject, mesh);
                     ensightField<vector>
                     (
                         volField<vector>(meshSubsetter, df),
@@ -609,14 +599,10 @@ int main(int argc, char *argv[])
                 else if
                 (
                     volFieldTypes[i]
-                 == volSphericalTensorField::DimensionedInternalField::typeName
+                 == volSphericalTensorField::Internal::typeName
                 )
                 {
-                    volSphericalTensorField::DimensionedInternalField df
-                    (
-                        fieldObject,
-                        mesh
-                    );
+                    volSphericalTensorField::Internal df(fieldObject, mesh);
                     ensightField<sphericalTensor>
                     (
                         volField<sphericalTensor>(meshSubsetter, df),
@@ -631,15 +617,10 @@ int main(int argc, char *argv[])
                 }
                 else if
                 (
-                    volFieldTypes[i]
-                 == volSymmTensorField::DimensionedInternalField::typeName
+                    volFieldTypes[i] == volSymmTensorField::Internal::typeName
                 )
                 {
-                    volSymmTensorField::DimensionedInternalField df
-                    (
-                        fieldObject,
-                        mesh
-                    );
+                    volSymmTensorField::Internal df(fieldObject, mesh);
                     ensightField<symmTensor>
                     (
                         volField<symmTensor>(meshSubsetter, df),
@@ -654,15 +635,10 @@ int main(int argc, char *argv[])
                 }
                 else if
                 (
-                    volFieldTypes[i]
-                 == volTensorField::DimensionedInternalField::typeName
+                    volFieldTypes[i] == volTensorField::Internal::typeName
                 )
                 {
-                    volTensorField::DimensionedInternalField df
-                    (
-                        fieldObject,
-                        mesh
-                    );
+                    volTensorField::Internal df(fieldObject, mesh);
                     ensightField<tensor>
                     (
                         volField<tensor>(meshSubsetter, df),
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
index f5f6e019d6d..c699c0ef036 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -618,11 +618,11 @@ int main(int argc, char *argv[])
 
 
         // Construct dimensioned fields
-        PtrList<volScalarField::DimensionedInternalField> dsf;
-        PtrList<volVectorField::DimensionedInternalField> dvf;
-        PtrList<volSphericalTensorField::DimensionedInternalField> dSpheretf;
-        PtrList<volSymmTensorField::DimensionedInternalField> dSymmtf;
-        PtrList<volTensorField::DimensionedInternalField> dtf;
+        PtrList<const volScalarField::Internal> dsf;
+        PtrList<const volVectorField::Internal> dvf;
+        PtrList<const volSphericalTensorField::Internal> dSpheretf;
+        PtrList<const volSymmTensorField::Internal> dSymmtf;
+        PtrList<const volTensorField::Internal> dtf;
 
         if (!specifiedFields || selectedFields.size())
         {
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriter.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriter.H
index e478544bfba..b61cfd6377a 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriter.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriter.H
@@ -98,7 +98,7 @@ public:
         template<class Type, class GeoMesh>
         void write
         (
-            const PtrList<DimensionedField<Type, volMesh>>& flds
+            const PtrList<const DimensionedField<Type, volMesh>>& flds
         );
 
         //- Interpolate and write volFields
@@ -114,7 +114,7 @@ public:
         void write
         (
             const volPointInterpolation&,
-            const PtrList<DimensionedField<Type, volMesh>>&
+            const PtrList<const DimensionedField<Type, volMesh>>&
         );
 };
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriterTemplates.C
index 0412336323e..f5e3b1aa395 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/internalWriterTemplates.C
@@ -44,7 +44,7 @@ void Foam::internalWriter::write
 template<class Type, class GeoMesh>
 void Foam::internalWriter::write
 (
-    const PtrList<DimensionedField<Type, volMesh>>& flds
+    const PtrList<const DimensionedField<Type, volMesh>>& flds
 )
 {
     forAll(flds, i)
@@ -79,7 +79,7 @@ template<class Type, class GeoMesh>
 void Foam::internalWriter::write
 (
     const volPointInterpolation& pInterp,
-    const PtrList<DimensionedField<Type, volMesh>>& flds
+    const PtrList<const DimensionedField<Type, volMesh>>& flds
 )
 {
     forAll(flds, i)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeFunsTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeFunsTemplates.C
index c38a77c74e0..a6778a461c3 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeFunsTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeFunsTemplates.C
@@ -64,7 +64,7 @@ void Foam::writeFuns::write
 (
     std::ostream& os,
     const bool binary,
-    const DimensionedField<Type, volMesh>& vvf,
+    const DimensionedField<Type, volMesh>& df,
     const vtkMesh& vMesh
 )
 {
@@ -74,19 +74,19 @@ void Foam::writeFuns::write
 
     label nValues = mesh.nCells() + superCells.size();
 
-    os  << vvf.name() << ' '
+    os  << df.name() << ' '
         << int(pTraits<Type>::nComponents) << ' '
         << nValues << " float" << std::endl;
 
     DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
 
-    insert(vvf.primitiveField(), fField);
+    insert(df.field(), fField);
 
     forAll(superCells, superCelli)
     {
         label origCelli = superCells[superCelli];
 
-        insert(vvf[origCelli], fField);
+        insert(df[origCelli], fField);
     }
     write(os, binary, fField);
 }
diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
index 7e8c022250d..f54b9b04a4a 100644
--- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
+++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
@@ -116,11 +116,11 @@ void Foam::writeVTKFields
         Info<< "        writing field " << fieldNames[fieldi] << endl;
         os  << nl << fieldNames[fieldi] << ' '
             << int(pTraits<Type>::nComponents) << ' '
-            << values[fieldI].size() << " float" << nl;
+            << values[fieldi].size() << " float" << nl;
         label offset = 0;
-        forAll(addr, trackI)
+        forAll(addr, tracki)
         {
-            const List<label> ids(addr[trackI]);
+            const List<label> ids(addr[tracki]);
 
             List<Type> data(UIndirectList<Type>(values[fieldi], ids));
             label nData = data.size() - 1;
diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
index 1f81ad47425..ffeef922f42 100644
--- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
+++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
@@ -93,7 +93,7 @@ void correctProcessorPatches(volScalarField& vf)
     // Not possible to use correctBoundaryConditions on fields as they may
     // use local info as opposed to the constraint values employed here,
     // but still need to update processor patches
-    volScalarField::GeometricBoundaryField& bf = vf.boundaryField();
+    volScalarField::Boundary& bf = vf.boundaryFieldRef();
 
     forAll(bf, patchI)
     {
@@ -134,8 +134,8 @@ void blendField
     if (fieldHeader.typeHeaderOk<volScalarField>(true))
     {
         volScalarField fld(fieldHeader, mesh);
-        scalarField& internalField = fld.internalField();
-        internalField = (1 - mask)*internalField + mask*boundaryLayerField;
+        scalarField& pf = fld.primitiveFieldRef();
+        pf = (1 - mask)*pf + mask*boundaryLayerField;
         fld.max(SMALL);
 
         // Do not correct BC
@@ -172,10 +172,9 @@ void calcOmegaField
     if (omegaHeader.typeHeaderOk<volScalarField>(true))
     {
         volScalarField omega(omegaHeader, mesh);
-        scalarField& internalField = omega.internalField();
+        scalarField& pf = omega.primitiveFieldRef();
 
-        internalField =
-            (1 - mask)*internalField + mask*epsilonBL/(Cmu*kBL + SMALL);
+        pf = (1 - mask)*pf + mask*epsilonBL/(Cmu*kBL + SMALL);
         omega.max(SMALL);
 
         // Do not correct BC
diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
index 0adeb49b720..0405a10aa11 100644
--- a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
+++ b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
@@ -52,7 +52,7 @@ volScalarField y
     dimensionedScalar("zero", dimLength, 0.0),
     zeroGradientFvPatchScalarField::typeName
 );
-y.internalField() = wallDist::New(mesh).y().internalField();
+y.primitiveFieldRef() = wallDist::New(mesh).y().primitiveField();
 y.correctBoundaryConditions();
 
 
diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
index 0d74d0b44ca..eb114a81003 100644
--- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
+++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options
@@ -1,8 +1,8 @@
 EXE_INC = \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude \
-    -I$(LIB_SRC)/postProcessing/functionObjects/jobControl/lnInclude
+    -I$(LIB_SRC)/functionObjects/field/lnInclude
 
 EXE_LIBS = \
     -lfiniteVolume \
-    -ljobControl
+    -lfieldFunctionObjects
diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C
index 1de5e50eb55..a7a26573dc8 100644
--- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C
+++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometry.C
@@ -56,12 +56,12 @@ Note:
     used for face addressing starts at index 0.
 
 See also
-    externalCoupledFunctionObject
+    functionObjects::externalCoupled
 
 \*---------------------------------------------------------------------------*/
 
 #include "fvCFD.H"
-#include "externalCoupledFunctionObject.H"
+#include "externalCoupled.H"
 #include "IOobjectList.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
     }
 
 
-    externalCoupledFunctionObject::writeGeometry
+    functionObjects::externalCoupled::writeGeometry
     (
         UPtrList<const fvMesh>(meshes),
         commsDir,
diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
index a8e20b188f6..ff91e32e15d 100644
--- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
+++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
@@ -786,6 +786,8 @@ int main(int argc, char *argv[])
         );
 
         label compactI = 0;
+
+        volScalarField::Boundary& vfbf = viewFactorField.boundaryFieldRef();
         forAll(viewFactorsPatches, i)
         {
             label patchID = viewFactorsPatches[i];
@@ -805,7 +807,7 @@ int main(int argc, char *argv[])
                     forAll(fineFaces, fineId)
                     {
                         const label faceID = fineFaces[fineId];
-                        viewFactorField.boundaryField()[patchID][faceID] = Fij;
+                        vfbf[patchID][faceID] = Fij;
                     }
                     compactI++;
                 }
diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
index 697b1a4334f..bbe1c8c7c28 100644
--- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C
+++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
@@ -230,7 +230,7 @@ void writeParts
     {
         boolList includeMap(surf.size(), false);
 
-        forAll(faceZone, faceI)
+        forAll(faceZone, facei)
         {
             if (faceZone[facei] == zone)
             {
@@ -651,7 +651,7 @@ int main(int argc, char *argv[])
                 {
                     Info<< "    close unconnected points "
                         << pti << ' ' << localPoints[pti]
-                        << " and " << prevPtI << ' '
+                        << " and " << prevPti << ' '
                         << localPoints[prevPti]
                         << " distance:"
                         << mag(localPoints[pti] - localPoints[prevPti])
@@ -660,8 +660,8 @@ int main(int argc, char *argv[])
                 else
                 {
                     Info<< "    small edge between points "
-                        << ptI << ' ' << localPoints[pti]
-                        << " and " << prevPtI << ' '
+                        << pti << ' ' << localPoints[pti]
+                        << " and " << prevPti << ' '
                         << localPoints[prevPti]
                         << " distance:"
                         << mag(localPoints[pti] - localPoints[prevPti])
@@ -837,7 +837,7 @@ int main(int argc, char *argv[])
 
         label nInt = 0;
 
-        forAll(surf.edges(), edgeI)
+        forAll(surf.edges(), edgei)
         {
             const edge& e = surf.edges()[edgei];
 
diff --git a/doc/Doxygen/Doxyfile b/doc/Doxygen/Doxyfile
index 756e7879d73..771dc8f14b1 100644
--- a/doc/Doxygen/Doxyfile
+++ b/doc/Doxygen/Doxyfile
@@ -44,14 +44,14 @@ PROJECT_NUMBER         = $(WM_PROJECT_VERSION)
 # for a project that appears at the top of each page and should give viewer a
 # quick idea about the purpose of the project. Keep the description short.
 
-PROJECT_BRIEF          = "The OpenFOAM Foundation"
+PROJECT_BRIEF          = "The open source CFD toolbox"
 
 # With the PROJECT_LOGO tag one can specify a logo or an icon that is included
 # in the documentation. The maximum height of the logo should not exceed 55
 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
 # the logo to the output directory.
 
-PROJECT_LOGO           = CFDFoundation55x55.png
+PROJECT_LOGO           = OpenFOAM-logo2-55x55.png
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
 # into which the generated documentation will be written. If a relative path is
@@ -168,7 +168,8 @@ STRIP_FROM_INC_PATH    =
 # support long names like on DOS, Mac, or CD-ROM.
 # The default value is: NO.
 
-SHORT_NAMES            = YES
+#SHORT_NAMES            = YES
+SHORT_NAMES            = NO
 
 # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
 # first line (until the first dot) of a Javadoc-style comment as the brief
@@ -1128,7 +1129,7 @@ HTML_EXTRA_FILES       =
 # Minimum value: 0, maximum value: 359, default value: 220.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_COLORSTYLE_HUE    = 120
+HTML_COLORSTYLE_HUE    = 220
 
 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
 # in the HTML output. For a value of 0 the output will use grayscales only. A
@@ -1426,7 +1427,7 @@ EXT_LINKS_IN_WINDOW    = NO
 # Minimum value: 8, maximum value: 50, default value: 10.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-FORMULA_FONTSIZE       = 12
+FORMULA_FONTSIZE       = 14
 
 # Use the FORMULA_TRANPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are not
diff --git a/doc/Doxygen/footer.html b/doc/Doxygen/footer.html
index 3d5b2080eb4..649b906855b 100644
--- a/doc/Doxygen/footer.html
+++ b/doc/Doxygen/footer.html
@@ -11,11 +11,27 @@
 </div>
 <!--END GENERATE_TREEVIEW-->
 <!--BEGIN !GENERATE_TREEVIEW-->
-<hr class="footer"/><address class="footer"><small>
-$generatedby &#160;<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
-</a> $doxygenversion
-</small></address>
+<hr class="footer"/>
+  <address class="footer">
+    <small>
+      <p>
+        Copyright&nbsp;&copy;&nbsp;2011-2016&nbsp;
+        <a href="http://www.openfoam.com">OpenFOAM</a>
+        |
+        OPENFOAM&reg; is a registered
+        <a href="http://www.openfoam.com/legal/trademark-policy.php">trademark
+        </a> of OpenCFD Ltd.
+      </p>
+      <p>
+        $generatedby &#160;<a href="http://www.doxygen.org/index.html">
+        <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
+        </a> $doxygenversion
+      </p>
+    </small>
+  </address>
 <!--END !GENERATE_TREEVIEW-->
+<!-- BEGIN MATHJAX-->
+$mathjax
+<!-- END MATHJAX-->
 </body>
 </html>
diff --git a/doc/Doxygen/header.html b/doc/Doxygen/header.html
index 39bf5107366..21e67ad0c0f 100644
--- a/doc/Doxygen/header.html
+++ b/doc/Doxygen/header.html
@@ -32,7 +32,7 @@ $extrastylesheet
    <div id="projectname"><a href="http://openfoam.com">$projectname</a>
    <!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber"><a href="http://openfoam.com/download/source">$projectnumber</a></span><!--END PROJECT_NUMBER-->
    </div>
-   <!--BEGIN PROJECT_BRIEF--><div id="projectbrief"><a href="http://openfoam.com/dev">$projectbrief</a></div><!--END PROJECT_BRIEF-->
+   <!--BEGIN PROJECT_BRIEF--><div id="projectbrief"><a href="https://develop.openfoam.com">$projectbrief</a></div><!--END PROJECT_BRIEF-->
   </td>
   <!--END PROJECT_NAME-->
   <!--BEGIN !PROJECT_NAME-->
diff --git a/src/Allwmake b/src/Allwmake
index 9b51b154319..511c735a7e5 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -47,11 +47,7 @@ wmake $targetType lagrangian/basic
 wmake $targetType lagrangian/distributionModels
 wmake $targetType genericPatchFields
 
-<<<<<<< HEAD
 conversion/Allwmake $targetType $*
-=======
-wmake $targetType conversion
->>>>>>> foundation-github
 wmake $targetType mesh/extrudeModel
 wmake $targetType dynamicMesh
 wmake $targetType sampling
diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C
index 7fe606a23cc..5ddb36617b4 100644
--- a/src/OpenFOAM/db/Time/Time.C
+++ b/src/OpenFOAM/db/Time/Time.C
@@ -1316,8 +1316,6 @@ Foam::Time& Foam::Time::operator++()
                 }
             }
         }
-
-        functionObjects_.timeSet();
     }
 
     return *this;
diff --git a/src/OpenFOAM/db/error/messageStream.H b/src/OpenFOAM/db/error/messageStream.H
index 54ef0fe664b..a86b7954c84 100644
--- a/src/OpenFOAM/db/error/messageStream.H
+++ b/src/OpenFOAM/db/error/messageStream.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -281,6 +281,15 @@ extern messageStream Info;
 //  for FUNCTION_NAME in file __FILE__ at line __LINE__
 #define InfoInFunction InfoIn(FUNCTION_NAME)
 
+//- Report an information message using Foam::Pout
+//  for functionName in file __FILE__ at line __LINE__
+#define PoutIn(functionName)                                                   \
+    ::Foam::Pout((functionName), __FILE__, __LINE__)
+
+//- Report an information message using Foam::Pout
+//  for FUNCTION_NAME in file __FILE__ at line __LINE__
+#define PoutInFunction PoutIn(FUNCTION_NAME)
+
 //- Report write to Foam::Info if the local log switch is true
 #define Log                                                                    \
     if (log) Info
@@ -309,6 +318,17 @@ extern messageStream Info;
 #define DebugInFunction                                                        \
     if (debug) InfoInFunction
 
+//- Report an information message using Foam::Pout
+//  if the local debug switch is true
+#define DebugPout                                                              \
+    if (debug) Pout
+
+//- Report an information message using Foam::Pout
+//  for FUNCTION_NAME in file __FILE__ at line __LINE__
+//  if the local debug switch is true
+#define DebugPoutInFunction                                                        \
+    if (debug) PoutInFunction
+
 //- Report a variable name and value
 //  using Foam::Pout in file __FILE__ at line __LINE__
 #define DebugVar(var)                                                          \
diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C
deleted file mode 100644
index a84db356570..00000000000
--- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C
+++ /dev/null
@@ -1,147 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "IOOutputFilter.H"
-#include "Time.H"
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-template<class OutputFilter>
-Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
-(
-    const word& outputFilterName,
-    const IOobject& ioDict,
-    const bool readFromFiles
-)
-:
-    IOdictionary(ioDict),
-    OutputFilter(outputFilterName, ioDict.db(), *this, readFromFiles)
-{}
-
-
-template<class OutputFilter>
-Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
-(
-    const word& outputFilterName,
-    const objectRegistry& obr,
-    const word& dictName,
-    const IOobject::readOption rOpt,
-    const bool readFromFiles
-)
-:
-    IOdictionary
-    (
-        IOobject
-        (
-            dictName,
-            obr.time().system(),
-            obr,
-            rOpt,
-            IOobject::NO_WRITE
-        )
-    ),
-    OutputFilter(outputFilterName, obr, *this, readFromFiles)
-{}
-
-
-template<class OutputFilter>
-Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
-(
-    const word& outputFilterName,
-    const objectRegistry& obr,
-    const fileName& dictName,
-    const IOobject::readOption rOpt,
-    const bool readFromFiles
-)
-:
-    IOdictionary
-    (
-        IOobject
-        (
-            dictName,
-            obr,
-            rOpt,
-            IOobject::NO_WRITE
-        )
-    ),
-    OutputFilter(outputFilterName, obr, *this, readFromFiles)
-{}
-
-
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-template<class OutputFilter>
-Foam::IOOutputFilter<OutputFilter>::~IOOutputFilter()
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-template<class OutputFilter>
-const Foam::word& Foam::IOOutputFilter<OutputFilter>::name() const
-{
-    return IOdictionary::name();
-}
-
-
-template<class OutputFilter>
-bool Foam::IOOutputFilter<OutputFilter>::read()
-{
-    if (regIOobject::read())
-    {
-        OutputFilter::read(*this);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-
-template<class OutputFilter>
-bool Foam::IOOutputFilter<OutputFilter>::write()
-{
-    return OutputFilter::write();
-}
-
-
-template<class OutputFilter>
-void Foam::IOOutputFilter<OutputFilter>::updateMesh(const mapPolyMesh& mpm)
-{
-    read();
-    OutputFilter::updateMesh(mpm);
-}
-
-
-template<class OutputFilter>
-void Foam::IOOutputFilter<OutputFilter>::movePoints(const polyMesh& mesh)
-{
-    read();
-    OutputFilter::movePoints(mesh);
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
deleted file mode 100644
index 17e81c67241..00000000000
--- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
+++ /dev/null
@@ -1,153 +0,0 @@
-/*---------------------------------------------------------------------------* \
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::IOOutputFilter
-
-Description
-    IOdictionary wrapper around OutputFilter to allow them to read from
-    their associated dictionaries.
-
-Note
-    The IOobject or the objectRegistry will normally have to be
-    derived from a fvMesh for a subsequent cast (within OutputFilter)
-    to work correctly.
-
-SourceFiles
-    IOOutputFilter.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOOutputFilter_H
-#define IOOutputFilter_H
-
-#include "IOdictionary.H"
-#include "pointFieldFwd.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// Forward declaration of classes
-class mapPolyMesh;
-
-/*---------------------------------------------------------------------------*\
-                       Class IOOutputFilter Declaration
-\*---------------------------------------------------------------------------*/
-
-template<class OutputFilter>
-class IOOutputFilter
-:
-    public IOdictionary,
-    public OutputFilter
-{
-    // Private Member Functions
-
-        // Disallow default bitwise copy construct and assignment
-        IOOutputFilter(const IOOutputFilter&);
-        void operator=(const IOOutputFilter&);
-
-
-public:
-
-    // Constructors
-
-        //- Construct from an IOobject for IOdictionary
-        //  Allow the possibility to load fields from files
-        IOOutputFilter
-        (
-            const word& outputFilterName,
-            const IOobject& ioDict,
-            const bool loadFromFile = false
-        );
-
-        //- Construct for given objectRegistry and dictionary
-        //  Allow dictionary to be optional
-        //  Allow the possibility to load fields from files
-        IOOutputFilter
-        (
-            const word& outputFilterName,
-            const objectRegistry&,
-            const word& dictName = OutputFilter::typeName() + "Dict",
-            const IOobject::readOption rOpt = IOobject::MUST_READ_IF_MODIFIED,
-            const bool loadFromFile = false
-        );
-
-        //- Construct for given objectRegistry and dictionary
-        //  Dictionary read from full path.
-        //  Allow the possibility to load fields from files
-        IOOutputFilter
-        (
-            const word& outputFilterName,
-            const objectRegistry&,
-            const fileName& dictName,
-            const IOobject::readOption rOpt = IOobject::MUST_READ_IF_MODIFIED,
-            const bool loadFromFile = false
-        );
-
-
-    //- Destructor
-    virtual ~IOOutputFilter();
-
-
-    // Member Functions
-
-        //- Return name
-        virtual const word& name() const;
-
-        //- Inherit read from OutputFilter
-        using OutputFilter::read;
-
-        //- Read output filter properties
-        virtual bool read();
-
-        //- Inherit write from regIOobject
-        using regIOobject::write;
-
-        //- Sample and write
-        virtual bool write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh& mpm);
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh& mesh);
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#ifdef NoRepository
-    #include "IOOutputFilter.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
index b54d71ef49b..c2c8309b458 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
+++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
@@ -520,11 +520,6 @@ bool Foam::functionObjectList::execute()
 
     if (execution_)
     {
-        if (forceWrite)
-        {
-            resetState();
-        }
-
         if (!updated_)
         {
             read();
@@ -532,21 +527,18 @@ bool Foam::functionObjectList::execute()
 
         forAll(*this, objectI)
         {
-            addProfiling
-            (
-                fo,
-                "functionObject::" + operator[](objectI).name() + "::execute"
-            );
+            const word& objName = operator[](objectI).name();
+            {
+                addProfiling(fo, "functionObject::" + objName + "::execute");
 
-            ok = operator[](objectI).execute() && ok;
+                ok = operator[](objectI).execute() && ok;
+            }
 
-            addProfiling
-            (
-                fo,
-                "functionObject::" + operator[](objectI).name() + "::write"
-            );
+            {
+                addProfiling(fo, "functionObject::" + objName + "::write");
 
-            ok = operator[](objectI).write() && ok;
+                ok = operator[](objectI).write() && ok;
+            }
         }
     }
 
@@ -583,11 +575,9 @@ bool Foam::functionObjectList::end()
 
         forAll(*this, objectI)
         {
-            addProfiling
-            (
-                fo,
-                "functionObject::" + operator[](objectI).name() + "::end"
-            );
+            const word& objName = operator[](objectI).name();
+
+            addProfiling(fo, "functionObject::" + objName + "::end");
 
             ok = operator[](objectI).end() && ok;
         }
@@ -610,12 +600,9 @@ bool Foam::functionObjectList::adjustTimeStep()
 
         forAll(*this, objectI)
         {
-            addProfiling
-            (
-                fo,
-                "functionObject::" + operator[](objectI).name()
-             + "::adjustTimeStep"
-            );
+            const word& objName = operator[](objectI).name();
+
+            addProfiling(fo, "functionObject::" + objName + "::adjustTimeStep");
 
             ok = operator[](objectI).adjustTimeStep() && ok;
         }
diff --git a/src/OpenFOAM/db/functionObjects/logFiles/logFiles.C b/src/OpenFOAM/db/functionObjects/logFiles/logFiles.C
index cd188da14cb..7e4f7a5effe 100644
--- a/src/OpenFOAM/db/functionObjects/logFiles/logFiles.C
+++ b/src/OpenFOAM/db/functionObjects/logFiles/logFiles.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -40,7 +40,7 @@ void Foam::functionObjects::logFiles::createFiles()
         {
             if (!filePtrs_.set(i))
             {
-                filePtrs_.set(i, createFile(names_[i]);
+                filePtrs_.set(i, createFile(names_[i]));
 
                 initStream(filePtrs_[i]);
             }
@@ -67,7 +67,7 @@ void Foam::functionObjects::logFiles::resetName(const word& name)
     names_.clear();
     names_.append(name);
 
-    resetFile(name);
+    writeFile::resetFile(name);
 }
 
 
@@ -85,6 +85,21 @@ Foam::functionObjects::logFiles::logFiles
 {}
 
 
+Foam::functionObjects::logFiles::logFiles
+(
+    const objectRegistry& obr,
+    const word& prefix,
+    const dictionary& dict
+)
+:
+    writeFile(obr, prefix),
+    names_(),
+    filePtrs_()
+{
+    writeFile::read(dict);
+}
+
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::functionObjects::logFiles::~logFiles()
diff --git a/src/OpenFOAM/db/functionObjects/logFiles/logFiles.H b/src/OpenFOAM/db/functionObjects/logFiles/logFiles.H
index 0b88325d504..fb98e6425f4 100644
--- a/src/OpenFOAM/db/functionObjects/logFiles/logFiles.H
+++ b/src/OpenFOAM/db/functionObjects/logFiles/logFiles.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -41,7 +41,6 @@ SourceFiles
 #define functionObjects_logFiles_H
 
 #include "writeFile.H"
-#include "OFstream.H"
 #include "PtrList.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -82,9 +81,6 @@ protected:
         //- Reset the list of names to a single name entry
         virtual void resetName(const word& name);
 
-        //- File header information
-        virtual void writeFileHeader(const label i = 0) = 0;
-
 
 private:
 
@@ -109,6 +105,16 @@ public:
         );
 
 
+        //- Construct from objectRegistry and prefix, and read options
+        //  from dictionary
+        logFiles
+        (
+            const objectRegistry& obr,
+            const word& prefix,
+            const dictionary& dict
+        );
+
+
     //- Destructor
     virtual ~logFiles();
 
diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C
index c010855bcee..6fdfe07eb1d 100644
--- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C
+++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C
@@ -97,8 +97,7 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject
     const dictionary& dict
 )
 :
-    functionObject(name),
-    time_(runTime),
+    stateFunctionObject(name, runTime),
     obr_
     (
         runTime.lookupObject<objectRegistry>
@@ -116,8 +115,7 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject
     const dictionary& dict
 )
 :
-    functionObject(name),
-    time_(obr.time()),
+    stateFunctionObject(name, obr.time()),
     obr_(obr)
 {}
 
diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H
index a7872e47894..9af84c0f876 100644
--- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H
+++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -29,7 +29,7 @@ Description
     reference to the region Foam::objectRegistry.
 
 See also
-    Foam::functionObject
+    Foam::functionObjects::stateFunctionObject
 
 SourceFiles
     regionFunctionObject.C
@@ -39,7 +39,7 @@ SourceFiles
 #ifndef functionObjects_regionFunctionObject_H
 #define functionObjects_regionFunctionObject_H
 
-#include "functionObject.H"
+#include "stateFunctionObject.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -53,21 +53,18 @@ namespace functionObjects
 {
 
 /*---------------------------------------------------------------------------*\
-                     Class regionFunctionObject Declaration
+                    Class regionFunctionObject Declaration
 \*---------------------------------------------------------------------------*/
 
 class regionFunctionObject
 :
-    public functionObject
+    public stateFunctionObject
 {
 
 protected:
 
     // Protected member data
 
-        //- Reference to the Time
-        const Time& time_;
-
         //- Reference to the region objectRegistry
         const objectRegistry& obr_;
 
@@ -86,7 +83,7 @@ protected:
         template<class ObjectType>
         bool store
         (
-            word& fieldName,
+            const word& fieldName,
             const tmp<ObjectType>& tfield,
             bool cacheable = false
         );
diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObjectTemplates.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObjectTemplates.C
index 89223ebb736..76327e4d20a 100644
--- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObjectTemplates.C
+++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObjectTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -51,7 +51,7 @@ const ObjectType& Foam::functionObjects::regionFunctionObject::lookupObject
 template<class ObjectType>
 bool Foam::functionObjects::regionFunctionObject::store
 (
-    word& fieldName,
+    const word& fieldName,
     const tmp<ObjectType>& tfield,
     bool cacheable
 )
@@ -68,16 +68,9 @@ bool Foam::functionObjects::regionFunctionObject::store
         return false;
     }
 
-    if
-    (
-        fieldName.size()
-     && obr_.foundObject<ObjectType>(fieldName)
-    )
+    if (fieldName.size() && foundObject<ObjectType>(fieldName))
     {
-        const ObjectType& field =
-        (
-            obr_.lookupObject<ObjectType>(fieldName)
-        );
+        const ObjectType& field = lookupObject<ObjectType>(fieldName);
 
         // If there is a result field already registered assign to the new
         // result field otherwise transfer ownership of the new result field to
@@ -97,10 +90,6 @@ bool Foam::functionObjects::regionFunctionObject::store
         {
             tfield.ref().rename(fieldName);
         }
-        else
-        {
-            fieldName = tfield().name();
-        }
 
         obr_.objectRegistry::store(tfield.ptr());
     }
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C
similarity index 68%
rename from src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C
rename to src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C
index 3dc191cefe7..2a24995c343 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C
+++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C
@@ -23,79 +23,71 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "functionObjectState.H"
+#include "stateFunctionObject.H"
 #include "Time.H"
 
-const Foam::word Foam::functionObjectState::resultsName_ = "results";
+const Foam::word Foam::functionObjects::stateFunctionObject::resultsName_ =
+    "results";
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-const Foam::IOdictionary& Foam::functionObjectState::stateDict() const
+const Foam::IOdictionary&
+Foam::functionObjects::stateFunctionObject::stateDict() const
 {
-    return obr_.time().functionObjects().stateDict();
+    return time_.functionObjects().stateDict();
 }
 
 
-Foam::IOdictionary& Foam::functionObjectState::stateDict()
+Foam::IOdictionary& Foam::functionObjects::stateFunctionObject::stateDict()
 {
-    return const_cast<IOdictionary&>(obr_.time().functionObjects().stateDict());
+    return const_cast<IOdictionary&>(time_.functionObjects().stateDict());
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::functionObjectState::functionObjectState
+Foam::functionObjects::stateFunctionObject::stateFunctionObject
 (
-    const objectRegistry& obr,
-    const word& name
+    const word& name,
+    const Time& runTime
 )
 :
-    obr_(obr),
-    name_(name),
-    active_(true)
+    functionObject(name),
+    time_(runTime)
 {}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::functionObjectState::~functionObjectState()
+Foam::functionObjects::stateFunctionObject::~stateFunctionObject()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-const Foam::word& Foam::functionObjectState::name() const
-{
-    return name_;
-}
-
-
-bool Foam::functionObjectState::active() const
-{
-    return active_;
-}
-
-
-Foam::dictionary& Foam::functionObjectState::propertyDict()
+Foam::dictionary& Foam::functionObjects::stateFunctionObject::propertyDict()
 {
     IOdictionary& stateDict = this->stateDict();
 
-    if (!stateDict.found(name_))
+    if (!stateDict.found(name()))
     {
-        stateDict.add(name_, dictionary());
+        stateDict.add(name(), dictionary());
     }
 
-    return stateDict.subDict(name_);
+    return stateDict.subDict(name());
 }
 
 
-bool Foam::functionObjectState::foundProperty(const word& entryName) const
+bool Foam::functionObjects::stateFunctionObject::foundProperty
+(
+    const word& entryName
+) const
 {
     const IOdictionary& stateDict = this->stateDict();
 
-    if (stateDict.found(name_))
+    if (stateDict.found(name()))
     {
-        const dictionary& baseDict = stateDict.subDict(name_);
+        const dictionary& baseDict = stateDict.subDict(name());
         return baseDict.found(entryName);
     }
 
@@ -103,13 +95,16 @@ bool Foam::functionObjectState::foundProperty(const word& entryName) const
 }
 
 
-Foam::word Foam::functionObjectState::resultType(const word& entryName) const
+Foam::word Foam::functionObjects::stateFunctionObject::resultType
+(
+    const word& entryName
+) const
 {
-    return objectResultType(name_, entryName);
+    return objectResultType(name(), entryName);
 }
 
 
-Foam::word Foam::functionObjectState::objectResultType
+Foam::word Foam::functionObjects::stateFunctionObject::objectResultType
 (
     const word& objectName,
     const word& entryName
@@ -142,13 +137,15 @@ Foam::word Foam::functionObjectState::objectResultType
 }
 
 
-Foam::List<Foam::word> Foam::functionObjectState::objectResultEntries() const
+Foam::List<Foam::word>
+Foam::functionObjects::stateFunctionObject::objectResultEntries() const
 {
-    return objectResultEntries(name_);
+    return objectResultEntries(name());
 }
 
 
-Foam::List<Foam::word> Foam::functionObjectState::objectResultEntries
+Foam::List<Foam::word> Foam::functionObjects::stateFunctionObject::
+objectResultEntries
 (
     const word& objectName
 ) const
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H
similarity index 85%
rename from src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H
rename to src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H
index f17b051affd..20a5c669194 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H
+++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.H
@@ -29,60 +29,67 @@ Description
     information (data required for smooth restart behaviour) and results
     to/from the state dictionary
 
-See Also
+    Note: cannot access the state dictionary until after construction of the
+    function objects, since the owner container functionObjectList is owned
+    by time, and time owns the state dictionary.  I.e. need to wait for time
+    to be fully consttucted.
+
+See also
     Foam::functionObject
 
 SourceFiles
-    functionObjectState.C
+    stateFunctionObject.C
+    stateFunctionObjectTemplates.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef functionObjectState_H
-#define functionObjectState_H
+#ifndef functionObjects_stateFunctionObject_H
+#define functionObjects_stateFunctionObject_H
 
-#include "objectRegistry.H"
-#include "IOdictionary.H"
+#include "functionObject.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
+class IOdictionary;
+
+namespace functionObjects
+{
+
 /*---------------------------------------------------------------------------*\
-                     Class functionObjectState Declaration
+                     Class stateFunctionObject Declaration
 \*---------------------------------------------------------------------------*/
 
-class functionObjectState
+class stateFunctionObject
+:
+    public functionObject
 {
+
 private:
 
-    // Private data
+    // Private member data
 
         //- Name of the results dictionary
         static const word resultsName_;
 
-        //- Reference to the database
-        const objectRegistry& obr_;
-
 
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        functionObjectState(const functionObjectState&);
+        stateFunctionObject(const stateFunctionObject&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const functionObjectState&);
+        void operator=(const stateFunctionObject&) = delete;
 
 
 protected:
 
-    // Protected data
-
-        //- Name of model
-        const word name_;
+    // Protected Member Data
 
-        //- Flag to indicate whether the object is active
-        bool active_;
+        //- Reference to the time database
+        const Time& time_;
 
 
     // Protacted Member Functions
@@ -100,29 +107,18 @@ public:
     // Constructors
 
         //- Construct from components
-        functionObjectState(const objectRegistry& obr, const word& name);
+        stateFunctionObject(const word& name, const Time& runTime);
 
 
     //- Destructor
-    virtual ~functionObjectState();
+    ~stateFunctionObject();
 
 
     // Member Functions
 
-        //- Return the name
-        const word& name() const;
-
-        //- Return the active flag
-        bool active() const;
-
         //- Return access to the property dictionary
         dictionary& propertyDict();
 
-        //- Set the active status by querying objectRegistry type
-        //  returns new active status
-        template<class Type>
-        bool setActive();
-
 
         // Properties
 
@@ -238,12 +234,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-    #include "functionObjectStateTemplates.C"
+    #include "stateFunctionObjectTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObjectTemplates.C
similarity index 80%
rename from src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C
rename to src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObjectTemplates.C
index ef791f3547b..35184d3ecab 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C
+++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObjectTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -23,28 +23,12 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-template<class Type>
-bool Foam::functionObjectState::setActive()
-{
-    active_ = true;
-
-    if (!isA<Type>(obr_))
-    {
-        WarningInFunction
-            << "No " << Type::typeName << " available, deactivating " << name_
-            << endl;
-
-        active_ = false;
-    }
-
-    return active_;
-}
+#include "IOdictionary.H"
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Type Foam::functionObjectState::getProperty
+Type Foam::functionObjects::stateFunctionObject::getProperty
 (
     const word& entryName,
     const Type& defaultValue
@@ -57,29 +41,29 @@ Type Foam::functionObjectState::getProperty
 
 
 template<class Type>
-void Foam::functionObjectState::getProperty
+void Foam::functionObjects::stateFunctionObject::getProperty
 (
     const word& entryName,
     Type& value
 ) const
 {
-    getObjectProperty(name_, entryName, value);
+    getObjectProperty(name(), entryName, value);
 }
 
 
 template<class Type>
-void Foam::functionObjectState::setProperty
+void Foam::functionObjects::stateFunctionObject::setProperty
 (
     const word& entryName,
     const Type& value
 )
 {
-    setObjectProperty(name_, entryName, value);
+    setObjectProperty(name(), entryName, value);
 }
 
 
 template<class Type>
-Type Foam::functionObjectState::getObjectProperty
+Type Foam::functionObjects::stateFunctionObject::getObjectProperty
 (
     const word& objectName,
     const word& entryName,
@@ -93,7 +77,7 @@ Type Foam::functionObjectState::getObjectProperty
 
 
 template<class Type>
-void Foam::functionObjectState::getObjectProperty
+void Foam::functionObjects::stateFunctionObject::getObjectProperty
 (
     const word& objectName,
     const word& entryName,
@@ -121,7 +105,7 @@ void Foam::functionObjectState::getObjectProperty
 
 
 template<class Type>
-void Foam::functionObjectState::setObjectProperty
+void Foam::functionObjects::stateFunctionObject::setObjectProperty
 (
     const word& objectName,
     const word& entryName,
@@ -141,18 +125,18 @@ void Foam::functionObjectState::setObjectProperty
 
 
 template<class Type>
-void Foam::functionObjectState::setResult
+void Foam::functionObjects::stateFunctionObject::setResult
 (
     const word& entryName,
     const Type& value
 )
 {
-    setObjectResult(name_, entryName, value);
+    setObjectResult(name(), entryName, value);
 }
 
 
 template<class Type>
-void Foam::functionObjectState::setObjectResult
+void Foam::functionObjects::stateFunctionObject::setObjectResult
 (
     const word& objectName,
     const word& entryName,
@@ -170,7 +154,7 @@ void Foam::functionObjectState::setObjectResult
 
     if (!resultsDict.found(objectName))
     {
-        resultsDict.add(name_, dictionary());
+        resultsDict.add(name(), dictionary());
     }
 
     dictionary& objectDict = resultsDict.subDict(objectName);
@@ -189,18 +173,18 @@ void Foam::functionObjectState::setObjectResult
 
 
 template<class Type>
-Type Foam::functionObjectState::getResult
+Type Foam::functionObjects::stateFunctionObject::getResult
 (
     const word& entryName,
     const Type& defaultValue
 ) const
 {
-    return getObjectResult(name_, entryName, defaultValue);
+    return getObjectResult(name(), entryName, defaultValue);
 }
 
 
 template<class Type>
-Type Foam::functionObjectState::getObjectResult
+Type Foam::functionObjects::stateFunctionObject::getObjectResult
 (
     const word& objectName,
     const word& entryName,
@@ -214,7 +198,7 @@ Type Foam::functionObjectState::getObjectResult
 
 
 template<class Type>
-void Foam::functionObjectState::getObjectResult
+void Foam::functionObjects::stateFunctionObject::getObjectResult
 (
     const word& objectName,
     const word& entryName,
diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.H b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.H
index ffc76466294..c592b3d9ca1 100644
--- a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.H
+++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.H
@@ -60,6 +60,7 @@ public:
         ocAdjustableRunTime,  //!< Adjust time step for execution
         ocRunTime,            //!< run time for execution
         ocClockTime,          //!< clock time for execution
+        ocCpuTime,            //!< CPU time for execution
         ocOnEnd,              //!< on end of run
         ocNone                //!< no execution
     };
diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
index 88eae7cc2fe..f6fefcdab25 100644
--- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
+++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
@@ -93,7 +93,7 @@ Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile
     if (Pstream::master() && writeToFile_)
     {
         const word startTimeName =
-            obr_.time().timeName(obr_.time().startTime().value());
+            fileObr_.time().timeName(fileObr_.time().startTime().value());
 
         fileName outputDir(baseFileDir()/prefix_/startTimeName);
 
@@ -105,7 +105,7 @@ Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile
         IFstream is(outputDir/(fName + ".dat"));
         if (is.good())
         {
-            fName = fName + "_" + obr_.time().timeName();
+            fName = fName + "_" + fileObr_.time().timeName();
         }
 
         osPtr.set(new OFstream(outputDir/(fName + ".dat")));
diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H
index 117581fd89e..269504d9c9f 100644
--- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H
+++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.H
@@ -40,6 +40,7 @@ SourceFiles
 #define functionObjects_writeFile_H
 
 #include "objectRegistry.H"
+#include "OFstream.H"
 #include "IOmanip.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -129,7 +130,8 @@ public:
             const word& prefix
         );
 
-        //- Construct from components and read options from dictionary
+        //- Construct from objectRegistry and prefix, and read options
+        //  from dictionary
         writeFile
         (
             const objectRegistry& obr,
@@ -151,6 +153,12 @@ public:
         //- Return access to the file (if only 1)
         OFstream& file();
 
+        //- Flag to allow writing to file
+        bool writeToFile() const;
+
+        //- Return width of character stream output
+        label charWidth() const;
+
         //- Write a commented string to stream
         void writeCommented(Ostream& os, const string& str) const;
 
@@ -171,9 +179,6 @@ public:
             const string& property,
             const Type& value
         ) const;
-
-        //- Return width of character stream output
-        label charWidth() const;
 };
 
 
diff --git a/src/OpenFOAM/fields/ReadFields/ReadFields.C b/src/OpenFOAM/fields/ReadFields/ReadFields.C
index 5f3087caf4d..6f2fc52436a 100644
--- a/src/OpenFOAM/fields/ReadFields/ReadFields.C
+++ b/src/OpenFOAM/fields/ReadFields/ReadFields.C
@@ -84,149 +84,4 @@ Foam::wordList Foam::fieldNames
 }
 
 
-}
-
-
-template<class GeoFieldType>
-void Foam::readFields
-(
-    const typename GeoFieldType::Mesh& mesh,
-    const IOobjectList& objects,
-    const HashSet<word>& selectedFields,
-    LIFOStack<regIOobject*>& storedObjects
-)
-{
-    IOobjectList fields(objects.lookupClass(GeoFieldType::typeName));
-    if (!fields.size()) return;
-
-    bool firstField = true;
-
-    forAllConstIter(IOobjectList, fields, fieldIter)
-    {
-        const IOobject& io = *fieldIter();
-        const word& fieldName = io.name();
-
-        if (selectedFields.found(fieldName))
-        {
-            if (firstField)
-            {
-                Info<< "    " << GeoFieldType::typeName << "s:";
-                firstField = false;
-            }
-
-            Info<< " " << fieldName;
-
-            GeoFieldType* fieldPtr = new GeoFieldType
-            (
-                IOobject
-                (
-                    fieldName,
-                    io.instance(),
-                    io.local(),
-                    io.db(),
-                    IOobject::MUST_READ,
-                    IOobject::NO_WRITE
-                ),
-                mesh
-            );
-            fieldPtr->store();
-            storedObjects.push(fieldPtr);
-        }
-    }
-
-    if (!firstField)
-    {
-        Info<< endl;
-    }
-}
-
-
-template<class UniformFieldType>
-void Foam::readUniformFields
-(
-    const IOobjectList& objects,
-    const HashSet<word>& selectedFields,
-    LIFOStack<regIOobject*>& storedObjects,
-    const bool syncPar
-)
-{
-    // Search list of objects for wanted type
-    IOobjectList fields(objects.lookupClass(UniformFieldType::typeName));
-    if (!fields.size()) return;
-
-    wordList masterNames(fields.names());
-
-    if (syncPar && Pstream::parRun())
-    {
-        // Check that I have the same fields as the master
-        const wordList localNames(masterNames);
-        Pstream::scatter(masterNames);
-
-        HashSet<word> localNamesSet(localNames);
-
-        forAll(masterNames, i)
-        {
-            const word& masterFld = masterNames[i];
-
-            HashSet<word>::iterator iter = localNamesSet.find(masterFld);
-
-            if (iter == localNamesSet.end())
-            {
-                FatalErrorInFunction
-                    << "Fields not synchronised across processors." << endl
-                    << "Master has fields " << masterNames
-                    << "  processor " << Pstream::myProcNo()
-                    << " has fields " << localNames << exit(FatalError);
-            }
-            else
-            {
-                localNamesSet.erase(iter);
-            }
-        }
-
-        forAllConstIter(HashSet<word>, localNamesSet, iter)
-        {
-            FatalErrorInFunction
-                << "Fields not synchronised across processors." << endl
-                << "Master has fields " << masterNames
-                << "  processor " << Pstream::myProcNo()
-                << " has fields " << localNames << exit(FatalError);
-        }
-    }
-
-    bool firstField = true;
-
-    forAll(masterNames, i)
-    {
-        const IOobject& io = *fields[masterNames[i]];
-        const word& fieldName = io.name();
-
-        if (selectedFields.found(fieldName))
-        {
-            if (firstField)
-            {
-                Info<< "    " << UniformFieldType::typeName << "s:";
-                firstField = false;
-            }
-
-            Info<< " " << fieldName;
-
-            UniformFieldType* fieldPtr = new UniformFieldType
-            (
-                IOobject
-                (
-                    fieldName,
-                    io.instance(),
-                    io.local(),
-                    io.db(),
-                    IOobject::MUST_READ,
-                    IOobject::NO_WRITE
-                )
-            );
-            fieldPtr->store();
-            storedObjects.push(fieldPtr);
-        }
-    }
-
-    Info<< endl;
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C b/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
index 5642213d43c..fcc6c071a63 100644
--- a/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
+++ b/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
@@ -311,4 +311,149 @@ void Foam::ReadFields
 }
 
 
+template<class GeoFieldType>
+void Foam::readFields
+(
+    const typename GeoFieldType::Mesh& mesh,
+    const IOobjectList& objects,
+    const HashSet<word>& selectedFields,
+    LIFOStack<regIOobject*>& storedObjects
+)
+{
+    IOobjectList fields(objects.lookupClass(GeoFieldType::typeName));
+    if (!fields.size()) return;
+
+    bool firstField = true;
+
+    forAllConstIter(IOobjectList, fields, fieldIter)
+    {
+        const IOobject& io = *fieldIter();
+        const word& fieldName = io.name();
+
+        if (selectedFields.found(fieldName))
+        {
+            if (firstField)
+            {
+                Info<< "    " << GeoFieldType::typeName << "s:";
+                firstField = false;
+            }
+
+            Info<< " " << fieldName;
+
+            GeoFieldType* fieldPtr = new GeoFieldType
+            (
+                IOobject
+                (
+                    fieldName,
+                    io.instance(),
+                    io.local(),
+                    io.db(),
+                    IOobject::MUST_READ,
+                    IOobject::NO_WRITE
+                ),
+                mesh
+            );
+            fieldPtr->store();
+            storedObjects.push(fieldPtr);
+        }
+    }
+
+    if (!firstField)
+    {
+        Info<< endl;
+    }
+}
+
+
+template<class UniformFieldType>
+void Foam::readUniformFields
+(
+    const IOobjectList& objects,
+    const HashSet<word>& selectedFields,
+    LIFOStack<regIOobject*>& storedObjects,
+    const bool syncPar
+)
+{
+    // Search list of objects for wanted type
+    IOobjectList fields(objects.lookupClass(UniformFieldType::typeName));
+    if (!fields.size()) return;
+
+    wordList masterNames(fields.names());
+
+    if (syncPar && Pstream::parRun())
+    {
+        // Check that I have the same fields as the master
+        const wordList localNames(masterNames);
+        Pstream::scatter(masterNames);
+
+        HashSet<word> localNamesSet(localNames);
+
+        forAll(masterNames, i)
+        {
+            const word& masterFld = masterNames[i];
+
+            HashSet<word>::iterator iter = localNamesSet.find(masterFld);
+
+            if (iter == localNamesSet.end())
+            {
+                FatalErrorInFunction
+                    << "Fields not synchronised across processors." << endl
+                    << "Master has fields " << masterNames
+                    << "  processor " << Pstream::myProcNo()
+                    << " has fields " << localNames << exit(FatalError);
+            }
+            else
+            {
+                localNamesSet.erase(iter);
+            }
+        }
+
+        forAllConstIter(HashSet<word>, localNamesSet, iter)
+        {
+            FatalErrorInFunction
+                << "Fields not synchronised across processors." << endl
+                << "Master has fields " << masterNames
+                << "  processor " << Pstream::myProcNo()
+                << " has fields " << localNames << exit(FatalError);
+        }
+    }
+
+    bool firstField = true;
+
+    forAll(masterNames, i)
+    {
+        const IOobject& io = *fields[masterNames[i]];
+        const word& fieldName = io.name();
+
+        if (selectedFields.found(fieldName))
+        {
+            if (firstField)
+            {
+                Info<< "    " << UniformFieldType::typeName << "s:";
+                firstField = false;
+            }
+
+            Info<< " " << fieldName;
+
+            UniformFieldType* fieldPtr = new UniformFieldType
+            (
+                IOobject
+                (
+                    fieldName,
+                    io.instance(),
+                    io.local(),
+                    io.db(),
+                    IOobject::MUST_READ,
+                    IOobject::NO_WRITE
+                )
+            );
+            fieldPtr->store();
+            storedObjects.push(fieldPtr);
+        }
+    }
+
+    Info<< endl;
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
index e5778669c05..4f3133a0385 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
@@ -32,7 +32,7 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// In case of no transform: copy elements
+template<class T>
 void Foam::mapDistribute::applyDummyTransforms(List<T>& field) const
 {
     forAll(transformElements_, trafoI)
diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
index 53e54c51945..aa619792c3a 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
@@ -1120,9 +1120,9 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const
 
     forAll(patches, patchi)
     {
-        os  << indent << patches[patchi].name() << nl
+        os.beginBlock(patches[patchi].name()) << nl;
         os  << patches[patchi];
-            << incrIndent << patches[patchi] << decrIndent
+        os.endBlock() << endl;
     }
 
     os  << decrIndent << token::END_LIST;
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
index 2b43089fb4c..1c2dbe2bfd9 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
@@ -91,6 +91,7 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
                     newMotionPoints[newPointi] = points_[newPointi];
                 }
             }
+        }
         else
         {
             const labelList& pointMap = mpm.pointMap();
@@ -103,7 +104,7 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
                 {
                     if (revPointMap[oldPointi] == newPointi) // master point
                     {
-                        newMotionPoints[newPoint] = oldMotionPoints[oldPointi];
+                        newMotionPoints[newPointi] = oldMotionPoints[oldPointi];
                     }
                     else
                     {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
index e382c05e3b0..546702bb54e 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
@@ -126,8 +126,8 @@ Foam::polyPatch::polyPatch
     ),
     start_(start),
     boundaryMesh_(bm),
-    faceCellsPtr_(NULL),
-    mePtr_(NULL)
+    faceCellsPtr_(nullptr),
+    mePtr_(nullptr)
 {}
 
 
diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
index 9e07547b39f..6ca563af916 100644
--- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
+++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
@@ -45,7 +45,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-               Class CompressibleTurbulenceModel Declaration
+                 Class CompressibleTurbulenceModel Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class TransportModel>
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
index 2c68c80bf21..bf6be9f3b5d 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -147,8 +147,8 @@ externalWallHeatFluxTemperatureFvPatchScalarField
                     << "\n number of layers for thicknessLayers and "
                     << "kappaLayers must be the same"
                     << "\n for patch " << p.name()
-                    << " of field " << dimensionedInternalField().name()
-                    << " in file " << dimensionedInternalField().objectPath()
+                    << " of field " << internalField().name()
+                    << " in file " << internalField().objectPath()
                     << exit(FatalIOError);
             }
         }
@@ -331,7 +331,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
 
         Info<< patch().boundaryMesh().mesh().name() << ':'
             << patch().name() << ':'
-            << this->internalField().name() << " :"
+            << internalField().name() << " :"
             << " heat transfer rate:" << Q
             << " wall temperature "
             << " min:" << gMin(*this)
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
index 9b15197851a..0e36d26701a 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
@@ -117,8 +117,8 @@ public:
         //- Operation mode enumeration
         enum operationMode
         {
-            fixedHeatFlux,
-            fixedHeatTransferCoeff,
+            fixedHeatFlux,              //< Fixed heat flux
+            fixedHeatTransferCoeff,     //< Fixed heat transfer coefficient
             unknown
         };
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C
index ea5e4d8232c..5aee70ba33e 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C
@@ -114,8 +114,8 @@ fixedIncidentRadiationFvPatchScalarField
     QrIncident_(ptf.QrIncident_)
 {}
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void Foam::radiation::fixedIncidentRadiationFvPatchScalarField::autoMap
 (
@@ -159,15 +159,12 @@ void Foam::radiation::fixedIncidentRadiationFvPatchScalarField::updateCoeffs()
 
     scalarField emissivity
     (
-        radiation.absorptionEmission().e()().boundaryField()
-        [
-            patch().index()
-        ]
+        radiation.absorptionEmission().e()().boundaryField()[patch().index()]
     );
 
     gradient() =
-        emissivity*
-        (
+        emissivity
+       *(
             QrIncident_
           - physicoChemical::sigma.value()*pow4(*this)
         )/kappa(*this);
@@ -179,7 +176,7 @@ void Foam::radiation::fixedIncidentRadiationFvPatchScalarField::updateCoeffs()
         scalar Qr = gSum(kappa(*this)*gradient()*patch().magSf());
         Info<< patch().boundaryMesh().mesh().name() << ':'
             << patch().name() << ':'
-            << this->dimensionedInternalField().name() << " -> "
+            << this->internalField().name() << " -> "
             << " radiativeFlux:" << Qr
             << " walltemperature "
             << " min:" << gMin(*this)
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
index fcf62569a62..b3e4a17a78d 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
@@ -135,7 +135,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
                 const basicThermo& thermo =
                     mesh.lookupObject<basicThermo>(basicThermo::dictName);
 
-                return thermo.kappa(patchI);
+                return thermo.kappa(patchi);
             }
             else
             {
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
index ec26c407545..5b698d9091b 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
@@ -100,9 +100,6 @@ makeLESModel(dynamicKEqn);
 #include "dynamicLagrangian.H"
 makeLESModel(dynamicLagrangian);
 
-#include "kOmegaSSTDES.H"
-makeLESModel(kOmegaSSTDES);
-
 #include "SpalartAllmarasDES.H"
 makeLESModel(SpalartAllmarasDES);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
index cbaa250e658..0c3d51012a9 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
@@ -96,9 +96,6 @@ makeLESModel(dynamicKEqn);
 #include "dynamicLagrangian.H"
 makeLESModel(dynamicLagrangian);
 
-#include "kOmegaSSTDES.H"
-makeLESModel(kOmegaSSTDES);
-
 #include "SpalartAllmarasDES.H"
 makeLESModel(SpalartAllmarasDES);
 
diff --git a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C
index ac38d9b8e0f..d750b52e1ad 100644
--- a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C
+++ b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C
@@ -128,6 +128,28 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correctNut()
 }
 
 
+template<class BasicEddyViscosityModel>
+tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::Pk
+(
+    const volScalarField::Internal& G
+) const
+{
+    return min(G, (c1_*betaStar_)*this->k_()*this->omega_());
+}
+
+
+template<class BasicEddyViscosityModel>
+tmp<volScalarField::Internal>
+kOmegaSSTBase<BasicEddyViscosityModel>::epsilonByk
+(
+    const volScalarField::Internal& F1,
+    const volScalarField::Internal& F2
+) const
+{
+    return betaStar_*omega_();
+}
+
+
 template<class BasicEddyViscosityModel>
 tmp<fvScalarMatrix> kOmegaSSTBase<BasicEddyViscosityModel>::kSource() const
 {
@@ -409,7 +431,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
     tgradU.clear();
 
     // Update omega and G at the wall
-    omega_.boundaryField().updateCoeffs();
+    omega_.boundaryFieldRef().updateCoeffs();
 
     volScalarField CDkOmega
     (
@@ -449,7 +471,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
 
         omegaEqn.ref().relax();
         fvOptions.constrain(omegaEqn.ref());
-        omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
+        omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef());
         solve(omegaEqn);
         fvOptions.correct(omega_);
         bound(omega_, this->omegaMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.H b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.H
index f191c16d511..8cf07622c8a 100644
--- a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.H
+++ b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ Description
     and the addition of the optional F3 term for rough walls from
     \verbatim
         Hellsten, A. (1998).
-        "Some Improvements in Menter’s k-omega-SST turbulence model"
+        "Some Improvements in Menter's k-omega-SST turbulence model"
         29th AIAA Fluid Dynamics Conference, AIAA-98-2554.
     \endverbatim
 
@@ -202,8 +202,24 @@ protected:
         virtual void correctNut(const volScalarField& S2);
 
         virtual void correctNut();
+
+        //- Return k production rate
+        virtual tmp<volScalarField::Internal> Pk
+        (
+            const volScalarField::Internal& G
+        ) const;
+
+        //- Return epsilon/k which for standard RAS is betaStar*omega
+        virtual tmp<volScalarField::Internal> epsilonByk
+        (
+            const volScalarField::Internal& F1,
+            const volScalarField::Internal& F2
+        ) const;
+
         virtual tmp<fvScalarMatrix> kSource() const;
+
         virtual tmp<fvScalarMatrix> omegaSource() const;
+
         virtual tmp<fvScalarMatrix> Qsas
         (
             const volScalarField& S2,
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
index a302520b587..99a884e2f96 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -98,7 +98,7 @@ tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr.ref().boundaryField() == 0.0;
+    tr.ref().boundaryFieldRef() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
index 76868eea294..d2aef82e837 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -56,7 +56,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr.ref().boundaryField() == 0.0;
+    tr.ref().boundaryFieldRef() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
index 91fae228e74..a6e1b26b491 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
@@ -179,7 +179,7 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
     tgradU.clear();
 
     // Update omega and G at the wall
-    omega.boundaryField().updateCoeffs();
+    omega.boundaryFieldRef().updateCoeffs();
 
     volScalarField CDkOmega
     (
@@ -208,7 +208,7 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
 
         omegaEqn.ref().relax();
 
-        omegaEqn.ref().boundaryManipulate(omega.boundaryField());
+        omegaEqn.ref().boundaryManipulate(omega.boundaryFieldRef());
 
         solve(omegaEqn);
         bound(omega, this->omegaMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
index a01df0542a0..87010f689c6 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
@@ -98,7 +98,7 @@ tmp<volScalarField> kOmegaSSTIDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr.ref().boundaryField() == 0.0;
+    tr.ref().boundaryFieldRef() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.C b/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.C
deleted file mode 100644
index 87148007842..00000000000
--- a/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.C
+++ /dev/null
@@ -1,156 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "kOmegaSSTDES.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace LESModels
-{
-
-// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
-
-template<class BasicTurbulenceModel>
-tmp<volScalarField::Internal> kOmegaSSTDES<BasicTurbulenceModel>::Lt() const
-{
-    return sqrt(this->k_())/(this->betaStar_*this->omega_());
-}
-
-
-template<class BasicTurbulenceModel>
-tmp<volScalarField::Internal> kOmegaSSTDES<BasicTurbulenceModel>::FDES
-(
-    const volScalarField::Internal& F1,
-    const volScalarField::Internal& F2
-) const
-{
-    switch (FSST_)
-    {
-        case 0:
-            return max(Lt()/(CDES_*this->delta()()), scalar(1));
-        case 1:
-            return max(Lt()*(1 - F1)/(CDES_*this->delta()()), scalar(1));
-        case 2:
-            return max(Lt()*(1 - F2)/(CDES_*this->delta()()), scalar(1));
-        default:
-            FatalErrorInFunction
-                << "Incorrect FSST = " << FSST_ << ", should be 0, 1 or 2"
-                << exit(FatalError);
-            return F1;
-    }
-}
-
-
-template<class BasicTurbulenceModel>
-tmp<volScalarField::Internal> kOmegaSSTDES<BasicTurbulenceModel>::epsilonByk
-(
-    const volScalarField::Internal& F1,
-    const volScalarField::Internal& F2
-) const
-{
-    return this->betaStar_*this->omega_()*FDES(F1, F2);
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-template<class BasicTurbulenceModel>
-kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES
-(
-    const alphaField& alpha,
-    const rhoField& rho,
-    const volVectorField& U,
-    const surfaceScalarField& alphaRhoPhi,
-    const surfaceScalarField& phi,
-    const transportModel& transport,
-    const word& propertiesName,
-    const word& type
-)
-:
-    kOmegaSST
-    <
-        LESeddyViscosity<BasicTurbulenceModel>,
-        BasicTurbulenceModel
-    >
-    (
-        type,
-        alpha,
-        rho,
-        U,
-        alphaRhoPhi,
-        phi,
-        transport,
-        propertiesName
-    ),
-
-    CDES_
-    (
-        dimensioned<scalar>::lookupOrAddToDict
-        (
-            "CDES",
-            this->coeffDict_,
-            0.61
-        )
-    ),
-    FSST_(this->coeffDict_.lookupOrDefault("FSST", 2))
-{
-    if (type == typeName)
-    {
-        this->printCoeffs(type);
-    }
-}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-template<class BasicTurbulenceModel>
-bool kOmegaSSTDES<BasicTurbulenceModel>::read()
-{
-    if
-    (
-        kOmegaSST<LESeddyViscosity<BasicTurbulenceModel>, BasicTurbulenceModel>
-        ::read()
-    )
-    {
-        CDES_.readIfPresent(this->coeffDict());
-        this->coeffDict().readIfPresent("FSST", FSST_);
-
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace LESModels
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.H b/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.H
deleted file mode 100644
index 3d4769d296a..00000000000
--- a/src/TurbulenceModels/turbulenceModels/LES/kOmegaSSTDES/kOmegaSSTDES.H
+++ /dev/null
@@ -1,174 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::LESModels::kOmegaSST
-
-Description
-    Implementation of the k-omega-SST-DES turbulence model for
-    incompressible and compressible flows.
-
-    DES model described in:
-    \verbatim
-        Menter, F. R., Kuntz, M., and Langtry, R. (2003).
-        Ten Years of Industrial Experience with the SST Turbulence Model.
-        Turbulence, Heat and Mass Transfer 4, ed: K. Hanjalic, Y. Nagano,
-        & M. Tummers, Begell House, Inc., 625 - 632.
-    \endverbatim
-
-    Optional support for zonal filtering based on F1 or F2 is provided as
-    described in the paper.
-
-    For further details of the implementation of the base k-omega-SST model
-    see Foam::kOmegaSST.
-
-Group
-    grpLESTurbulence
-
-See also
-    Foam::kOmegaSST
-
-SourceFiles
-    kOmegaSST.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef kOmegaSSTDES_H
-#define kOmegaSSTDES_H
-
-#include "kOmegaSSTBase.H"
-#include "LESModel.H"
-#include "LESeddyViscosity.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-namespace LESModels
-{
-
-/*---------------------------------------------------------------------------*\
-                          Class kOmegaSST Declaration
-\*---------------------------------------------------------------------------*/
-
-template<class BasicTurbulenceModel>
-class kOmegaSSTDES
-:
-    public Foam::kOmegaSST
-    <
-        LESeddyViscosity<BasicTurbulenceModel>,
-        BasicTurbulenceModel
-    >
-{
-
-protected:
-
-    // Protected data
-
-        // Model constants
-
-            //- DES coefficient
-            dimensionedScalar CDES_;
-
-            //- Zonal filter choice
-            //
-            //  - 0: no filtering
-            //  - 1: (1 - F1)
-            //  - 2: (1 - F2)
-            direction FSST_;
-
-
-    // Protected Member Functions
-
-        //- Return the turbulent length-scale
-        tmp<volScalarField::Internal> Lt() const;
-
-        //- The DES dissipation-rate multiplier with options zonal filtering
-        //  based on either F1 or F2
-        virtual tmp<volScalarField::Internal> FDES
-        (
-            const volScalarField::Internal& F1,
-            const volScalarField::Internal& F2
-        ) const;
-
-        //- Return epsilon/k which for standard RAS is betaStar*omega
-        virtual tmp<volScalarField::Internal> epsilonByk
-        (
-            const volScalarField::Internal& F1,
-            const volScalarField::Internal& F2
-        ) const;
-
-
-public:
-
-    typedef typename BasicTurbulenceModel::alphaField alphaField;
-    typedef typename BasicTurbulenceModel::rhoField rhoField;
-    typedef typename BasicTurbulenceModel::transportModel transportModel;
-
-
-    //- Runtime type information
-    TypeName("kOmegaSSTDES");
-
-
-    // Constructors
-
-        //- Construct from components
-        kOmegaSSTDES
-        (
-            const alphaField& alpha,
-            const rhoField& rho,
-            const volVectorField& U,
-            const surfaceScalarField& alphaRhoPhi,
-            const surfaceScalarField& phi,
-            const transportModel& transport,
-            const word& propertiesName = turbulenceModel::propertiesName,
-            const word& type = typeName
-        );
-
-
-    //- Destructor
-    virtual ~kOmegaSSTDES()
-    {}
-
-
-    // Member Functions
-
-        //- Read model coefficients if they have changed
-        virtual bool read();
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace LESModels
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-#ifdef NoRepository
-    #include "kOmegaSSTDES.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-#endif
-
-// ************************************************************************* //
diff --git a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
index 6cea0f9cb12..9125597de74 100644
--- a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
+++ b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
@@ -44,7 +44,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class linearViscousStress Declaration
+                     Class linearViscousStress Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class BasicTurbulenceModel>
diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
index f1aa8eb574b..9fd6314bfee 100644
--- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
+++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,40 +36,13 @@ void Foam::combustionModels::
 diffusionMulticomponent<CombThermoType, ThermoType>::init()
 {
     // Load default values
-    if (this->coeffs().found("Ci"))
-    {
-        this->coeffs().lookup("Ci") >> Ci_;
-    }
-
-    if (this->coeffs().found("YoxStream"))
-    {
-        this->coeffs().lookup("YoxStream") >> YoxStream_;
-    }
-
-    if (this->coeffs().found("YfStream"))
-    {
-        this->coeffs().lookup("YfStream") >> YfStream_;
-    }
-
-    if (this->coeffs().found("sigma"))
-    {
-        this->coeffs().lookup("sigma") >> sigma_;
-    }
-
-    if (this->coeffs().found("ftCorr"))
-    {
-        this->coeffs().lookup("ftCorr") >> ftCorr_;
-    }
-
-    if (this->coeffs().found("alpha"))
-    {
-        alpha_ = readScalar(this->coeffs().lookup("alpha"));
-    }
-
-    if (this->coeffs().found("laminarIgn"))
-    {
-        this->coeffs().lookup("laminarIgn") >> laminarIgn_;
-    }
+    this->coeffs().readIfPresent("Ci", Ci_);
+    this->coeffs().readIfPresent("YoxStream", YoxStream_);
+    this->coeffs().readIfPresent("YfStream", YfStream_);
+    this->coeffs().readIfPresent("sigma", sigma_);
+    this->coeffs().readIfPresent("ftCorr", ftCorr_);
+    this->coeffs().readIfPresent("alpha", alpha_);
+    this->coeffs().readIfPresent("laminarIgn", laminarIgn_);
 
     typedef typename Reaction<ThermoType>::specieCoeffs specieCoeffs;
 
@@ -142,7 +115,6 @@ diffusionMulticomponent<CombThermoType, ThermoType>::init()
         const scalar fStoich = 1.0/(1.0 + stoicRatio_[k]);
 
         Info << "stoichiometric mixture fraction : " << fStoich << endl;
-
     }
 }
 
@@ -164,7 +136,7 @@ diffusionMulticomponent
     specieThermo_
     (
         dynamic_cast<const reactingMixture<ThermoType>&>
-            (this->thermo()).speciesData()
+           (this->thermo()).speciesData()
     ),
     RijPtr_(reactions_.size()),
     Ci_(reactions_.size(), 1.0),
@@ -218,7 +190,6 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
 
         for (label k=0; k < nReactions; k++)
         {
-
             RijlPtr.set
             (
                 k,
@@ -246,8 +217,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
 
             if (laminarIgn_)
             {
-                Rijl.dimensionedInternalField() =
-                    -this->chemistryPtr_->calculateRR(k, fuelIndex);
+                Rijl.ref() = -this->chemistryPtr_->calculateRR(k, fuelIndex);
             }
 
 
@@ -287,11 +257,9 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
             (
                 "ft" + name(k),
                 (
-                    s_[k]*Yfuel
-                  - (Yox - YoxStream_[k])
+                    s_[k]*Yfuel - (Yox - YoxStream_[k])
                 )
-                /
-                (
+               /(
                     s_[k]*YfStream_[k] + YoxStream_[k]
                 )
             );
@@ -318,15 +286,9 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
               * exp(-sqr(ft - fStoich)/(2*sqr(sigma)))
             );
 
-            const volScalarField topHatFilter
-            (
-                pos(filter - 1e-3)
-            );
+            const volScalarField topHatFilter(pos(filter - 1e-3));
 
-            const volScalarField prob
-            (
-                "prob" + name(k), preExp*filter
-            );
+            const volScalarField prob("prob" + name(k), preExp*filter);
 
             const volScalarField RijkDiff
             (
@@ -383,8 +345,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
                 const scalar stoichCoeff = lhs[l].stoichCoeff;
 
                 this->chemistryPtr_->RR(lIndex) +=
-                    -Rijk*stoichCoeff*specieThermo_[lIndex].W()
-                   /fuelStoic/MwFuel;
+                   -Rijk*stoichCoeff*specieThermo_[lIndex].W()/fuelStoic/MwFuel;
 
             }
 
@@ -396,8 +357,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
                 const scalar stoichCoeff = rhs[r].stoichCoeff;
 
                 this->chemistryPtr_->RR(rIndex) +=
-                    Rijk*stoichCoeff*specieThermo_[rIndex].W()
-                   /fuelStoic/MwFuel;
+                    Rijk*stoichCoeff*specieThermo_[rIndex].W()/fuelStoic/MwFuel;
             }
         }
     }
diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
index d6ec345cce5..b6640a354ec 100644
--- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
+++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -280,11 +280,9 @@ void Foam::fvMeshAdder::MapVolFields
         ++fieldIter
     )
     {
-        if (debug)
-        {
-            Pout<< "MapVolFields : Storing old time for " << fieldIter()->name()
-                << endl;
-        }
+        DebugPout
+            << "MapVolFields : Storing old time for " << fieldIter()->name()
+            << endl;
 
         const_cast<GeometricField<Type, fvPatchField, volMesh>*>(fieldIter())
             ->storeOldTimes();
@@ -310,11 +308,9 @@ void Foam::fvMeshAdder::MapVolFields
             const GeometricField<Type, fvPatchField, volMesh>& fldToAdd =
                 *fieldsToAdd[fld.name()];
 
-            if (debug)
-            {
-                Pout<< "MapVolFields : mapping " << fld.name()
-                    << " and " << fldToAdd.name() << endl;
-            }
+            DebugPout
+                << "MapVolFields : mapping " << fld.name()
+                << " and " << fldToAdd.name() << endl;
 
             MapVolField<Type>(meshMap, fld, fldToAdd);
         }
@@ -597,11 +593,9 @@ void Foam::fvMeshAdder::MapSurfaceFields
         ++fieldIter
     )
     {
-        if (debug)
-        {
-            Pout<< "MapSurfaceFields : Storing old time for "
-                << fieldIter()->name() << endl;
-        }
+        DebugPout
+            << "MapSurfaceFields : Storing old time for "
+            << fieldIter()->name() << endl;
 
         const_cast<fldType*>(fieldIter())->storeOldTimes();
     }
@@ -621,11 +615,9 @@ void Foam::fvMeshAdder::MapSurfaceFields
         {
             const fldType& fldToAdd = *fieldsToAdd[fld.name()];
 
-            if (debug)
-            {
-                Pout<< "MapSurfaceFields : mapping " << fld.name()
-                    << " and " << fldToAdd.name() << endl;
-            }
+            DebugPout
+                << "MapSurfaceFields : mapping " << fld.name()
+                << " and " << fldToAdd.name() << endl;
 
             MapSurfaceField<Type>(meshMap, fld, fldToAdd);
         }
@@ -697,11 +689,9 @@ void Foam::fvMeshAdder::MapDimFields
         {
             const fldType& fldToAdd = *fieldsToAdd[fld.name()];
 
-            if (debug)
-            {
-                Pout<< "MapDimFields : mapping " << fld.name()
-                    << " and " << fldToAdd.name() << endl;
-            }
+            DebugPout
+                << "MapDimFields : mapping " << fld.name()
+                << " and " << fldToAdd.name() << endl;
 
             MapDimField<Type>(meshMap, fld, fldToAdd);
         }
@@ -716,80 +706,4 @@ void Foam::fvMeshAdder::MapDimFields
 }
 
 
-template<class Type>
-void Foam::fvMeshAdder::MapDimField
-(
-    const mapAddedPolyMesh& meshMap,
-
-    DimensionedField<Type, volMesh>& fld,
-    const DimensionedField<Type, volMesh>& fldToAdd
-)
-{
-    const fvMesh& mesh = fld.mesh();
-
-    // Store old field
-    Field<Type> oldField(fld);
-
-    fld.setSize(mesh.nCells());
-
-    fld.rmap(oldField, meshMap.oldCellMap());
-    fld.rmap(fldToAdd, meshMap.addedCellMap());
-}
-
-
-template<class Type>
-void Foam::fvMeshAdder::MapDimFields
-(
-    const mapAddedPolyMesh& meshMap,
-    const fvMesh& mesh,
-    const fvMesh& meshToAdd
-)
-{
-    typedef DimensionedField<Type, volMesh> fldType;
-
-    // Note: use strict flag on lookupClass to avoid picking up
-    //       volFields
-    HashTable<const fldType*> fields
-    (
-        mesh.objectRegistry::lookupClass<fldType>(true)
-    );
-
-    HashTable<const fldType*> fieldsToAdd
-    (
-        meshToAdd.objectRegistry::lookupClass<fldType>(true)
-    );
-
-    for
-    (
-        typename HashTable<const fldType*>::
-            iterator fieldIter = fields.begin();
-        fieldIter != fields.end();
-        ++fieldIter
-    )
-    {
-        fldType& fld = const_cast<fldType&>(*fieldIter());
-
-        if (fieldsToAdd.found(fld.name()))
-        {
-            const fldType& fldToAdd = *fieldsToAdd[fld.name()];
-
-            if (debug)
-            {
-                Pout<< "MapDimFields : mapping " << fld.name()
-                    << " and " << fldToAdd.name() << endl;
-            }
-
-            MapDimField<Type>(meshMap, fld, fldToAdd);
-        }
-        else
-        {
-            WarningIn("fvMeshAdder::MapDimFields(..)")
-                << "Not mapping field " << fld.name()
-                << " since not present on mesh to add"
-                << endl;
-        }
-    }
-}
-
-
 // ************************************************************************* //
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
index e761663dffe..49fcc74fcfb 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
@@ -189,13 +189,14 @@ Foam::labelList Foam::fvMeshDistribute::select
 }
 
 
-// Check all procs have same names and in exactly same order.
 void Foam::fvMeshDistribute::checkEqualWordList
 (
     const string& msg,
     const wordList& lst
 )
 {
+    // Check all procs have same names and in exactly same order.
+
     List<wordList> allNames(Pstream::nProcs());
     allNames[Pstream::myProcNo()] = lst;
     Pstream::gatherList(allNames);
@@ -235,7 +236,6 @@ Foam::wordList Foam::fvMeshDistribute::mergeWordList(const wordList& procNames)
 }
 
 
-// Print some info on mesh.
 void Foam::fvMeshDistribute::printMeshInfo(const fvMesh& mesh)
 {
     Pout<< "Primitives:" << nl
@@ -322,9 +322,10 @@ void Foam::fvMeshDistribute::printCoupleInfo
 }
 
 
-// Finds (non-empty) patch that exposed internal and proc faces can be put into.
 Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
 {
+    // Finds (non-empty) patch that exposed internal and proc faces can be
+    // put into.
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
     label nonEmptyPatchi = -1;
@@ -412,18 +413,22 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvMeshDistribute::generateTestField
 
     const surfaceVectorField n(mesh.Sf()/mesh.magSf());
 
-    forAll(fld, faceI)
+    forAll(fld, facei)
     {
-        fld[faceI] = (n[faceI] & testNormal);
+        fld[facei] = (n[facei] & testNormal);
     }
-    forAll(fld.boundaryField(), patchI)
+
+    surfaceScalarField::Boundary& fluxBf = fld.boundaryFieldRef();
+    const surfaceVectorField::Boundary& nBf = n.boundaryField();
+
+    forAll(fluxBf, patchi)
     {
-        fvsPatchScalarField& fvp = fld.boundaryField()[patchI];
+        fvsPatchScalarField& fvp = fluxBf[patchi];
 
         scalarField newPfld(fvp.size());
         forAll(newPfld, i)
         {
-            newPfld[i] = (n.boundaryField()[patchI][i] & testNormal);
+            newPfld[i] = (nBf[patchi][i] & testNormal);
         }
         fvp == newPfld;
     }
@@ -441,41 +446,41 @@ void Foam::fvMeshDistribute::testField(const surfaceScalarField& fld)
 
     const surfaceVectorField n(mesh.Sf()/mesh.magSf());
 
-    forAll(fld, faceI)
+    forAll(fld, facei)
     {
-        scalar cos = (n[faceI] & testNormal);
+        scalar cos = (n[facei] & testNormal);
 
-        if (mag(cos-fld[faceI]) > 1e-6)
+        if (mag(cos - fld[facei]) > 1e-6)
         {
             //FatalErrorInFunction
             WarningInFunction
-                << "On internal face " << faceI << " at "
-                << mesh.faceCentres()[faceI]
-                << " the field value is " << fld[faceI]
+                << "On internal face " << facei << " at "
+                << mesh.faceCentres()[facei]
+                << " the field value is " << fld[facei]
                 << " whereas cos angle of " << testNormal
-                << " with mesh normal " << n[faceI]
+                << " with mesh normal " << n[facei]
                 << " is " << cos
                 //<< exit(FatalError);
                 << endl;
         }
     }
-    forAll(fld.boundaryField(), patchI)
+    forAll(fld.boundaryField(), patchi)
     {
-        const fvsPatchScalarField& fvp = fld.boundaryField()[patchI];
-        const fvsPatchVectorField& np = n.boundaryField()[patchI];
+        const fvsPatchScalarField& fvp = fld.boundaryField()[patchi];
+        const fvsPatchVectorField& np = n.boundaryField()[patchi];
 
         forAll(fvp, i)
         {
             scalar cos = (np[i] & testNormal);
 
-            if (mag(cos-fvp[i]) > 1e-6)
+            if (mag(cos - fvp[i]) > 1e-6)
             {
-                label faceI = fvp.patch().start()+i;
+                label facei = fvp.patch().start()+i;
                 //FatalErrorInFunction
                 WarningInFunction
-                    << "On face " << faceI
+                    << "On face " << facei
                     << " on patch " << fvp.patch().name()
-                    << " at " << mesh.faceCentres()[faceI]
+                    << " at " << mesh.faceCentres()[facei]
                     << " the field value is " << fvp[i]
                     << " whereas cos angle of " << testNormal
                     << " with mesh normal " << np[i]
@@ -488,13 +493,14 @@ void Foam::fvMeshDistribute::testField(const surfaceScalarField& fld)
 }
 
 
-// Delete all processor patches. Move any processor faces into the last
-// non-processor patch.
 Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches
 (
     const label destinationPatch
 )
 {
+    // Delete all processor patches. Move any processor faces into the last
+    // non-processor patch.
+
     // New patchID per boundary faces to be repatched. Is -1 (no change)
     // or new patchID
     labelList newPatchID(mesh_.nFaces() - mesh_.nInternalFaces(), -1);
@@ -535,23 +541,23 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches
     // Delete (now empty) processor patches.
     {
         labelList oldToNew(identity(mesh_.boundaryMesh().size()));
-        label newI = 0;
+        label newi = 0;
         // Non processor patches first
         forAll(mesh_.boundaryMesh(), patchi)
         {
             if (!isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi]))
             {
-                oldToNew[patchi] = newI++;
+                oldToNew[patchi] = newi++;
             }
         }
-        label nNonProcPatches = newI;
+        label nNonProcPatches = newi;
 
         // Processor patches as last
         forAll(mesh_.boundaryMesh(), patchi)
         {
             if (isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi]))
             {
-                oldToNew[patchi] = newI++;
+                oldToNew[patchi] = newi++;
             }
         }
         fvMeshTools::reorderPatches(mesh_, oldToNew, nNonProcPatches, false);
@@ -561,7 +567,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches
 }
 
 
-// Repatch the mesh.
 Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
 (
     const labelList& newPatchID,         // per boundary face -1 or new patchID
@@ -2521,7 +2526,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
             const labelList& oldPatchMap = map().oldPatchMap();
 
             //Note: old mesh faces never flipped!
-            forAll(constructPatchMap, procI)
+            forAll(constructPatchMap, proci)
             {
                 if (proci != sendProc && constructPatchMap[proci].size())
                 {
diff --git a/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C b/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
index fc7d6e7c30f..8c8848bae5f 100644
--- a/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
+++ b/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
@@ -48,10 +48,7 @@ namespace Foam
 Foam::wordList
 Foam::velocityDisplacementMotionSolver::pointDisplacementBoundaryTypes() const
 {
-    const pointVectorField::GeometricBoundaryField& pmUbf
-    (
-        pointMotionU().boundaryField()
-    );
+    const pointVectorField::Boundary& pmUbf(pointMotionU().boundaryField());
 
     wordList cmUbf = pmUbf.types();
 
@@ -93,7 +90,7 @@ Foam::velocityDisplacementMotionSolver::velocityDisplacementMotionSolver
         pointDisplacementBoundaryTypes()
     );
 
-    pointDisplacement.internalField() = mesh.points() - points0;
+    pointDisplacement.primitiveFieldRef() = mesh.points() - points0;
 
     displacementMotionSolverPtr_.set
     (
@@ -155,6 +152,8 @@ void Foam::velocityDisplacementMotionSolver::solve()
     // Update the velocity boundary conditions
     pointMotionU().correctBoundaryConditions();
 
+    pointVectorField::Boundary& dispBf = displacement.boundaryFieldRef();
+
     // Update the displacement boundary conditions
     forAll(pointMotionU().boundaryField(), patchI)
     {
@@ -163,7 +162,7 @@ void Foam::velocityDisplacementMotionSolver::solve()
             pointMotionU().boundaryField()[patchI]
         );
 
-        displacement.boundaryField()[patchI] ==
+        dispBf[patchI] ==
             patchField.patchInternalField()*deltaT
           + patchField.patchInternalField(displacementOld);
     }
@@ -172,8 +171,8 @@ void Foam::velocityDisplacementMotionSolver::solve()
     displacementMotionSolverPtr_->solve();
 
     // Update the velocity
-    pointMotionU().internalField() =
-        (displacement.internalField() - displacementOld)/deltaT;
+    pointMotionU().primitiveFieldRef() =
+        (displacement.primitiveField() - displacementOld)/deltaT;
 }
 
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
index 0d2fbd3734d..9232458ffb7 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
@@ -50,11 +50,11 @@ namespace Foam
 Foam::label Foam::addPatchCellLayer::nbrFace
 (
     const labelListList& edgeFaces,
-    const label edgeI,
+    const label edgei,
     const label facei
 )
 {
-    const labelList& eFaces = edgeFaces[edgeI];
+    const labelList& eFaces = edgeFaces[edgei];
 
     if (eFaces.size() == 2)
     {
@@ -97,19 +97,19 @@ bool Foam::addPatchCellLayer::sameEdgeNeighbour
     const boolList& doneEdge,
     const label thisGlobalFacei,
     const label nbrGlobalFacei,
-    const label edgeI
+    const label edgei
 ) const
 {
-    const edge& e = pp.edges()[edgeI];
+    const edge& e = pp.edges()[edgei];
 
     return
-        !doneEdge[edgeI]                            // not yet handled
+        !doneEdge[edgei]                            // not yet handled
      && (
             addedPoints_[e[0]].size()               // is extruded
          || addedPoints_[e[1]].size()
         )
      && (
-            nbrFace(globalEdgeFaces, edgeI, thisGlobalFacei)
+            nbrFace(globalEdgeFaces, edgei, thisGlobalFacei)
          == nbrGlobalFacei  // is to same neighbour
         );
 }
@@ -135,12 +135,12 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
     // Get edge that hasn't been done yet but needs extrusion
     forAll(fEdges, fp)
     {
-        label edgeI = fEdges[fp];
-        const edge& e = pp.edges()[edgeI];
+        label edgei = fEdges[fp];
+        const edge& e = pp.edges()[edgei];
 
         if
         (
-            !doneEdge[edgeI]
+            !doneEdge[edgei]
          && ( addedPoints_[e[0]].size() || addedPoints_[e[1]].size() )
         )
         {
@@ -229,14 +229,14 @@ Foam::label Foam::addPatchCellLayer::addSideFace
     const labelListList& addedCells,    // per pp face the new extruded cell
     const face& newFace,
     const label newPatchID,
-    const label zoneI,
+    const label zonei,
     const bool edgeFlip,
-    const label inflateFaceI,
+    const label inflateFacei,
 
-    const label ownFaceI,               // pp face that provides owner
-    const label nbrFaceI,
-    const label meshEdgeI,              // corresponding mesh edge
-    const label layerI,                 // layer
+    const label ownFacei,               // pp face that provides owner
+    const label nbrFacei,
+    const label meshEdgei,              // corresponding mesh edge
+    const label layeri,                 // layer
     const label numEdgeFaces,           // number of layers for edge
     const labelList& meshFaces,         // precalculated edgeFaces
     polyTopoChange& meshMod
@@ -261,18 +261,18 @@ Foam::label Foam::addPatchCellLayer::addSideFace
         if (addedCells[ownFacei].size() < numEdgeFaces)
         {
             label offset = numEdgeFaces - addedCells[ownFacei].size();
-            if (layerI <= offset)
+            if (layeri <= offset)
             {
                 layerOwn = 0;
             }
             else
             {
-                layerOwn = layerI - offset;
+                layerOwn = layeri - offset;
             }
         }
         else
         {
-            layerOwn = layerI;
+            layerOwn = layeri;
         }
 
 
@@ -313,15 +313,15 @@ Foam::label Foam::addPatchCellLayer::addSideFace
             label offset =
                 addedCells[ownFacei].size() - addedCells[nbrFacei].size();
 
-            layerOwn = layerI;
+            layerOwn = layeri;
 
-            if (layerI <= offset)
+            if (layeri <= offset)
             {
                 layerNbr = 0;
             }
             else
             {
-                layerNbr = layerI - offset;
+                layerNbr = layeri - offset;
             }
         }
         else if (addedCells[nbrFacei].size() > addedCells[ownFacei].size())
@@ -329,22 +329,22 @@ Foam::label Foam::addPatchCellLayer::addSideFace
             label offset =
                 addedCells[nbrFacei].size() - addedCells[ownFacei].size();
 
-            layerNbr = layerI;
+            layerNbr = layeri;
 
-            if (layerI <= offset)
+            if (layeri <= offset)
             {
                 layerOwn = 0;
             }
             else
             {
-                layerOwn = layerI - offset;
+                layerOwn = layeri - offset;
             }
         }
         else
         {
             // Same number of layers on both sides.
-            layerNbr = layerI;
-            layerOwn = layerI;
+            layerNbr = layeri;
+            layerOwn = layeri;
         }
 
 
@@ -364,7 +364,7 @@ Foam::label Foam::addPatchCellLayer::addSideFace
         }
 
 
-        addedFaceI = meshMod.setAction
+        addedFacei = meshMod.setAction
         (
             polyAddFace
             (
@@ -422,13 +422,13 @@ void Foam::addPatchCellLayer::setFaceProps
     const label facei,
 
     label& patchi,
-    label& zoneI,
+    label& zonei,
     bool& zoneFlip
 )
 {
     patchi = mesh.boundaryMesh().whichPatch(facei);
     zonei = mesh.faceZones().whichZone(facei);
-    if (zoneI != -1)
+    if (zonei != -1)
     {
         label index = mesh.faceZones()[zonei].whichFace(facei);
         zoneFlip = mesh.faceZones()[zonei].flipMap()[index];
@@ -716,13 +716,13 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
     // processor patch or create interprocessor-patch if necessary.
     // Sets edgePatchID[edgeI] but none of the other quantities
 
-    forAll(globalEdgeFaces, edgeI)
+    forAll(globalEdgeFaces, edgei)
     {
-        const labelList& eGlobalFaces = globalEdgeFaces[edgeI];
+        const labelList& eGlobalFaces = globalEdgeFaces[edgei];
         if
         (
             eGlobalFaces.size() == 2
-         && pp.edgeFaces()[edgeI].size() == 1
+         && pp.edgeFaces()[edgei].size() == 1
         )
         {
             // Locally but not globally a boundary edge. Hence a coupled
@@ -746,11 +746,11 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
             {
                 if (findIndex(gd[Pstream::myProcNo()], otherProci) != -1)
                 {
-                    // There is already a processorPolyPatch to otherProcI.
+                    // There is already a processorPolyPatch to otherProci.
                     // Use it. Note that we can only index procPatchMap
                     // if the processor actually is a neighbour processor
                     // so that is why we first check.
-                    edgePatchID[edgeI] = gd.procPatchMap()[otherProci];
+                    edgePatchID[edgei] = gd.procPatchMap()[otherProci];
                 }
                 else
                 {
@@ -786,20 +786,20 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
         {
             UIndirectList<label> ppFaces(pp.addressing(), edgeFaces[edgei]);
 
-            label meshEdgeI = meshEdges[edgeI];
+            label meshEdgei = meshEdges[edgei];
             const labelList& meshFaces = mesh.edgeFaces
             (
-                meshEdgeI,
+                meshEdgei,
                 dynMeshEdgeFaces
             );
 
-            if (edgeFaces[edgeI].size() == 2)
+            if (edgeFaces[edgei].size() == 2)
             {
                 // Internal edge. Look at any face (internal or boundary) to
                 // determine extrusion properties. First one that has zone
                 // info wins
 
-                label dummyPatchI = -1;
+                label dummyPatchi = -1;
                 findZoneFace
                 (
                     true,               // useInternalFaces,
@@ -850,7 +850,7 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
     // Now hopefully every boundary edge has a edge patch. Check
     if (debug)
     {
-        forAll(edgeFaces, edgeI)
+        forAll(edgeFaces, edgei)
         {
             if (edgeFaces[edgei].size() == 1 && edgePatchID[edgei] == -1)
             {
@@ -882,32 +882,32 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
             label myFaceI = pp.addressing()[edgeFaces[edgei][0]];
 
             // Pick up any boundary face on this edge and use its properties
-            label meshEdgeI = meshEdges[edgeI];
+            label meshEdgei = meshEdges[edgei];
             const labelList& meshFaces = mesh.edgeFaces
             (
-                meshEdgeI,
+                meshEdgei,
                 dynMeshEdgeFaces
             );
 
             forAll(meshFaces, k)
             {
-                label faceI = meshFaces[k];
+                label facei = meshFaces[k];
 
-                if (faceI != myFaceI && !mesh.isInternalFace(faceI))
+                if (facei != myFaceI && !mesh.isInternalFace(facei))
                 {
-                    if (patches.whichPatch(faceI) == edgePatchID[edgeI])
+                    if (patches.whichPatch(facei) == edgePatchID[edgei])
                     {
                         setFaceProps
                         (
                             mesh,
                             pp,
-                            edgeI,
-                            faceI,
+                            edgei,
+                            facei,
 
-                            edgePatchID[edgeI],
-                            edgeZoneID[edgeI],
-                            edgeFlip[edgeI],
-                            inflateFaceID[edgeI]
+                            edgePatchID[edgei],
+                            edgeZoneID[edgei],
+                            edgeFlip[edgei],
+                            inflateFaceID[edgei]
                         );
                         break;
                     }
@@ -947,17 +947,17 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
         boolList cppEdgeFlip(cpp.nEdges(), false);
         forAll(coupledEdges, i)
         {
-            label cppEdgeI = coupledEdges[i];
-            label ppEdgeI = patchEdges[i];
+            label cppEdgei = coupledEdges[i];
+            label ppEdgei = patchEdges[i];
 
-            cppEdgeZoneID[cppEdgeI] = edgeZoneID[ppEdgeI];
+            cppEdgeZoneID[cppEdgei] = edgeZoneID[ppEdgei];
             if (sameEdgeOrientation[i])
             {
-                cppEdgeFlip[cppEdgeI] = edgeFlip[ppEdgeI];
+                cppEdgeFlip[cppEdgei] = edgeFlip[ppEdgei];
             }
             else
             {
-                cppEdgeFlip[cppEdgeI] = !edgeFlip[ppEdgeI];
+                cppEdgeFlip[cppEdgei] = !edgeFlip[ppEdgei];
             }
         }
 
@@ -989,17 +989,17 @@ void Foam::addPatchCellLayer::calcExtrudeInfo
         // Convert data on coupled edges to pp edges
         forAll(coupledEdges, i)
         {
-            label cppEdgeI = coupledEdges[i];
-            label ppEdgeI = patchEdges[i];
+            label cppEdgei = coupledEdges[i];
+            label ppEdgei = patchEdges[i];
 
-            edgeZoneID[ppEdgeI] = cppEdgeZoneID[cppEdgeI];
+            edgeZoneID[ppEdgei] = cppEdgeZoneID[cppEdgei];
             if (sameEdgeOrientation[i])
             {
-                edgeFlip[ppEdgeI] = cppEdgeFlip[cppEdgeI];
+                edgeFlip[ppEdgei] = cppEdgeFlip[cppEdgei];
             }
             else
             {
-                edgeFlip[ppEdgeI] = !cppEdgeFlip[cppEdgeI];
+                edgeFlip[ppEdgei] = !cppEdgeFlip[cppEdgei];
             }
         }
     }
@@ -1070,11 +1070,11 @@ void Foam::addPatchCellLayer::setRefinement
         }
     }
 
-    forAll(globalEdgeFaces, edgeI)
+    forAll(globalEdgeFaces, edgei)
     {
-        if (globalEdgeFaces[edgeI].size() > 2)
+        if (globalEdgeFaces[edgei].size() > 2)
         {
-            const edge& e = pp.edges()[edgeI];
+            const edge& e = pp.edges()[edgei];
 
             if (nPointLayers[e[0]] > 0 || nPointLayers[e[1]] > 0)
             {
@@ -1082,10 +1082,10 @@ void Foam::addPatchCellLayer::setRefinement
                     << "Trying to extrude edge "
                     << e.line(pp.localPoints())
                     << " which is non-manifold (has "
-                    << globalEdgeFaces[edgeI].size()
+                    << globalEdgeFaces[edgei].size()
                     << " local or coupled faces using it)"
                     << " of which "
-                    << pp.edgeFaces()[edgeI].size()
+                    << pp.edgeFaces()[edgei].size()
                     << " local"
                     << abort(FatalError);
             }
@@ -1207,15 +1207,15 @@ void Foam::addPatchCellLayer::setRefinement
         // sides decide the same.
         // ~~~~~~~~~~~~~~~~~~~~~~
 
-        for (label edgeI = pp.nInternalEdges(); edgeI < pp.nEdges(); edgeI++)
+        for (label edgei = pp.nInternalEdges(); edgei < pp.nEdges(); edgei++)
         {
-            const edge& e = pp.edges()[edgeI];
+            const edge& e = pp.edges()[edgei];
 
             if (nPointLayers[e[0]] > 0 || nPointLayers[e[1]] > 0)
             {
                 // Edge is to become a face
 
-                const labelList& eFaces = pp.edgeFaces()[edgeI];
+                const labelList& eFaces = pp.edgeFaces()[edgei];
 
                 // First check: pp should be single connected.
                 if (eFaces.size() != 1)
@@ -1230,10 +1230,10 @@ void Foam::addPatchCellLayer::setRefinement
 
                 label myFacei = pp.addressing()[eFaces[0]];
 
-                label meshEdgeI = meshEdges[edgeI];
+                label meshEdgei = meshEdges[edgei];
 
                 // Mesh faces using edge
-                const labelList& meshFaces = mesh_.edgeFaces(meshEdgeI, ef);
+                const labelList& meshFaces = mesh_.edgeFaces(meshEdgei, ef);
 
                 // Check that there is only one patchface using edge.
                 const polyBoundaryMesh& patches = mesh_.boundaryMesh();
@@ -1609,26 +1609,26 @@ void Foam::addPatchCellLayer::setRefinement
         // partial list synchronisation.
         labelList meshEdgeLayers(mesh_.nEdges(), -1);
 
-        forAll(meshEdges, edgeI)
+        forAll(meshEdges, edgei)
         {
-            const edge& e = edges[edgeI];
+            const edge& e = edges[edgei];
 
-            label meshEdgeI = meshEdges[edgeI];
+            label meshEdgei = meshEdges[edgei];
 
             if ((nPointLayers[e[0]] == 0) && (nPointLayers[e[1]] == 0))
             {
-                meshEdgeLayers[meshEdgeI] = 0;
+                meshEdgeLayers[meshEdgei] = 0;
             }
             else
             {
-                const labelList& eFaces = pp.edgeFaces()[edgeI];
+                const labelList& eFaces = pp.edgeFaces()[edgei];
 
                 forAll(eFaces, i)
                 {
-                    meshEdgeLayers[meshEdgeI] = max
+                    meshEdgeLayers[meshEdgei] = max
                     (
                         nFaceLayers[eFaces[i]],
-                        meshEdgeLayers[meshEdgeI]
+                        meshEdgeLayers[meshEdgei]
                     );
                 }
             }
@@ -1642,9 +1642,9 @@ void Foam::addPatchCellLayer::setRefinement
             label(0)            // initial value
         );
 
-        forAll(meshEdges, edgeI)
+        forAll(meshEdges, edgei)
         {
-            edgeLayers[edgeI] = meshEdgeLayers[meshEdges[edgeI]];
+            edgeLayers[edgei] = meshEdgeLayers[meshEdges[edgei]];
         }
     }
 
@@ -1718,11 +1718,11 @@ void Foam::addPatchCellLayer::setRefinement
                 // because we loop in incrementing order as well we will
                 // always have nbrFacei > patchFacei.
 
-                label startEdgeI = fEdges[startFp];
+                label startEdgei = fEdges[startFp];
 
-                label meshEdgeI = meshEdges[startEdgeI];
+                label meshEdgei = meshEdges[startEdgei];
 
-                label numEdgeSideFaces = edgeLayers[startEdgeI];
+                label numEdgeSideFaces = edgeLayers[startEdgei];
 
                 for (label i = 0; i < numEdgeSideFaces; i++)
                 {
@@ -1897,9 +1897,9 @@ void Foam::addPatchCellLayer::setRefinement
                                             ) << nl
                                         << "Layer:" << i
                                         << " out of:" << numEdgeSideFaces << nl
-                                        << "ExtrudeEdge:" << meshEdgeI
+                                        << "ExtrudeEdge:" << meshEdgei
                                         << " at:"
-                                        <<  mesh_.edges()[meshEdgeI].line
+                                        <<  mesh_.edges()[meshEdgei].line
                                             (
                                                 mesh_.points()
                                             ) << nl
@@ -1924,13 +1924,13 @@ void Foam::addPatchCellLayer::setRefinement
                         label nbrFacei = nbrFace
                         (
                             pp.edgeFaces(),
-                            startEdgeI,
+                            startEdgei,
                             patchFacei
                         );
 
                         const labelList& meshFaces = mesh_.edgeFaces
                         (
-                            meshEdgeI,
+                            meshEdgei,
                             ef
                         );
 
@@ -1938,9 +1938,9 @@ void Foam::addPatchCellLayer::setRefinement
                         // of face edges so face orientation will be opposite
                         // that of the patch edge
                         bool zoneFlip = false;
-                        if (edgeZoneID[startEdgeI] != -1)
+                        if (edgeZoneID[startEdgei] != -1)
                         {
-                            zoneFlip = !edgeFlip[startEdgeI];
+                            zoneFlip = !edgeFlip[startEdgei];
                         }
 
                         addSideFace
@@ -1949,14 +1949,14 @@ void Foam::addPatchCellLayer::setRefinement
                             addedCells,
 
                             newFace,                // vertices of new face
-                            edgePatchID[startEdgeI],// -1 or patch for face
-                            edgeZoneID[startEdgeI],
+                            edgePatchID[startEdgei],// -1 or patch for face
+                            edgeZoneID[startEdgei],
                             zoneFlip,
-                            inflateFaceID[startEdgeI],
+                            inflateFaceID[startEdgei],
 
-                            patchFaceI,
-                            nbrFaceI,
-                            meshEdgeI,          // (mesh) edge to inflate
+                            patchFacei,
+                            nbrFacei,
+                            meshEdgei,          // (mesh) edge to inflate
                             i,                  // layer
                             numEdgeSideFaces,   // num layers
                             meshFaces,          // edgeFaces
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
index 1b1e1ab8bdb..1a76ea75b48 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
@@ -557,7 +557,6 @@ void Foam::refinementHistory::apply
 Foam::refinementHistory::refinementHistory(const IOobject& io)
 :
     regIOobject(io),
-    refCount(),
     active_(false)
 {
     // Warn for MUST_READ_IF_MODIFIED
@@ -600,7 +599,6 @@ Foam::refinementHistory::refinementHistory
 )
 :
     regIOobject(io),
-    refCount(),
     active_(active),
     splitCells_(splitCells),
     freeSplitCells_(0),
@@ -642,7 +640,6 @@ Foam::refinementHistory::refinementHistory
 )
 :
     regIOobject(io),
-    refCount(),
     active_(false),
     freeSplitCells_(0)
 {
@@ -698,7 +695,6 @@ Foam::refinementHistory::refinementHistory
 )
 :
     regIOobject(io),
-    refCount(),
     active_(active),
     freeSplitCells_(0)
 {
@@ -750,7 +746,6 @@ Foam::refinementHistory::refinementHistory
 )
 :
     regIOobject(io),
-    refCount(),
     active_(rh.active_),
     splitCells_(rh.splitCells()),
     freeSplitCells_(rh.freeSplitCells()),
@@ -773,7 +768,6 @@ Foam::refinementHistory::refinementHistory
 )
 :
     regIOobject(io),
-    refCount(),
     active_(false)
 {
     if
@@ -886,7 +880,6 @@ Foam::refinementHistory::refinementHistory
 Foam::refinementHistory::refinementHistory(const IOobject& io, Istream& is)
 :
     regIOobject(io),
-    refCount(),
     splitCells_(is),
     freeSplitCells_(0),
     visibleCells_(is)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
index 4382635b2fd..88874be430a 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
@@ -71,7 +71,6 @@ SourceFiles
 #ifndef refinementHistory_H
 #define refinementHistory_H
 
-#include "UPtrList.H"
 #include "DynamicList.H"
 #include "labelList.H"
 #include "FixedList.H"
@@ -99,13 +98,12 @@ Ostream& operator<<(Ostream&, const refinementHistory&);
 
 
 /*---------------------------------------------------------------------------*\
-                           Class refinementHistory Declaration
+                      Class refinementHistory Declaration
 \*---------------------------------------------------------------------------*/
 
 class refinementHistory
 :
-    public regIOobject,
-    public refCount
+    public regIOobject
 {
 public:
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
index 3b5d2db4fa5..0606d0bf2ee 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
@@ -481,9 +481,9 @@ void Foam::polyTopoChange::makeCells
         if (faceOwner_[facei] < 0)
         {
             pointField newPoints;
-            if (faceI < faces_.size())
+            if (facei < faces_.size())
             {
-                const face& f = faces_[faceI];
+                const face& f = faces_[facei];
                 newPoints.setSize(f.size(), vector::max);
                 forAll(f, fp)
                 {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
index 59646f3ad86..d2a5ac36656 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
@@ -29,6 +29,7 @@ License
 #include "fvPatchFieldMapper.H"
 #include "momentOfInertia.H"
 #include "cartesianCS.H"
+#include "IFstream.H"
 #include "OFstream.H"
 #include "globalIndex.H"
 
@@ -106,20 +107,19 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::writeLumleyCoeffs() const
     // Before interpolation/raw data
     if (interpolateR_)
     {
-        AverageIOField<symmTensor> Rexp
+        fileName valsFile
         (
-            IOobject
-            (
-                "R",
-                this->db().time().caseConstant(),
-                "boundaryData"/patch().name()/"0",
-                this->db(),
-                IOobject::MUST_READ,
-                IOobject::AUTO_WRITE,
-                false
-            )
+            this->db().time().caseConstant()
+           /"boundaryData"
+           /this->patch().name()
+           /"0"
+           /"R"
         );
 
+        IFstream is(valsFile);
+
+        Field<symmTensor> Rexp(is);
+
         OFstream os(db().time().path()/"lumley_input.out");
 
         os  << "# xi" << token::TAB << "eta" << endl;
@@ -507,7 +507,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::initialiseEddies()
     {
         WarningInFunction
             << "Patch: " << patch().patch().name()
-            << " on field " << dimensionedInternalField().name()
+            << " on field " << internalField().name()
             << ": No eddies seeded - please check your set-up" << endl;
     }
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C
index 230e1c707fd..b12065fc168 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C
@@ -23,9 +23,9 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "AverageIOField.H"
 #include "pointToPointPlanarInterpolation.H"
 #include "Time.H"
+#include "IFstream.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -70,25 +70,23 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
 {
     const word& patchName = this->patch().name();
 
-    // Note: reading from the '0' directory only
-    IOobject io
+    fileName valsFile
     (
-        fieldName,
-        this->db().time().caseConstant(),
-        "boundaryData"/patchName/"0",
-        this->db(),
-        IOobject::MUST_READ,
-        IOobject::AUTO_WRITE,
-        false
+        this->db().time().caseConstant()
+       /"boundaryData"
+       /patchName
+       /"0"
+       /fieldName
     );
 
-    Info<< "Turbulent DFSEM patch " << this->patch().name()
-        << ": interpolating field " << fieldName
-        << " from " << io.path() << endl;
+    IFstream is(valsFile);
+    Field<Type> vals(is);
 
-    AverageIOField<Type> aFld(io);
+    Info<< "Turbulent DFSEM patch " << patchName
+        << ": interpolating field " << fieldName
+        << " from " << valsFile << endl;
 
-    return patchMapper().interpolate(aFld);
+    return patchMapper().interpolate(vals);
 }
 
 
diff --git a/src/finiteVolume/functionObjects/fvMeshFunctionObject/fvMeshFunctionObject.H b/src/finiteVolume/functionObjects/fvMeshFunctionObject/fvMeshFunctionObject.H
index fb4fda93f32..50e707299aa 100644
--- a/src/finiteVolume/functionObjects/fvMeshFunctionObject/fvMeshFunctionObject.H
+++ b/src/finiteVolume/functionObjects/fvMeshFunctionObject/fvMeshFunctionObject.H
@@ -78,10 +78,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        fvMeshFunctionObject(const fvMeshFunctionObject&);
+        fvMeshFunctionObject(const fvMeshFunctionObject&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const fvMeshFunctionObject&);
+        void operator=(const fvMeshFunctionObject&) = delete;
 
 
 public:
diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.C b/src/finiteVolume/functionObjects/volRegion/volRegion.C
index e9b9758b5de..3a0dcede22b 100644
--- a/src/finiteVolume/functionObjects/volRegion/volRegion.C
+++ b/src/finiteVolume/functionObjects/volRegion/volRegion.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -58,7 +58,7 @@ void Foam::functionObjects::volRegion::writeFileHeader
 (
     const writeFile& wf,
     Ostream& file
-)
+) const
 {
     wf.writeCommented(file, "Region");
     file<< setw(1) << ':' << setw(1) << ' '
diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.H b/src/finiteVolume/functionObjects/volRegion/volRegion.H
index 74edb39ab54..78972545ce6 100644
--- a/src/finiteVolume/functionObjects/volRegion/volRegion.H
+++ b/src/finiteVolume/functionObjects/volRegion/volRegion.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -85,7 +85,7 @@ namespace functionObjects
 {
 
 /*---------------------------------------------------------------------------*\
-                         Class volRegion Declaration
+                          Class volRegion Declaration
 \*---------------------------------------------------------------------------*/
 
 class volRegion
@@ -106,8 +106,8 @@ public:
         //- Region type enumeration
         enum regionTypes
         {
-            vrtCellZone,
-            vrtAll
+            vrtCellZone,    //< cell zone
+            vrtAll          //< all cells
         };
 
         //- Region type names
@@ -131,7 +131,7 @@ protected:
     // Protected Member Functions
 
         //- Output file header information
-        void writeFileHeader(const writeFile& wf, Ostream& file);
+        void writeFileHeader(const writeFile& wf, Ostream& file) const;
 
 
 public:
@@ -143,11 +143,7 @@ public:
     // Constructors
 
         //- Construct from fvMesh and dictionary
-        volRegion
-        (
-            const fvMesh& mesh,
-            const dictionary& dict
-        );
+        volRegion(const fvMesh& mesh, const dictionary& dict);
 
 
     //- Destructor
diff --git a/src/functionObjects/field/CourantNo/CourantNo.H b/src/functionObjects/field/CourantNo/CourantNo.H
index bc11cb7fc51..a6e030fa91e 100644
--- a/src/functionObjects/field/CourantNo/CourantNo.H
+++ b/src/functionObjects/field/CourantNo/CourantNo.H
@@ -38,7 +38,7 @@ Usage
     CourantNo1
     {
         type        CourantNo;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        libs        ("libfieldFunctionObjects.so");
         ...
     }
     \endverbatim
@@ -113,8 +113,8 @@ public:
         CourantNo
         (
             const word& name,
-            const Time&,
-            const dictionary&
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
diff --git a/src/functionObjects/field/DESModelRegions/DESModelRegions.C b/src/functionObjects/field/DESModelRegions/DESModelRegions.C
new file mode 100644
index 00000000000..87a3e1fb587
--- /dev/null
+++ b/src/functionObjects/field/DESModelRegions/DESModelRegions.C
@@ -0,0 +1,178 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "DESModelRegions.H"
+#include "volFields.H"
+#include "DESModelBase.H"
+#include "turbulenceModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+    defineTypeNameAndDebug(DESModelRegions, 0);
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        DESModelRegions,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
+
+void Foam::functionObjects::DESModelRegions::writeFileHeader(Ostream& os) const
+{
+    writeHeader(os, "DES model region coverage (% volume)");
+
+    writeCommented(os, "Time");
+    writeTabbed(os, "LES");
+    writeTabbed(os, "RAS");
+    os << endl;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::functionObjects::DESModelRegions::DESModelRegions
+(
+    const word& name,
+    const Time& runTime,
+    const dictionary& dict
+)
+:
+    fvMeshFunctionObject(name, runTime, dict),
+    writeFile(obr_, name, typeName, dict),
+    resultName_(name)
+{
+    read(dict);
+
+    tmp<volScalarField> tDESModelRegions
+    (
+        (
+            new volScalarField
+            (
+                IOobject
+                (
+                    resultName_,
+                    time_.timeName(),
+                    mesh_,
+                    IOobject::NO_READ,
+                    IOobject::NO_WRITE
+                ),
+                mesh_,
+                dimensionedScalar("0", dimless, 0.0)
+            )
+        )
+    );
+
+    store(resultName_, tDESModelRegions);
+
+    writeFileHeader(file());
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::functionObjects::DESModelRegions::~DESModelRegions()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+bool Foam::functionObjects::DESModelRegions::read(const dictionary& dict)
+{
+    writeFile::read(dict);
+
+    dict.readIfPresent("resultName", resultName_);
+
+    return true;
+}
+
+
+bool Foam::functionObjects::DESModelRegions::execute()
+{
+    Log << type() << " " << name() <<  " execute:" << nl;
+
+    volScalarField& DESModelRegions =
+        const_cast<volScalarField&>
+        (
+            lookupObject<volScalarField>(resultName_)
+        );
+
+
+    if (foundObject<DESModelBase>(turbulenceModel::propertiesName))
+    {
+        const DESModelBase& model =
+            lookupObject<DESModelBase>
+            (
+                turbulenceModel::propertiesName
+            );
+
+        DESModelRegions == model.LESRegion();
+
+        scalar prc =
+            gSum(DESModelRegions.primitiveField()*mesh_.V())
+           /gSum(mesh_.V())*100.0;
+
+        file() << time_.value()
+            << token::TAB << prc
+            << token::TAB << 100.0 - prc
+            << endl;
+
+        Log << "    LES = " << prc << " % (volume)" << nl
+            << "    RAS = " << 100.0 - prc << " % (volume)" << nl
+            << endl;
+    }
+    else
+    {
+        Log << "    No DES turbulence model found in database" << nl
+            << endl;
+    }
+
+    return true;
+}
+
+
+bool Foam::functionObjects::DESModelRegions::write()
+{
+    const volScalarField& DESModelRegions =
+        lookupObject<volScalarField>(resultName_);
+
+    Log << type() << " " << name() <<  " output:" << nl
+        << "    writing field " << DESModelRegions.name() << nl
+        << endl;
+
+    return true;
+}
+
+
+// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H b/src/functionObjects/field/DESModelRegions/DESModelRegions.H
similarity index 65%
rename from src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H
rename to src/functionObjects/field/DESModelRegions/DESModelRegions.H
index 2db27d53f2b..aeb6a5d3eda 100644
--- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H
+++ b/src/functionObjects/field/DESModelRegions/DESModelRegions.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,10 +22,10 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::DESModelRegions
+    Foam::functionObjects::DESModelRegions
 
 Group
-    grpUtilitiesFunctionObjects
+    grpFieldFunctionObjects
 
 Description
     This function object writes out an indicator field for DES turbulence
@@ -36,17 +36,17 @@ Description
     The field is stored on the mesh database so that it can be retrieved and
     used for other applications.
 
+Usage
     Example of function object specification to generate DES indicator field:
     \verbatim
     DESModelRegions1
     {
         type        DESModelRegions;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        libs        ("libutilityFunctionObjects.so");
         ...
     }
     \endverbatim
 
-    \heading Function object usage
     \table
         Property     | Description             | Required    | Default value
         type         | type name: DESModelRegions| yes       |
@@ -56,29 +56,23 @@ Description
 
 SourceFiles
     DESModelRegions.C
-    IODESModelRegions.H
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef DESModelRegions_H
-#define DESModelRegions_H
+#ifndef functionObjects_DESModelRegions_H
+#define functionObjects_DESModelRegions_H
 
-#include "functionObjectFile.H"
+#include "fvMeshFunctionObject.H"
+#include "writeFile.H"
 #include "volFieldsFwd.H"
-#include "Switch.H"
 #include "OFstream.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
-class fvMesh;
+namespace functionObjects
+{
 
 /*---------------------------------------------------------------------------*\
                        Class DESModelRegions Declaration
@@ -86,26 +80,16 @@ class fvMesh;
 
 class DESModelRegions
 :
-    public functionObjectFile
+    public fvMeshFunctionObject,
+    public writeFile
 {
 protected:
 
     // Protected data
 
-        //- Name of this set of DESModelRegions object
-        word name_;
-
-        const objectRegistry& obr_;
-
-        //- on/off switch
-        bool active_;
-
         //- Result name
         word resultName_;
 
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
 
     // Protected Member Functions
 
@@ -113,10 +97,10 @@ protected:
         virtual void writeFileHeader(Ostream& os) const;
 
         //- Disallow default bitwise copy construct
-        DESModelRegions(const DESModelRegions&);
+        DESModelRegions(const DESModelRegions&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const DESModelRegions&);
+        void operator=(const DESModelRegions&) = delete;
 
 
 public:
@@ -126,15 +110,12 @@ public:
 
 
     // Constructors
-
-        //- Construct for given objectRegistry and dictionary.
-        //  Allow the possibility to load fields from files
+        //- Construct from Time and dictionary
         DESModelRegions
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
@@ -144,39 +125,20 @@ public:
 
     // Member Functions
 
-        //- Return name of the set of DESModelRegions
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
         //- Read the DESModelRegions data
-        virtual void read(const dictionary&);
-
-        //- Execute, currently does nothing
-        virtual void execute();
+        virtual bool read(const dictionary&);
 
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        //- Execute
+        virtual bool execute();
 
         //- Calculate the DESModelRegions and write
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/field/Make/files b/src/functionObjects/field/Make/files
index d340a0cf8b7..2a4fab2de85 100644
--- a/src/functionObjects/field/Make/files
+++ b/src/functionObjects/field/Make/files
@@ -63,12 +63,13 @@ XiReactionRate/XiReactionRate.C
 streamFunction/streamFunction.C
 
 valueAverage/valueAverage.C
-valueAverage/valueAverageFunctionObject.C
+fluxSummary/fluxSummary.C
+mapFields/mapFields.C
+reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C 
+DESModelRegions/DESModelRegions.C
 
-wallBoundedStreamLine/wallBoundedStreamLine.C
-wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C
-wallBoundedStreamLine/wallBoundedStreamLineParticle.C
-wallBoundedStreamLine/wallBoundedStreamLineParticleCloud.C
-wallBoundedStreamLine/wallBoundedParticle.C
+externalCoupled/externalCoupled.C
+externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
+externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
 
 LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects
diff --git a/src/functionObjects/field/PecletNo/PecletNo.C b/src/functionObjects/field/PecletNo/PecletNo.C
index 81e03021f5b..1dd4c91764e 100644
--- a/src/functionObjects/field/PecletNo/PecletNo.C
+++ b/src/functionObjects/field/PecletNo/PecletNo.C
@@ -24,8 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PecletNo.H"
-#include "turbulentTransportModel.H"
-#include "turbulentFluidThermoModel.H"
+#include "turbulenceModel.H"
 #include "surfaceInterpolate.H"
 #include "addToRunTimeSelectionTable.H"
 
@@ -49,44 +48,43 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-bool Foam::functionObjects::PecletNo::calc()
+Foam::tmp<Foam::surfaceScalarField> Foam::functionObjects::PecletNo::rhoScale
+(
+    const surfaceScalarField& phi
+) const
 {
-    if (foundObject<surfaceScalarField>(fieldName_))
+    if (phi.dimensions() == dimMass/dimTime)
+    {
+        return phi/fvc::interpolate(lookupObject<volScalarField>(rhoName_));
+    }
+    else
     {
-        // Obtain nuEff of muEff.  Assumes that a compressible flux is present
-        // when using a compressible turbulence model, and an incompressible
-        // flux when using an incompressible turbulence model
+        return phi;
+    }
+}
 
-        tmp<volScalarField> nuOrMuEff;
-        if (mesh_.foundObject<cmpTurbModel>(turbulenceModel::propertiesName))
-        {
-            const cmpTurbModel& model =
-                mesh_.lookupObject<cmpTurbModel>
-                (
-                    turbulenceModel::propertiesName
-                );
 
-            nuOrMuEff = model.muEff();
-        }
-        else if
-        (
-            mesh_.foundObject<icoTurbModel>(turbulenceModel::propertiesName)
-        )
+bool Foam::functionObjects::PecletNo::calc()
+{
+    if (foundObject<surfaceScalarField>(fieldName_))
+    {
+        tmp<volScalarField> nuEff;
+        if (mesh_.foundObject<turbulenceModel>(turbulenceModel::propertiesName))
         {
-            const icoTurbModel& model =
-                mesh_.lookupObject<icoTurbModel>
+            const turbulenceModel& model =
+                lookupObject<turbulenceModel>
                 (
                     turbulenceModel::propertiesName
                 );
 
-            nuOrMuEff = model.nuEff();
+            nuEff = model.nuEff();
         }
         else if (mesh_.foundObject<dictionary>("transportProperties"))
         {
             const dictionary& model =
                 mesh_.lookupObject<dictionary>("transportProperties");
 
-            nuOrMuEff =
+            nuEff =
                 tmp<volScalarField>
                 (
                     new volScalarField
@@ -118,11 +116,11 @@ bool Foam::functionObjects::PecletNo::calc()
         return store
         (
             resultName_,
-            mag(phi)
+            mag(rhoScale(phi))
            /(
                 mesh_.magSf()
                *mesh_.surfaceInterpolation::deltaCoeffs()
-               *fvc::interpolate(nuOrMuEff)
+               *fvc::interpolate(nuEff)
             )
         );
     }
@@ -142,7 +140,8 @@ Foam::functionObjects::PecletNo::PecletNo
     const dictionary& dict
 )
 :
-    fieldExpression(name, runTime, dict, "phi")
+    fieldExpression(name, runTime, dict, "phi"),
+    rhoName_("rho")
 {
     setResultName("Pe", "phi");
 }
@@ -153,5 +152,14 @@ Foam::functionObjects::PecletNo::PecletNo
 Foam::functionObjects::PecletNo::~PecletNo()
 {}
 
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+bool Foam::functionObjects::PecletNo::read(const dictionary& dict)
+{
+    dict.readIfPresent("rho", rhoName_);
+
+    return true;
+}
+
 
 // ************************************************************************* //
diff --git a/src/functionObjects/field/PecletNo/PecletNo.H b/src/functionObjects/field/PecletNo/PecletNo.H
index e406206ee67..4b66202abf6 100644
--- a/src/functionObjects/field/PecletNo/PecletNo.H
+++ b/src/functionObjects/field/PecletNo/PecletNo.H
@@ -33,10 +33,10 @@ Description
 Usage
     Example of function object specification to calculate the Peclet number:
     \verbatim
-    Peclet1
+    PecletNo1
     {
-        type        Peclet;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        type        PecletNo;
+        libs        ("libutilityFunctionObjects.so");
         ...
     }
     \endverbatim
@@ -46,6 +46,7 @@ Usage
         Property     | Description             | Required    | Default value
         type         | type name: Peclet       | yes         |
         phi          | Name of flux field      | no          | phi
+        rho          | Name of density field   | no          | rho
         result       | Name of Peclet field    | no          | <function name>
         log          | Log to standard output  | no          | yes
     \endtable
@@ -59,6 +60,7 @@ SourceFiles
 #define functionObjects_PecletNo_H
 
 #include "fieldExpression.H"
+#include "surfaceFieldsFwd.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -75,8 +77,17 @@ class PecletNo
 :
     public fieldExpression
 {
+    // Private data
+
+        //- Name of density field, default is "rho"
+        word rhoName_;
+
+
     // Private Member Functions
 
+        //- Optionally scale the flux for compressible cases
+        tmp<surfaceScalarField> rhoScale(const surfaceScalarField& phi) const;
+
         //- Calculate the Peclet number field and return true if successful
         virtual bool calc();
 
@@ -89,8 +100,7 @@ public:
 
     // Constructors
 
-        //- Construct for given objectRegistry and dictionary.
-        //  Allow the possibility to load fields from files
+        //- Construct from Time and dictionary
         PecletNo
         (
             const word& name,
@@ -101,6 +111,12 @@ public:
 
     //- Destructor
     virtual ~PecletNo();
+
+
+    // Member Functions
+
+        //- Read the PecletNo data
+        virtual bool read(const dictionary&);
 };
 
 
diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C
index b891e621864..f631b7e851e 100644
--- a/src/functionObjects/field/blendingFactor/blendingFactor.C
+++ b/src/functionObjects/field/blendingFactor/blendingFactor.C
@@ -25,6 +25,7 @@ License
 
 #include "blendingFactor.H"
 #include "addToRunTimeSelectionTable.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -55,8 +56,8 @@ bool Foam::functionObjects::blendingFactor::calc()
 {
     bool processed = false;
 
-    processed = processed || calcBF<scalar>();
-    processed = processed || calcBF<vector>();
+    processed = processed || calcScheme<scalar>();
+    processed = processed || calcScheme<vector>();
 
     return processed;
 }
@@ -72,10 +73,13 @@ Foam::functionObjects::blendingFactor::blendingFactor
 )
 :
     fieldExpression(name, runTime, dict),
-    writeFile(obr, name)
+    writeFile(obr_, name, typeName, dict),
+    phiName_("phi"),
+    tolerance_(0.001)
 {
     read(dict);
     writeFileHeader(file());
+    setResultName(typeName, fieldName_);
 
     tmp<volScalarField> indicatorPtr
     (
@@ -84,20 +88,18 @@ Foam::functionObjects::blendingFactor::blendingFactor
             IOobject
             (
                 resultName_,
-                mesh.time().timeName(),
-                mesh,
+                time_.timeName(),
+                mesh_,
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            mesh,
+            mesh_,
             dimensionedScalar("0", dimless, 0.0),
             zeroGradientFvPatchScalarField::typeName
         )
     );
 
-    store(indicatorPtr, resultName_);
-
-    setResultName(typeName, fieldName_);
+    store(resultName_, indicatorPtr);
 }
 
 
@@ -114,16 +116,23 @@ bool Foam::functionObjects::blendingFactor::read(const dictionary& dict)
     fieldExpression::read(dict);
 
     phiName_ = dict.lookupOrDefault<word>("phi", "phi");
+    dict.readIfPresent("tolerance", tolerance_);
+    if ((tolerance_ < 0) || (tolerance_ > 1))
+    {
+        FatalErrorInFunction
+            << "tolerance must be in the range 0 to 1.  Supplied value: "
+            << tolerance_ << exit(FatalError);
+    }
 
     return true;
 }
 
 
-bool Foam::functionObjects::forces::write()
+bool Foam::functionObjects::blendingFactor::write()
 {
     if (fieldExpression::write())
     {
-        const volScalarField& indictator =
+        const volScalarField& indicator =
             lookupObject<volScalarField>(resultName_);
 
         // Generate scheme statistics
@@ -152,22 +161,22 @@ bool Foam::functionObjects::forces::write()
         reduce(nCellsScheme2, sumOp<label>());
         reduce(nCellsBlended, sumOp<label>());
 
-        Log << type() << " " << name_ << " write:" << nl
+        Log << type() << " " << name() << " write:" << nl
             << "    scheme 1 cells :  " << nCellsScheme1 << nl
             << "    scheme 2 cells :  " << nCellsScheme2 << nl
             << "    blended cells  :  " << nCellsBlended << nl
             << endl;
 
         file()
-            << mesh_.time().time().value()
+            << time_.time().value()
             << token::TAB << nCellsScheme1
             << token::TAB << nCellsScheme2
             << token::TAB << nCellsBlended
             << endl;
-        }
     }
 
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.H b/src/functionObjects/field/blendingFactor/blendingFactor.H
index b294f581abe..14438ed4305 100644
--- a/src/functionObjects/field/blendingFactor/blendingFactor.H
+++ b/src/functionObjects/field/blendingFactor/blendingFactor.H
@@ -54,7 +54,7 @@ Description
     blendingFactor1
     {
         type        blendingFactor;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        libs        ("libfieldFunctionObjects.so");
 
         ...
 
@@ -76,6 +76,7 @@ Description
 See also
     Foam::functionObjects::fieldExpression
     Foam::functionObjects::fvMeshFunctionObject
+    Foam::functionObjects::writeFile
 
 SourceFiles
     blendingFactor.C
@@ -86,6 +87,8 @@ SourceFiles
 #define functionObjects_blendingFactor_H
 
 #include "fieldExpression.H"
+#include "writeFile.H"
+#include "convectionScheme.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -100,24 +103,44 @@ namespace functionObjects
 
 class blendingFactor
 :
-    public fieldExpression
+    public fieldExpression,
+    public writeFile
 {
     // Private member data
 
         //- Name of flux field, default is "phi"
         word phiName_;
 
+        //- Tolerance used when calculating the number of blended cells
+        scalar tolerance_;
+
 
     // Private Member Functions
 
         //- Calculate the blending factor field
         template<class Type>
-        bool calcBF();
+        void calcBlendingFactor
+        (
+            const GeometricField<Type, fvPatchField, volMesh>& field,
+            const typename fv::convectionScheme<Type>& cs
+        );
+
+        //- Calculate the blending factor field
+        template<class Type>
+        bool calcScheme();
 
         //- Calculate the blending factor field and return true if successful
         virtual bool calc();
 
 
+protected:
+
+    // Protected Member Functions
+
+        //- Write the file header
+        virtual void writeFileHeader(Ostream& os) const;
+
+
 public:
 
     //- Runtime type information
diff --git a/src/functionObjects/field/blendingFactor/blendingFactorTemplates.C b/src/functionObjects/field/blendingFactor/blendingFactorTemplates.C
index 854351a554e..36948ff2b00 100644
--- a/src/functionObjects/field/blendingFactor/blendingFactorTemplates.C
+++ b/src/functionObjects/field/blendingFactor/blendingFactorTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -24,13 +24,14 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "gaussConvectionScheme.H"
+#include "boundedConvectionScheme.H"
 #include "blendedSchemeBase.H"
 #include "fvcCellReduce.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::blendingFactor::calcScheme
+void Foam::functionObjects::blendingFactor::calcBlendingFactor
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
     const typename fv::convectionScheme<Type>& cs
@@ -67,11 +68,13 @@ void Foam::blendingFactor::calcScheme
     const surfaceScalarField factorf(blendedScheme.blendingFactor(field));
 
     // Convert into vol field whose values represent the local face minima
-    // Note: factor applied to 1st scheme, and (1-factor) to 2nd scheme
+    // Note:
+    // - factor applied to 1st scheme, and (1-factor) to 2nd scheme
+    // - not using the store(...) mechanism due to need to correct BCs
     volScalarField& indicator =
         const_cast<volScalarField&>
         (
-            obr_.lookupObject<volScalarField>(resultName_)
+            lookupObject<volScalarField>(resultName_)
         );
     indicator = 1 - fvc::cellReduce(factorf, minEqOp<scalar>(), GREAT);
     indicator.correctBoundaryConditions();
@@ -79,7 +82,7 @@ void Foam::blendingFactor::calcScheme
 
 
 template<class Type>
-bool Foam::functionObjects::blendingFactor::calcBF()
+bool Foam::functionObjects::blendingFactor::calcScheme()
 {
     typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
 
@@ -95,23 +98,25 @@ bool Foam::functionObjects::blendingFactor::calcBF()
 
     const surfaceScalarField& phi = lookupObject<surfaceScalarField>(phiName_);
 
-    tmp<fv::convectionScheme<Type>> cs =
+    tmp<fv::convectionScheme<Type>> tcs =
         fv::convectionScheme<Type>::New(mesh_, phi, its);
 
-    if (isA<fv::boundedConvectionScheme<Type>>(cs))
+    if (isA<fv::boundedConvectionScheme<Type>>(tcs()))
     {
         const fv::boundedConvectionScheme<Type>& bcs =
-            refCast<const fv::boundedConvectionScheme<Type>>(cs);
+            refCast<const fv::boundedConvectionScheme<Type>>(tcs());
 
-        calcScheme(field, bcs.scheme());
+        calcBlendingFactor(field, bcs.scheme());
     }
     else
     {
         const fv::gaussConvectionScheme<Type>& gcs =
-            refCast<const fv::gaussConvectionScheme<Type>>(cs);
+            refCast<const fv::gaussConvectionScheme<Type>>(tcs());
 
-        calcScheme(field, gcs);
+        calcBlendingFactor(field, gcs);
     }
+
+    return true;
 }
 
 
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C b/src/functionObjects/field/externalCoupled/externalCoupled.C
similarity index 86%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C
rename to src/functionObjects/field/externalCoupled/externalCoupled.C
index 66f11a90385..6828d13e139 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.C
+++ b/src/functionObjects/field/externalCoupled/externalCoupled.C
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "externalCoupledFunctionObject.H"
+#include "externalCoupled.H"
 #include "addToRunTimeSelectionTable.H"
 #include "OSspecific.H"
 #include "IFstream.H"
@@ -37,24 +37,27 @@ License
 
 namespace Foam
 {
-    defineTypeNameAndDebug(externalCoupledFunctionObject, 0);
+namespace functionObjects
+{
+    defineTypeNameAndDebug(externalCoupled, 0);
 
     addToRunTimeSelectionTable
     (
         functionObject,
-        externalCoupledFunctionObject,
+        externalCoupled,
         dictionary
     );
 }
+}
 
-Foam::word Foam::externalCoupledFunctionObject::lockName = "OpenFOAM";
+Foam::word Foam::functionObjects::externalCoupled::lockName = "OpenFOAM";
 
-Foam::string Foam::externalCoupledFunctionObject::patchKey = "# Patch: ";
+Foam::string Foam::functionObjects::externalCoupled::patchKey = "# Patch: ";
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-Foam::fileName Foam::externalCoupledFunctionObject::baseDir() const
+Foam::fileName Foam::functionObjects::externalCoupled::baseDir() const
 {
     fileName result(commsDir_);
     result.clean();
@@ -63,7 +66,7 @@ Foam::fileName Foam::externalCoupledFunctionObject::baseDir() const
 }
 
 
-Foam::fileName Foam::externalCoupledFunctionObject::groupDir
+Foam::fileName Foam::functionObjects::externalCoupled::groupDir
 (
     const fileName& commsDir,
     const word& regionGroupName,
@@ -82,13 +85,13 @@ Foam::fileName Foam::externalCoupledFunctionObject::groupDir
 }
 
 
-Foam::fileName Foam::externalCoupledFunctionObject::lockFile() const
+Foam::fileName Foam::functionObjects::externalCoupled::lockFile() const
 {
     return fileName(baseDir()/(lockName + ".lock"));
 }
 
 
-void Foam::externalCoupledFunctionObject::createLockFile() const
+void Foam::functionObjects::externalCoupled::createLockFile() const
 {
     if (!Pstream::master())
     {
@@ -101,7 +104,7 @@ void Foam::externalCoupledFunctionObject::createLockFile() const
     // Only create lock file if it doesn't already exist
     if (!is.good())
     {
-        if (log_) Info<< type() << ": creating lock file" << endl;
+        Log << type() << ": creating lock file" << endl;
 
         OFstream os(fName);
         os  << "lock file";
@@ -110,27 +113,27 @@ void Foam::externalCoupledFunctionObject::createLockFile() const
 }
 
 
-void Foam::externalCoupledFunctionObject::removeLockFile() const
+void Foam::functionObjects::externalCoupled::removeLockFile() const
 {
     if (!Pstream::master())
     {
         return;
     }
 
-    if (log_) Info<< type() << ": removing lock file" << endl;
+    Log << type() << ": removing lock file" << endl;
 
     rm(lockFile());
 }
 
 
-void Foam::externalCoupledFunctionObject::removeReadFiles() const
+void Foam::functionObjects::externalCoupled::removeReadFiles() const
 {
     if (!Pstream::master())
     {
         return;
     }
 
-    if (log_) Info<< type() << ": removing all read files" << endl;
+    Log << type() << ": removing all read files" << endl;
 
     forAll(regionGroupNames_, regionI)
     {
@@ -156,14 +159,14 @@ void Foam::externalCoupledFunctionObject::removeReadFiles() const
 }
 
 
-void Foam::externalCoupledFunctionObject::removeWriteFiles() const
+void Foam::functionObjects::externalCoupled::removeWriteFiles() const
 {
     if (!Pstream::master())
     {
         return;
     }
 
-    if (log_) Info<< type() << ": removing all write files" << endl;
+    Log << type() << ": removing all write files" << endl;
 
     forAll(regionGroupNames_, regionI)
     {
@@ -189,13 +192,13 @@ void Foam::externalCoupledFunctionObject::removeWriteFiles() const
 }
 
 
-void Foam::externalCoupledFunctionObject::wait() const
+void Foam::functionObjects::externalCoupled::wait() const
 {
     const fileName fName(lockFile());
     label found = 0;
     label totalTime = 0;
 
-    if (log_) Info<< type() << ": beginning wait for lock file " << fName << nl;
+    Log << type() << ": beginning wait for lock file " << fName << nl;
 
     while (found == 0)
     {
@@ -214,30 +217,24 @@ void Foam::externalCoupledFunctionObject::wait() const
             {
                 found++;
 
-                if (log_)
-                {
-                    Info<< type() << ": found lock file " << fName << endl;
-                }
+                Log << type() << ": found lock file " << fName << endl;
             }
             else
             {
                 sleep(waitInterval_);
                 totalTime += waitInterval_;
 
-                if (log_)
-                {
-                    Info<< type() << ": wait time = " << totalTime << endl;
-                }
+                Log << type() << ": wait time = " << totalTime << endl;
             }
         }
 
-        // prevent other procs from racing ahead
+        // Prevent other procs from racing ahead
         reduce(found, sumOp<label>());
     }
 }
 
 
-void Foam::externalCoupledFunctionObject::readColumns
+void Foam::functionObjects::externalCoupled::readColumns
 (
     const label nRows,
     const label nColumns,
@@ -307,7 +304,7 @@ void Foam::externalCoupledFunctionObject::readColumns
 }
 
 
-void Foam::externalCoupledFunctionObject::readLines
+void Foam::functionObjects::externalCoupled::readLines
 (
     const label nRows,
     autoPtr<IFstream>& masterFilePtr,
@@ -369,7 +366,7 @@ void Foam::externalCoupledFunctionObject::readLines
 }
 
 
-void Foam::externalCoupledFunctionObject::writeGeometry
+void Foam::functionObjects::externalCoupled::writeGeometry
 (
     const UPtrList<const fvMesh>& meshes,
     const fileName& commsDir,
@@ -387,10 +384,7 @@ void Foam::externalCoupledFunctionObject::writeGeometry
 
     fileName dir(groupDir(commsDir, compositeName(regionNames), groupName));
 
-    //if (log_)
-    {
-        Info<< typeName << ": writing geometry to " << dir << endl;
-    }
+    Info<< typeName << ": writing geometry to " << dir << endl;
 
     autoPtr<OFstream> osPointsPtr;
     autoPtr<OFstream> osFacesPtr;
@@ -408,27 +402,25 @@ void Foam::externalCoupledFunctionObject::writeGeometry
     forAll(meshes, meshI)
     {
         const fvMesh& mesh = meshes[meshI];
+        const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
         const labelList patchIDs
         (
-            mesh.boundaryMesh().patchSet
-            (
-                List<wordRe>(1, groupName)
-            ).sortedToc()
+            pbm.patchSet(List<wordRe>(1, groupName)).sortedToc()
         );
 
         // Count faces
         label nFaces = 0;
         forAll(patchIDs, i)
         {
-            nFaces += mesh.boundaryMesh()[patchIDs[i]].size();
+            nFaces += pbm[patchIDs[i]].size();
         }
 
         // Collect faces
         DynamicList<label> allFaceIDs(nFaces);
         forAll(patchIDs, i)
         {
-            const polyPatch& p = mesh.boundaryMesh()[patchIDs[i]];
+            const polyPatch& p = pbm[patchIDs[i]];
 
             forAll(p, pI)
             {
@@ -499,7 +491,6 @@ void Foam::externalCoupledFunctionObject::writeGeometry
             }
         }
 
-        //if (log_)
         {
             Info<< typeName << ": for mesh " << mesh.name()
                 << " writing " << allMeshesPoints.size() << " points to "
@@ -524,7 +515,7 @@ void Foam::externalCoupledFunctionObject::writeGeometry
 }
 
 
-Foam::word Foam::externalCoupledFunctionObject::compositeName
+Foam::word Foam::functionObjects::externalCoupled::compositeName
 (
     const wordList& regionNames
 )
@@ -564,7 +555,7 @@ Foam::word Foam::externalCoupledFunctionObject::compositeName
 }
 
 
-void Foam::externalCoupledFunctionObject::checkOrder
+void Foam::functionObjects::externalCoupled::checkOrder
 (
     const wordList& regionNames
 )
@@ -580,7 +571,7 @@ void Foam::externalCoupledFunctionObject::checkOrder
 }
 
 
-void Foam::externalCoupledFunctionObject::readData()
+void Foam::functionObjects::externalCoupled::readData()
 {
     forAll(regionGroupNames_, regionI)
     {
@@ -650,7 +641,7 @@ void Foam::externalCoupledFunctionObject::readData()
 }
 
 
-void Foam::externalCoupledFunctionObject::writeData() const
+void Foam::functionObjects::externalCoupled::writeData() const
 {
     forAll(regionGroupNames_, regionI)
     {
@@ -720,7 +711,7 @@ void Foam::externalCoupledFunctionObject::writeData() const
 }
 
 
-void Foam::externalCoupledFunctionObject::initialise()
+void Foam::functionObjects::externalCoupled::initialise()
 {
     if (initialised_)
     {
@@ -780,7 +771,7 @@ void Foam::externalCoupledFunctionObject::initialise()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::externalCoupledFunctionObject::externalCoupledFunctionObject
+Foam::functionObjects::externalCoupled::externalCoupled
 (
     const word& name,
     const Time& runTime,
@@ -808,37 +799,15 @@ Foam::externalCoupledFunctionObject::externalCoupledFunctionObject
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::externalCoupledFunctionObject::~externalCoupledFunctionObject()
+Foam::functionObjects::externalCoupled::~externalCoupled()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::externalCoupledFunctionObject::on()
+bool Foam::functionObjects::externalCoupled::execute()
 {
-    enabled_ = true;
-}
-
-
-void Foam::externalCoupledFunctionObject::off()
-{
-    enabled_ = false;
-}
-
-
-bool Foam::externalCoupledFunctionObject::start()
-{
-    return true;
-}
-
-
-bool Foam::externalCoupledFunctionObject::execute(const bool forceWrite)
-{
-    if
-    (
-        enabled()
-     && (!initialised_ || time_.timeIndex() % calcFrequency_ == 0)
-    )
+    if (!initialised_ || time_.timeIndex() % calcFrequency_ == 0)
     {
         // Initialise the coupling
         initialise();
@@ -870,34 +839,20 @@ bool Foam::externalCoupledFunctionObject::execute(const bool forceWrite)
 }
 
 
-bool Foam::externalCoupledFunctionObject::end()
+bool Foam::functionObjects::externalCoupled::end()
 {
-    if (enabled())
-    {
-        // Remove old data files
-        removeReadFiles();
-        removeWriteFiles();
-        removeLockFile();
-    }
-
-    return true;
-}
+    functionObject::end();
 
+    // Remove old data files
+    removeReadFiles();
+    removeWriteFiles();
+    removeLockFile();
 
-bool Foam::externalCoupledFunctionObject::timeSet()
-{
-    // Do nothing - only valid on execute
     return true;
 }
 
 
-bool Foam::externalCoupledFunctionObject::adjustTimeStep()
-{
-    return true;
-}
-
-
-bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
+bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
 {
     dict.readIfPresent("enabled", enabled_);
 
@@ -913,14 +868,12 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
     timeOut_ = dict.lookupOrDefault("timeOut", 100*waitInterval_);
     calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1);
     initByExternal_ = readBool(dict.lookup("initByExternal"));
-    log_ = dict.lookupOrDefault("log", false);
 
 
     // Get names of all fvMeshes (and derived types)
     wordList allRegionNames(time_.lookupClass<fvMesh>().sortedToc());
 
 
-
     const dictionary& allRegionsDict = dict.subDict("regions");
 
     forAllConstIter(dictionary, allRegionsDict, iter)
@@ -982,7 +935,7 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
 
 
     // Print a bit
-    if (log_)
+    if (log)
     {
         Info<< type() << ": Communicating with regions:" << endl;
         forAll(regionGroupNames_, rgI)
@@ -1031,11 +984,8 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
                 fileName dir(groupDir(commsDir_, compName, groupName));
                 if (!isDir(dir))
                 {
-                    if (log_)
-                    {
-                        Info<< type() << ": creating communications directory "
-                            << dir << endl;
-                    }
+                    Log << type() << ": creating communications directory "
+                        << dir << endl;
                     mkDir(dir);
                 }
             }
@@ -1046,12 +996,10 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
 }
 
 
-void Foam::externalCoupledFunctionObject::updateMesh(const mapPolyMesh& mpm)
-{}
-
-
-void Foam::externalCoupledFunctionObject::movePoints(const polyMesh& mesh)
-{}
+bool Foam::functionObjects::externalCoupled::write()
+{
+    return true;
+}
 
 
 // ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H b/src/functionObjects/field/externalCoupled/externalCoupled.H
similarity index 84%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H
rename to src/functionObjects/field/externalCoupled/externalCoupled.H
index 458296f99f7..96ae2392cdb 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H
+++ b/src/functionObjects/field/externalCoupled/externalCoupled.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,10 +22,10 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::externalCoupledFunctionObject
+    Foam::functionObjects::externalCoupled
 
 Group
-    grpJobControlFunctionObjects
+    grpUtilitiesFunctionObjects
 
 Description
     This functionObject provides a simple interface for explicit coupling with
@@ -51,7 +51,7 @@ Description
         <regionsName>/<patchGroup>/<fieldName>.[in|out]
 
     (where regionsName is either the name of a single region or a composite
-     of multiple region names)
+    of multiple region names)
 
     At start-up, the boundary creates a lock file, i.e..
 
@@ -73,7 +73,7 @@ Description
     read these values, apply them to the boundary conditions and pass
     program execution back to OpenFOAM.
 
-    Example of function object specification:
+Usage
     \verbatim
     externalCoupled
     {
@@ -111,12 +111,12 @@ Description
     application.
 
 SourceFiles
-    externalCoupledFunctionObject.C
+    externalCoupledTemplates.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef externalCoupledFunctionObject_H
-#define externalCoupledFunctionObject_H
+#ifndef functionObjects_externalCoupled_H
+#define functionObjects_externalCoupled_H
 
 #include "functionObject.H"
 #include "DynamicList.H"
@@ -131,17 +131,17 @@ namespace Foam
 {
 
 // Forward declaration of classes
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
-class IFstream;
 class fvMesh;
+class IFstream;
+
+namespace functionObjects
+{
 
 /*---------------------------------------------------------------------------*\
-                Class externalCoupledFunctionObject Declaration
+                      Class externalCoupled Declaration
 \*---------------------------------------------------------------------------*/
 
-class externalCoupledFunctionObject
+class externalCoupled
 :
     public functionObject
 {
@@ -168,9 +168,6 @@ class externalCoupledFunctionObject
         //- Flag to indicate values are initialised by external application
         bool initByExternal_;
 
-        //- Log flag
-        bool log_;
-
         //- Names of (composite) regions
         DynamicList<word> regionGroupNames_;
 
@@ -279,11 +276,11 @@ class externalCoupledFunctionObject
 
         static void checkOrder(const wordList&);
 
-        //- Disallow default bitwise copy construc
-        externalCoupledFunctionObject(const externalCoupledFunctionObject&);
+        //- Disallow default bitwise copy constructor
+        externalCoupled(const externalCoupled&) = delete;
 
-        //- Disallow default bitwise assignmen
-        void operator=(const externalCoupledFunctionObject&);
+        //- Disallow default bitwise assignment
+        void operator=(const externalCoupled&) = delete;
 
 
 public:
@@ -301,7 +298,7 @@ public:
     // Constructors
 
         //- Construct given time and dictionary
-        externalCoupledFunctionObject
+        externalCoupled
         (
             const word& name,
             const Time& runTime,
@@ -310,51 +307,24 @@ public:
 
 
     //- Destructor
-    virtual ~externalCoupledFunctionObject();
+    virtual ~externalCoupled();
 
 
     // Member Functions
 
-        // Access
-
-            //- Return the enabled flag
-            virtual bool enabled() const
-            {
-                return enabled_;
-            }
-
-
         // Function object control
 
-            //- Switch the function object on
-            virtual void on();
-
-            //- Switch the function object off
-            virtual void off();
-
-            //- Called at the start of the time-loop
-            virtual bool start();
-
             //- Called at each ++ or += of the time-loop
-            virtual bool execute(const bool forceWrite);
+            virtual bool execute();
 
             //- Called when Time::run() determines that the time-loop exits
             virtual bool end();
 
-            //- Called when time was set at the end of the Time::operator++
-            virtual bool timeSet();
-
-            //- Called at the end of Time::adjustDeltaT() if adjustTime is true
-            virtual bool adjustTimeStep();
-
             //- Read and set the function object if its data have changed
             virtual bool read(const dictionary&);
 
-            //- Update for changes of mesh
-            virtual void updateMesh(const mapPolyMesh& mpm);
-
-            //- Update for changes of mesh
-            virtual void movePoints(const polyMesh& mesh);
+            //- Write
+            virtual bool write();
 
 
         // Other
@@ -375,12 +345,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "externalCoupledFunctionObjectTemplates.C"
+    #include "externalCoupledTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
rename to src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
rename to src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
rename to src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.H b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.H
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.H
rename to src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.H
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFieldsFwd.H b/src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFieldsFwd.H
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFieldsFwd.H
rename to src/functionObjects/field/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFieldsFwd.H
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
similarity index 99%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
rename to src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
index ba2ac858a56..b86ada44091 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
+++ b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
@@ -157,7 +157,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
         IOobject::groupName
         (
             turbulenceModel::propertiesName,
-            dimensionedInternalField().group()
+            internalField().group()
         )
     );
 
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
similarity index 100%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
rename to src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C b/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C
similarity index 95%
rename from src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C
rename to src/functionObjects/field/externalCoupled/externalCoupledTemplates.C
index 9e92ff047a3..997dfffd3e3 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C
+++ b/src/functionObjects/field/externalCoupled/externalCoupledTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "externalCoupledFunctionObject.H"
+#include "externalCoupled.H"
+//#include "fvMesh.H"
 #include "OSspecific.H"
 #include "IFstream.H"
 #include "OFstream.H"
@@ -38,7 +39,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-bool Foam::externalCoupledFunctionObject::readData
+bool Foam::functionObjects::externalCoupled::readData
 (
     const UPtrList<const fvMesh>& meshes,
     const wordRe& groupName,
@@ -65,10 +66,8 @@ bool Foam::externalCoupledFunctionObject::readData
           / fieldName + ".in"
         );
 
-        if (log_)
-        {
-            Info<< type() << ": reading data from " << transferFile << endl;
-        }
+        Log << type() << ": reading data from " << transferFile << endl;
+
         masterFilePtr.reset(new IFstream(transferFile));
 
         if (!masterFilePtr().good())
@@ -96,8 +95,7 @@ bool Foam::externalCoupledFunctionObject::readData
         nFound++;
 
         const volFieldType& cvf = mesh.lookupObject<volFieldType>(fieldName);
-        const typename volFieldType::GeometricBoundaryField& bf =
-            cvf.boundaryField();
+        const typename volFieldType::Boundary& bf = cvf.boundaryField();
 
 
         // Get the patches
@@ -294,7 +292,7 @@ bool Foam::externalCoupledFunctionObject::readData
 
 template<class Type>
 Foam::tmp<Foam::Field<Type>>
-Foam::externalCoupledFunctionObject::gatherAndCombine
+Foam::functionObjects::externalCoupled::gatherAndCombine
 (
     const Field<Type>& fld
 )
@@ -338,7 +336,7 @@ Foam::externalCoupledFunctionObject::gatherAndCombine
 
 
 template<class Type>
-bool Foam::externalCoupledFunctionObject::writeData
+bool Foam::functionObjects::externalCoupled::writeData
 (
     const UPtrList<const fvMesh>& meshes,
     const wordRe& groupName,
@@ -365,10 +363,8 @@ bool Foam::externalCoupledFunctionObject::writeData
           / fieldName + ".out"
         );
 
-        if (log_)
-        {
-            Info<< type() << ": writing data to " << transferFile << endl;
-        }
+        Log << type() << ": writing data to " << transferFile << endl;
+
         masterFilePtr.reset(new OFstream(transferFile));
 
         if (!masterFilePtr().good())
@@ -397,8 +393,7 @@ bool Foam::externalCoupledFunctionObject::writeData
         nFound++;
 
         const volFieldType& cvf = mesh.lookupObject<volFieldType>(fieldName);
-        const typename volFieldType::GeometricBoundaryField& bf =
-            cvf.boundaryField();
+        const typename volFieldType::Boundary& bf = cvf.boundaryField();
 
 
         // Get the patches
diff --git a/src/functionObjects/field/fieldAverage/fieldAverage.C b/src/functionObjects/field/fieldAverage/fieldAverage.C
index a17fde8f8ee..cf076159c44 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverage.C
+++ b/src/functionObjects/field/fieldAverage/fieldAverage.C
@@ -69,7 +69,7 @@ void Foam::functionObjects::fieldAverage::initialize()
 {
     resetFields();
 
-    Log << type() << " " << name_ << ":" << nl;
+    Log << type() << " " << name() << ":" << nl;
 
     // Add mean fields to the field lists
     forAll(faItems_, fieldi)
@@ -187,7 +187,7 @@ void Foam::functionObjects::fieldAverage::writeAverages() const
 }
 
 
-void Foam::fieldAverage::writeAveragingProperties()
+void Foam::functionObjects::fieldAverage::writeAveragingProperties()
 {
     forAll(faItems_, fieldi)
     {
diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
index 308bf1649de..efd22faf118 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
+++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
@@ -55,6 +55,7 @@ const Foam::NamedEnum
 
 Foam::functionObjects::fieldAverageItem::fieldAverageItem()
 :
+    active_(false),
     fieldName_("unknown"),
     mean_(0),
     meanFieldName_("unknown"),
@@ -71,6 +72,7 @@ Foam::functionObjects::fieldAverageItem::fieldAverageItem
     const fieldAverageItem& faItem
 )
 :
+    active_(faItem.active_),
     fieldName_(faItem.fieldName_),
     mean_(faItem.mean_),
     meanFieldName_(faItem.meanFieldName_),
@@ -104,6 +106,7 @@ void Foam::functionObjects::fieldAverageItem::operator=
     }
 
     // Set updated values
+    active_ = rhs.active_;
     fieldName_ = rhs.fieldName_;
     mean_ = rhs.mean_;
     meanFieldName_ = rhs.meanFieldName_;
diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.H b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.H
index 63e2b02c1fa..d0b900f0e8b 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.H
+++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.H
@@ -100,17 +100,20 @@ private:
 
     // Private data
 
+        //- Active flag
+        bool active_;
+
         //- Field name
         word fieldName_;
 
         //- Compute mean flag
-        Switch mean_;
+        bool mean_;
 
         //- Name of mean field
         word meanFieldName_;
 
         //- Compute prime-squared mean flag
-        Switch prime2Mean_;
+        bool prime2Mean_;
 
         //- Name of prime-squared mean field
         word prime2MeanFieldName_;
@@ -150,6 +153,18 @@ public:
 
         // Access
 
+            //- Return const access to the active flag
+            bool active() const
+            {
+                return active_;
+            }
+
+            //- Return non-const access to the active flag
+            bool& active()
+            {
+                return active_;
+            }
+
             //- Return const access to the field name
             const word& fieldName() const
             {
@@ -157,13 +172,13 @@ public:
             }
 
             //- Return const access to the mean flag
-            const Switch& mean() const
+            bool mean() const
             {
                 return mean_;
             }
 
             //- Return non-const access to the mean flag
-            Switch& mean()
+            bool& mean()
             {
                 return mean_;
             }
@@ -175,13 +190,13 @@ public:
             }
 
             //- Return const access to the prime-squared mean flag
-            const Switch& prime2Mean() const
+            bool prime2Mean() const
             {
                 return prime2Mean_;
             }
 
             //- Return non-const access to the prime-squared mean flag
-            Switch& prime2Mean()
+            bool& prime2Mean()
             {
                 return prime2Mean_;
             }
@@ -199,13 +214,13 @@ public:
             }
 
             //- Return true if base is ITER
-            Switch iterBase() const
+            bool iterBase() const
             {
                 return base_ == ITER;
             }
 
             //- Return true if base is time
-            Switch timeBase() const
+            bool timeBase() const
             {
                 return base_ == TIME;
             }
@@ -235,7 +250,8 @@ public:
         )
         {
             return
-                a.fieldName_ == b.fieldName_
+                a.active_ == b.active_
+             && a.fieldName_ == b.fieldName_
              && a.mean_ == b.mean_
              && a.meanFieldName_ == b.meanFieldName_
              && a.prime2Mean_ == b.prime2Mean_
diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
index 304d88d5f49..7aaf5b49468 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
+++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
@@ -31,6 +31,7 @@ License
 
 Foam::functionObjects::fieldAverageItem::fieldAverageItem(Istream& is)
 :
+    active_(false),
     fieldName_("unknown"),
     mean_(0),
     meanFieldName_("unknown"),
@@ -48,8 +49,8 @@ Foam::functionObjects::fieldAverageItem::fieldAverageItem(Istream& is)
     const dictionaryEntry entry(dictionary::null, is);
 
     fieldName_ = entry.keyword();
-    entry.lookup("mean") >> mean_;
-    entry.lookup("prime2Mean") >> prime2Mean_;
+    mean_ = readBool(entry.lookup("mean"));
+    prime2Mean_ = readBool(entry.lookup("prime2Mean"));
     base_ = baseTypeNames_[entry.lookup("base")];
     window_ = entry.lookupOrDefault<scalar>("window", -1.0);
     windowName_ = entry.lookupOrDefault<word>("windowName", "");
@@ -80,9 +81,10 @@ Foam::Istream& Foam::functionObjects::operator>>
 
     const dictionaryEntry entry(dictionary::null, is);
 
+    faItem.active_ = false;
     faItem.fieldName_ = entry.keyword();
-    entry.lookup("mean") >> faItem.mean_;
-    entry.lookup("prime2Mean") >> faItem.prime2Mean_;
+    faItem.mean_ = readBool(entry.lookup("mean"));
+    faItem.prime2Mean_ = readBool(entry.lookup("prime2Mean"));
     faItem.base_ = faItem.baseTypeNames_[entry.lookup("base")];
     faItem.window_ = entry.lookupOrDefault<scalar>("window", -1.0);
     faItem.windowName_ = entry.lookupOrDefault<word>("windowName", "");
diff --git a/src/functionObjects/field/fieldAverage/fieldAverageTemplates.C b/src/functionObjects/field/fieldAverage/fieldAverageTemplates.C
index b4c435143e3..f5995f718a7 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverageTemplates.C
+++ b/src/functionObjects/field/fieldAverage/fieldAverageTemplates.C
@@ -33,6 +33,9 @@ License
 template<class Type>
 void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldi)
 {
+    // Field has been found, so set active flag to true
+    faItems_[fieldi].active() = true;
+
     const word& fieldName = faItems_[fieldi].fieldName();
     const word& meanFieldName = faItems_[fieldi].meanFieldName();
 
diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C
index c03c49cae78..e0d65cc7078 100644
--- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C
+++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -55,18 +55,15 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
     typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
     typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
 
-    if (mesh_.foundObject<VolFieldType>(fieldName))
+    if (foundObject<VolFieldType>(fieldName))
     {
         DebugInfo
             << type() << ": Field " << fieldName << " already in database"
             << endl;
 
-        transformField<VolFieldType>
-        (
-            mesh_.lookupObject<VolFieldType>(fieldName)
-        );
+        transformField<VolFieldType>(lookupObject<VolFieldType>(fieldName));
     }
-    else if (mesh_.foundObject<SurfaceFieldType>(fieldName))
+    else if (foundObject<SurfaceFieldType>(fieldName))
     {
         DebugInfo
             << type() << ": Field " << fieldName << " already in database"
@@ -74,7 +71,7 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
 
         transformField<SurfaceFieldType>
         (
-            mesh_.lookupObject<SurfaceFieldType>(fieldName)
+            lookupObject<SurfaceFieldType>(fieldName)
         );
     }
     else
@@ -88,11 +85,7 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
             IOobject::NO_WRITE
         );
 
-        if
-        (
-            fieldHeader.headerOk()
-         && fieldHeader.headerClassName() == VolFieldType::typeName
-        )
+        if (fieldHeader.typeHeaderOk<VolFieldType>(true))
         {
             DebugInfo
                 << type() << ": Field " << fieldName << " read from file"
@@ -100,14 +93,10 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
 
             transformField<VolFieldType>
             (
-                mesh_.lookupObject<VolFieldType>(fieldName)
+                lookupObject<VolFieldType>(fieldName)
             );
         }
-        else if
-        (
-            fieldHeader.headerOk()
-         && fieldHeader.headerClassName() == SurfaceFieldType::typeName
-        )
+        else if (fieldHeader.typeHeaderOk<SurfaceFieldType>(true))
         {
             DebugInfo
                 << type() << ": Field " << fieldName << " read from file"
@@ -115,7 +104,7 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
 
             transformField<SurfaceFieldType>
             (
-                mesh_.lookupObject<SurfaceFieldType>(fieldName)
+                lookupObject<SurfaceFieldType>(fieldName)
             );
         }
     }
diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/functionObjects/field/fieldMinMax/fieldMinMax.C
index 6dd488e0e3f..5c6f4f4d6af 100644
--- a/src/functionObjects/field/fieldMinMax/fieldMinMax.C
+++ b/src/functionObjects/field/fieldMinMax/fieldMinMax.C
@@ -54,12 +54,12 @@ const Foam::NamedEnum
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-void Foam::fieldMinMax::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::fieldMinMax::writeFileHeader(Ostream& os) const
 {
     writeHeader(os, "Field minima and maxima");
     writeCommented(os, "Time");
 
-    if (writeLocation_)
+    if (location_)
     {
         writeTabbed(os, "field");
         writeTabbed(os, "min");
@@ -101,7 +101,7 @@ Foam::functionObjects::fieldMinMax::fieldMinMax
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    writeFile(obr_, name, typeName, dict),
+    writeFile(mesh_, name, typeName, dict),
     location_(true),
     mode_(mdMag),
     fieldSet_()
@@ -159,5 +159,4 @@ bool Foam::functionObjects::fieldMinMax::write()
 }
 
 
-
 // ************************************************************************* //
diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/functionObjects/field/fieldMinMax/fieldMinMax.H
index 40037078289..eb65e22da5d 100644
--- a/src/functionObjects/field/fieldMinMax/fieldMinMax.H
+++ b/src/functionObjects/field/fieldMinMax/fieldMinMax.H
@@ -44,7 +44,7 @@ Description
         ...
         writeToFile yes;
         log         yes;
-        writeLocation yes;
+        location    yes;
         mode        magnitude;
         fields      (U p);
     }
@@ -56,7 +56,7 @@ Usage
         type         | type name: fieldMinMax  | yes         |
         writeToFile  | write min/max data to file | no       | yes
         log          | write min/max data to standard output | no | yes
-        writeLocation | write location of the min/max value | no | yes
+        location     | write location of the min/max value | no | yes
         mode         | calculation mode: magnitude or component | no | magnitude
         fields       | list of fields to process | yes       |
     \endtable
@@ -117,7 +117,7 @@ protected:
         static const NamedEnum<modeType, 2> modeTypeNames_;
 
         //- Switch to write location of min/max values
-        Switch writeLocation_;
+        Switch location_;
 
         //- Mode for min/max - only applicable for ranks > 0
         modeType mode_;
diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C
index f1d206184fc..d50548bc2da 100644
--- a/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C
+++ b/src/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C
@@ -43,7 +43,7 @@ void Foam::functionObjects::fieldMinMax::output
 {
     OFstream& file = this->file();
 
-    if (writeLocation_)
+    if (location_)
     {
         writeTime(file());
 
@@ -97,10 +97,10 @@ void Foam::functionObjects::fieldMinMax::output
     word nameStr('(' + outputName + ')');
     this->setResult("min" + nameStr, minValue);
     this->setResult("min" + nameStr + "_position", minC);
-    this->setResult("min" + nameStr + "_processor", minProcI);
+    this->setResult("min" + nameStr + "_processor", minProci);
     this->setResult("max" + nameStr, maxValue);
     this->setResult("max" + nameStr + "_position", maxC);
-    this->setResult("max" + nameStr + "_processor", maxProcI);
+    this->setResult("max" + nameStr + "_processor", maxProci);
 }
 
 
@@ -117,7 +117,7 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
     {
         const label proci = Pstream::myProcNo();
 
-        const fieldType& field = obr_.lookupObject<fieldType>(fieldName);
+        const fieldType& field = lookupObject<fieldType>(fieldName);
 
         const volVectorField::Boundary& CfBoundary =
             mesh_.C().boundaryField();
@@ -177,13 +177,13 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
                 Pstream::gatherList(maxCs);
                 Pstream::scatterList(maxCs);
 
-                label minI = findMin(minVs);
-                scalar minValue = minVs[minI];
-                const vector& minC = minCs[minI];
+                label mini = findMin(minVs);
+                scalar minValue = minVs[mini];
+                const vector& minC = minCs[mini];
 
-                label maxI = findMax(maxVs);
-                scalar maxValue = maxVs[maxI];
-                const vector& maxC = maxCs[maxI];
+                label maxi = findMax(maxVs);
+                scalar maxValue = maxVs[maxi];
+                const vector& maxC = maxCs[maxi];
 
                 output
                 (
@@ -191,8 +191,8 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
                     word("mag(" + fieldName + ")"),
                     minC,
                     maxC,
-                    minI,
-                    maxI,
+                    mini,
+                    maxi,
                     minValue,
                     maxValue
                 );
@@ -225,18 +225,18 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
                     {
                         const vectorField& Cfp = CfBoundary[patchi];
 
-                        label minPI = findMin(fp);
-                        if (fp[minPI] < minVs[proci])
+                        label minPi = findMin(fp);
+                        if (fp[minPi] < minVs[proci])
                         {
-                            minVs[proci] = fp[minPI];
-                            minCs[proci] = Cfp[minPI];
+                            minVs[proci] = fp[minPi];
+                            minCs[proci] = Cfp[minPi];
                         }
 
-                        label maxPI = findMax(fp);
-                        if (fp[maxPI] > maxVs[proci])
+                        label maxPi = findMax(fp);
+                        if (fp[maxPi] > maxVs[proci])
                         {
-                            maxVs[proci] = fp[maxPI];
-                            maxCs[proci] = Cfp[maxPI];
+                            maxVs[proci] = fp[maxPi];
+                            maxCs[proci] = Cfp[maxPi];
                         }
                     }
                 }
@@ -251,13 +251,13 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
                 Pstream::gatherList(maxCs);
                 Pstream::scatterList(maxCs);
 
-                label minI = findMin(minVs);
-                Type minValue = minVs[minI];
-                const vector& minC = minCs[minI];
+                label mini = findMin(minVs);
+                Type minValue = minVs[mini];
+                const vector& minC = minCs[mini];
 
-                label maxI = findMax(maxVs);
-                Type maxValue = maxVs[maxI];
-                const vector& maxC = maxCs[maxI];
+                label maxi = findMax(maxVs);
+                Type maxValue = maxVs[maxi];
+                const vector& maxC = maxCs[maxi];
 
                 output
                 (
@@ -265,8 +265,8 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
                     fieldName,
                     minC,
                     maxC,
-                    minI,
-                    maxI,
+                    mini,
+                    maxi,
                     minValue,
                     maxValue
                 );
diff --git a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C
index 21d9fbb34ed..42f57bb9f71 100644
--- a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C
+++ b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C
@@ -93,6 +93,7 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
     }
 
     fvMeshFunctionObject::read(dict);
+    writeFile::read(dict);
 
     dict.lookup("fields") >> fields_;
     dict.lookup("writeFields") >> writeFields_;
diff --git a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.H b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.H
index 1c73f7f02d6..6278eea50a7 100644
--- a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.H
+++ b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.H
@@ -53,14 +53,11 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
-class fvMesh;
-
 namespace functionObjects
 {
 
 /*---------------------------------------------------------------------------*\
-                       Class fieldValue Declaration
+                         Class fieldValue Declaration
 \*---------------------------------------------------------------------------*/
 
 class fieldValue
@@ -73,6 +70,9 @@ protected:
 
     // Protected data
 
+        //- Optional scale value
+        scalar scaleFactor_;
+
         //- Construction dictionary
         dictionary dict_;
 
diff --git a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C
index 27cdee7034d..90010c4669e 100644
--- a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C
+++ b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C
@@ -62,7 +62,10 @@ const Foam::NamedEnum
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-void Foam::fieldValues::fieldValueDelta::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::fieldValues::fieldValueDelta::writeFileHeader
+(
+    Ostream& os
+) const
 {
     const wordList& fields1 = region1Ptr_->fields();
     const wordList& fields2 = region2Ptr_->fields();
@@ -100,7 +103,7 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta
     const dictionary& dict
 )
 :
-    regionFunctionObject(name, runTime, dict),
+    fvMeshFunctionObject(name, runTime, dict),
     writeFile(obr_, name, typeName, dict),
     operation_(opSubtract),
     region1Ptr_(nullptr),
@@ -124,7 +127,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::read
     const dictionary& dict
 )
 {
-    regionFunctionObject::read(dict);
+    fvMeshFunctionObject::read(dict);
 
     writeFile::read(dict);
 
@@ -164,8 +167,8 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
 
     Log << type() << " " << name() << " write:" << endl;
 
-    const word& name1 = source1Ptr_->name();
-    const word& name2 = source2Ptr_->name();
+    const word& name1 = region1Ptr_->name();
+    const word& name2 = region2Ptr_->name();
 
     const wordList entries1 = objectResultEntries(name1);
     const wordList entries2 = objectResultEntries(name2);
@@ -173,7 +176,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
     if (entries1.size() != entries2.size())
     {
         FatalErrorInFunction
-            << name_ << ": objects must generate the same number of results"
+            << name() << ": objects must generate the same number of results"
             << nl
             << "    " << name1 << " objects: " << entries1 << nl
             << "    " << name2 << " objects: " << entries2 << nl
@@ -190,7 +193,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write()
         if (type1 != type2)
         {
             FatalErrorInFunction
-                << name_
+                << name()
                 << ": input values for operation must be of the same type"
                 << nl
                 << "    " << entry1 << ": " << type1 << nl
diff --git a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
index bb44a1d8101..5a9687f53fc 100644
--- a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+++ b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
@@ -2,13 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
-=======
     \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,15 +28,10 @@ Group
     grpFieldFunctionObjects
 
 Description
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-    This function object provides applies an operation to the output of two
-    fieldValue function objects.
+    Provides an operation between two 'field value' function objects.
 
     The operation is applied to all results of each fieldValue object.
     Accordingly, each object must generate the same number and type of results.
-=======
-    Provides a differencing option between two 'field value' function objects.
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
 
     Example of function object specification:
     \verbatim
@@ -77,16 +67,11 @@ Usage
        average       | average
     \endplaintable
 
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-SeeAlso
-    Foam::fieldValue
-=======
 See also
     Foam::functionObject
-    Foam::functionObject::fieldValue
+    Foam::functionObjects::fieldValue
     Foam::functionObjects::regionFunctionObject
-    Foam::functionObjects::logFiles
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+    Foam::functionObjects::writeFile
 
 SourceFiles
     fieldValueDelta.C
@@ -96,13 +81,8 @@ SourceFiles
 #ifndef functionObjects_fieldValueDelta_H
 #define functionObjects_fieldValueDelta_H
 
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-#include "functionObjectState.H"
-#include "functionObjectFile.H"
-=======
-#include "regionFunctionObject.H"
-#include "logFiles.H"
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+#include "stateFunctionObject.H"
+#include "writeFile.H"
 #include "fieldValue.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -120,23 +100,18 @@ namespace fieldValues
 
 class fieldValueDelta
 :
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-    public functionObjectState,
-    public functionObjectFile
-=======
-    public regionFunctionObject,
-    public logFiles
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
+    public fvMeshFunctionObject,
+    public writeFile
 {
 public:
         //- Operation type enumeration
         enum operationType
         {
-            opAdd,
-            opSubtract,
-            opMin,
-            opMax,
-            opAverage
+            opAdd,              //< Add
+            opSubtract,         //< Subtract
+            opMin,              //< Minimum
+            opMax,              //< Maximum
+            opAverage           //< Average
         };
 
         //- Operation type names
@@ -147,18 +122,6 @@ private:
 
     // Private data
 
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
-        //- Database this class is registered to
-        const objectRegistry& obr_;
-
-        //- Flag to indicate to load from files
-        bool loadFromFiles_;
-
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
-=======
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H
         //- Operation to apply to values
         operationType operation_;
 
@@ -173,7 +136,7 @@ private:
 
         //- Templated function to apply the operation
         template<class Type>
-        void apply
+        void applyOperation
         (
             const word& resultType,
             const word& name1,
diff --git a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
index 79250977a1c..13ce520a285 100644
--- a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
+++ b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Type Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
+void Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
 (
     const word& resultType,
     const word& name1,
diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C
index 5c0633c4e13..907d365d5c9 100644
--- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C
+++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C
@@ -25,7 +25,6 @@ License
 
 #include "surfaceFieldValue.H"
 #include "fvMesh.H"
-#include "cyclicPolyPatch.H"
 #include "emptyPolyPatch.H"
 #include "coupledPolyPatch.H"
 #include "sampledSurface.H"
@@ -489,7 +488,7 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
         if (weightFieldName_ == "none")
         {
             dict.lookup("orientedWeightField") >>  weightFieldName_;
-            if (log_) Info << "    weight field = " << weightFieldName_ << nl;
+            Log << "    weight field = " << weightFieldName_ << nl;
             orientWeightField_ = true;
         }
         else
@@ -527,7 +526,10 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::initialise
 }
 
 
-void Foam::fieldValues::faceSource::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::fieldValues::surfaceFieldValue::writeFileHeader
+(
+    Ostream& os
+) const
 {
     if (operation_ != opNone)
     {
@@ -649,7 +651,6 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
     weightFieldName_("none"),
     orientWeightField_(false),
     orientedFieldsStart_(labelMax),
-    scaleFactor_(1.0),
     writeArea_(dict.lookupOrDefault("writeArea", false)),
     nFaces_(0),
     faceId_(),
@@ -675,7 +676,6 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::surfaceFieldValue
     weightFieldName_("none"),
     orientWeightField_(false),
     orientedFieldsStart_(labelMax),
-    scaleFactor_(1.0),
     writeArea_(dict.lookupOrDefault("writeArea", false)),
     nFaces_(0),
     faceId_(),
diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.H b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.H
index 2d2b200233b..963d60ce740 100644
--- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.H
+++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.H
@@ -52,13 +52,7 @@ Description
         name            movingWall;
 
         operation       areaAverage;
-
-        fields
-        (
-            p
-            phi
-            U
-        );
+        fields          (p phi U);
     }
 
     surfaceFieldValue1
@@ -75,15 +69,8 @@ Description
         name            f0;
 
         operation       sum;
-
         weightField     alpha1;
-
-        fields
-        (
-            p
-            phi
-            U
-        );
+        fields          (p phi U);
     }
     \endverbatim
 
@@ -165,6 +152,11 @@ SourceFiles
 
 #include "fieldValue.H"
 #include "NamedEnum.H"
+#include "faceList.H"
+#include "surfaceMesh.H"
+#include "fvsPatchField.H"
+#include "volFieldsFwd.H"
+#include "surfFieldsFwd.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -180,7 +172,7 @@ namespace fieldValues
 {
 
 /*---------------------------------------------------------------------------*\
-                         Class surfaceFieldValue Declaration
+                      Class surfaceFieldValue Declaration
 \*---------------------------------------------------------------------------*/
 
 class surfaceFieldValue
@@ -207,21 +199,21 @@ public:
         //- Operation type enumeration
         enum operationType
         {
-            opNone,
-            opSum,
-            opSumMag,
-            opSumDirection,
-            opSumDirectionBalance,
-            opAverage,
-            opWeightedAverage,
-            opAreaAverage,
-            opWeightedAreaAverage,
-            opAreaIntegrate,
-            opMin,
-            opMax,
-            opCoV,
-            opAreaNormalAverage,
-            opAreaNormalIntegrate
+            opNone,                 //< None
+            opSum,                  //< Sum
+            opSumMag,               //< Magnitude of sum
+            opSumDirection,         //< Sum in a given direction
+            opSumDirectionBalance,  //< Sum in a given direction for multiple
+            opAverage,              //< Average
+            opWeightedAverage,      //< Weighted average
+            opAreaAverage,          //< Area average
+            opWeightedAreaAverage,  //< Weighted area average
+            opAreaIntegrate,        //< Area integral
+            opMin,                  //< Minimum
+            opMax,                  //< Maximum
+            opCoV,                  //< Coefficient of variation
+            opAreaNormalAverage,    //< Area average in normal direction
+            opAreaNormalIntegrate   //< Area integral in normal direction
         };
 
         //- Operation type names
@@ -321,7 +313,7 @@ protected:
 
         //- Return field values by looking up field name
         template<class Type>
-        tmp<Field<Type>> setFieldValues
+        tmp<Field<Type>> getFieldValues
         (
             const word& fieldName,
             const bool mustGet = false,
diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueI.H b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueI.H
index 4031b12a4db..04bd7f72dfb 100644
--- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueI.H
+++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueI.H
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "surfaceFieldValue.H"
+#include "Time.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -58,7 +59,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::faceSign() const
 inline Foam::fileName
 Foam::functionObjects::fieldValues::surfaceFieldValue::outputDir() const
 {
-    return baseFileDir()/name()/"surface"/obr_.time().timeName();
+    return baseFileDir()/name()/"surface"/time_.timeName();
 }
 
 
diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C
index f365f30a291..68158b58ffd 100644
--- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C
+++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C
@@ -55,12 +55,8 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::validField
 
 
 template<class Type>
-<<<<<<< HEAD:src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C
-Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::setFieldValues
-=======
 Foam::tmp<Foam::Field<Type>>
 Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues
->>>>>>> foundation-github:src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C
 (
     const word& fieldName,
     const bool mustGet,
@@ -294,7 +290,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
 
     if (ok)
     {
-        Field<Type> values(setFieldValues<Type>(fieldName, true, orient));
+        Field<Type> values(getFieldValues<Type>(fieldName, true, orient));
 
         vectorField Sf;
         if (surfacePtr_.valid())
@@ -357,7 +353,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
             // Write state/results information
             const word& opName = operationTypeNames_[operation_];
             word resultName =
-                opName + '(' + sourceName_ + ',' + fieldName + ')';
+                opName + '(' + regionName_ + ',' + fieldName + ')';
             this->setResult(resultName, result);
         }
     }
diff --git a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.C b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.C
index f1ae6a2e3a3..faabae815fc 100644
--- a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.C
+++ b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.C
@@ -199,7 +199,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::write()
         {
             WarningInFunction
                 << "Requested field " << fieldName
-                << " not found in database and not ok"
+                << " not found in database and not processed"
                 << endl;
         }
     }
diff --git a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.H b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.H
index bfbd48dee7a..69643720d8b 100644
--- a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.H
+++ b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValue.H
@@ -173,7 +173,7 @@ protected:
 
         //- Insert field values into values list
         template<class Type>
-        tmp<Field<Type>> setFieldValues
+        tmp<Field<Type>> getFieldValues
         (
             const word& fieldName,
             const bool mustGet = false
diff --git a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValueTemplates.C b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValueTemplates.C
index b065095cc1e..99f0cff0727 100644
--- a/src/functionObjects/field/fieldValues/volFieldValue/volFieldValueTemplates.C
+++ b/src/functionObjects/field/fieldValues/volFieldValue/volFieldValueTemplates.C
@@ -47,7 +47,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::validField
 
 template<class Type>
 Foam::tmp<Foam::Field<Type>>
-Foam::functionObjects::fieldValues::volFieldValue::setFieldValues
+Foam::functionObjects::fieldValues::volFieldValue::getFieldValues
 (
     const word& fieldName,
     const bool mustGet
@@ -171,7 +171,7 @@ Type Foam::functionObjects::fieldValues::volFieldValue::processValues
 template<class Type>
 bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
 (
-    const word& fieldName
+    const word& fieldName,
     const scalarField& weightField
 )
 {
@@ -179,7 +179,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
 
     if (ok)
     {
-        Field<Type> values(setFieldValues<Type>(fieldName));
+        Field<Type> values(getFieldValues<Type>(fieldName));
         scalarField V(filterField(fieldValue::mesh_.V()));
 
         if (writeFields_)
@@ -218,7 +218,8 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
 
         // Write state/results information
         const word& opName = operationTypeNames_[operation_];
-        word resultName = opName + '(' + sourceName_ + ',' + fieldName + ')';
+        word resultName =
+            opName + '(' + volRegion::regionName_ + ',' + fieldName + ')';
         this->setResult(resultName, result);
     }
 
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C b/src/functionObjects/field/fluxSummary/fluxSummary.C
similarity index 80%
rename from src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C
rename to src/functionObjects/field/fluxSummary/fluxSummary.C
index 0ac60ab3081..80678076970 100644
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C
+++ b/src/functionObjects/field/fluxSummary/fluxSummary.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,34 +33,44 @@ License
 #include "patchEdgeFaceRegion.H"
 #include "globalIndex.H"
 #include "OBJstream.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
 {
     defineTypeNameAndDebug(fluxSummary, 0);
 
-    template<>
-    const char* NamedEnum
-    <
-        fluxSummary::modeType,
-        3
-    >::names[] =
-    {
-        "faceZone",
-        "faceZoneAndDirection",
-        "cellZoneAndDirection"
-    };
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        fluxSummary,
+        dictionary
+    );
+}
+template<>
+const char* NamedEnum
+<
+    functionObjects::fluxSummary::modeType,
+    3
+>::names[] =
+{
+    "faceZone",
+    "faceZoneAndDirection",
+    "cellZoneAndDirection"
+};
 }
 
 
-const Foam::NamedEnum<Foam::fluxSummary::modeType, 3>
-Foam::fluxSummary::modeTypeNames_;
+const Foam::NamedEnum<Foam::functionObjects::fluxSummary::modeType, 3>
+Foam::functionObjects::fluxSummary::modeTypeNames_;
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::fluxSummary::initialiseFaceZone
+void Foam::functionObjects::fluxSummary::initialiseFaceZone
 (
     const word& faceZoneName,
     DynamicList<word>& faceZoneNames,
@@ -128,7 +138,7 @@ void Foam::fluxSummary::initialiseFaceZone
 
         if (faceID >= 0)
         {
-            // orientation set by faceZone flip map
+            // Orientation set by faceZone flip map
             if (fZone.flipMap()[faceI])
             {
                 faceSigns.append(-1);
@@ -149,7 +159,7 @@ void Foam::fluxSummary::initialiseFaceZone
 }
 
 
-void Foam::fluxSummary::initialiseFaceZoneAndDirection
+void Foam::functionObjects::fluxSummary::initialiseFaceZoneAndDirection
 (
     const word& faceZoneName,
     const vector& dir,
@@ -258,7 +268,7 @@ void Foam::fluxSummary::initialiseFaceZoneAndDirection
 }
 
 
-void Foam::fluxSummary::initialiseCellZoneAndDirection
+void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
 (
     const word& cellZoneName,
     const vector& dir,
@@ -307,16 +317,16 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
         }
     }
 
-    // correct boundary values for parallel running
+    // Correct boundary values for parallel running
     syncTools::swapBoundaryFaceList(mesh, nbrFaceCellAddr);
 
-    // collect faces
+    // Collect faces
     DynamicList<label> faceIDs(floor(0.1*mesh.nFaces()));
     DynamicList<label> facePatchIDs(faceIDs.size());
     DynamicList<label> faceLocalPatchIDs(faceIDs.size());
     DynamicList<scalar> faceSigns(faceIDs.size());
 
-    // internal faces
+    // Internal faces
     for (label faceI = 0; faceI < nInternalFaces; faceI++)
     {
         const label own = cellAddr[mesh.faceOwner()[faceI]];
@@ -344,7 +354,7 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
         }
     }
 
-    // loop of boundary faces
+    // Loop over boundary faces
     forAll(pbm, patchI)
     {
         const polyPatch& pp = pbm[patchI];
@@ -378,7 +388,7 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
         }
     }
 
-    // convert into primitivePatch for convenience
+    // Convert into primitivePatch for convenience
     indirectPrimitivePatch patch
     (
         IndirectList<face>(mesh.faces(), faceIDs),
@@ -393,23 +403,21 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
     }
 
 
-    // data on all edges and faces
+    // Data on all edges and faces
     List<patchEdgeFaceRegion> allEdgeInfo(patch.nEdges());
     List<patchEdgeFaceRegion> allFaceInfo(patch.size());
 
     bool search = true;
 
-    if (debug)
-    {
-        Info<< "initialiseCellZoneAndDirection: "
-            << "Starting walk to split patch into faceZones"
-            << endl;
-    }
+    DebugInfo
+        << "initialiseCellZoneAndDirection: "
+        << "Starting walk to split patch into faceZones"
+        << endl;
 
     globalIndex globalFaces(patch.size());
 
     label oldFaceID = 0;
-    label regionI = 0;
+    label regioni = 0;
     while (search)
     {
         DynamicList<label> changedEdges;
@@ -448,7 +456,7 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
                 }
 
                 changedEdges.append(fEdges[i]);
-                changedInfo.append(regionI);
+                changedInfo.append(regioni);
             }
         }
 
@@ -473,58 +481,58 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
             label nCells = 0;
             forAll(allFaceInfo, faceI)
             {
-                if (allFaceInfo[faceI].region() == regionI)
+                if (allFaceInfo[faceI].region() == regioni)
                 {
                     nCells++;
                 }
             }
 
-            Info<< "*** region:" << regionI
+            Info<< "*** region:" << regioni
                 << "  found:" << returnReduce(nCells, sumOp<label>())
                 << " faces" << endl;
         }
 
-        regionI++;
+        regioni++;
     }
 
-    // collect the data per region
-    label nRegion = regionI;
+    // Collect the data per region
+    label nRegion = regioni;
 
     List<DynamicList<label>> regionFaceIDs(nRegion);
     List<DynamicList<label>> regionFacePatchIDs(nRegion);
     List<DynamicList<scalar>> regionFaceSigns(nRegion);
 
-    forAll(allFaceInfo, faceI)
+    forAll(allFaceInfo, facei)
     {
-        regionI = allFaceInfo[faceI].region();
+        regioni = allFaceInfo[facei].region();
 
-        regionFaceIDs[regionI].append(faceLocalPatchIDs[faceI]);
-        regionFacePatchIDs[regionI].append(facePatchIDs[faceI]);
-        regionFaceSigns[regionI].append(faceSigns[faceI]);
+        regionFaceIDs[regioni].append(faceLocalPatchIDs[facei]);
+        regionFacePatchIDs[regioni].append(facePatchIDs[facei]);
+        regionFaceSigns[regioni].append(faceSigns[facei]);
     }
 
-    // transfer to persistent storage
-    forAll(regionFaceIDs, regionI)
+    // Transfer to persistent storage
+    forAll(regionFaceIDs, regioni)
     {
-        const word zoneName = cellZoneName + ":faceZone" + Foam::name(regionI);
+        const word zoneName = cellZoneName + ":faceZone" + Foam::name(regioni);
         faceZoneNames.append(zoneName);
         zoneRefDir.append(refDir);
-        faceID.append(regionFaceIDs[regionI]);
-        facePatchID.append(regionFacePatchIDs[regionI]);
-        faceSign.append(regionFaceSigns[regionI]);
+        faceID.append(regionFaceIDs[regioni]);
+        facePatchID.append(regionFacePatchIDs[regioni]);
+        faceSign.append(regionFaceSigns[regioni]);
 
-        // write OBJ of faces to file
+        // Write OBJ of faces to file
         if (debug)
         {
             OBJstream os(mesh.time().path()/zoneName + ".obj");
-            faceList faces(mesh.faces(), regionFaceIDs[regionI]);
+            faceList faces(mesh.faces(), regionFaceIDs[regioni]);
             os.write(faces, mesh.points(), false);
         }
     }
 
-    if (log_)
+    if (log)
     {
-        Info<< type() << " " << name_ << " output:" << nl
+        Info<< type() << " " << name() << " output:" << nl
             << "    Created " << faceID.size()
             << " separate face zones from cell zone " << cellZoneName << nl;
 
@@ -540,55 +548,51 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
 }
 
 
-void Foam::fluxSummary::initialiseFaceArea()
+void Foam::functionObjects::fluxSummary::initialiseFaceArea()
 {
     faceArea_.setSize(faceID_.size(), 0);
 
     const fvMesh& mesh = refCast<const fvMesh>(obr_);
     const surfaceScalarField& magSf = mesh.magSf();
 
-    forAll(faceID_, zoneI)
+    forAll(faceID_, zonei)
     {
-        const labelList& faceIDs = faceID_[zoneI];
-        const labelList& facePatchIDs = facePatchID_[zoneI];
+        const labelList& faceIDs = faceID_[zonei];
+        const labelList& facePatchIDs = facePatchID_[zonei];
 
         scalar sumMagSf = 0;
 
         forAll(faceIDs, i)
         {
-            label faceI = faceIDs[i];
+            label facei = faceIDs[i];
 
             if (facePatchIDs[i] == -1)
             {
-                sumMagSf += magSf[faceI];
+                sumMagSf += magSf[facei];
             }
             else
             {
-                label patchI = facePatchIDs[i];
-                sumMagSf += magSf.boundaryField()[patchI][faceI];
+                label patchi = facePatchIDs[i];
+                sumMagSf += magSf.boundaryField()[patchi][facei];
             }
         }
 
-        faceArea_[zoneI] = returnReduce(sumMagSf, sumOp<scalar>());
+        faceArea_[zonei] = returnReduce(sumMagSf, sumOp<scalar>());
     }
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::fluxSummary::fluxSummary
+Foam::functionObjects::fluxSummary::fluxSummary
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectFile(obr, name),
-    name_(name),
-    obr_(obr),
-    active_(true),
-    log_(true),
+    fvMeshFunctionObject(name, runTime, dict),
+    writeFile(obr_, name, typeName, dict),
     mode_(mdFaceZone),
     scaleFactor_(1),
     phiName_("phi"),
@@ -601,44 +605,28 @@ Foam::fluxSummary::fluxSummary
     filePtrs_(),
     tolerance_(0.8)
 {
-    // Check if the available mesh is an fvMesh otherise deactivate
-    if (!isA<fvMesh>(obr_))
-    {
-        active_ = false;
-        WarningInFunction
-            << "No fvMesh available, deactivating " << name_
-            << endl;
-    }
-
     read(dict);
 }
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::fluxSummary::~fluxSummary()
+Foam::functionObjects::fluxSummary::~fluxSummary()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::fluxSummary::read(const dictionary& dict)
+bool Foam::functionObjects::fluxSummary::read(const dictionary& dict)
 {
-    if (!active_)
-    {
-        return;
-    }
-
-    functionObjectFile::read(dict);
-
-    log_ = dict.lookupOrDefault<Switch>("log", true);
+    writeFile::read(dict);
 
     mode_ = modeTypeNames_.read(dict.lookup("mode"));
     phiName_= dict.lookupOrDefault<word>("phiName", "phi");
     dict.readIfPresent("scaleFactor", scaleFactor_);
     dict.readIfPresent("tolerance", tolerance_);
 
-    // initialise with capacity of 10 faceZones
+    // Initialise with capacity of 10 faceZones
     DynamicList<vector> refDir(10);
     DynamicList<word> faceZoneName(refDir.size());
     DynamicList<List<label>> faceID(refDir.size());
@@ -739,24 +727,26 @@ void Foam::fluxSummary::read(const dictionary& dict)
     }
 
     // Provide some output
-    if (log_)
+    if (log)
     {
-        Info<< type() << " " << name_ << " output:" << nl;
+        Info<< type() << " " << name() << " output:" << nl;
 
-        forAll(faceZoneName_, zoneI)
+        forAll(faceZoneName_, zonei)
         {
-            const word& zoneName = faceZoneName_[zoneI];
-            scalar zoneArea = faceArea_[zoneI];
+            const word& zoneName = faceZoneName_[zonei];
+            scalar zoneArea = faceArea_[zonei];
 
             Info<< "    Zone: " << zoneName << ", area: " << zoneArea << nl;
         }
 
         Info<< endl;
     }
+
+    return true;
 }
 
 
-void Foam::fluxSummary::writeFileHeader
+void Foam::functionObjects::fluxSummary::writeFileHeader
 (
     const word& fzName,
     const scalar area,
@@ -791,33 +781,15 @@ void Foam::fluxSummary::writeFileHeader
 }
 
 
-void Foam::fluxSummary::execute()
+bool Foam::functionObjects::fluxSummary::execute()
 {
-    // Do nothing - only valid on write
+    return true;
 }
 
 
-void Foam::fluxSummary::end()
+bool Foam::functionObjects::fluxSummary::write()
 {
-    // Do nothing - only valid on write
-}
-
-
-void Foam::fluxSummary::timeSet()
-{
-    // Do nothing - only valid on write
-}
-
-
-void Foam::fluxSummary::write()
-{
-    if (!active_)
-    {
-        return;
-    }
-
-    const surfaceScalarField& phi =
-        obr_.lookupObject<surfaceScalarField>(phiName_);
+    const surfaceScalarField& phi = lookupObject<surfaceScalarField>(phiName_);
 
     word flowType = "";
     if (phi.dimensions() == dimVolume/dimTime)
@@ -836,17 +808,13 @@ void Foam::fluxSummary::write()
             << "flow rate" << abort(FatalError);
     }
 
-    if (log_)
-    {
-        Info<< type() << " " << name_ << ' ' << flowType << " flux output:"
-            << nl;
-    }
+    Log << type() << " " << name() << ' ' << flowType << " write:" << nl;
 
-    forAll(faceZoneName_, zoneI)
+    forAll(faceZoneName_, zonei)
     {
-        const labelList& faceID = faceID_[zoneI];
-        const labelList& facePatchID = facePatchID_[zoneI];
-        const scalarList& faceSign = faceSign_[zoneI];
+        const labelList& faceID = faceID_[zonei];
+        const labelList& facePatchID = facePatchID_[zonei];
+        const scalarList& faceSign = faceSign_[zonei];
 
         scalar phiPos = scalar(0);
         scalar phiNeg = scalar(0);
@@ -854,16 +822,16 @@ void Foam::fluxSummary::write()
 
         forAll(faceID, i)
         {
-            label faceI = faceID[i];
-            label patchI = facePatchID[i];
+            label facei = faceID[i];
+            label patchi = facePatchID[i];
 
-            if (patchI != -1)
+            if (patchi != -1)
             {
-                phif = phi.boundaryField()[patchI][faceI];
+                phif = phi.boundaryField()[patchi][facei];
             }
             else
             {
-                phif = phi[faceI];
+                phif = phi[facei];
             }
 
             phif *= faceSign[i];
@@ -887,20 +855,17 @@ void Foam::fluxSummary::write()
         scalar netFlux = phiPos + phiNeg;
         scalar absoluteFlux = phiPos - phiNeg;
 
-        if (log_)
-        {
-            Info<< "    faceZone " << faceZoneName_[zoneI] << ':' << nl
-                << "        positive : " << phiPos << nl
-                << "        negative : " << phiNeg << nl
-                << "        net      : " << netFlux << nl
-                << "        absolute : " << absoluteFlux
-                << nl << endl;
-        }
+        Log << "    faceZone " << faceZoneName_[zonei] << ':' << nl
+            << "        positive : " << phiPos << nl
+            << "        negative : " << phiNeg << nl
+            << "        net      : " << netFlux << nl
+            << "        absolute : " << absoluteFlux
+            << nl << endl;
 
         if (writeToFile())
         {
-            filePtrs_[zoneI]
-                << obr_.time().value() << token::TAB
+            filePtrs_[zonei]
+                << time_.value() << token::TAB
                 << phiPos << token::TAB
                 << phiNeg << token::TAB
                 << netFlux << token::TAB
@@ -909,9 +874,10 @@ void Foam::fluxSummary::write()
         }
     }
 
-    if (log_) Info<< endl;
-}
+    Log << endl;
 
+    return true;
+}
 
 
 // ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H b/src/functionObjects/field/fluxSummary/fluxSummary.H
similarity index 75%
rename from src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H
rename to src/functionObjects/field/fluxSummary/fluxSummary.H
index dbc198baf7b..701a3ea852a 100644
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H
+++ b/src/functionObjects/field/fluxSummary/fluxSummary.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,22 +22,21 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::fluxSummary
+    Foam::functionObjects::fluxSummary
 
 Group
-    grpUtilityFunctionObjects
+    grpFieldFunctionObjects
 
 Description
     This function object calculates the flux across selections of faces.
 
-    Output comprises, per set of faces, the:
+    Output comprises, per set of faces, the fluxes:
     - positive
     - negative
     - net
     - absolute
-    fluxes
 
-    Example of function object specification:
+Usage
     \verbatim
     fluxSummary1
     {
@@ -55,7 +54,6 @@ Description
     }
     \endverbatim
 
-    \heading Function object usage
     \table
         Property     | Description             | Required    | Default value
         type         | type name: fluxSummary  | yes         |
@@ -72,21 +70,21 @@ Description
 
     Output data is written to files of the form \<timeDir\>/<faceZoneName>.dat
 
-SeeAlso
-    Foam::functionObject
-    Foam::OutputFilterFunctionObject
+See also
+    Foam::functionObjects::fvMeshFunctionObject
+    Foam::functionObjects::writeFile
+    Foam::functionObjects::timeControl
 
 SourceFiles
     fluxSummary.C
-    IOfluxSummary.H
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef fluxSummary_H
-#define fluxSummary_H
+#ifndef functionObjects_fluxSummary_H
+#define functionObjects_fluxSummary_H
 
-#include "functionObjectFile.H"
-#include "Switch.H"
+#include "fvMeshFunctionObject.H"
+#include "writeFile.H"
 #include "vector.H"
 #include "DynamicList.H"
 
@@ -94,20 +92,16 @@ SourceFiles
 
 namespace Foam
 {
-
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
-
+namespace functionObjects
+{
 /*---------------------------------------------------------------------------*\
-                    Class fluxSummary Declaration
+                         Class fluxSummary Declaration
 \*---------------------------------------------------------------------------*/
 
 class fluxSummary
 :
-    public functionObjectFile
+    public fvMeshFunctionObject,
+    public writeFile
 {
 public:
 
@@ -116,9 +110,9 @@ public:
         //- Face mode type
         enum modeType
         {
-            mdFaceZone,
-            mdFaceZoneAndDirection,
-            mdCellZoneAndDirection
+            mdFaceZone,                 //< face zone
+            mdFaceZoneAndDirection,     //< face zone with prescribed direction
+            mdCellZoneAndDirection      //< cell zone with prescribed direction
         };
 
         //- Mode type names
@@ -129,19 +123,6 @@ protected:
 
     // Protected data
 
-        //- Name of function object
-        //  Also used as the name of the output directory
-        word name_;
-
-        //- Reference to the database
-        const objectRegistry& obr_;
-
-        //- on/off switch
-        bool active_;
-
-        //- Switch to send output to Info as well
-        Switch log_;
-
         //- Mode for face determination
         modeType mode_;
 
@@ -229,10 +210,10 @@ protected:
         ) const;
 
         //- Disallow default bitwise copy construct
-        fluxSummary(const fluxSummary&);
+        fluxSummary(const fluxSummary&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const fluxSummary&);
+        void operator=(const fluxSummary&) = delete;
 
 
 public:
@@ -243,14 +224,12 @@ public:
 
     // Constructors
 
-        //- Construct for given objectRegistry and dictionary.
-        //  Allow the possibility to load fields from files
+        //- Construct from Time and dictionary
         fluxSummary
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
@@ -260,39 +239,20 @@ public:
 
     // Member Functions
 
-        //- Return name of the set of field min/max
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
         //- Read the field min/max data
-        virtual void read(const dictionary&);
+        virtual bool read(const dictionary&);
 
         //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        virtual bool execute();
 
         //- Write the fluxSummary
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/field/histogram/histogram.C b/src/functionObjects/field/histogram/histogram.C
index 45f29d4aa4f..68c5f46387d 100644
--- a/src/functionObjects/field/histogram/histogram.C
+++ b/src/functionObjects/field/histogram/histogram.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -50,7 +50,7 @@ void Foam::functionObjects::histogram::writeGraph
 {
     const wordList fieldNames(1, fieldName);
 
-    fileName outputPath = file_.baseTimeDir();
+    fileName outputPath = baseTimeDir();
     mkDir(outputPath);
     OFstream graphFile
     (
@@ -76,7 +76,7 @@ Foam::functionObjects::histogram::histogram
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    file_(obr_, name)
+    writeFile(obr_, name)
 {
     read(dict);
 }
@@ -157,7 +157,7 @@ bool Foam::functionObjects::histogram::write()
         x += delta;
     }
 
-    scalarField volFrac(nBins_, 0);
+    scalarField data(nBins_, 0);
     const scalarField& V = mesh_.V();
 
     forAll(field, celli)
@@ -165,29 +165,29 @@ bool Foam::functionObjects::histogram::write()
         const label bini = (field[celli] - min_)/delta;
         if (bini >= 0 && bini < nBins_)
         {
-            volFrac[bini] += V[celli];
+            data[bini] += V[celli];
         }
     }
 
-    Pstream::listCombineGather(volFrac, plusEqOp<scalar>());
+    Pstream::listCombineGather(data, plusEqOp<scalar>());
 
     if (Pstream::master())
     {
-        const scalar sumVol = sum(volFrac);
+        const scalar sumData = sum(data);
 
-        if (sumVol > SMALL)
+        if (sumData > SMALL)
         {
-            volFrac /= sumVol;
+            data /= sumData;
 
             const coordSet coords
             (
-                "Volume_Fraction",
+                fieldName_,
                 "x",
                 xBin,
                 mag(xBin)
             );
 
-            writeGraph(coords, field.name(), volFrac);
+            writeGraph(coords, fieldName_, data);
         }
     }
 
diff --git a/src/functionObjects/field/histogram/histogram.H b/src/functionObjects/field/histogram/histogram.H
index deb355e3c8e..0cd803c6685 100644
--- a/src/functionObjects/field/histogram/histogram.H
+++ b/src/functionObjects/field/histogram/histogram.H
@@ -87,12 +87,11 @@ namespace functionObjects
 
 class histogram
 :
-    public fvMeshFunctionObject
+    public fvMeshFunctionObject,
+    public writeFile
 {
     // Private data
 
-        writeFile file_;
-
         //- Name of field
         word fieldName_;
 
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/mapFields.C b/src/functionObjects/field/mapFields/mapFields.C
similarity index 67%
rename from src/postProcessing/functionObjects/utilities/mapFields/mapFields.C
rename to src/functionObjects/field/mapFields/mapFields.C
index 136b3210057..61b94de2cb4 100644
--- a/src/postProcessing/functionObjects/utilities/mapFields/mapFields.C
+++ b/src/functionObjects/field/mapFields/mapFields.C
@@ -25,27 +25,38 @@ License
 
 #include "mapFields.H"
 #include "meshToMesh.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    defineTypeNameAndDebug(mapFieldsFO, 0);
+namespace functionObjects
+{
+    defineTypeNameAndDebug(mapFields, 0);
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        mapFields,
+        dictionary
+    );
+}
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::mapFieldsFO::createInterpolation(const dictionary& dict)
+void Foam::functionObjects::mapFields::createInterpolation
+(
+    const dictionary& dict
+)
 {
-    const fvMesh& meshTarget = static_cast<const fvMesh&>(obr_);
+    const fvMesh& meshTarget = mesh_;
     const word mapRegionName(dict.lookup("mapRegion"));
 
-    if (log_)
-    {
-        Info<< name_ << ':' << nl
-            << "    Reading mesh " << mapRegionName << endl;
-    }
+    Log << name() << ':' << nl
+        << "    Reading mesh " << mapRegionName << endl;
 
     mapRegionPtr_.reset
     (
@@ -64,7 +75,7 @@ void Foam::mapFieldsFO::createInterpolation(const dictionary& dict)
     if (!meshToMesh::interpolationMethodNames_.found(mapMethodName))
     {
         FatalErrorInFunction
-            << type() << " " << name_ << ": unknown map method "
+            << type() << " " << name() << ": unknown map method "
             << mapMethodName << nl
             << "Available methods include: "
             << meshToMesh::interpolationMethodNames_.sortedToc()
@@ -86,13 +97,12 @@ void Foam::mapFieldsFO::createInterpolation(const dictionary& dict)
     // Optionally override
     if (dict.readIfPresent("patchMapMethod", patchMapMethodName))
     {
-        if (log_)
-            Info<< "    Patch mapping method: " << patchMapMethodName << endl;
+        Log << "    Patch mapping method: " << patchMapMethodName << endl;
     }
 
     bool consistent = readBool(dict.lookup("consistent"));
 
-    if (log_) Info<< "    Creating mesh to mesh interpolation" << endl;
+    Log << "    Creating mesh to mesh interpolation" << endl;
 
     if (consistent)
     {
@@ -130,91 +140,67 @@ void Foam::mapFieldsFO::createInterpolation(const dictionary& dict)
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::mapFieldsFO::mapFieldsFO
+Foam::functionObjects::mapFields::mapFields
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    name_(name),
-    obr_(obr),
-    active_(true),
-    log_(true),
+    fvMeshFunctionObject(name, runTime, dict),
     mapRegionPtr_(),
     interpPtr_(),
     fieldNames_()
 {
-    if (!isA<fvMesh>(obr_))
-    {
-        active_ = false;
-        WarningInFunction
-            << "No fvMesh available, deactivating " << name_ << nl
-            << endl;
-    }
-
     read(dict);
 }
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::mapFieldsFO::~mapFieldsFO()
+Foam::functionObjects::mapFields::~mapFields()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::mapFieldsFO::read(const dictionary& dict)
+bool Foam::functionObjects::mapFields::read(const dictionary& dict)
 {
-    if (active_)
-    {
-        log_.readIfPresent("log", dict);
-        dict.lookup("fields") >> fieldNames_;
-
-        createInterpolation(dict);
-    }
+    dict.lookup("fields") >> fieldNames_;
+    createInterpolation(dict);
+    return true;
 }
 
 
-void Foam::mapFieldsFO::execute()
-{}
-
-
-void Foam::mapFieldsFO::end()
-{}
-
-
-void Foam::mapFieldsFO::timeSet()
-{}
+bool Foam::functionObjects::mapFields::execute()
+{
+    return true;
+}
 
 
-void Foam::mapFieldsFO::write()
+bool Foam::functionObjects::mapFields::write()
 {
-    if (active_)
-    {
-        if (log_) Info
-            << type() << " " << name_ << " output:" << nl;
+    Log << type() << " " << name() << " write:" << nl;
 
-        bool ok = false;
+    bool ok = false;
 
-        ok = writeFieldType<scalar>() || ok;
-        ok = writeFieldType<vector>() || ok;
-        ok = writeFieldType<sphericalTensor>() || ok;
-        ok = writeFieldType<symmTensor>() || ok;
-        ok = writeFieldType<tensor>() || ok;
+    ok = writeFieldType<scalar>() || ok;
+    ok = writeFieldType<vector>() || ok;
+    ok = writeFieldType<sphericalTensor>() || ok;
+    ok = writeFieldType<symmTensor>() || ok;
+    ok = writeFieldType<tensor>() || ok;
 
-        if (log_)
+    if (log)
+    {
+        if (!ok)
         {
-            if (!ok)
-            {
-                Info<< "    none" << nl;
-            }
-
-            Info<< endl;
+            Info<< "    none" << nl;
         }
+
+        Info<< endl;
     }
+
+    return true;
 }
 
 
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/mapFields.H b/src/functionObjects/field/mapFields/mapFields.H
similarity index 70%
rename from src/postProcessing/functionObjects/utilities/mapFields/mapFields.H
rename to src/functionObjects/field/mapFields/mapFields.H
index 9343616cfec..3a68fa3789a 100644
--- a/src/postProcessing/functionObjects/utilities/mapFields/mapFields.H
+++ b/src/functionObjects/field/mapFields/mapFields.H
@@ -22,20 +22,21 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::mapFields
+    Foam::functionObjects::mapFields
 
 Group
-    grpUtilitiesFunctionObjects
+    grpFieldFunctionObjects
 
 Description
     Map fields from local mesh to secondary mesh at run-time.
 
+Usage
     Example of function object specification to map fields:
     \verbatim
     mapFields1
     {
         type            mapFields;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        libs            ("libfieldFunctionObjects.so");
         ...
 
         mapRegion       coarseMesh;
@@ -45,7 +46,6 @@ Description
         fields          ("U.*" p);
     }
 
-    \heading Function object usage
     \table
         Property     | Description                | Required  | Default value
         type         | Type name: mapFields       | yes       |
@@ -64,43 +64,32 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef mapFieldsFO_H
-#define mapFieldsFO_H
+#ifndef functionObjects_mapFields_H
+#define functionObjects_mapFields_H
 
-#include "volFields.H"
+#include "fvMeshFunctionObject.H"
+#include "volFieldsFwd.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
 class meshToMesh;
 
+namespace functionObjects
+{
+
 /*---------------------------------------------------------------------------*\
                           Class mapFields Declaration
 \*---------------------------------------------------------------------------*/
 
-class mapFieldsFO
+class mapFields
+:
+    public fvMeshFunctionObject
 {
     // Private data
 
-        //- Name of this set of mapFields objects
-        word name_;
-
-        //- Reference to the database
-        const objectRegistry& obr_;
-
-        //- On/off switch
-        bool active_;
-
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
         //- Locally cached map region mesh (map to this mesh)
         autoPtr<fvMesh> mapRegionPtr_;
 
@@ -114,10 +103,10 @@ class mapFieldsFO
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        mapFieldsFO(const mapFieldsFO&);
+        mapFields(const mapFields&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const mapFieldsFO&) = delete;
+        void operator=(const mapFields&) = delete;
 
         //- Helper function to create the mesh-to-mesh interpolation
         void createInterpolation(const dictionary& dict);
@@ -129,7 +118,7 @@ class mapFieldsFO
             GeometricField<Type, fvPatchField, volMesh>& fld
         ) const;
 
-        //- Helper function to interpolate and write the fied
+        //- Helper function to interpolate and write the field
         template<class Type>
         bool writeFieldType() const;
 
@@ -137,61 +126,40 @@ class mapFieldsFO
 public:
 
     //- Runtime type information
-    TypeName("mapFieldsFO");
+    TypeName("mapFields");
 
 
     // Constructors
 
-        //- Construct for given objectRegistry and dictionary.
-        //  Allow the possibility to load fields from files
-        mapFieldsFO
+        //- Construct from Time and dictionary
+        mapFields
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
     //- Destructor
-    virtual ~mapFieldsFO();
+    virtual ~mapFields();
 
 
     // Member Functions
 
-        //- Return name of the set of mapFields
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
         //- Read the mapFields data
-        virtual void read(const dictionary&);
+        virtual bool read(const dictionary&);
 
         //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        virtual bool execute();
 
         //- Calculate the mapFields and write
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsTemplates.C b/src/functionObjects/field/mapFields/mapFieldsTemplates.C
similarity index 82%
rename from src/postProcessing/functionObjects/utilities/mapFields/mapFieldsTemplates.C
rename to src/functionObjects/field/mapFields/mapFieldsTemplates.C
index dd1086049b0..2b473ac3289 100644
--- a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsTemplates.C
+++ b/src/functionObjects/field/mapFields/mapFieldsTemplates.C
@@ -23,16 +23,20 @@ License
 
 \*---------------------------------------------------------------------------*/
 
+#include "fvMesh.H"
+#include "polyPatch.H"
+#include "lduSchedule.H"
 #include "meshToMesh.H"
 
 template<class Type>
-void Foam::mapFieldsFO::evaluateConstraintTypes
+void Foam::functionObjects::mapFields::evaluateConstraintTypes
 (
     GeometricField<Type, fvPatchField, volMesh>& fld
 ) const
 {
-    typename GeometricField<Type, fvPatchField, volMesh>::
-        GeometricBoundaryField& fldBf = fld.boundaryField();
+    typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
+
+    typename VolFieldType::Boundary& fldBf = fld.boundaryFieldRef();
 
     if
     (
@@ -111,39 +115,39 @@ void Foam::mapFieldsFO::evaluateConstraintTypes
 
 
 template<class Type>
-bool Foam::mapFieldsFO::writeFieldType() const
+bool Foam::functionObjects::mapFields::writeFieldType() const
 {
-    typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
+    typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
 
     const fvMesh& mapRegion = mapRegionPtr_();
 
-    wordList fieldNames(obr_.names(FieldType::typeName));
+    wordList fieldNames(this->mesh_.names(VolFieldType::typeName));
     labelList selected = findStrings(fieldNames_, fieldNames);
     forAll(selected, i)
     {
         const word& fieldName = fieldNames[selected[i]];
-        const FieldType& field = obr_.lookupObject<FieldType>(fieldName);
+        const VolFieldType& field = lookupObject<VolFieldType>(fieldName);
 
-        if (log_) Info << "    " << fieldName;
+        Log << "    " << fieldName;
 
         IOobject mapRegionIO
         (
             fieldName,
-            field.time().timeName(),
+            time_.timeName(),
             mapRegion
         );
 
-        tmp<FieldType> tfieldMapRegion(interpPtr_->mapTgtToSrc(field));
+        tmp<VolFieldType> tfieldMapRegion(interpPtr_->mapTgtToSrc(field));
 
-        if (log_) Info<< ": interpolated";
+        Log << ": interpolated";
 
-        FieldType fieldMapRegion(mapRegionIO, tfieldMapRegion);
+        VolFieldType fieldMapRegion(mapRegionIO, tfieldMapRegion);
 
         evaluateConstraintTypes(fieldMapRegion);
 
         fieldMapRegion.write();
 
-        if (log_) Info<< " and written" << nl;
+        Log << " and written" << nl;
     }
 
     return selected.size() > 0;
diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C
index b87e9bd6495..349e7cca8c5 100644
--- a/src/functionObjects/field/pressure/pressure.C
+++ b/src/functionObjects/field/pressure/pressure.C
@@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::rhoScale
         if (!rhoInfInitialised_)
         {
             FatalErrorInFunction
-                << type() << " " << name_ << ": "
+                << type() << " " << name() << ": "
                 << "pressure identified as incompressible, but reference "
                 << "density is not set.  Please set rhoName to rhoInf, and "
                 << "set an appropriate value for rhoInf"
diff --git a/src/functionObjects/field/pressure/pressure.H b/src/functionObjects/field/pressure/pressure.H
index f4ae2ad040d..7b0023339b0 100644
--- a/src/functionObjects/field/pressure/pressure.H
+++ b/src/functionObjects/field/pressure/pressure.H
@@ -143,9 +143,6 @@ class pressure
         //- Name of density field, default is "rho"
         word rhoName_;
 
-        //- Flag to show whether rhoInf has been initialised
-        bool rhoInfInitialised_;
-
 
         // Total pressure calculation
 
@@ -170,6 +167,9 @@ class pressure
             //- Freestream density
             scalar rhoInf_;
 
+            //- Flag to show whether rhoInf has been initialised
+            bool rhoInfInitialised_;
+
 
     // Private Member Functions
 
diff --git a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C
similarity index 82%
rename from src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C
rename to src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C
index 43fa9a09647..5fd52e5da15 100644
--- a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C
+++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C
@@ -29,7 +29,8 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::createFileNames()
+void Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+createFileNames()
 {
     if (writeToFile() && !prodFilePtr_.valid())
     {
@@ -53,7 +54,8 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::createFileNames()
 
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::writeFileHeader
+void Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+writeFileHeader
 (
     OFstream& os
 )
@@ -70,12 +72,12 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::writeFileHeader
 
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::calculateSpeciesRR
+void Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+calculateSpeciesRR
 (
     const basicChemistryModel& basicChemistry
 )
 {
-
     tmp<DimensionedField<scalar, volMesh>> RRt
     (
         new DimensionedField<scalar, volMesh>
@@ -83,7 +85,7 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::calculateSpeciesRR
             IOobject
             (
                 "RR",
-                mesh_.time().timeName(),
+                time_.timeName(),
                 mesh_,
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
@@ -95,7 +97,7 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::calculateSpeciesRR
 
     DimensionedField<scalar, volMesh>& RR = RRt.ref();
 
-    scalar dt = mesh_.time().deltaT().value();
+    scalar dt = time_.deltaT().value();
 
     endTime_ += dt;
 
@@ -126,7 +128,8 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::calculateSpeciesRR
 
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::writeSpeciesRR()
+void Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+writeSpeciesRR()
 {
 
     consFilePtr_() << "time : " << mesh_.time().value() << tab << nl;
@@ -140,10 +143,7 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::writeSpeciesRR()
     prodIntFilePtr_() << "start time : " << startTime_ << tab
             << "end time :" <<  endTime_ << nl;
 
-    for
-    (
-        label reactionI = 0; reactionI < nReactions_; reactionI++
-    )
+    for (label reactionI = 0; reactionI < nReactions_; ++reactionI)
     {
         consFilePtr_() << reactionI << tab;
         consIntFilePtr_() << reactionI << tab;
@@ -174,18 +174,16 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::writeSpeciesRR()
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class chemistryType>
-Foam::reactionsSensitivityAnalysis<chemistryType>::reactionsSensitivityAnalysis
+Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+reactionsSensitivityAnalysis
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectFile(obr, name),
-    name_(name),
-    mesh_(refCast<const fvMesh>(obr)),
-    active_(true),
+    fvMeshFunctionObject(name, runTime, dict),
+    writeFile(mesh_, name),
     production_(0),
     consumption_(0),
     productionInt_(0),
@@ -200,6 +198,7 @@ Foam::reactionsSensitivityAnalysis<chemistryType>::reactionsSensitivityAnalysis
     consIntFilePtr_()
 {
     read(dict);
+
     if (mesh_.nCells() != 1)
     {
         FatalErrorInFunction
@@ -207,14 +206,13 @@ Foam::reactionsSensitivityAnalysis<chemistryType>::reactionsSensitivityAnalysis
             << abort(FatalError);
     }
 
-    if (mesh_.foundObject<basicChemistryModel>("chemistryProperties"))
+    if (foundObject<basicChemistryModel>("chemistryProperties"))
     {
         const chemistryType& chemistry = refCast<const chemistryType>
         (
-            mesh_.lookupObject<basicChemistryModel>("chemistryProperties")
+            lookupObject<basicChemistryModel>("chemistryProperties")
         );
 
-
         speciesNames_.setSize
         (
             chemistry.thermo().composition().species().size()
@@ -256,7 +254,7 @@ Foam::reactionsSensitivityAnalysis<chemistryType>::reactionsSensitivityAnalysis
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class chemistryType>
-Foam::reactionsSensitivityAnalysis<chemistryType>::
+Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
 ~reactionsSensitivityAnalysis()
 {}
 
@@ -264,57 +262,42 @@ Foam::reactionsSensitivityAnalysis<chemistryType>::
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::read
+bool Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::read
 (
     const dictionary& dict
 )
-{}
+{
+    writeFile::read(dict);
+    return true;
+}
 
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::execute()
+bool Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+execute()
 {
     createFileNames();
 
     const basicChemistryModel& chemistry =
-        mesh_.lookupObject<basicChemistryModel>
-        (
-            "chemistryProperties"
-        );
+        lookupObject<basicChemistryModel>("chemistryProperties");
     calculateSpeciesRR(chemistry);
-}
-
 
-template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::end()
-{
-    // Do nothing - only valid on write
-}
-
-
-template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::timeSet()
-{
-    // Do nothing
+    return true;
 }
 
 
 template<class chemistryType>
-void Foam::reactionsSensitivityAnalysis<chemistryType>::write()
+bool Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::
+write()
 {
-    if (!active_)
-    {
-        return;
-    }
-
     if (Pstream::master())
     {
-        //functionObjectFile::write();
-
         writeSpeciesRR();
 
         startTime_ = endTime_;
     }
+
+    return true;
 }
 
 
diff --git a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H
similarity index 70%
rename from src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H
rename to src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H
index 7fa52e6304f..69bfce7ffb7 100644
--- a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H
+++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.H
@@ -22,18 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::reactionsSensitivityAnalysis
+    Foam::functionObjects::reactionsSensitivityAnalysis
 
 Group
-    grpUtilitiesFunctionObjects grpThermophysicalFunctionObjects
+    grpFieldFunctionObjects grpThermophysicalFunctionObjects
 
 Description
     This function object creates four data files named:
 
-    "consumption"    :   consumption rate
-    "production"     :   destruction rate
-    "productionInt"  :   integral between dumps of the production rate
-    "consumptionInt" :   integral between dumps of the consumption rate
+    - "consumption"    :   consumption rate
+    - "production"     :   destruction rate
+    - "productionInt"  :   integral between dumps of the production rate
+    - "consumptionInt" :   integral between dumps of the consumption rate
 
     The function object indicates reaction rates of creation or destruction
     of species in each reaction.
@@ -41,15 +41,15 @@ Description
 
 SourceFiles
     reactionsSensitivityAnalysis.C
-    IOreactionsSensitivityAnalysis.H
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef reactionsSensitivityAnalysis_H
-#define reactionsSensitivityAnalysis_H
+#ifndef functionObjescts_reactionsSensitivityAnalysis_H
+#define functionObjescts_reactionsSensitivityAnalysis_H
 
-#include "functionObjectFile.H"
-#include "volFields.H"
+#include "fvMeshFunctionObject.H"
+#include "writeFile.H"
+#include "volFieldsFwd.H"
 #include "basicChemistryModel.H"
 #include "autoPtr.H"
 #include "basicMultiComponentMixture.H"
@@ -58,31 +58,22 @@ SourceFiles
 
 namespace Foam
 {
-
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
+namespace functionObjects
+{
 
 /*---------------------------------------------------------------------------*\
-                    Class reactionsSensitivityAnalysis Declaration
+                Class reactionsSensitivityAnalysis Declaration
 \*---------------------------------------------------------------------------*/
+
 template<class chemistryType>
 class reactionsSensitivityAnalysis
 :
-    public functionObjectFile
+    public fvMeshFunctionObject,
+    public writeFile
 
 {
     // Private data
 
-        //- Name of this set of reactionsSensitivityAnalysis objects
-        word name_;
-
-        //- Reference to the mesh database
-        const fvMesh& mesh_;
-
-        //- On/off switch
-        bool active_;
-
         //- List list for species production
         scalarListList production_;
 
@@ -155,14 +146,12 @@ public:
 
     // Constructors
 
-        //- Construct for given objectRegistry and dictionary.
-        //  Allow the possibility to load fields from files
+        //- Construct from Time and dictionary
         reactionsSensitivityAnalysis
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
@@ -172,39 +161,20 @@ public:
 
     // Member Functions
 
-        //- Return name of the set of reactionsSensitivityAnalysis
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
         //- Read the reactionsSensitivityAnalysis data
-        virtual void read(const dictionary&);
-
-        //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
+        virtual bool read(const dictionary&);
 
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        //- Execute
+        virtual bool execute();
 
         //- Calculate the reactionsSensitivityAnalysis and write
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.C b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C
similarity index 80%
rename from src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.C
rename to src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C
index 4f892e9a39b..5784157f9b5 100644
--- a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.C
+++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C
@@ -23,53 +23,55 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "reactionsSensitivityAnalysisFunctionObject.H"
+#include "reactionsSensitivityAnalysis.H"
+#include "psiChemistryModel.H"
+#include "rhoChemistryModel.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    defineTemplateTypeNameAndDebugWithName
-    (
-        reactionsSensitivityAnalysis<rhoChemistryModel>,
-        "rhoReactionsSensitivityAnalysis",
-        0
-    );
+namespace functionObjects
+{
+    // Psi-based chemistry
+    typedef reactionsSensitivityAnalysis<psiChemistryModel>
+        psiReactionsSensitivityAnalysisFunctionObject;
 
     defineTemplateTypeNameAndDebugWithName
     (
-        rhoReactionsSensitivityAnalysisFunctionObject,
-        "rhoReactionsSensitivityAnalysis",
+        psiReactionsSensitivityAnalysisFunctionObject,
+        "psiReactionsSensitivityAnalysis",
         0
     );
 
     addToRunTimeSelectionTable
     (
         functionObject,
-        rhoReactionsSensitivityAnalysisFunctionObject,
+        psiReactionsSensitivityAnalysisFunctionObject,
         dictionary
     );
 
-    defineTemplateTypeNameAndDebugWithName
-    (
-        reactionsSensitivityAnalysis<psiChemistryModel>,
-        "psiReactionsSensitivityAnalysis",
-        0
-    );
+
+    // Rho-based chemistry
+    typedef reactionsSensitivityAnalysis<rhoChemistryModel>
+        rhoReactionsSensitivityAnalysisFunctionObject;
 
     defineTemplateTypeNameAndDebugWithName
     (
-        psiReactionsSensitivityAnalysisFunctionObject,
-        "psiReactionsSensitivityAnalysis",
+        rhoReactionsSensitivityAnalysisFunctionObject,
+        "rhoReactionsSensitivityAnalysis",
         0
     );
 
     addToRunTimeSelectionTable
     (
         functionObject,
-        psiReactionsSensitivityAnalysisFunctionObject,
+        rhoReactionsSensitivityAnalysisFunctionObject,
         dictionary
     );
 }
+}
+
 
 // ************************************************************************* //
diff --git a/src/functionObjects/field/readFields/readFields.C b/src/functionObjects/field/readFields/readFields.C
index dd819c00a86..2ac396999f2 100644
--- a/src/functionObjects/field/readFields/readFields.C
+++ b/src/functionObjects/field/readFields/readFields.C
@@ -81,11 +81,11 @@ bool Foam::functionObjects::readFields::execute()
         const word& fieldName = fieldSet_[fieldi];
 
         // If necessary load field
-        loadField<scalar>(fieldName, vsf_, ssf_);
-        loadField<vector>(fieldName, vvf_, svf_);
-        loadField<sphericalTensor>(fieldName, vSpheretf_, sSpheretf_);
-        loadField<symmTensor>(fieldName, vSymmtf_, sSymmtf_);
-        loadField<tensor>(fieldName, vtf_, stf_);
+        loadField<scalar>(fieldName);
+        loadField<vector>(fieldName);
+        loadField<sphericalTensor>(fieldName);
+        loadField<symmTensor>(fieldName);
+        loadField<tensor>(fieldName);
     }
 
     return true;
diff --git a/src/functionObjects/field/readFields/readFields.H b/src/functionObjects/field/readFields/readFields.H
index ed17311896a..f0146557d43 100644
--- a/src/functionObjects/field/readFields/readFields.H
+++ b/src/functionObjects/field/readFields/readFields.H
@@ -87,14 +87,11 @@ protected:
         //- Fields to load
         wordList fieldSet_;
 
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
 
     // Protected Member Functions
 
         template<class Type>
-        bool loadField(const word&) const;
+        bool loadField(const word&);
 
 
 private:
diff --git a/src/functionObjects/field/readFields/readFieldsTemplates.C b/src/functionObjects/field/readFields/readFieldsTemplates.C
index e2c74bb8733..357473ed1d9 100644
--- a/src/functionObjects/field/readFields/readFieldsTemplates.C
+++ b/src/functionObjects/field/readFields/readFieldsTemplates.C
@@ -31,19 +31,19 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-bool Foam::readFields::loadField(const word& fieldName) const
+bool Foam::functionObjects::readFields::loadField(const word& fieldName)
 {
     typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
     typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
 
-    if (obr_.foundObject<VolFieldType>(fieldName))
+    if (foundObject<VolFieldType>(fieldName))
     {
         DebugInfo
             << "readFields : " << VolFieldType::typeName
             << " " << fieldName << " already in database"
             << endl;
     }
-    else if (obr_.foundObject<SurfaceFieldType>(fieldName))
+    else if (foundObject<SurfaceFieldType>(fieldName))
     {
         DebugInfo<< "readFields: " << SurfaceFieldType::typeName
             << " " << fieldName << " already exists in database"
@@ -60,28 +60,20 @@ bool Foam::readFields::loadField(const word& fieldName) const
             IOobject::NO_WRITE
         );
 
-        if
-        (
-            fieldHeader.typeHeaderOk<vfType>(false)
-         && fieldHeader.headerClassName() == VolFieldType::typeName
-        )
+        if (fieldHeader.typeHeaderOk<VolFieldType>(false))
         {
             // Store field on mesh database
             Log << "    Reading " << fieldName << endl;
-            tmp<VolFieldType> tvf(new VolFieldType(fieldHeader, mesh));
-            store(tvf, fieldName);
+            tmp<VolFieldType> tvf(new VolFieldType(fieldHeader, mesh_));
+            regionFunctionObject::store(fieldName, tvf);
             return true;
         }
-        else if
-        (
-            fieldHeader.typeHeaderOk<sfType>(false)
-         && fieldHeader.headerClassName() == SurfaceFieldType::typeName
-        )
+        else if (fieldHeader.typeHeaderOk<SurfaceFieldType>(false))
         {
             // Store field on mesh database
             Log << "    Reading " << fieldName << endl;
-            tmp<SurfaceFieldType> tsf(new SurfaceFieldType(fieldHeader, mesh));
-            store(tsf, fieldName);
+            tmp<SurfaceFieldType> tsf(new SurfaceFieldType(fieldHeader, mesh_));
+            regionFunctionObject::store(fieldName, tsf);
             return true;
         }
     }
diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
index e8d14aecfd0..2314f721fd8 100644
--- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
+++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
@@ -334,13 +334,10 @@ Foam::functionObjects::regionSizeDistribution::regionSizeDistribution
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    file_(obr_, name),
+    writeFile(obr_, name),
     alphaName_(dict.lookup("field")),
     patchNames_(dict.lookup("patches")),
     isoPlanes_(dict.lookupOrDefault<bool>("isoPlanes", false))
-{
-    // Check if the available mesh is an fvMesh, otherwise deactivate
-    if (isA<fvMesh>(obr_))
 {
     read(dict);
 }
@@ -372,7 +369,7 @@ bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict)
     {
         coordSysPtr_.reset(new coordinateSystem(obr_, dict));
 
-        Log < "Transforming all vectorFields with coordinate system "
+        Log << "Transforming all vectorFields with coordinate system "
             << coordSysPtr_().name() << endl;
     }
 
@@ -390,18 +387,6 @@ bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict)
 }
 
 
-void Foam::regionSizeDistribution::execute()
-{
-    // Do nothing - only valid on write
-}
-
-
-void Foam::regionSizeDistribution::end()
-{
-    // Do nothing - only valid on write
-}
-
-
 bool Foam::functionObjects::regionSizeDistribution::execute()
 {
     return true;
@@ -723,8 +708,8 @@ bool Foam::functionObjects::regionSizeDistribution::write()
         {
             vectorField alphaDistance
             (
-                (alpha.primitiveField()*mesh.V())
-              * (mesh.C().primitiveField() - origin_)()
+                (alpha.primitiveField()*mesh_.V())
+               *(mesh_.C().primitiveField() - origin_)()
             );
 
             Map<vector> allRegionAlphaDistance
diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
index b15b93efeaa..f82320a103d 100644
--- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
+++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
@@ -158,12 +158,11 @@ namespace functionObjects
 
 class regionSizeDistribution
 :
-    public fvMeshFunctionObject
+    public fvMeshFunctionObject,
+    public writeFile
 {
     // Private data
 
-        writeFile file_;
-
         //- Name of field
         word alphaName_;
 
diff --git a/src/functionObjects/field/streamFunction/streamFunction.C b/src/functionObjects/field/streamFunction/streamFunction.C
index 9a5d32ca49e..f571baa16cb 100644
--- a/src/functionObjects/field/streamFunction/streamFunction.C
+++ b/src/functionObjects/field/streamFunction/streamFunction.C
@@ -107,7 +107,7 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc
 
     bool finished = true;
 
-    // Find the boundary face with zero flux. set the stream function
+    // Find the boundary face with zero flux. Set the stream function
     // to zero on that face
     bool found = false;
 
@@ -123,10 +123,7 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc
             {
                 forAll(bouFaces, facei)
                 {
-                    if
-                    (
-                        magSqr(phi.boundaryField()[patchi][facei]) < SMALL
-                    )
+                    if (magSqr(phi.boundaryField()[patchi][facei]) < SMALL)
                     {
                         const labelList& zeroPoints = bouFaces[facei];
 
@@ -441,7 +438,7 @@ Foam::functionObjects::streamFunction::streamFunction
 :
     fieldExpression(name, runTime, dict, "phi")
 {
-    setResultName("streamFunction", "phi");
+    setResultName(typeName, "phi");
 
     label nD = mesh_.nGeometricD();
 
diff --git a/src/functionObjects/field/streamLine/streamLine.C b/src/functionObjects/field/streamLine/streamLine.C
index 252b4d600f2..1edbba13e6a 100644
--- a/src/functionObjects/field/streamLine/streamLine.C
+++ b/src/functionObjects/field/streamLine/streamLine.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -23,18 +23,9 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "Pstream.H"
-#include "functionObjectList.H"
 #include "streamLine.H"
 #include "streamLineParticleCloud.H"
-#include "ReadFields.H"
-#include "meshSearch.H"
 #include "sampledSet.H"
-#include "globalIndex.H"
-#include "mapDistribute.H"
-#include "interpolationCellPoint.H"
-#include "PatchTools.H"
-#include "mapPolyMesh.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -51,53 +42,6 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-Foam::autoPtr<Foam::indirectPrimitivePatch>
-Foam::functionObjects::streamLine::wallPatch() const
-{
-    const polyBoundaryMesh& patches = mesh_.boundaryMesh();
-
-    label nFaces = 0;
-
-    forAll(patches, patchi)
-    {
-        if (isA<wallPolyPatch>(patches[patchi]))
-        {
-            nFaces += patches[patchi].size();
-        }
-    }
-
-    labelList addressing(nFaces);
-
-    nFaces = 0;
-
-    forAll(patches, patchi)
-    {
-        if (isA<wallPolyPatch>(patches[patchi]))
-        {
-            const polyPatch& pp = patches[patchi];
-
-            forAll(pp, i)
-            {
-                addressing[nFaces++] = pp.start()+i;
-            }
-        }
-    }
-
-    return autoPtr<indirectPrimitivePatch>
-    (
-        new indirectPrimitivePatch
-        (
-            IndirectList<face>
-            (
-                mesh_.faces(),
-                addressing
-            ),
-            mesh_.points()
-        )
-    );
-}
-
-
 void Foam::functionObjects::streamLine::track()
 {
     IDLList<streamLineParticle> initialParticles;
@@ -126,7 +70,7 @@ void Foam::functionObjects::streamLine::track()
 
     label nSeeds = returnReduce(particles.size(), sumOp<label>());
 
-    Info << "    seeded " << nSeeds << " particles" << endl;
+    Log << "    seeded " << nSeeds << " particles" << endl;
 
     // Read or lookup fields
     PtrList<volScalarField> vsFlds;
@@ -136,119 +80,15 @@ void Foam::functionObjects::streamLine::track()
 
     label UIndex = -1;
 
-    label nScalar = 0;
-    label nVector = 0;
-
-    forAll(fields_, i)
-    {
-        if (mesh_.foundObject<volScalarField>(fields_[i]))
-        {
-            nScalar++;
-        }
-        else if (mesh_.foundObject<volVectorField>(fields_[i]))
-        {
-            nVector++;
-        }
-        else
-        {
-            FatalErrorInFunction
-                << "Cannot find field " << fields_[i] << nl
-                << "Valid scalar fields are:"
-                << mesh_.names(volScalarField::typeName) << nl
-                << "Valid vector fields are:"
-                << mesh_.names(volVectorField::typeName)
-                << exit(FatalError);
-        }
-    }
-    vsInterp.setSize(nScalar);
-    nScalar = 0;
-    vvInterp.setSize(nVector);
-    nVector = 0;
-
-    forAll(fields_, i)
-    {
-        if (mesh_.foundObject<volScalarField>(fields_[i]))
-        {
-            const volScalarField& f = mesh_.lookupObject<volScalarField>
-            (
-                fields_[i]
-            );
-            vsInterp.set
-            (
-                nScalar++,
-                interpolation<scalar>::New
-                (
-                    interpolationScheme_,
-                    f
-                )
-            );
-        }
-        else if (mesh_.foundObject<volVectorField>(fields_[i]))
-        {
-            const volVectorField& f = mesh_.lookupObject<volVectorField>
-            (
-                fields_[i]
-            );
-
-            if (f.name() == UName_)
-            {
-                UIndex = nVector;
-            }
-
-            vvInterp.set
-            (
-                nVector++,
-                interpolation<vector>::New
-                (
-                    interpolationScheme_,
-                    f
-                )
-            );
-        }
-    }
-
-    // Store the names
-    scalarNames_.setSize(vsInterp.size());
-    forAll(vsInterp, i)
-    {
-        scalarNames_[i] = vsInterp[i].psi().name();
-    }
-    vectorNames_.setSize(vvInterp.size());
-    forAll(vvInterp, i)
-    {
-        vectorNames_[i] = vvInterp[i].psi().name();
-    }
-
-    // Check that we know the index of U in the interpolators.
-
-    if (UIndex == -1)
-    {
-        FatalErrorInFunction
-            << "Cannot find field to move particles with : " << UName_ << nl
-            << "This field has to be present in the sampled fields " << fields_
-            << " and in the objectRegistry."
-            << exit(FatalError);
-    }
-
-    // Sampled data
-    // ~~~~~~~~~~~~
-
-    // Size to maximum expected sizes.
-    allTracks_.clear();
-    allTracks_.setCapacity(nSeeds);
-    allScalars_.setSize(vsInterp.size());
-    forAll(allScalars_, i)
-    {
-        allScalars_[i].clear();
-        allScalars_[i].setCapacity(nSeeds);
-    }
-    allVectors_.setSize(vvInterp.size());
-    forAll(allVectors_, i)
-    {
-        allVectors_[i].clear();
-        allVectors_[i].setCapacity(nSeeds);
-    }
-
+    initInterpolations
+    (
+        nSeeds,
+        UIndex,
+        vsFlds,
+        vsInterp,
+        vvFlds,
+        vvInterp
+    );
 
     // Additional particle info
     streamLineParticle::trackingData td
@@ -285,9 +125,7 @@ Foam::functionObjects::streamLine::streamLine
     const dictionary& dict
 )
 :
-    fvMeshFunctionObject(name, runTime, dict),
-    dict_(dict),
-    nSubCycle_(0)
+    streamLineBase(name, runTime, dict)
 {
     read(dict_);
 }
@@ -303,375 +141,34 @@ Foam::functionObjects::streamLine::~streamLine()
 
 bool Foam::functionObjects::streamLine::read(const dictionary& dict)
 {
-    if (dict != dict_)
+    if (streamLineBase::read(dict))
     {
-        dict_ = dict;
-    }
+        bool subCycling = dict.found("nSubCycle");
+        bool fixedLength = dict.found("trackLength");
 
-    Info<< type() << " " << name() << ":" << nl;
-
-    dict.lookup("fields") >> fields_;
-    if (dict.found("U"))
-    {
-        dict.lookup("U") >> UName_;
-    }
-    else
-    {
-        UName_ = "U";
-        if (dict.found("U"))
+        if (subCycling && fixedLength)
         {
-            IOWarningInFunction(dict)
-                << "Using deprecated entry \"U\"."
-                << " Please use \"UName\" instead."
-                << endl;
-            dict.lookup("U") >> UName_;
+            FatalIOErrorInFunction(dict)
+                << "Cannot both specify automatic time stepping (through '"
+                << "nSubCycle' specification) and fixed track length (through '"
+                << "trackLength')"
+                << exit(FatalIOError);
         }
-    }
-
-    if (findIndex(fields_, UName_) == -1)
-    {
-        FatalIOErrorInFunction(dict)
-            << "Velocity field for tracking " << UName_
-            << " should be present in the list of fields " << fields_
-            << exit(FatalIOError);
-    }
-
-
-    dict.lookup("trackForward") >> trackForward_;
-    dict.lookup("lifeTime") >> lifeTime_;
-    if (lifeTime_ < 1)
-    {
-        FatalErrorInFunction
-            << "Illegal value " << lifeTime_ << " for lifeTime"
-            << exit(FatalError);
-    }
-
 
-    bool subCycling = dict.found("nSubCycle");
-    bool fixedLength = dict.found("trackLength");
-
-    if (subCycling && fixedLength)
-    {
-        FatalIOErrorInFunction(dict)
-            << "Cannot both specify automatic time stepping (through '"
-            << "nSubCycle' specification) and fixed track length (through '"
-            << "trackLength')"
-            << exit(FatalIOError);
-    }
-
-
-    nSubCycle_ = 1;
-    if (dict.readIfPresent("nSubCycle", nSubCycle_))
-    {
-        trackLength_ = VGREAT;
-        if (nSubCycle_ < 1)
+        nSubCycle_ = 1;
+        if (dict.readIfPresent("nSubCycle", nSubCycle_))
         {
-            nSubCycle_ = 1;
-        }
-        Info<< "    automatic track length specified through"
-            << " number of sub cycles : " << nSubCycle_ << nl << endl;
-    }
-    else
-    {
-        dict.lookup("trackLength") >> trackLength_;
+            trackLength_ = VGREAT;
+            nSubCycle_ = max(nSubCycle_, 1);
 
-        Info<< "    fixed track length specified : "
-            << trackLength_ << nl << endl;
-    }
-
-
-    interpolationScheme_ = dict.lookupOrDefault
-    (
-        "interpolationScheme",
-        interpolationCellPoint<scalar>::typeName
-    );
 
-    cloudName_ = dict.lookupOrDefault<word>("cloudName", "streamLine");
-    dict.lookup("seedSampleSet") >> seedSet_;
-
-    meshSearchPtr_.reset(new meshSearch(mesh_));
-
-    const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");
-    sampledSetPtr_ = sampledSet::New
-    (
-        seedSet_,
-        mesh_,
-        meshSearchPtr_(),
-        coeffsDict
-    );
-    coeffsDict.lookup("axis") >> sampledSetAxis_;
-
-    scalarFormatterPtr_ = writer<scalar>::New(dict.lookup("setFormat"));
-    vectorFormatterPtr_ = writer<vector>::New(dict.lookup("setFormat"));
-
-    return true;
-}
-
-
-bool Foam::functionObjects::streamLine::execute()
-{
-    return true;
-}
-
-
-bool Foam::functionObjects::streamLine::write()
-{
-    Info<< type() << " " << name() << " write:" << nl;
-
-    const Time& runTime = obr_.time();
-
-    // Do all injection and tracking
-    track();
-
-
-    if (Pstream::parRun())
-    {
-        // Append slave tracks to master ones
-        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-        globalIndex globalTrackIDs(allTracks_.size());
-
-        // Construct a distribution map to pull all to the master.
-        labelListList sendMap(Pstream::nProcs());
-        labelListList recvMap(Pstream::nProcs());
-
-        if (Pstream::master())
-        {
-            // Master: receive all. My own first, then consecutive
-            // processors.
-            label trackI = 0;
-
-            forAll(recvMap, proci)
-            {
-                labelList& fromProc = recvMap[proci];
-                fromProc.setSize(globalTrackIDs.localSize(proci));
-                forAll(fromProc, i)
-                {
-                    fromProc[i] = trackI++;
-                }
-            }
-        }
-
-        labelList& toMaster = sendMap[0];
-        toMaster.setSize(globalTrackIDs.localSize());
-        forAll(toMaster, i)
-        {
-            toMaster[i] = i;
-        }
-
-        const mapDistribute distMap
-        (
-            globalTrackIDs.size(),
-            sendMap.xfer(),
-            recvMap.xfer()
-        );
-
-
-        // Distribute the track positions. Note: use scheduled comms
-        // to prevent buffering.
-        mapDistributeBase::distribute
-        (
-            Pstream::scheduled,
-            distMap.schedule(),
-            distMap.constructSize(),
-            distMap.subMap(),
-            false,
-            distMap.constructMap(),
-            false,
-            allTracks_,
-            flipOp()
-        );
-
-        // Distribute the scalars
-        forAll(allScalars_, scalarI)
-        {
-            allScalars_[scalarI].shrink();
-            mapDistributeBase::distribute
-            (
-                Pstream::scheduled,
-                distMap.schedule(),
-                distMap.constructSize(),
-                distMap.subMap(),
-                false,
-                distMap.constructMap(),
-                false,
-                allScalars_[scalarI],
-                flipOp()
-            );
-            allScalars_[scalarI].setCapacity(allScalars_[scalarI].size());
-        }
-        // Distribute the vectors
-        forAll(allVectors_, vectorI)
-        {
-            allVectors_[vectorI].shrink();
-            mapDistributeBase::distribute
-            (
-                Pstream::scheduled,
-                distMap.schedule(),
-                distMap.constructSize(),
-                distMap.subMap(),
-                false,
-                distMap.constructMap(),
-                false,
-                allVectors_[vectorI],
-                flipOp()
-            );
-            allVectors_[vectorI].setCapacity(allVectors_[vectorI].size());
-        }
-    }
-
-
-    label n = 0;
-    forAll(allTracks_, trackI)
-    {
-        n += allTracks_[trackI].size();
-    }
-
-    Info<< "    Tracks:" << allTracks_.size() << nl
-        << "    Total samples:" << n
-        << endl;
-
-
-    // Massage into form suitable for writers
-    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    if (Pstream::master() && allTracks_.size())
-    {
-        // Make output directory
-
-        fileName vtkPath
-        (
-            Pstream::parRun()
-          ? runTime.path()/".."/"postProcessing"/"sets"/name()
-          : runTime.path()/"postProcessing"/"sets"/name()
-        );
-        if (mesh_.name() != fvMesh::defaultRegion)
-        {
-            vtkPath = vtkPath/mesh_.name();
-        }
-        vtkPath = vtkPath/mesh_.time().timeName();
-
-        mkDir(vtkPath);
-
-        // Convert track positions
-
-        PtrList<coordSet> tracks(allTracks_.size());
-        forAll(allTracks_, trackI)
-        {
-            tracks.set
-            (
-                trackI,
-                new coordSet
-                (
-                    "track" + Foam::name(trackI),
-                    sampledSetAxis_                 //"xyz"
-                )
-            );
-            tracks[trackI].transfer(allTracks_[trackI]);
-        }
-
-        // Convert scalar values
-
-        if (allScalars_.size() > 0)
-        {
-            List<List<scalarField>> scalarValues(allScalars_.size());
-
-            forAll(allScalars_, scalarI)
-            {
-                DynamicList<scalarList>& allTrackVals =
-                    allScalars_[scalarI];
-                scalarValues[scalarI].setSize(allTrackVals.size());
-
-                forAll(allTrackVals, trackI)
-                {
-                    scalarList& trackVals = allTrackVals[trackI];
-                    scalarValues[scalarI][trackI].transfer(trackVals);
-                }
-            }
-
-            fileName vtkFile
-            (
-                vtkPath
-              / scalarFormatterPtr_().getFileName
-                (
-                    tracks[0],
-                    scalarNames_
-                )
-            );
-
-            Info<< "    Writing data to " << vtkFile.path() << endl;
-
-            scalarFormatterPtr_().write
-            (
-                true,           // writeTracks
-                tracks,
-                scalarNames_,
-                scalarValues,
-                OFstream(vtkFile)()
-            );
-        }
-
-        // Convert vector values
-
-        if (allVectors_.size() > 0)
-        {
-            List<List<vectorField>> vectorValues(allVectors_.size());
-
-            forAll(allVectors_, vectorI)
-            {
-                DynamicList<vectorList>& allTrackVals =
-                    allVectors_[vectorI];
-                vectorValues[vectorI].setSize(allTrackVals.size());
-
-                forAll(allTrackVals, trackI)
-                {
-                    vectorList& trackVals = allTrackVals[trackI];
-                    vectorValues[vectorI][trackI].transfer(trackVals);
-                }
-            }
-
-            fileName vtkFile
-            (
-                vtkPath
-              / vectorFormatterPtr_().getFileName
-                (
-                    tracks[0],
-                    vectorNames_
-                )
-            );
-
-            vectorFormatterPtr_().write
-            (
-                true,           // writeTracks
-                tracks,
-                vectorNames_,
-                vectorValues,
-                OFstream(vtkFile)()
-            );
+            Log << "    automatic track length specified through"
+                << " number of sub cycles : " << nSubCycle_ << nl
+                << endl;
         }
     }
-
     return true;
 }
 
 
-void Foam::functionObjects::streamLine::updateMesh(const mapPolyMesh& mpm)
-{
-    if (&mpm.mesh() == &mesh_)
-    {
-        read(dict_);
-    }
-}
-
-
-void Foam::functionObjects::streamLine::movePoints(const polyMesh& mesh)
-{
-    if (&mesh == &mesh_)
-    {
-        // Moving mesh affects the search tree
-        read(dict_);
-    }
-}
-
-
 // ************************************************************************* //
diff --git a/src/functionObjects/field/streamLine/streamLineBase.C b/src/functionObjects/field/streamLine/streamLineBase.C
index f5da6adc2ab..0a564d7baf7 100644
--- a/src/functionObjects/field/streamLine/streamLineBase.C
+++ b/src/functionObjects/field/streamLine/streamLineBase.C
@@ -32,23 +32,25 @@ License
 #include "interpolationCellPoint.H"
 #include "wallPolyPatch.H"
 #include "meshSearchMeshObject.H"
+#include "mapPolyMesh.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
 {
     defineTypeNameAndDebug(streamLineBase, 0);
 }
+}
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 Foam::autoPtr<Foam::indirectPrimitivePatch>
-Foam::streamLineBase::wallPatch() const
+Foam::functionObjects::streamLineBase::wallPatch() const
 {
-    const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);
-
-    const polyBoundaryMesh& patches = mesh.boundaryMesh();
+    const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
     label nFaces = 0;
 
@@ -85,16 +87,16 @@ Foam::streamLineBase::wallPatch() const
         (
             IndirectList<face>
             (
-                mesh.faces(),
+                mesh_.faces(),
                 addressing
             ),
-            mesh.points()
+            mesh_.points()
         )
     );
 }
 
 
-void Foam::streamLineBase::initInterpolations
+void Foam::functionObjects::streamLineBase::initInterpolations
 (
     const label nSeeds,
     label& UIndex,
@@ -104,123 +106,73 @@ void Foam::streamLineBase::initInterpolations
     PtrList<interpolation<vector>>& vvInterp
 )
 {
-    const Time& runTime = obr_.time();
-    const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);
-
-    // Read or lookup fields
+    // Read fields
+    label nScalar = 0;
+    label nVector = 0;
 
-    if (loadFromFiles_)
+    forAll(fields_, i)
     {
-        IOobjectList allObjects(mesh, runTime.timeName());
-
-        IOobjectList objects(2*fields_.size());
-        forAll(fields_, i)
+        if (foundObject<volScalarField>(fields_[i]))
+        {
+            nScalar++;
+        }
+        else if (foundObject<volVectorField>(fields_[i]))
         {
-            objects.add(*allObjects[fields_[i]]);
+            nVector++;
         }
+        else
+        {
+            FatalErrorInFunction
+                << "Cannot find field " << fields_[i] << nl
+                << "Valid scalar fields are:"
+                << mesh_.names(volScalarField::typeName) << nl
+                << "Valid vector fields are:"
+                << mesh_.names(volVectorField::typeName)
+                << exit(FatalError);
+        }
+    }
+    vsInterp.setSize(nScalar);
+    nScalar = 0;
+    vvInterp.setSize(nVector);
+    nVector = 0;
 
-        ReadFields(mesh, objects, vsFlds);
-        vsInterp.setSize(vsFlds.size());
-        forAll(vsFlds, i)
+    forAll(fields_, i)
+    {
+        if (foundObject<volScalarField>(fields_[i]))
         {
+            const volScalarField& f =
+                lookupObject<volScalarField>(fields_[i]);
             vsInterp.set
             (
-                i,
+                nScalar++,
                 interpolation<scalar>::New
                 (
                     interpolationScheme_,
-                    vsFlds[i]
+                    f
                 )
             );
         }
-        ReadFields(mesh, objects, vvFlds);
-        vvInterp.setSize(vvFlds.size());
-        forAll(vvFlds, i)
+        else if (foundObject<volVectorField>(fields_[i]))
         {
+            const volVectorField& f =
+                lookupObject<volVectorField>(fields_[i]);
+
+            if (f.name() == UName_)
+            {
+                UIndex = nVector;
+            }
+
             vvInterp.set
             (
-                i,
+                nVector++,
                 interpolation<vector>::New
                 (
                     interpolationScheme_,
-                    vvFlds[i]
+                    f
                 )
             );
         }
     }
-    else
-    {
-        label nScalar = 0;
-        label nVector = 0;
-
-        forAll(fields_, i)
-        {
-            if (mesh.foundObject<volScalarField>(fields_[i]))
-            {
-                nScalar++;
-            }
-            else if (mesh.foundObject<volVectorField>(fields_[i]))
-            {
-                nVector++;
-            }
-            else
-            {
-                FatalErrorInFunction
-                    << "Cannot find field " << fields_[i] << nl
-                    << "Valid scalar fields are:"
-                    << mesh.names(volScalarField::typeName) << nl
-                    << "Valid vector fields are:"
-                    << mesh.names(volVectorField::typeName)
-                    << exit(FatalError);
-            }
-        }
-        vsInterp.setSize(nScalar);
-        nScalar = 0;
-        vvInterp.setSize(nVector);
-        nVector = 0;
-
-        forAll(fields_, i)
-        {
-            if (mesh.foundObject<volScalarField>(fields_[i]))
-            {
-                const volScalarField& f = mesh.lookupObject<volScalarField>
-                (
-                    fields_[i]
-                );
-                vsInterp.set
-                (
-                    nScalar++,
-                    interpolation<scalar>::New
-                    (
-                        interpolationScheme_,
-                        f
-                    )
-                );
-            }
-            else if (mesh.foundObject<volVectorField>(fields_[i]))
-            {
-                const volVectorField& f = mesh.lookupObject<volVectorField>
-                (
-                    fields_[i]
-                );
-
-                if (f.name() == UName_)
-                {
-                    UIndex = nVector;
-                }
-
-                vvInterp.set
-                (
-                    nVector++,
-                    interpolation<vector>::New
-                    (
-                        interpolationScheme_,
-                        f
-                    )
-                );
-            }
-        }
-    }
 
     // Store the names
     scalarNames_.setSize(vsInterp.size());
@@ -266,7 +218,7 @@ void Foam::streamLineBase::initInterpolations
 }
 
 
-void Foam::streamLineBase::storePoint
+void Foam::functionObjects::streamLineBase::storePoint
 (
     const label trackI,
 
@@ -312,7 +264,7 @@ void Foam::streamLineBase::storePoint
 
 
 // Can split a track into multiple tracks
-void Foam::streamLineBase::trimToBox
+void Foam::functionObjects::streamLineBase::trimToBox
 (
     const treeBoundBox& bb,
     const label trackI,
@@ -467,7 +419,7 @@ void Foam::streamLineBase::trimToBox
 }
 
 
-void Foam::streamLineBase::trimToBox(const treeBoundBox& bb)
+void Foam::functionObjects::streamLineBase::trimToBox(const treeBoundBox& bb)
 {
     // Storage for new tracks. Per track, per sample the coordinate (newTracks)
     // or values for all the sampled fields (newScalars, newVectors)
@@ -533,198 +485,177 @@ void Foam::streamLineBase::trimToBox(const treeBoundBox& bb)
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::streamLineBase::streamLineBase
+Foam::functionObjects::streamLineBase::streamLineBase
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectState(obr, name),
-    dict_(dict),
-    obr_(obr),
-    loadFromFiles_(loadFromFiles),
-    log_(true)
+    fvMeshFunctionObject(name, runTime, dict),
+    dict_(dict)
 {}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::streamLineBase::~streamLineBase()
+Foam::functionObjects::streamLineBase::~streamLineBase()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::streamLineBase::read(const dictionary& dict)
+bool Foam::functionObjects::streamLineBase::read(const dictionary& dict)
 {
-    if (active_)
-    {
-        log_.readIfPresent("log", dict);
+    Info<< type() << " " << name() << ":" << nl;
 
-        if (log_) Info<< type() << " " << name_ << ":" << nl;
+    dict.lookup("fields") >> fields_;
+    dict.lookup("U") >> UName_;
 
-        dict.lookup("fields") >> fields_;
-        if (dict.found("UName"))
-        {
-            dict.lookup("UName") >> UName_;
-        }
-        else
-        {
-            UName_ = "U";
-            if (dict.found("U"))
-            {
-                IOWarningInFunction(dict)
-                    << "Using deprecated entry \"U\"."
-                    << " Please use \"UName\" instead."
-                    << endl;
-                dict.lookup("U") >> UName_;
-            }
-        }
-
-        if (findIndex(fields_, UName_) == -1)
-        {
-            FatalIOErrorInFunction(dict)
-                << "Velocity field for tracking " << UName_
-                << " should be present in the list of fields " << fields_
-                << exit(FatalIOError);
-        }
+    if (findIndex(fields_, UName_) == -1)
+    {
+        FatalIOErrorInFunction(dict)
+            << "Velocity field for tracking " << UName_
+            << " should be present in the list of fields " << fields_
+            << exit(FatalIOError);
+    }
 
 
-        dict.lookup("trackForward") >> trackForward_;
-        dict.lookup("lifeTime") >> lifeTime_;
-        if (lifeTime_ < 1)
-        {
-            FatalErrorInFunction
-                << "Illegal value " << lifeTime_ << " for lifeTime"
-                << exit(FatalError);
-        }
+    dict.lookup("trackForward") >> trackForward_;
+    dict.lookup("lifeTime") >> lifeTime_;
+    if (lifeTime_ < 1)
+    {
+        FatalErrorInFunction
+            << "Illegal value " << lifeTime_ << " for lifeTime"
+            << exit(FatalError);
+    }
 
 
-        trackLength_ = VGREAT;
-        if (dict.found("trackLength"))
-        {
-            dict.lookup("trackLength") >> trackLength_;
+    trackLength_ = VGREAT;
+    if (dict.found("trackLength"))
+    {
+        dict.lookup("trackLength") >> trackLength_;
 
-            if (log_)
-            {
-                Info<< type() << " : fixed track length specified : "
-                    << trackLength_ << nl << endl;
-            }
-        }
+        Info<< type() << " : fixed track length specified : "
+            << trackLength_ << nl << endl;
+    }
 
 
-        bounds_ = boundBox::greatBox;
-        if (dict.readIfPresent("bounds", bounds_))
-        {
-            if (log_) Info<< "    clipping all segments to " << bounds_ << nl << endl;
-        }
+    bounds_ = boundBox::greatBox;
+    if (dict.readIfPresent("bounds", bounds_))
+    {
+        Info<< "    clipping all segments to " << bounds_ << nl << endl;
+    }
 
 
-        interpolationScheme_ = dict.lookupOrDefault
-        (
-            "interpolationScheme",
-            interpolationCellPoint<scalar>::typeName
-        );
+    interpolationScheme_ = dict.lookupOrDefault
+    (
+        "interpolationScheme",
+        interpolationCellPoint<scalar>::typeName
+    );
 
-        //if (log_) Info<< "    using interpolation " << interpolationScheme_
-        //    << endl;
+    //Info<< "    using interpolation " << interpolationScheme_ << endl;
 
-        cloudName_ = dict.lookupOrDefault<word>("cloudName", type());
-        dict.lookup("seedSampleSet") >> seedSet_;
+    cloudName_ = dict.lookupOrDefault<word>("cloudName", type());
+    dict.lookup("seedSampleSet") >> seedSet_;
 
-        const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);
+    const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");
 
-        const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");
+    sampledSetPtr_ = sampledSet::New
+    (
+        seedSet_,
+        mesh_,
+        meshSearchMeshObject::New(mesh_),
+        coeffsDict
+    );
+    coeffsDict.lookup("axis") >> sampledSetAxis_;
 
-        sampledSetPtr_ = sampledSet::New
-        (
-            seedSet_,
-            mesh,
-            meshSearchMeshObject::New(mesh),
-            coeffsDict
-        );
-        coeffsDict.lookup("axis") >> sampledSetAxis_;
+    scalarFormatterPtr_ = writer<scalar>::New(dict.lookup("setFormat"));
+    vectorFormatterPtr_ = writer<vector>::New(dict.lookup("setFormat"));
 
-        scalarFormatterPtr_ = writer<scalar>::New(dict.lookup("setFormat"));
-        vectorFormatterPtr_ = writer<vector>::New(dict.lookup("setFormat"));
-    }
+    return true;
 }
 
 
-void Foam::streamLineBase::execute()
-{}
+bool Foam::functionObjects::streamLineBase::execute()
+{
+    return true;
+}
 
 
-void Foam::streamLineBase::end()
-{}
+bool Foam::functionObjects::streamLineBase::write()
+{
+    Log << type() << " " << name() << " write:" << nl;
 
 
-void Foam::streamLineBase::timeSet()
-{}
+    // Do all injection and tracking
+    track();
 
 
-void Foam::streamLineBase::write()
-{
-    if (active_)
+    if (Pstream::parRun())
     {
-        if (log_) Info<< type() << " " << name_ << " output:" << nl;
-
-        const Time& runTime = obr_.time();
-        const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_);
+        // Append slave tracks to master ones
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+        globalIndex globalTrackIDs(allTracks_.size());
 
-        // Do all injection and tracking
-        track();
+        // Construct a distribution map to pull all to the master.
+        labelListList sendMap(Pstream::nProcs());
+        labelListList recvMap(Pstream::nProcs());
 
-
-        if (Pstream::parRun())
+        if (Pstream::master())
         {
-            // Append slave tracks to master ones
-            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-            globalIndex globalTrackIDs(allTracks_.size());
+            // Master: receive all. My own first, then consecutive
+            // processors.
+            label tracki = 0;
 
-            // Construct a distribution map to pull all to the master.
-            labelListList sendMap(Pstream::nProcs());
-            labelListList recvMap(Pstream::nProcs());
-
-            if (Pstream::master())
+            forAll(recvMap, proci)
             {
-                // Master: receive all. My own first, then consecutive
-                // processors.
-                label trackI = 0;
-
-                forAll(recvMap, procI)
+                labelList& fromProc = recvMap[proci];
+                fromProc.setSize(globalTrackIDs.localSize(proci));
+                forAll(fromProc, i)
                 {
-                    labelList& fromProc = recvMap[procI];
-                    fromProc.setSize(globalTrackIDs.localSize(procI));
-                    forAll(fromProc, i)
-                    {
-                        fromProc[i] = trackI++;
-                    }
+                    fromProc[i] = tracki++;
                 }
             }
+        }
 
-            labelList& toMaster = sendMap[0];
-            toMaster.setSize(globalTrackIDs.localSize());
-            forAll(toMaster, i)
-            {
-                toMaster[i] = i;
-            }
+        labelList& toMaster = sendMap[0];
+        toMaster.setSize(globalTrackIDs.localSize());
+        forAll(toMaster, i)
+        {
+            toMaster[i] = i;
+        }
 
-            const mapDistribute distMap
-            (
-                globalTrackIDs.size(),
-                sendMap.xfer(),
-                recvMap.xfer()
-            );
+        const mapDistribute distMap
+        (
+            globalTrackIDs.size(),
+            sendMap.xfer(),
+            recvMap.xfer()
+        );
 
 
-            // Distribute the track positions. Note: use scheduled comms
-            // to prevent buffering.
-            allTracks_.shrink();
+        // Distribute the track positions. Note: use scheduled comms
+        // to prevent buffering.
+        allTracks_.shrink();
+        mapDistributeBase::distribute
+        (
+            Pstream::scheduled,
+            distMap.schedule(),
+            distMap.constructSize(),
+            distMap.subMap(),
+            false,
+            distMap.constructMap(),
+            false,
+            allTracks_,
+            flipOp()
+        );
+        allTracks_.setCapacity(allTracks_.size());
+
+        // Distribute the scalars
+        forAll(allScalars_, scalari)
+        {
+            allScalars_[scalari].shrink();
             mapDistributeBase::distribute
             (
                 Pstream::scheduled,
@@ -734,250 +665,225 @@ void Foam::streamLineBase::write()
                 false,
                 distMap.constructMap(),
                 false,
-                allTracks_,
+                allScalars_[scalari],
                 flipOp()
             );
-            allTracks_.setCapacity(allTracks_.size());
-
-            // Distribute the scalars
-            forAll(allScalars_, scalarI)
-            {
-                allScalars_[scalarI].shrink();
-                mapDistributeBase::distribute
-                (
-                    Pstream::scheduled,
-                    distMap.schedule(),
-                    distMap.constructSize(),
-                    distMap.subMap(),
-                    false,
-                    distMap.constructMap(),
-                    false,
-                    allScalars_[scalarI],
-                    flipOp()
-                );
-                allScalars_[scalarI].setCapacity(allScalars_[scalarI].size());
-            }
-            // Distribute the vectors
-            forAll(allVectors_, vectorI)
-            {
-                allVectors_[vectorI].shrink();
-                mapDistributeBase::distribute
-                (
-                    Pstream::scheduled,
-                    distMap.schedule(),
-                    distMap.constructSize(),
-                    distMap.subMap(),
-                    false,
-                    distMap.constructMap(),
-                    false,
-                    allVectors_[vectorI],
-                    flipOp()
-                );
-                allVectors_[vectorI].setCapacity(allVectors_[vectorI].size());
-            }
+            allScalars_[scalari].setCapacity(allScalars_[scalari].size());
         }
+        // Distribute the vectors
+        forAll(allVectors_, vectori)
+        {
+            allVectors_[vectori].shrink();
+            mapDistributeBase::distribute
+            (
+                Pstream::scheduled,
+                distMap.schedule(),
+                distMap.constructSize(),
+                distMap.subMap(),
+                false,
+                distMap.constructMap(),
+                false,
+                allVectors_[vectori],
+                flipOp()
+            );
+            allVectors_[vectori].setCapacity(allVectors_[vectori].size());
+        }
+    }
 
 
-        // Note: filenames scattered below since used in global call
-        fileName scalarVtkFile;
-        fileName vectorVtkFile;
+    // Note: filenames scattered below since used in global call
+    fileName scalarVtkFile;
+    fileName vectorVtkFile;
 
-        if (Pstream::master())
+    if (Pstream::master())
+    {
+        if (bounds_ != boundBox::greatBox)
         {
-            if (bounds_ != boundBox::greatBox)
-            {
-                // Clip to bounding box
-                trimToBox(treeBoundBox(bounds_));
-            }
+            // Clip to bounding box
+            trimToBox(treeBoundBox(bounds_));
+        }
 
 
-            label nTracks = 0;
-            label n = 0;
-            forAll(allTracks_, trackI)
+        label nTracks = 0;
+        label n = 0;
+        forAll(allTracks_, tracki)
+        {
+            if (allTracks_[tracki].size())
             {
-                if (allTracks_[trackI].size())
-                {
-                    nTracks++;
-                    n += allTracks_[trackI].size();
-                }
+                nTracks++;
+                n += allTracks_[tracki].size();
             }
+        }
 
-            if (log_)
-            {
-                Info<< "    Tracks:" << nTracks << nl
-                    << "    Total samples:" << n
-                    << endl;
-            }
+        Log << "    Tracks:" << nTracks << nl
+            << "    Total samples:" << n
+            << endl;
 
 
-            // Massage into form suitable for writers
-            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        // Massage into form suitable for writers
+        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-            // Make output directory
+        // Make output directory
 
-            fileName vtkPath
-            (
-                Pstream::parRun()
-              ? runTime.path()/".."/"postProcessing"/"sets"/name()
-              : runTime.path()/"postProcessing"/"sets"/name()
-            );
-            if (mesh.name() != fvMesh::defaultRegion)
-            {
-                vtkPath = vtkPath/mesh.name();
-            }
-            vtkPath = vtkPath/mesh.time().timeName();
+        fileName vtkPath
+        (
+            Pstream::parRun()
+          ? time_.path()/".."/"postProcessing"/"sets"/name()
+          : time_.path()/"postProcessing"/"sets"/name()
+        );
+        if (mesh_.name() != fvMesh::defaultRegion)
+        {
+            vtkPath = vtkPath/mesh_.name();
+        }
+        vtkPath = vtkPath/mesh_.time().timeName();
 
-            mkDir(vtkPath);
+        mkDir(vtkPath);
 
-            // Convert track positions (and compact out empty tracks)
+        // Convert track positions (and compact out empty tracks)
 
-            PtrList<coordSet> tracks(nTracks);
-            nTracks = 0;
-            labelList oldToNewTrack(allTracks_.size(), -1);
+        PtrList<coordSet> tracks(nTracks);
+        nTracks = 0;
+        labelList oldToNewTrack(allTracks_.size(), -1);
 
-            forAll(allTracks_, trackI)
+        forAll(allTracks_, tracki)
+        {
+            if (allTracks_[tracki].size())
             {
-                if (allTracks_[trackI].size())
-                {
-                    tracks.set
+                tracks.set
+                (
+                    nTracks,
+                    new coordSet
                     (
-                        nTracks,
-                        new coordSet
-                        (
-                            "track" + Foam::name(nTracks),
-                            sampledSetAxis_                 //"xyz"
-                        )
-                    );
-                    oldToNewTrack[trackI] = nTracks;
-                    tracks[nTracks].transfer(allTracks_[trackI]);
-                    nTracks++;
-                }
+                        "track" + Foam::name(nTracks),
+                        sampledSetAxis_                 //"xyz"
+                    )
+                );
+                oldToNewTrack[tracki] = nTracks;
+                tracks[nTracks].transfer(allTracks_[tracki]);
+                nTracks++;
             }
+        }
 
-            // Convert scalar values
+        // Convert scalar values
 
-            if (allScalars_.size() > 0)
+        if (allScalars_.size() > 0)
+        {
+            List<List<scalarField>> scalarValues(allScalars_.size());
+
+            forAll(allScalars_, scalari)
             {
-                List<List<scalarField>> scalarValues(allScalars_.size());
+                DynamicList<scalarList>& allTrackVals = allScalars_[scalari];
+                scalarValues[scalari].setSize(nTracks);
 
-                forAll(allScalars_, scalarI)
+                forAll(allTrackVals, tracki)
                 {
-                    DynamicList<scalarList>& allTrackVals =
-                        allScalars_[scalarI];
-                    scalarValues[scalarI].setSize(nTracks);
-
-                    forAll(allTrackVals, trackI)
+                    scalarList& vals = allTrackVals[tracki];
+                    if (vals.size())
                     {
-                        scalarList& vals = allTrackVals[trackI];
-                        if (vals.size())
-                        {
-                            label newTrackI = oldToNewTrack[trackI];
-                            scalarValues[scalarI][newTrackI].transfer(vals);
-                        }
+                        label newTracki = oldToNewTrack[tracki];
+                        scalarValues[scalari][newTracki].transfer(vals);
                     }
                 }
+            }
 
-                scalarVtkFile = fileName
+            scalarVtkFile = fileName
+            (
+                vtkPath
+              / scalarFormatterPtr_().getFileName
                 (
-                    vtkPath
-                  / scalarFormatterPtr_().getFileName
-                    (
-                        tracks[0],
-                        scalarNames_
-                    )
-                );
+                    tracks[0],
+                    scalarNames_
+                )
+            );
 
-                if (log_) Info
-                    << "    Writing data to " << scalarVtkFile.path() << endl;
+            Log << "    Writing data to " << scalarVtkFile.path() << endl;
 
-                scalarFormatterPtr_().write
-                (
-                    true,           // writeTracks
-                    tracks,
-                    scalarNames_,
-                    scalarValues,
-                    OFstream(scalarVtkFile)()
-                );
-            }
+            scalarFormatterPtr_().write
+            (
+                true,           // writeTracks
+                tracks,
+                scalarNames_,
+                scalarValues,
+                OFstream(scalarVtkFile)()
+            );
+        }
+
+        // Convert vector values
 
-            // Convert vector values
+        if (allVectors_.size() > 0)
+        {
+            List<List<vectorField>> vectorValues(allVectors_.size());
 
-            if (allVectors_.size() > 0)
+            forAll(allVectors_, vectori)
             {
-                List<List<vectorField>> vectorValues(allVectors_.size());
+                DynamicList<vectorList>& allTrackVals = allVectors_[vectori];
+                vectorValues[vectori].setSize(nTracks);
 
-                forAll(allVectors_, vectorI)
+                forAll(allTrackVals, tracki)
                 {
-                    DynamicList<vectorList>& allTrackVals =
-                        allVectors_[vectorI];
-                    vectorValues[vectorI].setSize(nTracks);
-
-                    forAll(allTrackVals, trackI)
+                    vectorList& vals = allTrackVals[tracki];
+                    if (vals.size())
                     {
-                        vectorList& vals = allTrackVals[trackI];
-                        if (vals.size())
-                        {
-                            label newTrackI = oldToNewTrack[trackI];
-                            vectorValues[vectorI][newTrackI].transfer(vals);
-                        }
+                        label newTracki = oldToNewTrack[tracki];
+                        vectorValues[vectori][newTracki].transfer(vals);
                     }
                 }
+            }
 
-                vectorVtkFile = fileName
-                (
-                    vtkPath
-                  / vectorFormatterPtr_().getFileName
-                    (
-                        tracks[0],
-                        vectorNames_
-                    )
-                );
+            vectorVtkFile = fileName
+            (
+                vtkPath
+              / vectorFormatterPtr_().getFileName(tracks[0], vectorNames_)
+            );
 
-                //if (log_) Info<< "    Writing vector data to "
-                //   << vectorVtkFile << endl;
+            //Info<< "    Writing vector data to " << vectorVtkFile << endl;
 
-                vectorFormatterPtr_().write
-                (
-                    true,           // writeTracks
-                    tracks,
-                    vectorNames_,
-                    vectorValues,
-                    OFstream(vectorVtkFile)()
-                );
-            }
+            vectorFormatterPtr_().write
+            (
+                true,           // writeTracks
+                tracks,
+                vectorNames_,
+                vectorValues,
+                OFstream(vectorVtkFile)()
+            );
         }
+    }
 
 
-        // fileNames are generated on the master but setProperty needs to
-        // be across all procs
-        Pstream::scatter(scalarVtkFile);
-        forAll(scalarNames_, nameI)
-        {
-            dictionary propsDict;
-            propsDict.add("file", scalarVtkFile);
-            const word& fieldName = scalarNames_[nameI];
-            setProperty(fieldName, propsDict);
-        }
+    // File names are generated on the master but setProperty needs to
+    // be across all procs
+    Pstream::scatter(scalarVtkFile);
+    forAll(scalarNames_, namei)
+    {
+        dictionary propsDict;
+        propsDict.add("file", scalarVtkFile);
+        const word& fieldName = scalarNames_[namei];
+        setProperty(fieldName, propsDict);
+    }
 
-        Pstream::scatter(vectorVtkFile);
-        forAll(vectorNames_, nameI)
-        {
-            dictionary propsDict;
-            propsDict.add("file", vectorVtkFile);
-            const word& fieldName = vectorNames_[nameI];
-            setProperty(fieldName, propsDict);
-        }
+    Pstream::scatter(vectorVtkFile);
+    forAll(vectorNames_, namei)
+    {
+        dictionary propsDict;
+        propsDict.add("file", vectorVtkFile);
+        const word& fieldName = vectorNames_[namei];
+        setProperty(fieldName, propsDict);
     }
+
+    return true;
 }
 
 
-void Foam::streamLineBase::updateMesh(const mapPolyMesh&)
+void Foam::functionObjects::streamLineBase::updateMesh(const mapPolyMesh& mpm)
 {
-    read(dict_);
+    if (&mpm.mesh() == &mesh_)
+    {
+        read(dict_);
+    }
 }
 
 
-void Foam::streamLineBase::movePoints(const polyMesh&)
+void Foam::functionObjects::streamLineBase::movePoints(const polyMesh& mpm)
 {
     // Moving mesh affects the search tree
     read(dict_);
diff --git a/src/functionObjects/field/streamLine/streamLineBase.H b/src/functionObjects/field/streamLine/streamLineBase.H
index 2facb4d2eba..dd0083449f9 100644
--- a/src/functionObjects/field/streamLine/streamLineBase.H
+++ b/src/functionObjects/field/streamLine/streamLineBase.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,11 +22,11 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::streamLineBase
+    Foam::functionObjects::streamLineBase
 
 SeeAlso
-    Foam::streamLine
-    Foam::wallBoundedStreamLine
+    Foam::functionObjects::streamLine
+    Foam::functionObjects::wallBoundedStreamLine
 
 SourceFiles
     streamLineBase.C
@@ -36,7 +36,7 @@ SourceFiles
 #ifndef streamLineBase_H
 #define streamLineBase_H
 
-#include "functionObjectState.H"
+#include "fvMeshFunctionObject.H"
 #include "DynamicList.H"
 #include "scalarList.H"
 #include "vectorList.H"
@@ -49,35 +49,25 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class mapPolyMesh;
 class meshSearch;
 class sampledSet;
 
+namespace functionObjects
+{
+
 /*---------------------------------------------------------------------------*\
-                         Class streamLineBase Declaration
+                       Class streamLineBase Declaration
 \*---------------------------------------------------------------------------*/
 
 class streamLineBase
 :
-    public functionObjectState
+    public fvMeshFunctionObject
 {
 protected:
 
         //- Input dictionary
         dictionary dict_;
 
-        //- Database this class is registered to
-        const objectRegistry& obr_;
-
-        //- Load fields from files (not from objectRegistry)
-        bool loadFromFiles_;
-
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
         //- List of fields to sample
         wordList fields_;
 
@@ -200,9 +190,8 @@ public:
         streamLineBase
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
@@ -213,19 +202,13 @@ public:
     // Member Functions
 
         //- Read the field average data
-        virtual void read(const dictionary&);
+        virtual bool read(const dictionary&);
 
         //- Execute the averaging
-        virtual void execute();
-
-        //- Execute the averaging at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        virtual bool execute();
 
         //- Track and write
-        virtual void write();
+        virtual bool write();
 
         //- Update for changes of mesh
         virtual void updateMesh(const mapPolyMesh&);
@@ -237,6 +220,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
index b6fa5a26917..4420a6da675 100644
--- a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
+++ b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolate.H
@@ -108,7 +108,7 @@ protected:
     // Protected Member Functions
 
         template<class Type>
-        void interpolateFields() const;
+        void interpolateFields();
 
 
 private:
diff --git a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolateTemplates.C b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolateTemplates.C
index 758e74b1482..8a975aab22e 100644
--- a/src/functionObjects/field/surfaceInterpolate/surfaceInterpolateTemplates.C
+++ b/src/functionObjects/field/surfaceInterpolate/surfaceInterpolateTemplates.C
@@ -30,10 +30,9 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::functionObjects::surfaceInterpolate::interpolateFields() const
+void Foam::functionObjects::surfaceInterpolate::interpolateFields()
 {
     typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
-    typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
 
     // Convert field to map
     HashTable<word> fieldMap(2*fieldSet_.size());
@@ -61,14 +60,10 @@ void Foam::functionObjects::surfaceInterpolate::interpolateFields() const
             }
             else
             {
-                tmp<VolFieldType> tvf
-                (
-                    new SurfaceFieldType(sName, linearInterpolate(fld))
-                );
-                store(tvf, sName);
+                store(sName, linearInterpolate(fld));
 
                 Log << "        interpolated " << fld.name() << " to create "
-                    << sflds[sz].name() << endl;
+                    << sName << endl;
             }
         }
     }
diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/functionObjects/field/turbulenceFields/turbulenceFields.C
index c383490d202..19ac082ee0b 100644
--- a/src/functionObjects/field/turbulenceFields/turbulenceFields.C
+++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.C
@@ -130,8 +130,7 @@ Foam::functionObjects::turbulenceFields::turbulenceFields
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    fieldSet_(),
-    log_(true)
+    fieldSet_()
 {
     read(dict);
 }
@@ -153,27 +152,25 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
     }
     else
     {
-        log_.readIfPresent("log", dict);
         fieldSet_.insert(wordList(dict.lookup("fields")));
     }
 
-    Info<< type() << " " << name() << ": ";
+    Log << type() << " " << name() << ": ";
     if (fieldSet_.size())
     {
-        Info<< "storing fields:" << nl;
+        Log << "storing fields:" << nl;
         forAllConstIter(wordHashSet, fieldSet_, iter)
         {
-            Info<< "    " << modelName << ':' << iter.key() << nl;
+            Log << "    " << modelName << ':' << iter.key() << nl;
         }
-        Info<< endl;
+        Log << endl;
     }
     else
     {
-        Info<< "no fields requested to be stored" << nl << endl;
+        Log << "no fields requested to be stored" << nl << endl;
     }
 
     return true;
-    }
 }
 
 
@@ -303,7 +300,7 @@ bool Foam::functionObjects::turbulenceFields::execute()
 
 
 bool Foam::functionObjects::turbulenceFields::write()
-{}
+{
     forAllConstIter(wordHashSet, fieldSet_, iter)
     {
         const word fieldName = modelName + ':' + iter.key();
diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/functionObjects/field/turbulenceFields/turbulenceFields.H
index 5c8d4e0c0b5..fb0ea99559c 100644
--- a/src/functionObjects/field/turbulenceFields/turbulenceFields.H
+++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.H
@@ -146,9 +146,6 @@ protected:
         //- Fields to load
         wordHashSet fieldSet_;
 
-        //- Switch to send output to Info as well as to file
-        Switch log_;
-
 
     // Protected Member Functions
 
@@ -173,10 +170,10 @@ private:
     // Private member functions
 
         //- Disallow default bitwise copy construct
-        turbulenceFields(const turbulenceFields&);
+        turbulenceFields(const turbulenceFields&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const turbulenceFields&);
+        void operator=(const turbulenceFields&) = delete;
 
 
 public:
diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C b/src/functionObjects/field/valueAverage/valueAverage.C
similarity index 62%
rename from src/postProcessing/functionObjects/field/valueAverage/valueAverage.C
rename to src/functionObjects/field/valueAverage/valueAverage.C
index 8db50b1f6fb..4358cc23848 100644
--- a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.C
+++ b/src/functionObjects/field/valueAverage/valueAverage.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -24,25 +24,36 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "valueAverage.H"
+#include "addToRunTimeSelectionTable.H"
 #include "Time.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
 {
     defineTypeNameAndDebug(valueAverage, 0);
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        valueAverage,
+        dictionary
+    );
+}
 }
 
 
 // * * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * //
 
-void Foam::valueAverage::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::valueAverage::writeFileHeader(Ostream& os) const
 {
     writeHeader(os, "Value averages");
     writeCommented(os, "Time");
-    forAll(fieldNames_, fieldI)
+    forAll(fieldNames_, fieldi)
     {
-        writeTabbed(os, fieldNames_[fieldI]);
+        writeTabbed(os, fieldNames_[fieldi]);
     }
     os  << endl;
 }
@@ -50,34 +61,33 @@ void Foam::valueAverage::writeFileHeader(Ostream& os) const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::valueAverage::valueAverage
+Foam::functionObjects::valueAverage::valueAverage
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectState(obr, name),
-    functionObjectFile(obr, name, typeName, dict),
-    obr_(obr),
-    functionObjectName_(dict.lookup("functionObjectName")),
-    fieldNames_(dict.lookup("fields")),
-    window_(dict.lookupOrDefault<scalar>("window", -1)),
-    totalTime_(fieldNames_.size(), obr_.time().deltaTValue()),
-    resetOnRestart_(false),
-    log_(true)
+    regionFunctionObject(name, runTime, dict),
+    writeFile(obr_, name, typeName, dict),
+    functionObjectName_("unknown-functionObjectName"),
+    fieldNames_(),
+    window_(-1),
+    totalTime_(),
+    resetOnRestart_(false)
 {
+    read(dict);
+
     if (resetOnRestart_)
     {
-        forAll(fieldNames_, fieldI)
+        forAll(fieldNames_, fieldi)
         {
-            const word& fieldName = fieldNames_[fieldI];
+            const word& fieldName = fieldNames_[fieldi];
 
             if (dict.found(fieldName))
             {
                 const dictionary& valueDict = dict.subDict(fieldName);
-                totalTime_[fieldI] = readScalar(valueDict.lookup("totalTime"));
+                totalTime_[fieldi] = readScalar(valueDict.lookup("totalTime"));
             }
         }
     }
@@ -88,44 +98,48 @@ Foam::valueAverage::valueAverage
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::valueAverage::~valueAverage()
+Foam::functionObjects::valueAverage::~valueAverage()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-void Foam::valueAverage::read(const dictionary& dict)
+bool Foam::functionObjects::valueAverage::read(const dictionary& dict)
 {
-    if (active_)
-    {
-        functionObjectFile::read(dict);
+    writeFile::read(dict);
 
-        log_ = dict.lookupOrDefault<Switch>("log", true);
+    dict.lookup("functionObjectName") >> functionObjectName_;
+    dict.lookup("fields") >> fieldNames_;
+    window_ = dict.lookupOrDefault<scalar>("window", -1);
+
+    totalTime_.setSize(fieldNames_.size());
+    forAll(totalTime_, i)
+    {
+        totalTime_[i] = time_.deltaTValue();
     }
+
+    resetOnRestart_ = readBool(dict.lookup("resetOnRestart"));
+
+    return true;
 }
 
 
-void Foam::valueAverage::execute()
+bool Foam::functionObjects::valueAverage::execute()
 {
-    if (!active_)
-    {
-        return;
-    }
-
     scalar dt = obr_.time().deltaTValue();
 
-    if (log_) Info<< type() << ": " << name_ << " averages:" << nl;
+    Log << type() << ": " << name() << " averages:" << nl;
 
-    file() << obr_.time().timeName();
+    file() << time_.timeName();
 
     DynamicList<label> unprocessedFields(fieldNames_.size());
 
-    forAll(fieldNames_, fieldI)
+    forAll(fieldNames_, fieldi)
     {
-        const word& fieldName(fieldNames_[fieldI]);
+        const word& fieldName(fieldNames_[fieldi]);
         const word meanName(fieldName + "Mean");
 
-        scalar Dt = totalTime_[fieldI];
+        scalar Dt = totalTime_[fieldi];
         scalar alpha = (Dt - dt)/Dt;
         scalar beta = dt/Dt;
 
@@ -147,7 +161,7 @@ void Foam::valueAverage::execute()
 
         if (!processed)
         {
-            unprocessedFields.append(fieldI);
+            unprocessedFields.append(fieldi);
 
             if (writeToFile())
             {
@@ -155,7 +169,7 @@ void Foam::valueAverage::execute()
             }
         }
 
-        totalTime_[fieldI] += dt;
+        totalTime_[fieldi] += dt;
     }
 
     file()<< endl;
@@ -168,31 +182,21 @@ void Foam::valueAverage::execute()
 
         forAll(unprocessedFields, i)
         {
-            label fieldI = unprocessedFields[i];
-            Info<< "        " << fieldNames_[fieldI] << nl;
+            label fieldi = unprocessedFields[i];
+            Log << "        " << fieldNames_[fieldi] << nl;
         }
-        Info<< endl;
+        Log << endl;
     }
 
-    if (log_) Info<< endl;
-}
+    Log << endl;
 
-
-void Foam::valueAverage::end()
-{
-    // Do nothing
-}
-
-
-void Foam::valueAverage::timeSet()
-{
-    // Do nothing
+    return true;
 }
 
 
-void Foam::valueAverage::write()
+bool Foam::functionObjects::valueAverage::write()
 {
-    // Do nothing
+    return true;
 }
 
 
diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.H b/src/functionObjects/field/valueAverage/valueAverage.H
similarity index 71%
rename from src/postProcessing/functionObjects/field/valueAverage/valueAverage.H
rename to src/functionObjects/field/valueAverage/valueAverage.H
index 584e1481066..625da2b0390 100644
--- a/src/postProcessing/functionObjects/field/valueAverage/valueAverage.H
+++ b/src/functionObjects/field/valueAverage/valueAverage.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -31,12 +31,13 @@ Description
     This function object calculates the average value from the output of
     function objects that generate singular values.
 
+Usage
     Example of function object specification:
     \verbatim
     valueAverage1
     {
         type        valueAverage;
-        functionObjectLibs ("libfieldFunctionObjects.so");
+        libs        ("libfieldFunctionObjects.so");
         ...
         writeToFile yes;
         log         yes;
@@ -46,7 +47,6 @@ Description
     }
     \endverbatim
 
-    \heading Function object usage
     \table
         Property     | Description             | Required    | Default value
         type         | type name: valueAverage | yes         |
@@ -57,37 +57,29 @@ Description
 
     Output data is written to the file \<timeDir\>/valueAverage.dat
 
-SeeAlso
+See also
     Foam::functionObject
-    Foam::functionObjectFile
-    Foam::functionObjectState
-    Foam::OutputFilterFunctionObject
+    Foam::functionObjects::stateFunctionObject
+    Foam::functionObjects::writeFile
 
 SourceFiles
     valueAverage.C
     valueAverageTemplates.C
-    IOvalueAverage.H
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef valueAverage_H
-#define valueAverage_H
-
-#include "functionObjectState.H"
-#include "functionObjectFile.H"
-#include "Switch.H"
+#ifndef functionObjects_valueAverage_H
+#define functionObjects_valueAverage_H
 
+#include "regionFunctionObject.H"
+#include "writeFile.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
+namespace functionObjects
+{
 
 /*---------------------------------------------------------------------------*\
                         Class valueAverage Declaration
@@ -95,16 +87,13 @@ class mapPolyMesh;
 
 class valueAverage
 :
-    public functionObjectState,
-    public functionObjectFile
+    public regionFunctionObject,
+    public writeFile
 {
 protected:
 
     // Protected data
 
-        //- Reference to the database
-        const objectRegistry& obr_;
-
         //- Name of function object to retrueve data from
         word functionObjectName_;
 
@@ -112,16 +101,13 @@ protected:
         wordList fieldNames_;
 
         //- Averaging window
-        const scalar window_;
+        scalar window_;
 
         //- Average time per field
         List<scalar> totalTime_;
 
         //- Reset the averaging process on restart flag
-        Switch resetOnRestart_;
-
-        //- Switch to send output to Info as well
-        Switch log_;
+        bool resetOnRestart_;
 
 
     // Protected Member Functions
@@ -141,10 +127,10 @@ protected:
         virtual void writeFileHeader(Ostream& os) const;
 
         //- Disallow default bitwise copy construct
-        valueAverage(const valueAverage&);
+        valueAverage(const valueAverage&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const valueAverage&);
+        void operator=(const valueAverage&) = delete;
 
 
 public:
@@ -156,9 +142,8 @@ public:
     valueAverage
     (
         const word& name,
-        const objectRegistry& obr,
-        const dictionary& dict,
-       const bool loadFromFiles = false
+        const Time& runTime,
+        const dictionary& dict
     );
 
     //- Destructor
@@ -167,33 +152,20 @@ public:
 
     // Public Member Functions
 
-        //- Read the field min/max data
-        virtual void read(const dictionary&);
-
-        //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
-
-        //- Write the fieldMinMax
-        virtual void write();
+        //- Read the field value average data
+        virtual bool read(const dictionary&);
 
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
+        //- Execute
+        virtual bool execute();
 
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        //- Write the value average
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverageTemplates.C b/src/functionObjects/field/valueAverage/valueAverageTemplates.C
similarity index 91%
rename from src/postProcessing/functionObjects/field/valueAverage/valueAverageTemplates.C
rename to src/functionObjects/field/valueAverage/valueAverageTemplates.C
index 10bff887799..2abf8aaea8a 100644
--- a/src/postProcessing/functionObjects/field/valueAverage/valueAverageTemplates.C
+++ b/src/functionObjects/field/valueAverage/valueAverageTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
 template<class Type>
-void Foam::valueAverage::calc
+void Foam::functionObjects::valueAverage::calc
 (
     const word& fieldName,
     const word& meanName,
@@ -51,7 +51,7 @@ void Foam::valueAverage::calc
 
     file() << tab << meanValue;
 
-    if (log_) Info<< "    " << meanName << ": " << meanValue << nl;
+    Log<< "    " << meanName << ": " << meanValue << nl;
 
     processed = true;
 }
diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
index c9bb1c6059d..bd4c5e6ccfb 100644
--- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
+++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
@@ -259,63 +259,64 @@ bool Foam::functionObjects::wallBoundedStreamLine::read(const dictionary& dict)
         // Make sure that the mesh is trackable
         if (debug)
         {
-        // 1. Positive volume decomposition tets
-        faceSet faces(mesh_, "lowQualityTetFaces", mesh_.nFaces()/100+1);
-        if
-        (
-            polyMeshTetDecomposition::checkFaceTets
+            // 1. Positive volume decomposition tets
+            faceSet faces(mesh_, "lowQualityTetFaces", mesh_.nFaces()/100+1);
+            if
             (
-                mesh_,
-                polyMeshTetDecomposition::minTetQuality,
-                true,
-                &faces
+                polyMeshTetDecomposition::checkFaceTets
+                (
+                    mesh_,
+                    polyMeshTetDecomposition::minTetQuality,
+                    true,
+                    &faces
+                )
             )
-        )
-        {
-            label nFaces = returnReduce(faces.size(), sumOp<label>());
+            {
+                label nFaces = returnReduce(faces.size(), sumOp<label>());
 
-            WarningInFunction
-                << "Found " << nFaces
-                <<" faces with low quality or negative volume "
-                << "decomposition tets. Writing to faceSet " << faces.name()
-                << endl;
-        }
+                WarningInFunction
+                    << "Found " << nFaces
+                    <<" faces with low quality or negative volume "
+                    << "decomposition tets. Writing to faceSet " << faces.name()
+                    << endl;
+            }
 
-        // 2. All edges on a cell having two faces
-        EdgeMap<label> numFacesPerEdge;
-        forAll(mesh_.cells(), celli)
-        {
-            const cell& cFaces = mesh_.cells()[celli];
+            // 2. All edges on a cell having two faces
+            EdgeMap<label> numFacesPerEdge;
+            forAll(mesh_.cells(), celli)
+            {
+                const cell& cFaces = mesh_.cells()[celli];
 
-            numFacesPerEdge.clear();
+                numFacesPerEdge.clear();
 
-            forAll(cFaces, cFacei)
-            {
-                label facei = cFaces[cFacei];
-                const face& f = mesh_.faces()[facei];
-                forAll(f, fp)
+                forAll(cFaces, cFacei)
                 {
-                    const edge e(f[fp], f.nextLabel(fp));
-                    EdgeMap<label>::iterator eFnd =
-                        numFacesPerEdge.find(e);
-                    if (eFnd != numFacesPerEdge.end())
-                    {
-                        eFnd()++;
-                    }
-                    else
+                    label facei = cFaces[cFacei];
+                    const face& f = mesh_.faces()[facei];
+                    forAll(f, fp)
                     {
-                        numFacesPerEdge.insert(e, 1);
+                        const edge e(f[fp], f.nextLabel(fp));
+                        EdgeMap<label>::iterator eFnd =
+                            numFacesPerEdge.find(e);
+                        if (eFnd != numFacesPerEdge.end())
+                        {
+                            eFnd()++;
+                        }
+                        else
+                        {
+                            numFacesPerEdge.insert(e, 1);
+                        }
                     }
                 }
-            }
 
-            forAllConstIter(EdgeMap<label>, numFacesPerEdge, iter)
-            {
-                if (iter() != 2)
+                forAllConstIter(EdgeMap<label>, numFacesPerEdge, iter)
                 {
-                    FatalErrorInFunction
-                        << "problem cell:" << celli
-                        << abort(FatalError);
+                    if (iter() != 2)
+                    {
+                        FatalErrorInFunction
+                            << "problem cell:" << celli
+                            << abort(FatalError);
+                    }
                 }
             }
         }
diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C
index cc89adf8cb0..ad9e4d832c6 100644
--- a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C
+++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -27,6 +27,7 @@ License
 #include "surfaceInterpolate.H"
 #include "fvcSnGrad.H"
 #include "wallPolyPatch.H"
+#include "turbulentFluidThermoModel.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -43,35 +44,31 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-void Foam::functionObjects::wallHeatFlux::writeFileHeader(const label i)
+void Foam::functionObjects::wallHeatFlux::writeFileHeader(Ostream& os) const
 {
     // Add headers to output data
-    writeHeader(file(), "Wall heat-flux");
-    writeCommented(file(), "Time");
-    writeTabbed(file(), "patch");
-    writeTabbed(file(), "min");
-    writeTabbed(file(), "max");
-    writeTabbed(file(), "integral");
-    file() << endl;
+    writeHeader(os, "Wall heat-flux");
+    writeCommented(os, "Time");
+    writeTabbed(os, "patch");
+    writeTabbed(os, "min");
+    writeTabbed(os, "max");
+    writeTabbed(os, "integral");
+    os  << endl;
 }
 
 
 void Foam::functionObjects::wallHeatFlux::calcHeatFlux
 (
-    const compressible::turbulenceModel& model,
+    const volScalarField& alpha,
+    const volScalarField& he,
     volScalarField& wallHeatFlux
 )
 {
-    surfaceScalarField heatFlux
-    (
-        fvc::interpolate(model.alphaEff())*fvc::snGrad(model.transport().he())
-    );
+    surfaceScalarField heatFlux(fvc::interpolate(alpha)*fvc::snGrad(he));
 
-    volScalarField::Boundary& wallHeatFluxBf =
-        wallHeatFlux.boundaryFieldRef();
+    volScalarField::Boundary& wallHeatFluxBf = wallHeatFlux.boundaryFieldRef();
 
-    const surfaceScalarField::Boundary& heatFluxBf =
-        heatFlux.boundaryField();
+    const surfaceScalarField::Boundary& heatFluxBf = heatFlux.boundaryField();
 
     forAll(wallHeatFluxBf, patchi)
     {
@@ -82,8 +79,7 @@ void Foam::functionObjects::wallHeatFlux::calcHeatFlux
     {
         const volScalarField& Qr = lookupObject<volScalarField>("Qr");
 
-        const volScalarField::Boundary& radHeatFluxBf =
-            Qr.boundaryField();
+        const volScalarField::Boundary& radHeatFluxBf = Qr.boundaryField();
 
         forAll(wallHeatFluxBf, patchi)
         {
@@ -103,7 +99,7 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    logFiles(obr_, name),
+    writeFile(obr_, name, typeName, dict),
     patchSet_()
 {
     volScalarField* wallHeatFluxPtr
@@ -126,7 +122,6 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux
     mesh_.objectRegistry::store(wallHeatFluxPtr);
 
     read(dict);
-    resetName(typeName);
 }
 
 
@@ -141,6 +136,7 @@ Foam::functionObjects::wallHeatFlux::~wallHeatFlux()
 bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
 {
     fvMeshFunctionObject::read(dict);
+    writeFile::read(dict);
 
     const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
 
@@ -214,7 +210,24 @@ bool Foam::functionObjects::wallHeatFlux::execute()
                 turbulenceModel::propertiesName
             );
 
-        calcHeatFlux(turbModel, wallHeatFlux);
+        calcHeatFlux
+        (
+            turbModel.alphaEff()(),
+            turbModel.transport().he(),
+            wallHeatFlux
+        );
+    }
+    else if (foundObject<fluidThermo>(fluidThermo::dictName))
+    {
+        const fluidThermo& thermo =
+            lookupObject<fluidThermo>(fluidThermo::dictName);
+
+        calcHeatFlux
+        (
+            thermo.alpha(),
+            thermo.he(),
+            wallHeatFlux
+        );
     }
     else
     {
@@ -229,10 +242,7 @@ bool Foam::functionObjects::wallHeatFlux::execute()
 
 bool Foam::functionObjects::wallHeatFlux::write()
 {
-    logFiles::write();
-
-    const volScalarField& wallHeatFlux =
-        obr_.lookupObject<volScalarField>(type());
+    const volScalarField& wallHeatFlux = lookupObject<volScalarField>(type());
 
     Log << type() << " " << name() << " write:" << nl
         << "    writing field " << wallHeatFlux.name() << endl;
@@ -249,8 +259,7 @@ bool Foam::functionObjects::wallHeatFlux::write()
         label patchi = iter.key();
         const fvPatch& pp = patches[patchi];
 
-        const scalarField& hfp =
-            wallHeatFlux.boundaryField()[patchi];
+        const scalarField& hfp = wallHeatFlux.boundaryField()[patchi];
 
         const scalar minHfp = gMin(hfp);
         const scalar maxHfp = gMax(hfp);
diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H
index 9cfc24da8af..7e621b7bb00 100644
--- a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H
+++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -55,8 +55,7 @@ Usage
 See also
     Foam::functionObject
     Foam::functionObjects::fvMeshFunctionObject
-    Foam::functionObjects::logFiles
-    Foam::functionObjects::pressureTools
+    Foam::functionObjects::writeFiles
     Foam::functionObjects::timeControl
 
 SourceFiles
@@ -70,9 +69,7 @@ SourceFiles
 #include "fvMeshFunctionObject.H"
 #include "logFiles.H"
 #include "volFieldsFwd.H"
-#include "surfaceFieldsFwd.H"
 #include "HashSet.H"
-#include "turbulentFluidThermoModel.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -88,7 +85,7 @@ namespace functionObjects
 class wallHeatFlux
 :
     public fvMeshFunctionObject,
-    public logFiles
+    public writeFile
 {
 
 protected:
@@ -102,12 +99,13 @@ protected:
     // Protected Member Functions
 
         //- File header information
-        virtual void writeFileHeader(const label i);
+        virtual void writeFileHeader(Ostream& os) const;
 
         //- Calculate the heat-flux
         void calcHeatFlux
         (
-            const compressible::turbulenceModel& turbModel,
+            const volScalarField& alpha,
+            const volScalarField& he,
             volScalarField& wallHeatFlux
         );
 
diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.C b/src/functionObjects/field/wallShearStress/wallShearStress.C
index 3a1a880c8b2..b5e0cd858af 100644
--- a/src/functionObjects/field/wallShearStress/wallShearStress.C
+++ b/src/functionObjects/field/wallShearStress/wallShearStress.C
@@ -45,7 +45,7 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-void Foam::functionObjects::wallShearStress::writeFileHeader(Ostream& os)
+void Foam::functionObjects::wallShearStress::writeFileHeader(Ostream& os) const
 {
     // Add headers to output data
     writeHeader(os, "Wall shear stress");
@@ -89,10 +89,10 @@ Foam::functionObjects::wallShearStress::wallShearStress
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    writeFile(obr_, name),
+    writeFile(mesh_, name, typeName, dict),
     patchSet_()
 {
-    temp<volVectorField> wallShearStressPtr
+    tmp<volVectorField> wallShearStressPtr
     (
         new volVectorField
         (
@@ -114,7 +114,7 @@ Foam::functionObjects::wallShearStress::wallShearStress
         )
     );
 
-    store(wallShearStressPtr, typeName);
+    store(typeName, wallShearStressPtr);
 
     read(dict);
 }
@@ -131,6 +131,7 @@ Foam::functionObjects::wallShearStress::~wallShearStress()
 bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
 {
     fvMeshFunctionObject::read(dict);
+    writeFile::read(dict);
 
     const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
 
@@ -224,8 +225,6 @@ bool Foam::functionObjects::wallShearStress::execute()
 
 bool Foam::functionObjects::wallShearStress::write()
 {
-    logFiles::write();
-
     const volVectorField& wallShearStress =
         obr_.lookupObject<volVectorField>(type());
 
diff --git a/src/functionObjects/field/yPlus/yPlus.C b/src/functionObjects/field/yPlus/yPlus.C
index 21baf39f0bb..c328b3b0b85 100644
--- a/src/functionObjects/field/yPlus/yPlus.C
+++ b/src/functionObjects/field/yPlus/yPlus.C
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "yPlus.H"
+#include "volFields.H"
 #include "turbulenceModel.H"
 #include "nutWallFunctionFvPatchScalarField.H"
 #include "wallFvPatch.H"
@@ -72,8 +73,10 @@ Foam::functionObjects::yPlus::yPlus
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    writeFile(obr_, name)
+    writeFile(obr_, name, typeName, dict)
 {
+    writeFileHeader(file());
+
     tmp<volScalarField> tyPlusPtr
     (
         new volScalarField
@@ -91,7 +94,7 @@ Foam::functionObjects::yPlus::yPlus
         )
     );
 
-    store(tyPlusPtr, typeName);
+    store(typeName, tyPlusPtr);
 }
 
 
@@ -106,7 +109,7 @@ Foam::functionObjects::yPlus::~yPlus()
 bool Foam::functionObjects::yPlus::read(const dictionary& dict)
 {
     fvMeshFunctionObject::read(dict);
-    dict.readIfPresent("phi", phiName_);
+    writeFile::read(dict);
 
     return true;
 }
@@ -114,34 +117,61 @@ bool Foam::functionObjects::yPlus::read(const dictionary& dict)
 
 bool Foam::functionObjects::yPlus::execute()
 {
-    typedef compressible::turbulenceModel cmpTurbModel;
-    typedef incompressible::turbulenceModel icoTurbModel;
-
     volScalarField& yPlus =
         const_cast<volScalarField&>
         (
-            mesh_.lookupObject<volScalarField>(resultName_)
+            lookupObject<volScalarField>(typeName)
         );
 
-    if (mesh.foundObject<cmpTurbModel>(turbulenceModel::propertiesName))
+    if (foundObject<turbulenceModel>(turbulenceModel::propertiesName))
     {
-        const cmpTurbModel& model =
-            mesh.lookupObject<cmpTurbModel>
-            (
-                turbulenceModel::propertiesName
-            );
+        volScalarField::Boundary& yPlusBf = yPlus.boundaryFieldRef();
 
-        calcYPlus(model, yPlus);
-    }
-    else if (mesh.foundObject<icoTurbModel>(turbulenceModel::propertiesName))
-    {
-        const icoTurbModel& model =
-            mesh.lookupObject<icoTurbModel>
+        const turbulenceModel& model =
+            lookupObject<turbulenceModel>
             (
                 turbulenceModel::propertiesName
             );
 
-        calcYPlus(model, yPlus);
+        const nearWallDist nwd(mesh_);
+        const volScalarField::Boundary& d = nwd.y();
+
+        // nut needed for wall function patches
+        const volScalarField::Boundary& nutBf = model.nut()().boundaryField();
+
+        // nuEff nu and U needed for plain wall patches
+        const volScalarField::Boundary& nuEffBf =
+            model.nuEff()().boundaryField();
+        const volScalarField::Boundary& nuBf = model.nu()().boundaryField();
+        const volVectorField::Boundary& UBf = model.U().boundaryField();
+
+        const fvPatchList& patches = mesh_.boundary();
+
+        forAll(patches, patchi)
+        {
+            const fvPatch& patch = patches[patchi];
+
+            if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
+            {
+                const nutWallFunctionFvPatchScalarField& nutPf =
+                    dynamic_cast<const nutWallFunctionFvPatchScalarField&>
+                    (
+                        nutBf[patchi]
+                    );
+
+                yPlusBf[patchi] = nutPf.yPlus();
+            }
+            else if (isA<wallFvPatch>(patch))
+            {
+                yPlusBf[patchi] =
+                    d[patchi]
+                   *sqrt
+                    (
+                        nuEffBf[patchi]
+                       *mag(UBf[patchi].snGrad())
+                    )/nuBf[patchi];
+            }
+        }
     }
     else
     {
@@ -165,8 +195,6 @@ bool Foam::functionObjects::yPlus::write()
 
     yPlus.write();
 
-    writeFile::write();
-
     const volScalarField::Boundary& yPlusBf = yPlus.boundaryField();
     const fvPatchList& patches = mesh_.boundary();
 
diff --git a/src/functionObjects/field/yPlus/yPlus.H b/src/functionObjects/field/yPlus/yPlus.H
index 0e171764994..8f119bb61a3 100644
--- a/src/functionObjects/field/yPlus/yPlus.H
+++ b/src/functionObjects/field/yPlus/yPlus.H
@@ -39,7 +39,7 @@ Usage
     yPlus1
     {
         type        yPlus;
-        functionObjectLibs ("libutilityFunctionObjects.so");
+        libs        ("libutilityFunctionObjects.so");
         ...
     }
     \endverbatim
@@ -55,8 +55,8 @@ Usage
 
 See also
     Foam::functionObject
-    Foam::functionObjects::fieldExpression
-    Foam::functionObjects::writeFiles
+    Foam::functionObjects::fvMeshFunctionObject
+    Foam::functionObjects::writeFile
     Foam::functionObjects::timeControl
 
 SourceFiles
@@ -70,7 +70,6 @@ SourceFiles
 #include "fvMeshFunctionObject.H"
 #include "writeFile.H"
 #include "volFieldsFwd.H"
-#include "Switch.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -94,15 +93,6 @@ class yPlus
         //- File header information
         virtual void writeFileHeader(Ostream& os) const;
 
-        //- Calculate y+
-        template<class TurbulenceModel>
-        void calcYPlus
-        (
-            const TurbulenceModel& turbulenceModel,
-            const fvMesh& mesh,
-            volScalarField& yPlus
-        );
-
         //- Disallow default bitwise copy construct
         yPlus(const yPlus&);
 
@@ -151,12 +141,6 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#ifdef NoRepository
-    #include "yPlusTemplates.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 #endif
 
 // ************************************************************************* //
diff --git a/src/functionObjects/field/yPlus/yPlusTemplates.C b/src/functionObjects/field/yPlus/yPlusTemplates.C
deleted file mode 100644
index 30c68cf9ea7..00000000000
--- a/src/functionObjects/field/yPlus/yPlusTemplates.C
+++ /dev/null
@@ -1,80 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "wallFvPatch.H"
-#include "nutWallFunctionFvPatchScalarField.H"
-#include "nearWallDist.H"
-
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
-template<class TurbulenceModel>
-void Foam::yPlus::calcYPlus
-(
-    const TurbulenceModel& turbulenceModel,
-    volScalarField& yPlus
-)
-{
-    volScalarField::GeometricBoundaryField d = nearWallDist(mesh_).y();
-
-    const volScalarField::GeometricBoundaryField nutBf =
-        turbulenceModel.nut()().boundaryField();
-
-    const volScalarField::GeometricBoundaryField nuEffBf =
-        turbulenceModel.nuEff()().boundaryField();
-
-    const volScalarField::GeometricBoundaryField nuBf =
-        turbulenceModel.nu()().boundaryField();
-
-    const fvPatchList& patches = mesh_.boundary();
-
-    forAll(patches, patchi)
-    {
-        const fvPatch& patch = patches[patchi];
-
-        if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
-        {
-            const nutWallFunctionFvPatchScalarField& nutPf =
-                dynamic_cast<const nutWallFunctionFvPatchScalarField&>
-                (
-                    nutBf[patchi]
-                );
-
-            yPlus.boundaryField()[patchi] = nutPf.yPlus();
-        }
-        else if (isA<wallFvPatch>(patch))
-        {
-            yPlus.boundaryField()[patchi] =
-                d[patchi]
-               *sqrt
-                (
-                    nuEffBf[patchi]
-                   *mag(turbulenceModel.U().boundaryField()[patchi].snGrad())
-                )/nuBf[patchi];
-        }
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C
index 46aeac2b9e1..de824dd2e96 100644
--- a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C
+++ b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C
@@ -31,18 +31,24 @@ License
 #include "fvMesh.H"
 #include "dimensionedTypes.H"
 #include "volFields.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
 {
     defineTypeNameAndDebug(forceCoeffs, 0);
+
+    addToRunTimeSelectionTable(functionObject, forceCoeffs, dictionary);
+}
 }
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::forceCoeffs::createFiles()
+void Foam::functionObjects::forceCoeffs::createFiles()
 {
     // Note: Only possible to create bin files after bins have been initialised
 
@@ -64,7 +70,7 @@ void Foam::forceCoeffs::createFiles()
 }
 
 
-void Foam::forceCoeffs::writeIntegratedHeader
+void Foam::functionObjects::forceCoeffs::writeIntegratedHeader
 (
     const word& header,
     Ostream& os
@@ -89,7 +95,7 @@ void Foam::forceCoeffs::writeIntegratedHeader
 }
 
 
-void Foam::forceCoeffs::writeBinHeader
+void Foam::functionObjects::forceCoeffs::writeBinHeader
 (
     const word& header,
     Ostream& os
@@ -144,7 +150,7 @@ void Foam::forceCoeffs::writeBinHeader
 }
 
 
-void Foam::forceCoeffs::writeIntegratedData
+void Foam::functionObjects::forceCoeffs::writeIntegratedData
 (
     const word& title,
     const List<Field<scalar>>& coeff
@@ -172,7 +178,7 @@ void Foam::forceCoeffs::writeIntegratedData
 }
 
 
-void Foam::forceCoeffs::writeBinData
+void Foam::functionObjects::forceCoeffs::writeBinData
 (
     const List<Field<scalar>> coeffs,
     Ostream& os
@@ -198,7 +204,7 @@ void Foam::forceCoeffs::writeBinData
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::forceCoeffs::forceCoeffs
+Foam::functionObjects::forceCoeffs::forceCoeffs
 (
     const word& name,
     const Time& runTime,
@@ -224,13 +230,13 @@ Foam::forceCoeffs::forceCoeffs
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::forceCoeffs::~forceCoeffs()
+Foam::functionObjects::forceCoeffs::~forceCoeffs()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-bool Foam::forceCoeffs::read(const dictionary& dict)
+bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
 {
     forces::read(dict);
 
@@ -267,7 +273,7 @@ bool Foam::forceCoeffs::read(const dictionary& dict)
             )
         );
 
-        store(tforceCoeff.ptr());
+        store(tforceCoeff().name(), tforceCoeff);
 
         tmp<volVectorField> tmomentCoeff
         (
@@ -286,14 +292,14 @@ bool Foam::forceCoeffs::read(const dictionary& dict)
             )
         );
 
-        store(tmomentCoeff.ptr());
+        store(tmomentCoeff().name(), tmomentCoeff);
     }
 
     return true;
 }
 
 
-bool Foam::forceCoeffs::execute()
+bool Foam::functionObjects::forceCoeffs::execute()
 {
     forces::calcForcesMoment();
 
@@ -330,7 +336,7 @@ bool Foam::forceCoeffs::execute()
     scalar ClfTot = ClTot/2.0 + CmTot;
     scalar ClrTot = ClTot/2.0 - CmTot;
 
-    Log << type() << " " << name_ << " output:" << nl
+    Log << type() << " " << name() << " execute:" << nl
         << "    Coefficients" << nl;
 
     writeIntegratedData("Cm", momentCoeffs);
@@ -410,7 +416,7 @@ bool Foam::forceCoeffs::execute()
 }
 
 
-bool Foam::forceCoeffs::write()
+bool Foam::functionObjects::forceCoeffs::write()
 {
     if (writeFields_)
     {
diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C
index 533822f964e..371569f6807 100644
--- a/src/functionObjects/forces/forces/forces.C
+++ b/src/functionObjects/forces/forces/forces.C
@@ -45,13 +45,13 @@ namespace functionObjects
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-Foam::word Foam::forces::fieldName(const word& name) const
-s{
-    return name_ + ":" + name;
+Foam::word Foam::functionObjects::forces::fieldName(const word& name) const
+{
+    return this->name() + ":" + name;
 }
 
 
-void Foam::forces::createFiles()
+void Foam::functionObjects::forces::createFiles()
 {
     // Note: Only possible to create bin files after bins have been initialised
 
@@ -89,7 +89,7 @@ void Foam::forces::createFiles()
 }
 
 
-void Foam::forces::writeIntegratedHeader
+void Foam::functionObjects::forces::writeIntegratedHeader
 (
     const word& header,
     Ostream& os
@@ -112,7 +112,11 @@ void Foam::forces::writeIntegratedHeader
 }
 
 
-void Foam::forces::writeBinHeader(const word& header, Ostream& os) const
+void Foam::functionObjects::forces::writeBinHeader
+(
+    const word& header,
+    Ostream& os
+) const
 {
     writeHeader(os, header + " bins");
     writeHeaderValue(os, "bins", nBin_);
@@ -156,7 +160,10 @@ void Foam::forces::writeBinHeader(const word& header, Ostream& os) const
         if (porosity_)
         {
             os  << tab << jn << "(porous_x porous_y porous_z)";
-    return names;
+        }
+    }
+
+    os << endl;
 }
 
 
@@ -205,7 +212,7 @@ void Foam::functionObjects::forces::initialise()
 }
 
 
-void Foam::forces::initialiseBins()
+void Foam::functionObjects::forces::initialiseBins()
 {
     if (nBin_ > 1)
     {
@@ -229,7 +236,7 @@ void Foam::forces::initialiseBins()
             const HashTable<const porosityModel*> models =
                 obr_.lookupClass<porosityModel>();
 
-            const scalarField dd(mesh.C() & binDir_);
+            const scalarField dd(mesh_.C() & binDir_);
 
             forAllConstIter(HashTable<const porosityModel*>, models, iter)
             {
@@ -239,7 +246,7 @@ void Foam::forces::initialiseBins()
                 forAll(cellZoneIDs, i)
                 {
                     label zoneI = cellZoneIDs[i];
-                    const cellZone& cZone = mesh.cellZones()[zoneI];
+                    const cellZone& cZone = mesh_.cellZones()[zoneI];
                     const scalarField d(dd, cZone);
                     binMin_ = min(min(d), binMin_);
                     binMax = max(max(d), binMax);
@@ -273,7 +280,7 @@ void Foam::forces::initialiseBins()
 }
 
 
-void Foam::forces::resetFields()
+void Foam::functionObjects::forces::resetFields()
 {
     force_[0] = Zero;
     force_[1] = Zero;
@@ -304,7 +311,8 @@ void Foam::forces::resetFields()
 }
 
 
-Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
+Foam::tmp<Foam::volSymmTensorField>
+Foam::functionObjects::forces::devRhoReff() const
 {
     typedef compressible::turbulenceModel cmpTurbModel;
     typedef incompressible::turbulenceModel icoTurbModel;
@@ -487,7 +495,7 @@ void Foam::functionObjects::forces::applyBins
 }
 
 
-void Foam::forces::addToFields
+void Foam::functionObjects::forces::addToFields
 (
     const label patchI,
     const vectorField& Md,
@@ -507,7 +515,7 @@ void Foam::forces::addToFields
             lookupObject<volVectorField>(fieldName("force"))
         );
 
-    vectorField& pf = force.boundaryField()[patchI];
+    vectorField& pf = force.boundaryFieldRef()[patchI];
     pf += fN + fT + fP;
 
     volVectorField& moment =
@@ -516,12 +524,12 @@ void Foam::forces::addToFields
             lookupObject<volVectorField>(fieldName("moment"))
         );
 
-    vectorField& pm = moment.boundaryField()[patchI];
+    vectorField& pm = moment.boundaryFieldRef()[patchI];
     pm += Md;
 }
 
 
-void Foam::forces::addToFields
+void Foam::functionObjects::forces::addToFields
 (
     const labelList& cellIDs,
     const vectorField& Md,
@@ -556,7 +564,7 @@ void Foam::forces::addToFields
 }
 
 
-void Foam::forces::writeIntegratedForceMoment
+void Foam::functionObjects::forces::writeIntegratedForceMoment
 (
     const string& descriptor,
     const vectorField& fm0,
@@ -599,9 +607,9 @@ void Foam::forces::writeIntegratedForceMoment
 }
 
 
-void Foam::forces::writeForces()
+void Foam::functionObjects::forces::writeForces()
 {
-    Log << type() << " " << name_ << " output:" << nl;
+    Log << type() << " " << name() << " write:" << nl;
 
     writeIntegratedForceMoment
     (
@@ -646,7 +654,7 @@ void Foam::forces::writeForces()
 }
 
 
-void Foam::forces::writeBinnedForceMoment
+void Foam::functionObjects::forces::writeBinnedForceMoment
 (
     const List<Field<vector>>& fm,
     autoPtr<OFstream>& osPtr
@@ -691,7 +699,7 @@ void Foam::forces::writeBinnedForceMoment
 }
 
 
-void Foam::forces::writeBins()
+void Foam::functionObjects::forces::writeBins()
 {
     writeBinnedForceMoment(force_, forceBinFilePtr_);
     writeBinnedForceMoment(moment_, momentBinFilePtr_);
@@ -724,7 +732,7 @@ Foam::functionObjects::forces::forces
 )
 :
     fvMeshFunctionObject(name, runTime, dict),
-    writeFile(obr_, name),
+    writeFile(mesh_, name, name, dict),
     force_(3),
     moment_(3),
     forceFilePtr_(),
@@ -772,7 +780,7 @@ Foam::functionObjects::forces::forces
 )
 :
     fvMeshFunctionObject(name, obr, dict),
-    writeFile(obr_, name),
+    writeFile(mesh_, name, name, dict),
     force_(3),
     moment_(3),
     forceFilePtr_(),
@@ -837,7 +845,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
 
     initialised_ = false;
 
-    Info << type() << " " << name_ << ":" << nl;
+    Info << type() << " " << name() << ":" << nl;
 
     directForceDensity_ = dict.lookupOrDefault("directForceDensity", false);
 
@@ -933,17 +941,17 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
                 IOobject
                 (
                     fieldName("force"),
-                    mesh.time().timeName(),
-                    mesh,
+                    time_.timeName(),
+                    mesh_,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE
                 ),
-                mesh,
+                mesh_,
                 dimensionedVector("0", dimForce, Zero)
             )
         );
 
-        store(tforce.ptr());
+        store(tforce().name(), tforce);
 
         tmp<volVectorField> tmoment
         (
@@ -952,52 +960,23 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
                 IOobject
                 (
                     fieldName("moment"),
-                    mesh.time().timeName(),
-                    mesh,
+                    time_.timeName(),
+                    mesh_,
                     IOobject::NO_READ,
                     IOobject::NO_WRITE
                 ),
-                mesh,
+                mesh_,
                 dimensionedVector("0", dimForce*dimLength, Zero)
             )
         );
 
-        store(tmoment.ptr());
+        store(tmoment().name(), tmoment);
     }
 
     return true;
 }
 
 
-bool Foam::forces::execute()
-{
-    calcForcesMoment();
-
-    if (Pstream::master())
-    {
-        createFiles();
-
-        writeForces();
-
-        writeBins();
-
-        Log << endl;
-    }
-
-    // Write state/results information
-    setResult("normalForce", sum(force_[0]));
-    setResult("tangentialForce", sum(force_[1]));
-    setResult("porousForce", sum(force_[2]));
-
-    setResult("normalMoment", sum(moment_[0]));
-    setResult("tangentialMoment", sum(moment_[1]));
-    setResult("porousMoment", sum(moment_[2]));
-
-    return true;
-}
-
-
-
 void Foam::functionObjects::forces::calcForcesMoment()
 {
     initialise();
@@ -1008,7 +987,7 @@ void Foam::functionObjects::forces::calcForcesMoment()
     {
         const volVectorField& fD = lookupObject<volVectorField>(fDName_);
 
-        const surfaceVectorField::Boundary& Sfb = mesh.Sf().boundaryField();
+        const surfaceVectorField::Boundary& Sfb = mesh_.Sf().boundaryField();
 
         forAllConstIter(labelHashSet, patchSet_, iter)
         {
@@ -1043,13 +1022,12 @@ void Foam::functionObjects::forces::calcForcesMoment()
     }
     else
     {
-        const volVectorField& U = lookupObject<volVectorField>(UName_);
         const volScalarField& p = lookupObject<volScalarField>(pName_);
 
         const surfaceVectorField::Boundary& Sfb = mesh_.Sf().boundaryField();
 
         tmp<volSymmTensorField> tdevRhoReff = devRhoReff();
-        const volSymmTensorField::GeometricBoundaryField& devRhoReffb
+        const volSymmTensorField::Boundary& devRhoReffb
             = tdevRhoReff().boundaryField();
 
         // Scale pRef by density for incompressible simulations
@@ -1075,7 +1053,7 @@ void Foam::functionObjects::forces::calcForcesMoment()
 
             addToFields(patchI, Md, fN, fT, fP);
 
-            applyBins(Md, fN, fT, fP, mesh.C().boundaryField()[patchI]);
+            applyBins(Md, fN, fT, fP, mesh_.C().boundaryField()[patchI]);
         }
     }
 
@@ -1144,11 +1122,33 @@ Foam::vector Foam::functionObjects::forces::momentEff() const
 
 bool Foam::functionObjects::forces::execute()
 {
+    calcForcesMoment();
+
+    if (Pstream::master())
+    {
+        createFiles();
+
+        writeForces();
+
+        writeBins();
+
+        Log << endl;
+    }
+
+    // Write state/results information
+    setResult("normalForce", sum(force_[0]));
+    setResult("tangentialForce", sum(force_[1]));
+    setResult("porousForce", sum(force_[2]));
+
+    setResult("normalMoment", sum(moment_[0]));
+    setResult("tangentialMoment", sum(moment_[1]));
+    setResult("porousMoment", sum(moment_[2]));
+
     return true;
 }
 
 
-bool Foam::forces::write()
+bool Foam::functionObjects::forces::write()
 {
     if (writeFields_)
     {
diff --git a/src/functionObjects/forces/forces/forces.H b/src/functionObjects/forces/forces/forces.H
index 8dd0cbc134a..2d6b1eff94c 100644
--- a/src/functionObjects/forces/forces/forces.H
+++ b/src/functionObjects/forces/forces/forces.H
@@ -365,7 +365,8 @@ public:
         (
             const word& name,
             const Time& runTime,
-            const dictionary& dict
+            const dictionary& dict,
+            const bool readFields = true
         );
 
         //- Construct from objectRegistry and dictionary
@@ -373,7 +374,8 @@ public:
         (
             const word& name,
             const objectRegistry& obr,
-            const dictionary&
+            const dictionary& dict,
+            const bool readFields = true
         );
 
 
diff --git a/src/functionObjects/graphics/runTimePostProcessing/IOrunTimePostProcessing.H b/src/functionObjects/graphics/runTimePostProcessing/IOrunTimePostProcessing.H
deleted file mode 100644
index dd39c24c338..00000000000
--- a/src/functionObjects/graphics/runTimePostProcessing/IOrunTimePostProcessing.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOrunTimePostProcessing
-
-Description
-    Instance of the generic IOOutputFilter for runTimePostProcessing.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOrunTimePostProcessing_H
-#define IOrunTimePostProcessing_H
-
-#include "runTimePostProcessing.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<runTimePostProcessing> IOrunTimePostProcessing;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C b/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
index 86fd9b0e736..e88d6a7eb74 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
@@ -50,14 +50,22 @@ License
 namespace Foam
 {
     template<>
-    const char* NamedEnum<fieldVisualisationBase::colourByType, 2>::names[] =
+    const char* NamedEnum
+    <
+        functionObjects::fieldVisualisationBase::colourByType,
+        2
+    >::names[] =
     {
         "colour",
         "field"
     };
 
     template<>
-    const char* NamedEnum<fieldVisualisationBase::colourMapType, 4>::names[] =
+    const char* NamedEnum
+    <
+        functionObjects::fieldVisualisationBase::colourMapType,
+        4
+    >::names[] =
     {
         "rainbow",
         "blueWhiteRed",
@@ -66,16 +74,27 @@ namespace Foam
     };
 }
 
-const Foam::NamedEnum<Foam::fieldVisualisationBase::colourByType, 2>
-    Foam::fieldVisualisationBase::colourByTypeNames;
+const Foam::NamedEnum
+    <
+        Foam::functionObjects::fieldVisualisationBase::colourByType,
+        2
+    >
+    Foam::functionObjects::fieldVisualisationBase::colourByTypeNames;
 
-const Foam::NamedEnum<Foam::fieldVisualisationBase::colourMapType, 4>
-    Foam::fieldVisualisationBase::colourMapTypeNames;
+const Foam::NamedEnum
+    <
+        Foam::functionObjects::fieldVisualisationBase::colourMapType,
+        4
+    >
+    Foam::functionObjects::fieldVisualisationBase::colourMapTypeNames;
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::fieldVisualisationBase::setColourMap(vtkLookupTable* lut) const
+void Foam::functionObjects::fieldVisualisationBase::setColourMap
+(
+    vtkLookupTable* lut
+) const
 {
     label nColours = 256;
 
@@ -131,7 +150,7 @@ void Foam::fieldVisualisationBase::setColourMap(vtkLookupTable* lut) const
 }
 
 
-void Foam::fieldVisualisationBase::addScalarBar
+void Foam::functionObjects::fieldVisualisationBase::addScalarBar
 (
     const scalar position,
     vtkRenderer* renderer,
@@ -242,7 +261,7 @@ void Foam::fieldVisualisationBase::addScalarBar
 }
 
 
-void Foam::fieldVisualisationBase::setField
+void Foam::functionObjects::fieldVisualisationBase::setField
 (
     const scalar position,
     const word& colourFieldName,
@@ -307,7 +326,7 @@ void Foam::fieldVisualisationBase::setField
 
 
 
-void Foam::fieldVisualisationBase::addGlyphs
+void Foam::functionObjects::fieldVisualisationBase::addGlyphs
 (
     const scalar position,
     const word& scaleFieldName,
@@ -486,7 +505,7 @@ void Foam::fieldVisualisationBase::addGlyphs
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::fieldVisualisationBase::fieldVisualisationBase
+Foam::functionObjects::fieldVisualisationBase::fieldVisualisationBase
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -537,20 +556,21 @@ Foam::fieldVisualisationBase::fieldVisualisationBase
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::fieldVisualisationBase::~fieldVisualisationBase()
+Foam::functionObjects::fieldVisualisationBase::~fieldVisualisationBase()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
-Foam::fieldVisualisationBase::colours() const
+Foam::functionObjects::fieldVisualisationBase::colours() const
 {
     return colours_;
 }
 
 
-const Foam::word& Foam::fieldVisualisationBase::fieldName() const
+const Foam::word&
+Foam::functionObjects::fieldVisualisationBase::fieldName() const
 {
     return fieldName_;
 }
diff --git a/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H b/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
index 2c201540764..7ddaa2e6873 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
@@ -22,17 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::fieldVisualisationBase
+    Foam::functionObjects::fieldVisualisationBase
 
 Description
+    Base class for scene objects
 
 SourceFiles
     fieldVisualisationBase.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef fieldVisualisationBase_H
-#define fieldVisualisationBase_H
+#ifndef functionObjects_fieldVisualisationBase_H
+#define functionObjects_fieldVisualisationBase_H
 
 #include "dictionary.H"
 #include "Tuple2.H"
@@ -56,6 +57,8 @@ class vtkMapper;
 
 namespace Foam
 {
+namespace functionObjects
+{
 
 class runTimePostProcessing;
 
@@ -206,6 +209,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
index 6150bd15ea4..044ed7b51ea 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -25,6 +25,7 @@ License
 
 // OpenFOAM includes
 #include "functionObjectCloud.H"
+#include "fvMesh.H"
 #include "runTimePostProcessing.H"
 #include "addToRunTimeSelectionTable.H"
 
@@ -39,15 +40,21 @@ License
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimePostPro
 {
     defineTypeNameAndDebug(functionObjectCloud, 0);
     addToRunTimeSelectionTable(pointData, functionObjectCloud, dictionary);
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::functionObjectCloud::functionObjectCloud
+Foam::functionObjects::runTimePostPro::functionObjectCloud::functionObjectCloud
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -67,13 +74,15 @@ Foam::functionObjectCloud::functionObjectCloud
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::functionObjectCloud::~functionObjectCloud()
+Foam::functionObjects::runTimePostPro::functionObjectCloud::
+~functionObjectCloud()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::functionObjectCloud::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::functionObjectCloud::
+addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer
@@ -85,13 +94,13 @@ void Foam::functionObjectCloud::addGeometryToScene
     }
 
     const dictionary& cloudDict =
-        geometryBase::parent_.obr().lookupObject<IOdictionary>
+        geometryBase::parent_.mesh().lookupObject<IOdictionary>
         (
             cloudName_ + "OutputProperties"
         );
 
     fileName fName;
-    if (cloudDict.found("cloudFunctionObject"))
+    if (cloudDict.found("functionObjectCloud"))
     {
         const dictionary& foDict = cloudDict.subDict("cloudFunctionObject");
         if (foDict.found(functionObject_))
@@ -138,7 +147,10 @@ void Foam::functionObjectCloud::addGeometryToScene
 }
 
 
-void Foam::functionObjectCloud::updateActors(const scalar position)
+void Foam::functionObjects::runTimePostPro::functionObjectCloud::updateActors
+(
+    const scalar position
+)
 {
     actor_->GetProperty()->SetOpacity(opacity(position));
 
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H b/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
index afc1c5262ff..19348aea06c 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,17 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::functionObjectCloud
+    Foam::functionObjects::runTimePostPro::functionObjectCloud
 
 Description
+    Visualisation of cloud data from function object output
 
 SourceFiles
     functionObjectCloud.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef functionObjectCloud_H
-#define functionObjectCloud_H
+#ifndef functionObjects_runTimePostPro_functionObjectCloud_H
+#define functionObjects_runTimePostPro_functionObjectCloud_H
 
 #include "pointData.H"
 #include "fieldVisualisationBase.H"
@@ -41,6 +42,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                      Class functionObjectCloud Declaration
@@ -56,20 +61,20 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        functionObjectCloud(const functionObjectCloud&);
+        functionObjectCloud(const functionObjectCloud&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const functionObjectCloud&);
+        void operator=(const functionObjectCloud&) = delete;
 
 
 protected:
 
     // Protected data
 
-        //- Name of cloud
+        //- Name of functionObjectCloud
         word cloudName_;
 
-        //- Name of cloud function object result to render
+        //- Name of functionObjectCloud function object result to render
         word functionObject_;
 
         //- Name of field to colour by
@@ -116,6 +121,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
index cb150e0e3ab..28ec2c91d58 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
@@ -39,15 +39,21 @@ License
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimePostPro
 {
     defineTypeNameAndDebug(functionObjectLine, 0);
     addToRunTimeSelectionTable(pathline, functionObjectLine, dictionary);
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::functionObjectLine::functionObjectLine
+Foam::functionObjects::runTimePostPro::functionObjectLine::functionObjectLine
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -65,13 +71,14 @@ Foam::functionObjectLine::functionObjectLine
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::functionObjectLine::~functionObjectLine()
+Foam::functionObjects::runTimePostPro::functionObjectLine::~functionObjectLine()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::functionObjectLine::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::functionObjectLine::
+addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer
@@ -121,7 +128,10 @@ void Foam::functionObjectLine::addGeometryToScene
 }
 
 
-void Foam::functionObjectLine::updateActors(const scalar position)
+void Foam::functionObjects::runTimePostPro::functionObjectLine::updateActors
+(
+    const scalar position
+)
 {
     actor_->GetProperty()->SetLineWidth(2);
     actor_->GetProperty()->SetOpacity(opacity(position));
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
index 3749d245976..8f896382c85 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,17 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::functionObjectLine
+    Foam::functionObjects::runTimePostPro::functionObjectLine
 
 Description
+    Visualisation of line data from function object output
 
 SourceFiles
     functionObjectLine.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef functionObjectLine_H
-#define functionObjectLine_H
+#ifndef functionObjects_runTimePostPro_functionObjectLine_H
+#define functionObjects_runTimePostPro_functionObjectLine_H
 
 #include "pathline.H"
 #include "fieldVisualisationBase.H"
@@ -41,6 +42,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                      Class functionObjectLine Declaration
@@ -56,10 +61,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        functionObjectLine(const functionObjectLine&);
+        functionObjectLine(const functionObjectLine&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const functionObjectLine&);
+        void operator=(const functionObjectLine&) = delete;
 
 
 protected:
@@ -76,7 +81,7 @@ protected:
 public:
 
     //- Run-time type information
-    TypeName("line");
+    TypeName("functionObjectLine");
 
 
     // Constructors
@@ -110,6 +115,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
index a2a09be360b..b7b11e69456 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
@@ -39,15 +39,22 @@ License
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimePostPro
 {
     defineTypeNameAndDebug(functionObjectSurface, 0);
     addToRunTimeSelectionTable(surface, functionObjectSurface, dictionary);
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::functionObjectSurface::functionObjectSurface
+Foam::functionObjects::runTimePostPro::functionObjectSurface::
+functionObjectSurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -67,13 +74,15 @@ Foam::functionObjectSurface::functionObjectSurface
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::functionObjectSurface::~functionObjectSurface()
+Foam::functionObjects::runTimePostPro::functionObjectSurface::
+~functionObjectSurface()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::functionObjectSurface::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::functionObjectSurface::
+addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer
@@ -98,7 +107,7 @@ void Foam::functionObjectSurface::addGeometryToScene
         WarningInFunction
             << "Unable to find function object " << functionObject_
             << " output for field " << fieldName_
-            << ". Surface will not be processed"
+            << ". functionObjectSurface will not be processed"
             << endl;
         return;
     }
diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
index b881611b6a3..95e592dbc87 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,17 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::functionObjectSurface
+    Foam::functionObjects::runTimePostPro::functionObjectSurface
 
 Description
+    Visualisation of surface data from function object output
 
 SourceFiles
-    functionObjectSurface.C
+    functionObjectfunctionObjectSurface.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef functionObjectSurface_H
-#define functionObjectSurface_H
+#ifndef functionObjects_runTimePostPro_functionObjectSurface_H
+#define functionObjects_runTimePostPro_functionObjectSurface_H
 
 #include "geometrySurface.H"
 #include "fieldVisualisationBase.H"
@@ -41,6 +42,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                     Class functionObjectSurface Declaration
@@ -58,10 +63,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        functionObjectSurface(const functionObjectSurface&);
+        functionObjectSurface(const functionObjectSurface&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const functionObjectSurface&);
+        void operator=(const functionObjectSurface&) = delete;
 
 
 protected:
@@ -75,7 +80,7 @@ protected:
 public:
 
     //- Run-time type information
-    TypeName("functionObject");
+    TypeName("functionObjectSurface");
 
 
     // Constructors
@@ -95,7 +100,7 @@ public:
 
     // Member Functions
 
-        //- Add surface(s) to scene
+        //- Add functionObjectSurface(s) to scene
         virtual void addGeometryToScene
         (
             const scalar position,
@@ -106,6 +111,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/geometryBase.C b/src/functionObjects/graphics/runTimePostProcessing/geometryBase.C
index 0d78faf14b2..14b8c11d339 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/geometryBase.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/geometryBase.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -35,7 +35,11 @@ License
 namespace Foam
 {
     template<>
-    const char* NamedEnum<geometryBase::renderModeType, 3>::names[] =
+    const char* NamedEnum
+    <
+        functionObjects::runTimePostPro::geometryBase::renderModeType,
+        3
+    >::names[] =
     {
         "flat",
         "gouraud",
@@ -43,13 +47,20 @@ namespace Foam
     };
 }
 
-const Foam::NamedEnum<Foam::geometryBase::renderModeType, 3>
-    Foam::geometryBase::renderModeTypeNames;
+const Foam::NamedEnum
+<
+    Foam::functionObjects::runTimePostPro::geometryBase::renderModeType,
+    3
+>
+    Foam::functionObjects::runTimePostPro::geometryBase::renderModeTypeNames;
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::geometryBase::initialiseActor(vtkActor* actor) const
+void Foam::functionObjects::runTimePostPro::geometryBase::initialiseActor
+(
+    vtkActor* actor
+) const
 {
     actor->GetProperty()->SetSpecular(0);
     actor->GetProperty()->SetSpecularPower(20);
@@ -77,7 +88,7 @@ void Foam::geometryBase::initialiseActor(vtkActor* actor) const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::geometryBase::geometryBase
+Foam::functionObjects::runTimePostPro::geometryBase::geometryBase
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -109,38 +120,43 @@ Foam::geometryBase::geometryBase
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::geometryBase::~geometryBase()
+Foam::functionObjects::runTimePostPro::geometryBase::~geometryBase()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-const Foam::runTimePostProcessing& Foam::geometryBase::parent() const
+const Foam::functionObjects::runTimePostProcessing&
+Foam::functionObjects::runTimePostPro::geometryBase::parent() const
 {
     return parent_;
 }
 
 
-const Foam::word& Foam::geometryBase::name() const
+const Foam::word&
+Foam::functionObjects::runTimePostPro::geometryBase::name() const
 {
     return name_;
 }
 
 
-bool Foam::geometryBase::visible() const
+bool Foam::functionObjects::runTimePostPro::geometryBase::visible() const
 {
     return visible_;
 }
 
 
-Foam::scalar Foam::geometryBase::opacity(const scalar position) const
+Foam::scalar Foam::functionObjects::runTimePostPro::geometryBase::opacity
+(
+    const scalar position
+) const
 {
     return opacity_->value(position);
 }
 
 
 const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
-Foam::geometryBase::colours() const
+Foam::functionObjects::runTimePostPro::geometryBase::colours() const
 {
     return colours_;
 }
diff --git a/src/functionObjects/graphics/runTimePostProcessing/geometryBase.H b/src/functionObjects/graphics/runTimePostProcessing/geometryBase.H
index 49997d79ad2..d1dc8a6a26b 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/geometryBase.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/geometryBase.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,17 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::geometryBase
+    Foam::functionObjects::runTimePostPro::geometryBase
 
 Description
+    Base class for surface handling
 
 SourceFiles
     geometryBase.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef geometryBase_H
-#define geometryBase_H
+#ifndef functionObjects_runTimePostPro_geometryBase_H
+#define functionObjects_runTimePostPro_geometryBase_H
 
 #include "dictionary.H"
 #include "vector.H"
@@ -47,9 +48,14 @@ class vtkActor;
 
 namespace Foam
 {
-
+namespace functionObjects
+{
 class runTimePostProcessing;
 
+namespace runTimePostPro
+{
+
+
 /*---------------------------------------------------------------------------*\
                         Class geometryBase Declaration
 \*---------------------------------------------------------------------------*/
@@ -63,9 +69,9 @@ public:
 
         enum renderModeType
         {
-            rmFlat,
-            rmGouraud,
-            rmPhong
+            rmFlat,             //< Flat shading
+            rmGouraud,          //< Gouraud shading
+            rmPhong             //< Phong shading
         };
 
         static const NamedEnum<renderModeType, 3> renderModeTypeNames;
@@ -162,6 +168,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.C b/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
index 9046189f593..1ebaa6e5e98 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -47,15 +47,20 @@ License
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimePostPro
 {
     defineTypeNameAndDebug(geometrySurface, 0);
     addToRunTimeSelectionTable(surface, geometrySurface, dictionary);
 }
-
+}
+}
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::geometrySurface::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::geometrySurface::addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer,
@@ -132,7 +137,7 @@ void Foam::geometrySurface::addGeometryToScene
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::geometrySurface::geometrySurface
+Foam::functionObjects::runTimePostPro::geometrySurface::geometrySurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -144,7 +149,7 @@ Foam::geometrySurface::geometrySurface
 {}
 
 
-Foam::geometrySurface::geometrySurface
+Foam::functionObjects::runTimePostPro::geometrySurface::geometrySurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -159,13 +164,13 @@ Foam::geometrySurface::geometrySurface
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::geometrySurface::~geometrySurface()
+Foam::functionObjects::runTimePostPro::geometrySurface::~geometrySurface()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::geometrySurface::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::geometrySurface::addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer
@@ -184,7 +189,10 @@ void Foam::geometrySurface::addGeometryToScene
 }
 
 
-void Foam::geometrySurface::updateActors(const scalar position)
+void Foam::functionObjects::runTimePostPro::geometrySurface::updateActors
+(
+    const scalar position
+)
 {
     if (!visible_)
     {
diff --git a/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.H b/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
index 3b35bc171b6..674746deb2c 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -25,14 +25,15 @@ Class
     Foam::geometrySurface
 
 Description
+    Visualisation of surface geometry data
 
 SourceFiles
     geometrySurface.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef geometrySurface_H
-#define geometrySurface_H
+#ifndef functionObjects_runTimePostPro_geometrySurface_H
+#define functionObjects_runTimePostPro_geometrySurface_H
 
 #include "surface.H"
 
@@ -42,9 +43,13 @@ class vtkPolyData;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
-                        Class geometrySurface Declaration
+                       Class geometrySurface Declaration
 \*---------------------------------------------------------------------------*/
 
 class geometrySurface
@@ -56,10 +61,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        geometrySurface(const geometrySurface&);
+        geometrySurface(const geometrySurface&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const geometrySurface&);
+        void operator=(const geometrySurface&) = delete;
 
 
 protected:
@@ -127,6 +132,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/pathline.C b/src/functionObjects/graphics/runTimePostProcessing/pathline.C
index 0b5a2da8be8..494d92d9bcb 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/pathline.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/pathline.C
@@ -40,26 +40,40 @@ License
 
 namespace Foam
 {
-    template<>
-    const char* NamedEnum<pathline::representationType, 4>::names[] =
-    {
-        "none",
-        "line",
-        "tube",
-        "vector"
-    };
-
+namespace functionObjects
+{
+namespace runTimePostPro
+{
     defineTypeNameAndDebug(pathline, 0);
     defineRunTimeSelectionTable(pathline, dictionary);
 }
+}
+
+template<>
+const char* NamedEnum
+<
+    functionObjects::runTimePostPro::pathline::representationType,
+    4
+>::names[] =
+{
+    "none",
+    "line",
+    "tube",
+    "vector"
+};
+}
 
-const Foam::NamedEnum<Foam::pathline::representationType, 4>
-    Foam::pathline::representationTypeNames;
+const Foam::NamedEnum
+<
+    Foam::functionObjects::runTimePostPro::pathline::representationType,
+    4
+>
+    Foam::functionObjects::runTimePostPro::pathline::representationTypeNames;
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::pathline::addLines
+void Foam::functionObjects::runTimePostPro::pathline::addLines
 (
     const label frameI,
     vtkActor* actor,
@@ -114,7 +128,7 @@ void Foam::pathline::addLines
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::pathline::pathline
+Foam::functionObjects::runTimePostPro::pathline::pathline
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -164,7 +178,8 @@ Foam::pathline::pathline
 
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
-Foam::autoPtr<Foam::pathline> Foam::pathline::New
+Foam::autoPtr<Foam::functionObjects::runTimePostPro::pathline>
+Foam::functionObjects::runTimePostPro::pathline::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -196,7 +211,7 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::pathline::~pathline()
+Foam::functionObjects::runTimePostPro::pathline::~pathline()
 {}
 
 
diff --git a/src/functionObjects/graphics/runTimePostProcessing/pathline.H b/src/functionObjects/graphics/runTimePostProcessing/pathline.H
index 06865482695..20d21f87236 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/pathline.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/pathline.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -31,8 +31,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef pathline_H
-#define pathline_H
+#ifndef functionObjects_runTimePostPro_pathline_H
+#define functionObjects_runTimePostPro_pathline_H
 
 #include "geometryBase.H"
 #include "NamedEnum.H"
@@ -46,6 +46,10 @@ class vtkPolyDataMapper;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                           Class pathline Declaration
@@ -75,10 +79,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        pathline(const pathline&);
+        pathline(const pathline&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const pathline&);
+        void operator=(const pathline&) = delete;
 
 
 protected:
@@ -158,6 +162,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/pointData.C b/src/functionObjects/graphics/runTimePostProcessing/pointData.C
index 19838d4adc9..04a103d7400 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/pointData.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/pointData.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -40,24 +40,37 @@ License
 
 namespace Foam
 {
-    template<>
-    const char* NamedEnum<pointData::representationType, 2>::names[] =
-    {
-        "sphere",
-        "vector"
-    };
-
+namespace functionObjects
+{
+namespace runTimePostPro
+{
     defineTypeNameAndDebug(pointData, 0);
     defineRunTimeSelectionTable(pointData, dictionary);
 }
+}
+template<>
+const char* NamedEnum
+<
+    functionObjects::runTimePostPro::pointData::representationType,
+    2
+>::names[] =
+{
+    "sphere",
+    "vector"
+};
+}
 
-const Foam::NamedEnum<Foam::pointData::representationType, 2>
-    Foam::pointData::representationTypeNames;
+const Foam::NamedEnum
+<
+    Foam::functionObjects::runTimePostPro::pointData::representationType,
+    2
+>
+    Foam::functionObjects::runTimePostPro::pointData::representationTypeNames;
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::pointData::addPoints
+void Foam::functionObjects::runTimePostPro::pointData::addPoints
 (
     const label frameI,
     vtkActor* actor,
@@ -83,7 +96,7 @@ void Foam::pointData::addPoints
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::pointData::pointData
+Foam::functionObjects::runTimePostPro::pointData::pointData
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -124,7 +137,7 @@ Foam::pointData::pointData
 
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
-Foam::autoPtr<Foam::pointData> Foam::pointData::New
+Foam::autoPtr<Foam::functionObjects::runTimePostPro::pointData> Foam::functionObjects::runTimePostPro::pointData::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -156,7 +169,7 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::pointData::~pointData()
+Foam::functionObjects::runTimePostPro::pointData::~pointData()
 {}
 
 
diff --git a/src/functionObjects/graphics/runTimePostProcessing/pointData.H b/src/functionObjects/graphics/runTimePostProcessing/pointData.H
index f6521b64071..a3d4c0578b4 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/pointData.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/pointData.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::pointData
+    Foam::functionObjects::runTimePostPro::pointData
 
 Description
 
@@ -31,8 +31,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef pointData_H
-#define pointData_H
+#ifndef functionObjects_runTimePostPro_pointData_H
+#define functionObjects_runTimePostPro_pointData_H
 
 #include "geometryBase.H"
 #include "NamedEnum.H"
@@ -46,6 +46,10 @@ class vtkPolyDataMapper;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                           Class pointData Declaration
@@ -61,8 +65,8 @@ public:
 
         enum representationType
         {
-            rtSphere,
-            rtVector
+            rtSphere,               //< Sphere
+            rtVector                //< Vector
         };
 
         static const NamedEnum<representationType, 2> representationTypeNames;
@@ -73,10 +77,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        pointData(const pointData&);
+        pointData(const pointData&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const pointData&);
+        void operator=(const pointData&) = delete;
 
 
 protected:
@@ -157,6 +161,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C
index d31b5403d53..3fdf57ad8e7 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -32,6 +32,7 @@ License
 #include "text.H"
 #include "Time.H"
 #include "sigFpe.H"
+#include "addToRunTimeSelectionTable.H"
 
 // VTK includes
 #include "vtkPolyDataMapper.h"
@@ -44,29 +45,36 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
 {
     defineTypeNameAndDebug(runTimePostProcessing, 0);
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        runTimePostProcessing,
+        dictionary
+    );
+}
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::runTimePostProcessing::runTimePostProcessing
+Foam::functionObjects::runTimePostProcessing::runTimePostProcessing
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectState(obr, name),
-    scene_(obr, name),
+    fvMeshFunctionObject(name, runTime, dict),
+    scene_(runTime, name),
     points_(),
     lines_(),
     surfaces_(),
-    text_(),
-    obr_(obr),
-    active_(true)
+    text_()
 {
     read(dict);
 }
@@ -74,15 +82,15 @@ Foam::runTimePostProcessing::runTimePostProcessing
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::runTimePostProcessing::~runTimePostProcessing()
+Foam::functionObjects::runTimePostProcessing::~runTimePostProcessing()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::runTimePostProcessing::read(const dictionary& dict)
+bool Foam::functionObjects::runTimePostProcessing::read(const dictionary& dict)
 {
-    Info<< type() << " " << name_ << ": reading post-processing data" << endl;
+    Info<< type() << " " << name() << ": reading post-processing data" << endl;
 
     scene_.read(dict);
 
@@ -107,37 +115,32 @@ void Foam::runTimePostProcessing::read(const dictionary& dict)
                 << exit(FatalIOError);
         }
 
-        text_.append(new text(*this, iter().dict(), scene_.colours()));
+        text_.append(new runTimePostPro::text
+        (
+            *this,
+            iter().dict(),
+            scene_.colours())
+        );
     }
-}
-
 
-void Foam::runTimePostProcessing::execute()
-{
-    // Do nothing
+    return true;
 }
 
 
-void Foam::runTimePostProcessing::end()
+bool Foam::functionObjects::runTimePostProcessing::execute()
 {
-    // Do nothing
+    return true;
 }
 
 
-void Foam::runTimePostProcessing::timeSet()
-{
-    // Do nothing
-}
-
-
-void Foam::runTimePostProcessing::write()
+bool Foam::functionObjects::runTimePostProcessing::write()
 {
     if (!Pstream::master())
     {
-        return;
+        return true;
     }
 
-    Info<< type() << " " << name_ <<  " output:" << nl
+    Info<< type() << " " << name() <<  " output:" << nl
         << "    Constructing scene" << endl;
 
     // Unset any floating point trapping (some low-level rendering functionality
@@ -214,6 +217,8 @@ void Foam::runTimePostProcessing::write()
 
     // Reset any floating point trapping
     sigFpe::set(false);
+
+    return true;
 }
 
 
diff --git a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.H b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.H
index d386aae369f..c531f5070bf 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessing.H
@@ -22,13 +22,13 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::runTimePostProcessing
+    Foam::functionObjects::runTimePostProcessing
 
 Group
     grpGraphicsFunctionObjects
 
 Description
-    Function object to generate images during run-time.
+    Generate images during run-time.
 
     The functionality makes use of the VTK libraries (see http://www.vtk.org)
     which provide a broad set of functionality for scene composition and
@@ -54,10 +54,10 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef runTimePostProcessing_H
-#define runTimePostProcessing_H
+#ifndef functionObjects_runTimePostProcessing_H
+#define functionObjects_runTimePostProcessing_H
 
-#include "functionObjectState.H"
+#include "fvMeshFunctionObject.H"
 #include "objectRegistry.H"
 #include "mapPolyMesh.H"
 #include "PtrList.H"
@@ -70,12 +70,15 @@ class vtkRenderWindow;
 
 namespace Foam
 {
-
-class dictionary;
-class pointData;
-class pathline;
-class surface;
-class text;
+namespace functionObjects
+{
+namespace runTimePostPro
+{
+    class pointData;
+    class pathline;
+    class surface;
+    class text;
+}
 
 /*---------------------------------------------------------------------------*\
                    Class runTimePostProcessing Declaration
@@ -83,7 +86,7 @@ class text;
 
 class runTimePostProcessing
 :
-    public functionObjectState
+    public fvMeshFunctionObject
 {
 private:
 
@@ -101,19 +104,19 @@ private:
         outputType output_;
 
         //- Scene manager
-        scene scene_;
+        runTimePostPro::scene scene_;
 
         //- List of points
-        PtrList<pointData> points_;
+        PtrList<runTimePostPro::pointData> points_;
 
         //- List of lines
-        PtrList<pathline> lines_;
+        PtrList<runTimePostPro::pathline> lines_;
 
         //- List of surfaces
-        PtrList<surface> surfaces_;
+        PtrList<runTimePostPro::surface> surfaces_;
 
         //- List of text
-        PtrList<text> text_;
+        PtrList<runTimePostPro::text> text_;
 
 
         // Private Member Functions
@@ -127,17 +130,6 @@ private:
             ) const;
 
 
-protected:
-
-    // Protected data
-
-        //- Reference to the database
-        const objectRegistry& obr_;
-
-        //- on/off switch
-        bool active_;
-
-
 public:
 
     //- Runtime type information
@@ -150,49 +142,36 @@ public:
         runTimePostProcessing
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary&dict
         );
 
+
     //- Desructor
     virtual ~runTimePostProcessing();
 
 
     // Member Functions
 
-        virtual const objectRegistry& obr() const
+        const fvMesh& mesh() const
         {
-            return obr_;
+            return mesh_;
         }
 
         //- Read the field min/max data
-        virtual void read(const dictionary&);
+        virtual bool read(const dictionary&);
 
         //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
-
-        //- Called when time was set at the end of the Time::operator++
-        virtual void timeSet();
+        virtual bool execute();
 
         //- Write
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.C b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.C
deleted file mode 100644
index abe87dfffdd..00000000000
--- a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "runTimePostProcessingFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(runTimePostProcessingFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        runTimePostProcessingFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.H b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.H
deleted file mode 100644
index 389447e8b59..00000000000
--- a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingFunctionObject.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::runTimePostProcessingFunctionObject
-
-Description
-    FunctionObject wrapper around runTimePostProcessing to allow them to be
-    created via the functions entry within controlDict.
-
-SourceFiles
-    runTimePostProcessingFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef runTimePostProcessingFunctionObject_H
-#define runTimePostProcessingFunctionObject_H
-
-#include "runTimePostProcessing.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<runTimePostProcessing>
-        runTimePostProcessingFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C
index 47540015eb4..29b9df16036 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/runTimePostProcessingTemplates.C
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::runTimePostProcessing::readObjects
+void Foam::functionObjects::runTimePostProcessing::readObjects
 (
     const dictionary& dict,
     PtrList<Type>& objects
diff --git a/src/functionObjects/graphics/runTimePostProcessing/scene.C b/src/functionObjects/graphics/runTimePostProcessing/scene.C
index 9e335bdfc5a..c9b282be421 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/scene.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/scene.C
@@ -43,19 +43,30 @@ License
 namespace Foam
 {
     template<>
-    const char* NamedEnum<scene::modeType, 2>::names[] =
+    const char* NamedEnum
+    <
+        functionObjects::runTimePostPro::scene::modeType,
+        2
+    >::names[] =
     {
         "static",
         "flightPath"
     };
 }
 
-const Foam::NamedEnum<Foam::scene::modeType, 2> modeTypeNames_;
+const Foam::NamedEnum
+<
+    Foam::functionObjects::runTimePostPro::scene::modeType,
+    2
+> modeTypeNames_;
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::scene::readCamera(const dictionary& dict)
+void Foam::functionObjects::runTimePostPro::scene::readCamera
+(
+    const dictionary& dict
+)
 {
     if (dict.readIfPresent("nFrameTotal", nFrameTotal_))
     {
@@ -155,7 +166,10 @@ void Foam::scene::readCamera(const dictionary& dict)
 }
 
 
-void Foam::scene::readColours(const dictionary& dict)
+void Foam::functionObjects::runTimePostPro::scene::readColours
+(
+    const dictionary& dict
+)
 {
     const wordList colours = dict.toc();
     forAll(colours, i)
@@ -166,7 +180,11 @@ void Foam::scene::readColours(const dictionary& dict)
 }
 
 
-void Foam::scene::initialise(vtkRenderer* renderer, const word& outputName)
+void Foam::functionObjects::runTimePostPro::scene::initialise
+(
+    vtkRenderer* renderer,
+    const word& outputName
+)
 {
     currentFrameI_ = 0;
     position_ = startPosition_;
@@ -256,7 +274,10 @@ void Foam::scene::initialise(vtkRenderer* renderer, const word& outputName)
 }
 
 
-void Foam::scene::setCamera(vtkRenderer* renderer) const
+void Foam::functionObjects::runTimePostPro::scene::setCamera
+(
+    vtkRenderer* renderer
+) const
 {
     if (mode_ == mtFlightPath)
     {
@@ -281,7 +302,8 @@ void Foam::scene::setCamera(vtkRenderer* renderer) const
 }
 
 
-Foam::string Foam::scene::frameIndexStr() const
+Foam::string
+Foam::functionObjects::runTimePostPro::scene::frameIndexStr() const
 {
     string str = Foam::name(currentFrameI_);
     str.insert(0, 4 - str.length(), '0');
@@ -292,7 +314,11 @@ Foam::string Foam::scene::frameIndexStr() const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::scene::scene(const objectRegistry& obr, const word& name)
+Foam::functionObjects::runTimePostPro::scene::scene
+(
+    const objectRegistry& obr,
+    const word& name
+)
 :
     obr_(obr),
     name_(name),
@@ -315,39 +341,39 @@ Foam::scene::scene(const objectRegistry& obr, const word& name)
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::scene::~scene()
+Foam::functionObjects::runTimePostPro::scene::~scene()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
-Foam::scene::colours() const
+Foam::functionObjects::runTimePostPro::scene::colours() const
 {
     return colours_;
 }
 
 
-Foam::label Foam::scene::frameIndex() const
+Foam::label Foam::functionObjects::runTimePostPro::scene::frameIndex() const
 {
     return currentFrameI_;
 }
 
 
-Foam::scalar Foam::scene::position() const
+Foam::scalar Foam::functionObjects::runTimePostPro::scene::position() const
 {
     return position_;
 }
 
 
-void Foam::scene::read(const dictionary& dict)
+void Foam::functionObjects::runTimePostPro::scene::read(const dictionary& dict)
 {
     readCamera(dict.subDict("camera"));
     readColours(dict.subDict("colours"));
 }
 
 
-bool Foam::scene::loop(vtkRenderer* renderer)
+bool Foam::functionObjects::runTimePostPro::scene::loop(vtkRenderer* renderer)
 {
     static bool initialised = false;
     setCamera(renderer);
@@ -381,7 +407,10 @@ bool Foam::scene::loop(vtkRenderer* renderer)
 }
 
 
-void Foam::scene::saveImage(vtkRenderWindow* renderWindow) const
+void Foam::functionObjects::runTimePostPro::scene::saveImage
+(
+    vtkRenderWindow* renderWindow
+) const
 {
     if (!renderWindow)
     {
diff --git a/src/functionObjects/graphics/runTimePostProcessing/scene.H b/src/functionObjects/graphics/runTimePostProcessing/scene.H
index 1ac5b0eacf5..9fd4ab8ebc7 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/scene.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/scene.H
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::scene
+    Foam::functionObjects::runTimePostPro::scene
 
 Description
 
@@ -31,8 +31,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef scene_H
-#define scene_H
+#ifndef functionObjects_runTimePostPro_scene_H
+#define functionObjects_runTimePostPro_scene_H
 
 // OpenFOAM includes
 #include "dictionary.H"
@@ -54,6 +54,10 @@ class vtkRenderWindow;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                            Class scene Declaration
@@ -193,6 +197,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/surface.C b/src/functionObjects/graphics/runTimePostProcessing/surface.C
index 45618af1a07..d43b2bd10fa 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/surface.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/surface.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -40,27 +40,43 @@ License
 
 namespace Foam
 {
-    template<>
-    const char* NamedEnum<surface::representationType, 5>::names[] =
-    {
-        "none",
-        "wireframe",
-        "surface",
-        "surfaceWithEdges",
-        "glyph"
-    };
-
+namespace functionObjects
+{
+namespace runTimePostPro
+{
     defineTypeNameAndDebug(surface, 0);
     defineRunTimeSelectionTable(surface, dictionary);
 }
+}
+template<>
+const char* NamedEnum
+<
+    functionObjects::runTimePostPro::surface::representationType,
+    5
+>::names[] =
+{
+    "none",
+    "wireframe",
+    "surface",
+    "surfaceWithEdges",
+    "glyph"
+};
+}
 
-const Foam::NamedEnum<Foam::surface::representationType, 5>
-    Foam::surface::representationTypeNames;
+const Foam::NamedEnum
+<
+    Foam::functionObjects::runTimePostPro::surface::representationType,
+    5
+>
+    Foam::functionObjects::runTimePostPro::surface::representationTypeNames;
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::surface::setRepresentation(vtkActor* actor) const
+void Foam::functionObjects::runTimePostPro::surface::setRepresentation
+(
+    vtkActor* actor
+) const
 {
     geometryBase::initialiseActor(actor);
 
@@ -93,7 +109,7 @@ void Foam::surface::setRepresentation(vtkActor* actor) const
 }
 
 
-void Foam::surface::addFeatureEdges
+void Foam::functionObjects::runTimePostPro::surface::addFeatureEdges
 (
     vtkRenderer* renderer,
     vtkPolyData* data
@@ -131,7 +147,7 @@ void Foam::surface::addFeatureEdges
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::surface::surface
+Foam::functionObjects::runTimePostPro::surface::surface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -187,7 +203,8 @@ Foam::surface::surface
 
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
-Foam::autoPtr<Foam::surface> Foam::surface::New
+Foam::autoPtr<Foam::functionObjects::runTimePostPro::surface>
+Foam::functionObjects::runTimePostPro::surface::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -219,13 +236,16 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::surface::~surface()
+Foam::functionObjects::runTimePostPro::surface::~surface()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::surface::updateActors(const scalar position)
+void Foam::functionObjects::runTimePostPro::surface::updateActors
+(
+    const scalar position
+)
 {
     if (!featureEdges_)
     {
diff --git a/src/functionObjects/graphics/runTimePostProcessing/surface.H b/src/functionObjects/graphics/runTimePostProcessing/surface.H
index cd6f7fbbd2c..e1510cab89e 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/surface.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/surface.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::surface
+    Foam::functionObjects::runTimePostPro::surface
 
 Description
 
@@ -31,8 +31,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef surface_H
-#define surface_H
+#ifndef functionObjects_runTimePostPro_surface_H
+#define functionObjects_runTimePostPro_surface_H
 
 #include "geometryBase.H"
 #include "NamedEnum.H"
@@ -48,6 +48,10 @@ class vtkPolyData;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                           Class surface Declaration
@@ -78,10 +82,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        surface(const surface&);
+        surface(const surface&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const surface&);
+        void operator=(const surface&) = delete;
 
 
 protected:
@@ -181,6 +185,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/graphics/runTimePostProcessing/text.C b/src/functionObjects/graphics/runTimePostProcessing/text.C
index d73bc28dbc0..67856fa42c6 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/text.C
+++ b/src/functionObjects/graphics/runTimePostProcessing/text.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -25,6 +25,7 @@ License
 
 // OpenFOAM includes
 #include "text.H"
+#include "fvMesh.H"
 #include "runTimePostProcessing.H"
 
 // VTK includes
@@ -35,7 +36,7 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::text::text
+Foam::functionObjects::runTimePostPro::text::text
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
@@ -63,13 +64,13 @@ Foam::text::text
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::text::~text()
+Foam::functionObjects::runTimePostPro::text::~text()
 {}
 
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void Foam::text::addGeometryToScene
+void Foam::functionObjects::runTimePostPro::text::addGeometryToScene
 (
     const scalar position,
     vtkRenderer* renderer
@@ -86,7 +87,8 @@ void Foam::text::addGeometryToScene
     string textAndTime = string_;
     if (timeStamp_)
     {
-        textAndTime = textAndTime + " " + geometryBase::parent_.obr().time().timeName();
+        textAndTime =
+            textAndTime + " " + geometryBase::parent_.mesh().time().timeName();
     }
     actor->SetInput(textAndTime.c_str());
     actor->GetTextProperty()->SetFontFamilyToArial();
@@ -108,7 +110,10 @@ void Foam::text::addGeometryToScene
 }
 
 
-void Foam::text::updateActors(const scalar position)
+void Foam::functionObjects::runTimePostPro::text::updateActors
+(
+    const scalar position
+)
 {
     // do nothing - all handled by addGeometryToScene
 }
diff --git a/src/functionObjects/graphics/runTimePostProcessing/text.H b/src/functionObjects/graphics/runTimePostProcessing/text.H
index 09f89cac8e4..f98f36add56 100644
--- a/src/functionObjects/graphics/runTimePostProcessing/text.H
+++ b/src/functionObjects/graphics/runTimePostProcessing/text.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::text
+    Foam::functionObjects::runTimePostPro::text
 
 Description
     Example of text object specification:
@@ -48,8 +48,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef text_H
-#define text_H
+#ifndef functionObjects_runTimePostPro_text_H
+#define functionObjects_runTimePostPro_text_H
 
 #include "geometryBase.H"
 #include "Tuple2.H"
@@ -60,6 +60,10 @@ class vtkRenderer;
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimePostPro
+{
 
 /*---------------------------------------------------------------------------*\
                           Class text Declaration
@@ -74,10 +78,10 @@ private:
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        text(const text&);
+        text(const text&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const text&);
+        void operator=(const text&) = delete;
 
 
 protected:
@@ -136,6 +140,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimePostPro
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/lagrangian/cloudInfo/cloudInfo.C b/src/functionObjects/lagrangian/cloudInfo/cloudInfo.C
index a8ca7cb2c92..cb0b8e738eb 100644
--- a/src/functionObjects/lagrangian/cloudInfo/cloudInfo.C
+++ b/src/functionObjects/lagrangian/cloudInfo/cloudInfo.C
@@ -49,7 +49,7 @@ namespace functionObjects
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
-void Foam::cloudInfo::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::cloudInfo::writeFileHeader(Ostream& os) const
 {
     writeHeader(os, "Cloud information");
     writeCommented(os, "Time");
@@ -120,8 +120,6 @@ bool Foam::functionObjects::cloudInfo::execute()
 
 bool Foam::functionObjects::cloudInfo::write()
 {
-    logFiles::write();
-
     forAll(names(), i)
     {
         const word& cloudName = names()[i];
@@ -137,7 +135,7 @@ bool Foam::functionObjects::cloudInfo::write()
         scalar D10 = cloud.Dij(1, 0);
         scalar D32 = cloud.Dij(3, 2);
 
-        Log << type() << " " << name_ <<  " write:" << nl
+        Log << type() << " " << name() <<  " write:" << nl
             << "    number of parcels : " << nParcels << nl
             << "    mass in system    : " << massInSystem << nl
             << "    maximum diameter  : " << Dmax << nl
diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.C b/src/functionObjects/solvers/scalarTransport/scalarTransport.C
index 08f91e9c3bc..2a86f645a1a 100644
--- a/src/functionObjects/solvers/scalarTransport/scalarTransport.C
+++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.C
@@ -53,43 +53,45 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-Foam::volScalarField& Foam::scalarTransport::transportedField()
+Foam::volScalarField& Foam::functionObjects::scalarTransport::transportedField()
 {
-    if (!mesh_.foundObject<volScalarField>(fieldName_))
+    if (!foundObject<volScalarField>(fieldName_))
     {
-        volScalarField* fldPtr = new volScalarField
+        tmp<volScalarField> tfldPtr
         (
-            IOobject
+            new volScalarField
             (
-                fieldName_,
-                mesh_.time().timeName(),
-                mesh_,
-                IOobject::MUST_READ,
-                IOobject::AUTO_WRITE
-            ),
-            mesh_,
-            dimensionedScalar("zero", dimless, 0.0),
-            boundaryTypes()
+                IOobject
+                (
+                    fieldName_,
+                    mesh_.time().timeName(),
+                    mesh_,
+                    IOobject::MUST_READ,
+                    IOobject::AUTO_WRITE
+                ),
+                mesh_
+            )
         );
-        fldPtr->store();
+        store(fieldName_, tfldPtr);
     }
 
     return const_cast<volScalarField&>
     (
-        mesh_.lookupObject<volScalarField>(fieldName_)
+        lookupObject<volScalarField>(fieldName_)
     );
 }
 
 
 Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
 (
+    const volScalarField& s,
     const surfaceScalarField& phi
 ) const
 {
     typedef incompressible::turbulenceModel icoModel;
     typedef compressible::turbulenceModel cmpModel;
 
-    word Dname("D" + s_.name());
+    word Dname("D" + s.name());
 
     if (constantD_)
     {
@@ -110,18 +112,18 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
             )
         );
     }
-    else if (mesh_.foundObject<icoModel>(turbulenceModel::propertiesName))
+    else if (foundObject<icoModel>(turbulenceModel::propertiesName))
     {
-        const icoModel& model = mesh_.lookupObject<icoModel>
+        const icoModel& model = lookupObject<icoModel>
         (
             turbulenceModel::propertiesName
         );
 
         return model.nuEff();
     }
-    else if (mesh_.foundObject<cmpModel>(turbulenceModel::propertiesName))
+    else if (foundObject<cmpModel>(turbulenceModel::propertiesName))
     {
-        const cmpModel& model = mesh_.lookupObject<cmpModel>
+        const cmpModel& model = lookupObject<cmpModel>
         (
             turbulenceModel::propertiesName
         );
@@ -221,13 +223,12 @@ bool Foam::functionObjects::scalarTransport::execute()
 {
     Log << type() << " write:" << endl;
 
-    const surfaceScalarField& phi =
-        mesh_.lookupObject<surfaceScalarField>(phiName_);
+    const surfaceScalarField& phi = lookupObject<surfaceScalarField>(phiName_);
 
     volScalarField& s = transportedField();
 
     // Calculate the diffusivity
-    volScalarField D(this->D(phi));
+    volScalarField D(this->D(s, phi));
 
     word divScheme("div(phi," + schemesField_ + ")");
     word laplacianScheme("laplacian(" + D.name() + "," + schemesField_ + ")");
@@ -241,8 +242,7 @@ bool Foam::functionObjects::scalarTransport::execute()
 
     if (phi.dimensions() == dimMass/dimTime)
     {
-        const volScalarField& rho =
-            mesh_.lookupObject<volScalarField>(rhoName_);
+        const volScalarField& rho = lookupObject<volScalarField>(rhoName_);
 
         for (label i = 0; i <= nCorr_; i++)
         {
diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.H b/src/functionObjects/solvers/scalarTransport/scalarTransport.H
index b5aad93ec18..032f7958136 100644
--- a/src/functionObjects/solvers/scalarTransport/scalarTransport.H
+++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.H
@@ -45,7 +45,7 @@ Description
         scalar1
         {
             type            scalarTransport;
-            functionObjectLibs ("libutilityFunctionObjects.so");
+            libs            ("libutilityFunctionObjects.so");
 
             fvOptions
             {
@@ -137,7 +137,11 @@ class scalarTransport
         volScalarField& transportedField();
 
         //- Return the diffusivity field
-        tmp<volScalarField> D(const surfaceScalarField& phi) const;
+        tmp<volScalarField> D
+        (
+            const volScalarField& s,
+            const surfaceScalarField& phi
+        ) const;
 
         //- Disallow default bitwise copy construct
         scalarTransport(const scalarTransport&) = delete;
diff --git a/src/functionObjects/utilities/Make/files b/src/functionObjects/utilities/Make/files
index 870ee734ce9..8a4d292c368 100644
--- a/src/functionObjects/utilities/Make/files
+++ b/src/functionObjects/utilities/Make/files
@@ -1,11 +1,28 @@
+abort/abort.C
+
 codedFunctionObject/codedFunctionObject.C
+
+removeRegisteredObject/removeRegisteredObject.C
+
 residuals/residuals.C
-timeActivatedFileUpdate/timeActivatedFileUpdate.C
+
+runTimeControl/runTimeControl.C
+runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
+runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
+runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
+runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
+runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
+runTimeControl/runTimeCondition/averageCondition/averageCondition.C
+runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
+
 setTimeStep/setTimeStepFunctionObject.C
+
 systemCall/systemCall.C
-abort/abort.C
-removeRegisteredObject/removeRegisteredObject.C
+
+timeActivatedFileUpdate/timeActivatedFileUpdate.C
+
 writeDictionary/writeDictionary.C
+
 writeObjects/writeObjects.C
 
 LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects
diff --git a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.C b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.C
index 8e361606f1e..76b51e732b5 100644
--- a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.C
+++ b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -55,14 +55,7 @@ Foam::functionObjects::removeRegisteredObject::removeRegisteredObject
     const dictionary& dict
 )
 :
-    functionObject(name),
-    obr_
-    (
-        runTime.lookupObject<objectRegistry>
-        (
-            dict.lookupOrDefault("region", polyMesh::defaultRegion)
-        )
-    ),
+    regionFunctionObject(name, runTime, dict),
     objectNames_()
 {
     read(dict);
@@ -89,14 +82,14 @@ bool Foam::functionObjects::removeRegisteredObject::execute()
 {
     forAll(objectNames_, i)
     {
-        if (obr_.foundObject<regIOobject>(objectNames_[i]))
+        if (foundObject<regIOobject>(objectNames_[i]))
         {
             const regIOobject& obj =
-                obr_.lookupObject<regIOobject>(objectNames_[i]);
+                lookupObject<regIOobject>(objectNames_[i]);
 
             if (obj.ownedByRegistry())
             {
-                Log << type() << " " << name_ << " output:" << nl
+                Log << type() << " " << name() << " output:" << nl
                     << "    removing object " << obj.name() << nl
                     << endl;
 
diff --git a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
index 2fc5df30386..276b8ccfed8 100644
--- a/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
+++ b/src/functionObjects/utilities/removeRegisteredObject/removeRegisteredObject.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -59,7 +59,7 @@ SourceFiles
 #ifndef functionObjects_removeRegisteredObject_H
 #define functionObjects_removeRegisteredObject_H
 
-#include "functionObject.H"
+#include "regionFunctionObject.H"
 #include "wordList.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -79,13 +79,10 @@ namespace functionObjects
 
 class removeRegisteredObject
 :
-    public functionObject
+    public regionFunctionObject
 {
     // Private data
 
-        //- Reference to the objectRegistry
-        const objectRegistry& obr_;
-
         //- Names of objects to control
         wordList objectNames_;
 
diff --git a/src/functionObjects/utilities/residuals/residuals.C b/src/functionObjects/utilities/residuals/residuals.C
index 8454133b795..a9f41a02b1b 100644
--- a/src/functionObjects/utilities/residuals/residuals.C
+++ b/src/functionObjects/utilities/residuals/residuals.C
@@ -46,7 +46,7 @@ namespace functionObjects
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-void Foam::residuals::writeFileHeader(Ostream& os) const
+void Foam::functionObjects::residuals::writeFileHeader(Ostream& os) const
 {
     writeHeader(os, "Residuals");
     writeCommented(os, "Time");
diff --git a/src/functionObjects/utilities/residuals/residualsTemplates.C b/src/functionObjects/utilities/residuals/residualsTemplates.C
index 14174c6a86d..c862bd649c7 100644
--- a/src/functionObjects/utilities/residuals/residualsTemplates.C
+++ b/src/functionObjects/utilities/residuals/residualsTemplates.C
@@ -33,7 +33,7 @@ template<class Type>
 void Foam::functionObjects::residuals::writeFileHeader
 (
     Ostream& os,
-    const word& fieldName,
+    const word& fieldName
 ) const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C
similarity index 91%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C
index 486a70c7972..c4a7e9f6039 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -30,20 +30,26 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(averageCondition, 0);
     addToRunTimeSelectionTable(runTimeCondition, averageCondition, dictionary);
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::averageCondition::averageCondition
+Foam::functionObjects::runTimeControls::averageCondition::averageCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     runTimeCondition(name, obr, dict, state),
@@ -74,13 +80,13 @@ Foam::averageCondition::averageCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::averageCondition::~averageCondition()
+Foam::functionObjects::runTimeControls::averageCondition::~averageCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-bool Foam::averageCondition::apply()
+bool Foam::functionObjects::runTimeControls::averageCondition::apply()
 {
     bool satisfied = true;
 
@@ -152,7 +158,7 @@ bool Foam::averageCondition::apply()
 }
 
 
-void Foam::averageCondition::write()
+void Foam::functionObjects::runTimeControls::averageCondition::write()
 {
     dictionary& conditionDict = this->conditionDict();
 
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.H
similarity index 92%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.H
index 0734cda8fd9..ff499d61368 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::averageCondition
+    Foam::functionObjects::runTimeControls::averageCondition
 
 Description
     Average run time condition - satisfied when average does not change by
@@ -45,6 +45,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
                       Class averageCondition Declaration
@@ -102,7 +106,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -121,6 +125,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C
similarity index 94%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C
index d5d35ed61d7..9b0b1349870 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageConditionTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
 template<class Type>
-void Foam::averageCondition::calc
+void Foam::functionObjects::runTimeControls::averageCondition::calc
 (
     const word& fieldName,
     const scalar alpha,
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
similarity index 84%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
index 9db4093b8b8..4d5a580f025 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -31,6 +31,10 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(equationInitialResidualCondition, 0);
     addToRunTimeSelectionTable
@@ -40,30 +44,46 @@ namespace Foam
         dictionary
     );
 
-    template<>
-    const char* Foam::NamedEnum
-    <
-        equationInitialResidualCondition::operatingMode,
-        2
-    >::names[] =
-    {
-        "minimum",
-        "maximum"
-    };
-
-    const NamedEnum<Foam::equationInitialResidualCondition::operatingMode, 2>
-        Foam::equationInitialResidualCondition::operatingModeNames;
 }
+}
+}
+template<>
+const char* Foam::NamedEnum
+<
+    Foam
+  ::functionObjects
+  ::runTimeControls
+  ::equationInitialResidualCondition
+  ::operatingMode,
+    2
+>::names[] =
+{
+    "minimum",
+    "maximum"
+};
+
+const Foam::NamedEnum
+<
+    Foam
+  ::functionObjects
+  ::runTimeControls
+  ::equationInitialResidualCondition
+  ::operatingMode,
+    2
+>
+Foam::functionObjects::runTimeControls::equationInitialResidualCondition::
+    operatingModeNames;
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::equationInitialResidualCondition::equationInitialResidualCondition
+Foam::functionObjects::runTimeControls::equationInitialResidualCondition::
+equationInitialResidualCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     runTimeCondition(name, obr, dict, state),
@@ -84,14 +104,15 @@ Foam::equationInitialResidualCondition::equationInitialResidualCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::equationInitialResidualCondition::
+Foam::functionObjects::runTimeControls::equationInitialResidualCondition::
 ~equationInitialResidualCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-bool Foam::equationInitialResidualCondition::apply()
+bool Foam::functionObjects::runTimeControls::equationInitialResidualCondition::
+apply()
 {
     bool satisfied = false;
 
@@ -200,7 +221,8 @@ bool Foam::equationInitialResidualCondition::apply()
 }
 
 
-void Foam::equationInitialResidualCondition::write()
+void Foam::functionObjects::runTimeControls::equationInitialResidualCondition::
+write()
 {
     // do nothing
 }
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H
similarity index 84%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H
index 60a2163b7db..cbf53d276e6 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::equationInitialResidualCondition
+    Foam::functionObjects::runTimeControls::equationInitialResidualCondition
 
 Description
     Minimum or maximum initial residual run time condition
@@ -33,8 +33,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef equationInitialResidualCondition_H
-#define equationInitialResidualCondition_H
+#ifndef functionObjects_runTimeControls_equationInitialResidualCondition_H
+#define functionObjects_runTimeControls_equationInitialResidualCondition_H
 
 #include "runTimeCondition.H"
 #include "NamedEnum.H"
@@ -43,6 +43,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
               Class equationInitialResidualCondition Declaration
@@ -56,8 +60,8 @@ public:
 
     enum operatingMode
     {
-        omMin,
-        omMax
+        omMin,          //< Minimum
+        omMax           //< Maximum
     };
 
     static const NamedEnum<operatingMode, 2> operatingModeNames;
@@ -91,7 +95,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -110,6 +114,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
similarity index 89%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
index 0788cf81bf0..afac40bdced 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -31,6 +31,10 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(equationMaxIterCondition, 0);
     addToRunTimeSelectionTable
@@ -40,16 +44,19 @@ namespace Foam
         dictionary
     );
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::equationMaxIterCondition::equationMaxIterCondition
+Foam::functionObjects::runTimeControls::equationMaxIterCondition::
+equationMaxIterCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     runTimeCondition(name, obr, dict, state),
@@ -71,13 +78,14 @@ Foam::equationMaxIterCondition::equationMaxIterCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::equationMaxIterCondition::~equationMaxIterCondition()
+Foam::functionObjects::runTimeControls::equationMaxIterCondition::
+~equationMaxIterCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-bool Foam::equationMaxIterCondition::apply()
+bool Foam::functionObjects::runTimeControls::equationMaxIterCondition::apply()
 {
     bool satisfied = false;
 
@@ -164,7 +172,7 @@ bool Foam::equationMaxIterCondition::apply()
 }
 
 
-void Foam::equationMaxIterCondition::write()
+void Foam::functionObjects::runTimeControls::equationMaxIterCondition::write()
 {
     // do nothing
 }
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H
similarity index 86%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H
index d77ab68366a..d3538c22c7b 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::equationMaxIterCondition
+    Foam::functionObjects::runTimeControls::equationMaxIterCondition
 
 Description
     Maximum number of equation iterations run time condition
@@ -33,16 +33,19 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef equationMaxIterCondition_H
-#define equationMaxIterCondition_H
+#ifndef functionObjects_runTimeConditions_equationMaxIterCondition_H
+#define functionObjects_runTimeConditions_equationMaxIterCondition_H
 
 #include "runTimeCondition.H"
-#include "NamedEnum.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
                   Class equationMaxIterCondition Declaration
@@ -77,7 +80,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -96,6 +99,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
similarity index 86%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
index 26418217b69..7f741d2ec60 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.C
@@ -30,7 +30,8 @@ License
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
 template<>
-void Foam::minMaxCondition::setValue<Foam::scalar>
+void Foam::functionObjects::runTimeControls::minMaxCondition::
+setValue<Foam::scalar>
 (
     const word& valueType,
     const word& fieldName,
@@ -44,6 +45,10 @@ void Foam::minMaxCondition::setValue<Foam::scalar>
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(minMaxCondition, 0);
     addToRunTimeSelectionTable(runTimeCondition, minMaxCondition, dictionary);
@@ -55,19 +60,29 @@ namespace Foam
         "maximum"
     };
 }
+}
+}
 
-const Foam::NamedEnum<Foam::minMaxCondition::modeType, 2>
-    Foam::minMaxCondition::modeTypeNames_;
+const Foam::NamedEnum
+<
+    Foam
+  ::functionObjects
+  ::runTimeControls
+  ::minMaxCondition
+  ::modeType,
+   2
+>
+    Foam::functionObjects::runTimeControls::minMaxCondition::modeTypeNames_;
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::minMaxCondition::minMaxCondition
+Foam::functionObjects::runTimeControls::minMaxCondition::minMaxCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     runTimeCondition(name, obr, dict, state),
@@ -80,13 +95,13 @@ Foam::minMaxCondition::minMaxCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::minMaxCondition::~minMaxCondition()
+Foam::functionObjects::runTimeControls::minMaxCondition::~minMaxCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-bool Foam::minMaxCondition::apply()
+bool Foam::functionObjects::runTimeControls::minMaxCondition::apply()
 {
     bool satisfied = true;
 
@@ -156,7 +171,7 @@ bool Foam::minMaxCondition::apply()
 }
 
 
-void Foam::minMaxCondition::write()
+void Foam::functionObjects::runTimeControls::minMaxCondition::write()
 {
     // do nothing
 }
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H
similarity index 90%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H
index 7bd899d3fe9..8729530b7c2 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxCondition.H
@@ -34,8 +34,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef minMaxCondition_H
-#define minMaxCondition_H
+#ifndef functionObjects_runTimeControls_minMaxCondition_H
+#define functionObjects_runTimeControls_minMaxCondition_H
 
 #include "runTimeCondition.H"
 #include "NamedEnum.H"
@@ -44,6 +44,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
                        Class minMaxCondition Declaration
@@ -60,8 +64,8 @@ public:
         // Mode type
         enum modeType
         {
-            mdMin,
-            mdMax
+            mdMin,          //< Minimum
+            mdMax           //< Maximum
         };
 
         static const NamedEnum<modeType, 2> modeTypeNames_;
@@ -104,7 +108,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -130,6 +134,8 @@ void minMaxCondition::setValue<Foam::scalar>
     scalar& value
 ) const;
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C
similarity index 91%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C
index a8befe9cda9..f58a16a59ad 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minMaxCondition/minMaxConditionTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
 template<class Type>
-void Foam::minMaxCondition::setValue
+void Foam::functionObjects::runTimeControls::minMaxCondition::setValue
 (
     const word& valueType,
     const word& fieldName,
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
similarity index 84%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
index 4b91fd14dcd..e46070d4944 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.C
@@ -30,6 +30,10 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(minTimeStepCondition, 0);
     addToRunTimeSelectionTable
@@ -39,16 +43,19 @@ namespace Foam
         dictionary
     );
 }
+}
+}
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::minTimeStepCondition::minTimeStepCondition
+Foam::functionObjects::runTimeControls::minTimeStepCondition::
+minTimeStepCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     runTimeCondition(name, obr, dict, state),
@@ -58,13 +65,14 @@ Foam::minTimeStepCondition::minTimeStepCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::minTimeStepCondition::~minTimeStepCondition()
+Foam::functionObjects::runTimeControls::minTimeStepCondition::
+~minTimeStepCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-bool Foam::minTimeStepCondition::apply()
+bool Foam::functionObjects::runTimeControls::minTimeStepCondition::apply()
 {
     bool satisfied = false;
 
@@ -82,7 +90,7 @@ bool Foam::minTimeStepCondition::apply()
 }
 
 
-void Foam::minTimeStepCondition::write()
+void Foam::functionObjects::runTimeControls::minTimeStepCondition::write()
 {
     // do nothing
 }
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H
similarity index 82%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H
index b5088a162d6..a207a8a49ee 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/minTimeStepCondition/minTimeStepCondition.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,10 +22,10 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::minTimeStepCondition
+    Foam::functionObjects::runTimeControls::minTimeStepCondition
 
 Description
-    Initial residual run time condition
+    Minimum time step condition
 
 SourceFiles
     minTimeStepCondition.H
@@ -33,8 +33,8 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef minTimeStepCondition_H
-#define minTimeStepCondition_H
+#ifndef functionObjects_runTimeConditions_minTimeStepCondition_H
+#define functionObjects_runTimeConditions_minTimeStepCondition_H
 
 #include "runTimeCondition.H"
 #include "NamedEnum.H"
@@ -43,9 +43,13 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
-                Class minTimeStepCondition Declaration
+                    Class minTimeStepCondition Declaration
 \*---------------------------------------------------------------------------*/
 
 class minTimeStepCondition
@@ -71,7 +75,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -90,6 +94,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
similarity index 74%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
index 16bcc6cb940..d151422438a 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -28,15 +28,21 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(runTimeCondition, 0);
     defineRunTimeSelectionTable(runTimeCondition, dictionary);
 }
-
+}
+}
 
 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
 
-Foam::dictionary& Foam::runTimeCondition::setConditionDict()
+Foam::dictionary&
+Foam::functionObjects::runTimeControls::runTimeCondition::setConditionDict()
 {
     dictionary& propertyDict = state_.propertyDict();
 
@@ -49,13 +55,15 @@ Foam::dictionary& Foam::runTimeCondition::setConditionDict()
 }
 
 
-const Foam::dictionary& Foam::runTimeCondition::conditionDict() const
+const Foam::dictionary&
+Foam::functionObjects::runTimeControls::runTimeCondition::conditionDict() const
 {
     return conditionDict_;
 }
 
 
-Foam::dictionary& Foam::runTimeCondition::conditionDict()
+Foam::dictionary&
+Foam::functionObjects::runTimeControls::runTimeCondition::conditionDict()
 {
     return conditionDict_;
 }
@@ -63,12 +71,12 @@ Foam::dictionary& Foam::runTimeCondition::conditionDict()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::runTimeCondition::runTimeCondition
+Foam::functionObjects::runTimeControls::runTimeCondition::runTimeCondition
 (
     const word& name,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 :
     name_(name),
@@ -83,25 +91,27 @@ Foam::runTimeCondition::runTimeCondition
 
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
-Foam::runTimeCondition::~runTimeCondition()
+Foam::functionObjects::runTimeControls::runTimeCondition::~runTimeCondition()
 {}
 
 
 // * * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * //
 
-const Foam::word& Foam::runTimeCondition::name() const
+const Foam::word&
+Foam::functionObjects::runTimeControls::runTimeCondition::name() const
 {
     return name_;
 }
 
 
-bool Foam::runTimeCondition::active() const
+bool Foam::functionObjects::runTimeControls::runTimeCondition::active() const
 {
     return active_;
 }
 
 
-Foam::label Foam::runTimeCondition::groupID() const
+Foam::label
+Foam::functionObjects::runTimeControls::runTimeCondition::groupID() const
 {
     return groupID_;
 }
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H
similarity index 88%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H
index 752a0ad8ec5..905816e0a6c 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::runTimeCondition
+    Foam::functionObjects::runTimeControls::runTimeCondition
 
 Description
     Base class for run time conditions
@@ -34,10 +34,10 @@ SourceFiles
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef runTimeCondition_H
-#define runTimeCondition_H
+#ifndef functionObjects_runTimeControls_runTimeCondition_H
+#define functionObjects_runTimeControls_runTimeCondition_H
 
-#include "functionObjectState.H"
+#include "stateFunctionObject.H"
 #include "dictionary.H"
 #include "autoPtr.H"
 #include "runTimeSelectionTables.H"
@@ -47,6 +47,10 @@ SourceFiles
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 /*---------------------------------------------------------------------------*\
                       Class runTimeCondition Declaration
@@ -66,7 +70,7 @@ protected:
         const objectRegistry& obr_;
 
         //- State
-        functionObjectState& state_;
+        stateFunctionObject& state_;
 
         //- On/off switch
         bool active_;
@@ -109,7 +113,7 @@ public:
             const word& name,
             const objectRegistry& obr,
             const dictionary& dict,
-            functionObjectState& state
+            stateFunctionObject& state
         ),
         (name, obr, dict, state)
     );
@@ -121,7 +125,7 @@ public:
         const word& name,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
     //- Destructor
@@ -133,7 +137,7 @@ public:
         const word& conditionName,
         const objectRegistry& obr,
         const dictionary& dict,
-        functionObjectState& state
+        stateFunctionObject& state
     );
 
 
@@ -158,6 +162,8 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
similarity index 92%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
rename to src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
index 000dbe1142f..e97e428ad60 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C
@@ -27,12 +27,13 @@ License
 
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
-Foam::autoPtr<Foam::runTimeCondition> Foam::runTimeCondition::New
+Foam::autoPtr<Foam::functionObjects::runTimeControls::runTimeCondition>
+Foam::functionObjects::runTimeControls::runTimeCondition::New
 (
     const word& conditionName,
     const objectRegistry& obr,
     const dictionary& dict,
-    functionObjectState& state
+    stateFunctionObject& state
 )
 {
     word conditionType(dict.lookup("type"));
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C b/src/functionObjects/utilities/runTimeControl/runTimeControl.C
similarity index 64%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C
rename to src/functionObjects/utilities/runTimeControl/runTimeControl.C
index 31e417cfdb2..4b18e6f16db 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.C
+++ b/src/functionObjects/utilities/runTimeControl/runTimeControl.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -28,119 +28,116 @@ License
 #include "runTimeCondition.H"
 #include "fvMesh.H"
 #include "Time.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
+{
+namespace functionObjects
+{
+namespace runTimeControls
 {
     defineTypeNameAndDebug(runTimeControl, 0);
+    addToRunTimeSelectionTable(functionObject, runTimeControl, dictionary);
+}
+}
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::runTimeControl::runTimeControl
+Foam::functionObjects::runTimeControls::runTimeControl::runTimeControl
 (
     const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
+    const Time& runTime,
+    const dictionary& dict
 )
 :
-    functionObjectState(obr, name),
-    obr_(obr),
+    fvMeshFunctionObject(name, runTime, dict),
     conditions_(),
     groupMap_(),
     nWriteStep_(0),
     writeStepI_(0)
 {
-    // Check if the available mesh is an fvMesh, otherwise deactivate
-    if (setActive<fvMesh>())
-    {
-        read(dict);
-
-        // Check that some conditions are set
-        if (conditions_.empty())
-        {
-            Info<< type() << " " << name_ << " output:" << nl
-                << "    No conditions present - deactivating" << nl
-                << endl;
-
-            active_ = false;
-        }
-        else
-        {
-            // Check that at least one condition is active
-            active_ = false;
-            forAll(conditions_, conditionI)
-            {
-                if (conditions_[conditionI].active())
-                {
-                    active_ = true;
-                    break;
-                }
-            }
-
-            if (!active_)
-            {
-                Info<< type() << " " << name_ << " output:" << nl
-                    << "    All conditions inactive - deactivating" << nl
-                    << endl;
-            }
-        }
-    }
+    read(dict);
 }
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::runTimeControl::~runTimeControl()
+Foam::functionObjects::runTimeControls::runTimeControl::~runTimeControl()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::runTimeControl::read(const dictionary& dict)
+bool Foam::functionObjects::runTimeControls::runTimeControl::read
+(
+    const dictionary& dict
+)
 {
-    if (active_)
+    const dictionary& conditionsDict = dict.subDict("conditions");
+    const wordList conditionNames(conditionsDict.toc());
+    conditions_.setSize(conditionNames.size());
+
+    label uniqueGroupI = 0;
+    forAll(conditionNames, conditionI)
     {
-        const dictionary& conditionsDict = dict.subDict("conditions");
-        const wordList conditionNames(conditionsDict.toc());
-        conditions_.setSize(conditionNames.size());
+        const word& conditionName = conditionNames[conditionI];
+        const dictionary& dict = conditionsDict.subDict(conditionName);
 
-        label uniqueGroupI = 0;
-        forAll(conditionNames, conditionI)
-        {
-            const word& conditionName = conditionNames[conditionI];
-            const dictionary& dict = conditionsDict.subDict(conditionName);
+        conditions_.set
+        (
+            conditionI,
+            runTimeCondition::New(conditionName, obr_, dict, *this)
+        );
 
-            conditions_.set
-            (
-                conditionI,
-                runTimeCondition::New(conditionName, obr_, dict, *this)
-            );
+        label groupI = conditions_[conditionI].groupID();
 
-            label groupI = conditions_[conditionI].groupID();
+        if (groupMap_.insert(groupI, uniqueGroupI))
+        {
+            uniqueGroupI++;
+        }
+    }
+
+    dict.readIfPresent("nWriteStep", nWriteStep_);
 
-            if (groupMap_.insert(groupI, uniqueGroupI))
+    // Check that some conditions are set
+    if (conditions_.empty())
+    {
+        Info<< type() << " " << name() << " output:" << nl
+            << "    No conditions present" << nl
+            << endl;
+    }
+    else
+    {
+        // Check that at least one condition is active
+        bool active = false;
+        forAll(conditions_, conditionI)
+        {
+            if (conditions_[conditionI].active())
             {
-                uniqueGroupI++;
+                active = true;
+                break;
             }
         }
 
-        dict.readIfPresent("nWriteStep", nWriteStep_);
+        if (!active)
+        {
+            Info<< type() << " " << name() << " output:" << nl
+                << "    All conditions are inactive" << nl
+                << endl;
+        }
     }
+
+    return true;
 }
 
 
-void Foam::runTimeControl::execute()
+bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
 {
-    if (!active_)
-    {
-        return;
-    }
-
-    Info<< type() << " " << name_ << " output:" << nl;
+    Info<< type() << " " << name() << " output:" << nl;
 
     // IDs of satisfied conditions
     DynamicList<label> IDs(conditions_.size());
@@ -210,7 +207,7 @@ void Foam::runTimeControl::execute()
 
 
         // Set to write a data dump or finalise the calculation
-        Time& time = const_cast<Time&>(obr_.time());
+        Time& time = const_cast<Time&>(time_);
 
         if (writeStepI_ < nWriteStep_ - 1)
         {
@@ -231,30 +228,19 @@ void Foam::runTimeControl::execute()
     }
 
     Info<< endl;
-}
 
-
-void Foam::runTimeControl::end()
-{
-    // Do nothing
+    return true;
 }
 
 
-void Foam::runTimeControl::timeSet()
+bool Foam::functionObjects::runTimeControls::runTimeControl::write()
 {
-    // Do nothing
-}
-
-
-void Foam::runTimeControl::write()
-{
-    if (active_)
+    forAll(conditions_, conditionI)
     {
-        forAll(conditions_, conditionI)
-        {
-            conditions_[conditionI].write();
-        }
+        conditions_[conditionI].write();
     }
+
+    return true;
 }
 
 
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.H b/src/functionObjects/utilities/runTimeControl/runTimeControl.H
similarity index 73%
rename from src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.H
rename to src/functionObjects/utilities/runTimeControl/runTimeControl.H
index fff6c446485..19a2cb58995 100644
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControl.H
+++ b/src/functionObjects/utilities/runTimeControl/runTimeControl.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,14 +22,14 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::runTimeControl
+    Foam::functionObjects::runTimeControl
 
 Group
     grpJobControlFunctionObjects
 
 Description
-    This function object controls when the calculation is terminated based on
-    satisfying user-specified conditions.
+    Controls when the calculation is terminated based on satisfying
+    user-specified conditions.
 
     Optionally specify a number of write steps before the calculation is
     terminated.  Here, a write is performed each time that all conditons are
@@ -37,26 +37,25 @@ Description
 
 SourceFiles
     runTimeControl.C
-    IOrunTimeControl.H
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef runTimeControl_H
-#define runTimeControl_H
+#ifndef functionObjects_runTimeControl_H
+#define functionObjects_runTimeControl_H
 
-#include "functionObjectState.H"
+#include "fvMeshFunctionObject.H"
 #include "Map.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
+namespace functionObjects
+{
+namespace runTimeControls
+{
 
 // Forward declaration of classes
-class objectRegistry;
-class dictionary;
-class polyMesh;
-class mapPolyMesh;
 class runTimeCondition;
 
 /*---------------------------------------------------------------------------*\
@@ -65,13 +64,10 @@ class runTimeCondition;
 
 class runTimeControl
 :
-    public functionObjectState
+    public fvMeshFunctionObject
 {
     // Private data
 
-        //- Reference to the database
-        const objectRegistry& obr_;
-
         //- List of conditions to satisfy
         PtrList<runTimeCondition> conditions_;
 
@@ -107,9 +103,8 @@ public:
         runTimeControl
         (
             const word& name,
-            const objectRegistry&,
-            const dictionary&,
-            const bool loadFromFiles = false
+            const Time& runTime,
+            const dictionary& dict
         );
 
 
@@ -119,39 +114,24 @@ public:
 
     // Member Functions
 
-        //- Return name of the set of runTimeControl
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
         //- Read the runTimeControl data
-        virtual void read(const dictionary&);
+        virtual bool read(const dictionary&);
 
         //- Execute, currently does nothing
-        virtual void execute();
-
-        //- Execute at the final time-loop, currently does nothing
-        virtual void end();
+        virtual bool execute();
 
         //- Called when time was set at the end of the Time::operator++
         virtual void timeSet();
 
         //- Calculate the runTimeControl and write
-        virtual void write();
-
-        //- Update for changes of mesh
-        virtual void updateMesh(const mapPolyMesh&)
-        {}
-
-        //- Update for changes of mesh
-        virtual void movePoints(const polyMesh&)
-        {}
+        virtual bool write();
 };
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace runTimeControls
+} // End namespace functionObjects
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C b/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C
index a953049c555..1f57b3e19f7 100644
--- a/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C
+++ b/src/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C
@@ -109,7 +109,7 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
     lastIndex_ = -1;
     fileToUpdate_.expand();
 
-    Log << type() << " " << name_ << " output:" << nl
+    Log << type() << " " << name() << " output:" << nl
         << "    time vs file list:" << endl;
 
     forAll(timeVsFile_, i)
diff --git a/src/functionObjects/utilities/writeDictionary/writeDictionary.C b/src/functionObjects/utilities/writeDictionary/writeDictionary.C
index 58032fc7d9c..22c63d60d2f 100644
--- a/src/functionObjects/utilities/writeDictionary/writeDictionary.C
+++ b/src/functionObjects/utilities/writeDictionary/writeDictionary.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -65,7 +65,7 @@ bool Foam::functionObjects::writeDictionary::tryDirectory
         false
     );
 
-    if (dictIO.headerOk())
+    if (dictIO.typeHeaderOk<IOdictionary>(false))
     {
         IOdictionary dict(dictIO);
 
@@ -103,14 +103,7 @@ Foam::functionObjects::writeDictionary::writeDictionary
     const dictionary& dict
 )
 :
-    functionObject(name),
-    obr_
-    (
-        runTime.lookupObject<objectRegistry>
-        (
-            dict.lookupOrDefault("region", polyMesh::defaultRegion)
-        )
-    ),
+    regionFunctionObject(name, runTime, dict),
     dictNames_(),
     digests_()
 {
diff --git a/src/functionObjects/utilities/writeDictionary/writeDictionary.H b/src/functionObjects/utilities/writeDictionary/writeDictionary.H
index 57b80e1463a..bb3cbd4047e 100644
--- a/src/functionObjects/utilities/writeDictionary/writeDictionary.H
+++ b/src/functionObjects/utilities/writeDictionary/writeDictionary.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -38,7 +38,7 @@ SourceFiles
 #ifndef functionObjects_writeDictionary_H
 #define functionObjects_writeDictionary_H
 
-#include "functionObject.H"
+#include "regionFunctionObject.H"
 #include "wordList.H"
 #include "SHA1Digest.H"
 
@@ -59,13 +59,10 @@ namespace functionObjects
 
 class writeDictionary
 :
-    public functionObject
+    public regionFunctionObject
 {
     // Private data
 
-        //- Reference to the database
-        const objectRegistry& obr_;
-
         //- Names of dictionaries to monitor
         wordList dictNames_;
 
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
index 7a342f19984..6294da02a18 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -131,29 +131,32 @@ Foam::surfaceAlignedSBRStressFvMotionSolver::
 
 void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
 {
-    cellRot_.internalField() = Zero;
-    pointDisplacement_.internalField() = Zero;
+    cellRot_.primitiveFieldRef() = Zero;
+    pointDisplacement_.primitiveFieldRef() = Zero;
 
     // Find intersections
     pointField start(fvMesh_.nInternalFaces());
     pointField end(start.size());
 
+    const vectorField& Cc = fvMesh_.cellCentres();
+    const polyBoundaryMesh& pbm = fvMesh_.boundaryMesh();
+
     for (label faceI = 0; faceI < fvMesh_.nInternalFaces(); faceI++)
     {
-        start[faceI] = fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
-        end[faceI] = fvMesh_.cellCentres()[fvMesh_.faceNeighbour()[faceI]];
+        start[faceI] = Cc[fvMesh_.faceOwner()[faceI]];
+        end[faceI] = Cc[fvMesh_.faceNeighbour()[faceI]];
     }
 
     DynamicList<label> hitCells;
 
-    forAll(surfaceMesh_, surfI)
+    forAll(surfaceMesh_, surfi)
     {
         List<pointIndexHit> hit(start.size());
-        surfaceMesh_[surfI].findLineAny(start, end, hit);
+        surfaceMesh_[surfi].findLineAny(start, end, hit);
 
         labelField pointsCount(fvMesh_.nPoints(), 1);
 
-        const vectorField& nf = surfaceMesh_[surfI].faceNormals();
+        const vectorField& nf = surfaceMesh_[surfi].faceNormals();
 
         const vectorField& SfMesh = fvMesh_.faceAreas();
 
@@ -161,54 +164,45 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
 
         DynamicList<label> cellsHit;
 
-        forAll(hit, faceI)
+        forAll(hit, facei)
         {
-            if (hit[faceI].hit())
+            if (hit[facei].hit())
             {
                 label rotCellId(-1);
-                const vector hitPoint = hit[faceI].hitPoint();
+                const vector hitPoint = hit[facei].hitPoint();
 
-                if (fvMesh_.isInternalFace(faceI))
+                if (fvMesh_.isInternalFace(facei))
                 {
-                    const vector cCOne =
-                        fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
-
-                    const vector cCTwo =
-                        fvMesh_.cellCentres()[fvMesh_.faceNeighbour()[faceI]];
+                    const vector cCOne = Cc[fvMesh_.faceOwner()[facei]];
+                    const vector cCTwo = Cc[fvMesh_.faceNeighbour()[facei]];
 
                     if (mag(cCOne - hitPoint) < mag(cCTwo - hitPoint))
                     {
-                        rotCellId = fvMesh_.faceOwner()[faceI];
+                        rotCellId = fvMesh_.faceOwner()[facei];
                     }
                     else
                     {
-                        rotCellId = fvMesh_.faceNeighbour()[faceI];
+                        rotCellId = fvMesh_.faceNeighbour()[facei];
                     }
                 }
                 else
                 {
-                    label patchI = fvMesh_.boundaryMesh().whichPatch(faceI);
-                    if
-                    (
-                        isA<processorPolyPatch>(fvMesh_.boundaryMesh()[patchI])
-                    )
+                    label patchi = pbm.whichPatch(facei);
+                    if (isA<processorPolyPatch>(pbm[patchi]))
                     {
-                        const point& ownCc =
-                            fvMesh_.cellCentres()[fvMesh_.faceOwner()[faceI]];
+                        const point& ownCc = Cc[fvMesh_.faceOwner()[facei]];
 
                         const vector cCentreOne = ownCc - hitPoint;
 
                         const vector nbrCc =
-                            refCast<const processorPolyPatch>
-                            (
-                                fvMesh_.boundaryMesh()[patchI]
-                            ).neighbFaceCellCentres()[faceI];
+                            refCast<const processorPolyPatch>(pbm[patchi])
+                                .neighbFaceCellCentres()[facei];
 
                         const vector cCentreTwo = nbrCc - hitPoint;
 
                         if (cCentreOne < cCentreTwo)
                         {
-                            rotCellId = fvMesh_.faceOwner()[faceI];
+                            rotCellId = fvMesh_.faceOwner()[facei];
                         }
                     }
                 }
@@ -228,7 +222,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
                     forAll(cFaces, k)
                     {
                         scalar tmp =
-                            mag(nf[hit[faceI].index()] & nSfMesh[cFaces[k]]);
+                            mag(nf[hit[facei].index()] & nSfMesh[cFaces[k]]);
 
                         if (tmp > cosMax)
                         {
@@ -248,7 +242,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
                     )
                     {
                         cellRot_[rotCellId] =
-                            nSfMesh[faceId] ^ nf[hit[faceI].index()];
+                            nSfMesh[faceId]^nf[hit[facei].index()];
 
                         const scalar magRot = mag(cellRot_[rotCellId]);
 
@@ -279,13 +273,12 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
             }
         }
 
-        forAll(pointDisplacement_.internalField(), iPoint)
+        vectorField& pd = pointDisplacement_.primitiveFieldRef();
+        forAll(pd, pointi)
         {
-            vector& point = pointDisplacement_.internalField()[iPoint];
-            point /= pointsCount[iPoint];
+            vector& point = pd[pointi];
+            point /= pointsCount[pointi];
         }
-
-
     }
 }
 
@@ -367,7 +360,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
     volScalarField& mu =  tmu.ref();
 
     const scalarList& V = fvMesh_.V();
-    mu.internalField() = (1.0/V);
+    mu.primitiveFieldRef() = (1.0/V);
 
     const volScalarField lambda(-mu);
 
@@ -379,8 +372,8 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
     const volSymmTensorField magNewSigmaD(sigmaD_ + accFactor_*newSigmaD);
 
     const scalar diffSigmaD =
-        gSum(mag(sigmaD_.oldTime().internalField()))
-     -  gSum(mag(magNewSigmaD.internalField()));
+        gSum(mag(sigmaD_.oldTime().primitiveField()))
+     -  gSum(mag(magNewSigmaD.primitiveField()));
 
     if (mag(diffSigmaD) > minSigmaDiff_)
     {
@@ -388,7 +381,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
     }
 
     const surfaceScalarField Df(diffusivity().operator()());
-    pointDisplacement_.boundaryField().updateCoeffs();
+    pointDisplacement_.boundaryFieldRef().updateCoeffs();
 
     const volTensorField gradCd(fvc::grad(cellDisp));
 
@@ -420,4 +413,5 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
     }
 }
 
+
 // ************************************************************************* //
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.H
index 77f83e5ad54..d0bac6c0484 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.H
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
index b5eee19c000..4f9cc95106f 100644
--- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
+++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
@@ -68,8 +68,8 @@ void Foam::patchCorrectedInterpolation::interpolateType
 
     // Set the point displacement to the uncorrected result everywhere except
     // for on the boundary
-    pointDisplacement.internalField() =
-        pointUncorrectedDisplacement.internalField();
+    pointDisplacement.primitiveFieldRef() =
+        pointUncorrectedDisplacement.primitiveField();
     pointDisplacement.correctBoundaryConditions();
 
     // Set the residual displacement as the difference between the boundary
@@ -136,10 +136,10 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups
         // Calculate the weight and add to weighted sum
         const scalarField patchWeight
         (
-            1/max(sqr(patchDistance.internalField()), SMALL)
+            1/max(sqr(patchDistance.primitiveField()), SMALL)
         );
-        data.internalField() += patchWeight*patchData.internalField();
-        weight.internalField() += patchWeight;
+        data.primitiveFieldRef() += patchWeight*patchData.primitiveField();
+        weight.primitiveFieldRef() += patchWeight;
     }
 
     // Complete the average
@@ -150,52 +150,52 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups
 template <class Type>
 void Foam::patchCorrectedInterpolation::propagateDataFromPatchGroup
 (
-    const label patchGroupI,
+    const label patchGroupi,
     pointScalarField& distance,
     GeometricField<Type, pointPatchField, pointMesh>& data
 ) const
 {
-    const labelList& patchGroup(patchGroups_[patchGroupI]);
+    const labelList& patchGroup(patchGroups_[patchGroupi]);
 
     // Get the size of the seed info
     label nSeedInfo(0);
-    forAll(patchGroup, patchGroupI)
+    forAll(patchGroup, patchGroupi)
     {
-        const label patchI(patchGroup[patchGroupI]);
+        const label patchi(patchGroup[patchGroupi]);
 
-        nSeedInfo += data.boundaryField()[patchI].size();
+        nSeedInfo += data.boundaryField()[patchi].size();
     }
 
     // Generate the seed labels and info
     labelList seedLabels(nSeedInfo);
     List<PointData<Type>> seedInfo(nSeedInfo);
     nSeedInfo = 0;
-    forAll(patchGroup, patchGroupI)
+    forAll(patchGroup, patchGroupi)
     {
-        const label patchI(patchGroup[patchGroupI]);
+        const label patchi(patchGroup[patchGroupi]);
 
-        pointPatchField<Type>& patchDataField(data.boundaryField()[patchI]);
+        pointPatchField<Type>& patchDataField(data.boundaryFieldRef()[patchi]);
 
         patchDataField.updateCoeffs();
 
         const pointPatch& patch(patchDataField.patch());
         const Field<Type> patchData(patchDataField.patchInternalField());
 
-        forAll(patch.meshPoints(), patchPointI)
+        forAll(patch.meshPoints(), patchPointi)
         {
-            const label pointI(patch.meshPoints()[patchPointI]);
+            const label pointi(patch.meshPoints()[patchPointi]);
 
-            seedLabels[nSeedInfo] = pointI;
+            seedLabels[nSeedInfo] = pointi;
 
             seedInfo[nSeedInfo] =
                 PointData<Type>
                 (
-                    mesh().points()[pointI],
+                    mesh().points()[pointi],
                     0,
-                    patchData[patchPointI]
+                    patchData[patchPointi]
                 );
 
-            nSeedInfo ++;
+            nSeedInfo++;
         }
     }
 
@@ -213,10 +213,10 @@ void Foam::patchCorrectedInterpolation::propagateDataFromPatchGroup
     );
 
     // Copy result into the fields
-    forAll(allPointInfo, pointI)
+    forAll(allPointInfo, pointi)
     {
-        distance[pointI] = sqrt(allPointInfo[pointI].distSqr());
-        data[pointI] = allPointInfo[pointI].data();
+        distance[pointi] = sqrt(allPointInfo[pointi].distSqr());
+        data[pointi] = allPointInfo[pointi].data();
     }
 }
 
diff --git a/src/fvOptions/Make/files b/src/fvOptions/Make/files
index 64aa00f514e..889ddebabb8 100644
--- a/src/fvOptions/Make/files
+++ b/src/fvOptions/Make/files
@@ -52,10 +52,11 @@ $(interRegion)/interRegionExplicitPorositySource/interRegionExplicitPorositySour
 
 
 /* Constraints */
+generalConstraints=constraints/general
+$(generalConstraints)/fixedValueConstraint/fixedValueConstraints.C
 
-constraints/fixedValueConstraint/fixedValueConstraints.C
-constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C
-
+derivedConstraints=constraints/derived
+$(derivedConstraints)/fixedTemperatureConstraint/fixedTemperatureConstraint.C
 $(derivedConstraints)/velocityDampingConstraint/velocityDampingConstraint.C
 
 /* Corrections */
diff --git a/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C
similarity index 100%
rename from src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C
rename to src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C
diff --git a/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.H b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H
similarity index 100%
rename from src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.H
rename to src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H
diff --git a/src/fvOptions/constraints/fixedValueConstraint/FixedValueConstraint.C b/src/fvOptions/constraints/general/fixedValueConstraint/FixedValueConstraint.C
similarity index 100%
rename from src/fvOptions/constraints/fixedValueConstraint/FixedValueConstraint.C
rename to src/fvOptions/constraints/general/fixedValueConstraint/FixedValueConstraint.C
diff --git a/src/fvOptions/constraints/fixedValueConstraint/FixedValueConstraint.H b/src/fvOptions/constraints/general/fixedValueConstraint/FixedValueConstraint.H
similarity index 100%
rename from src/fvOptions/constraints/fixedValueConstraint/FixedValueConstraint.H
rename to src/fvOptions/constraints/general/fixedValueConstraint/FixedValueConstraint.H
diff --git a/src/fvOptions/constraints/fixedValueConstraint/fixedValueConstraints.C b/src/fvOptions/constraints/general/fixedValueConstraint/fixedValueConstraints.C
similarity index 100%
rename from src/fvOptions/constraints/fixedValueConstraint/fixedValueConstraints.C
rename to src/fvOptions/constraints/general/fixedValueConstraint/fixedValueConstraints.C
diff --git a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C
index 8b5cad4be59..767f0224897 100644
--- a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C
+++ b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C
@@ -52,7 +52,7 @@ namespace fv
 
 void Foam::fv::acousticDampingSource::setBlendingFactor()
 {
-    blendFactor_.internalField() = 1;
+    blendFactor_.primitiveFieldRef() = 1;
 
     const vectorField& Cf = mesh_.C();
 
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C
index 0cb51e13bbd..4190a1deb2b 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -254,7 +254,7 @@ void Foam::fv::tabulatedNTUHeatTransfer::calculateHtc()
     const scalarField mDotNbr(UMagNbrMapped*rhoNbrMapped*AinNbr_);
 
 
-    scalarField& htcc = htc_.internalField();
+    scalarField& htcc = htc_.primitiveFieldRef();
     const interpolation2DTable<Foam::scalar>& ntuTable = this->ntuTable();
 
     forAll(htcc, cellI)
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
index caf914c18ef..c4c4ddda835 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
@@ -291,7 +291,7 @@ bool Foam::KinematicParcel<ParcelType>::move
         if (p.active() && tracking && (magU > ROOTVSMALL))
         {
             const scalar d = dt*magU;
-            const scalar deltaLMax = solution.deltaLMax(cellLengthScale[cellI]);
+            const scalar deltaLMax = solution.deltaLMax(cellLengthScale[celli]);
             const scalar dCorr = min(d, deltaLMax);
             dt *=
                 dCorr/d
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C
index 713d6df68a8..e9c4bc33e28 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C
@@ -219,8 +219,8 @@ void Foam::patchInjectionBase::setPositionAndCell
             (
                 position,
                 cellOwner,
-                tetFaceI,
-                tetPtI
+                tetFacei,
+                tetPti
             );
         }
         else
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
index 528833adbdc..942c89b22e4 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
@@ -110,7 +110,7 @@ Foam::PatchInteractionModel<CloudType>::PatchInteractionModel
 )
 :
     CloudSubModelBase<CloudType>(owner),
-    UName_("unknown_U")
+    UName_("unknown_U"),
     escapedParcels_(0),
     escapedMass_(0.0)
 {}
@@ -125,7 +125,7 @@ Foam::PatchInteractionModel<CloudType>::PatchInteractionModel
 )
 :
     CloudSubModelBase<CloudType>(owner, dict, typeName, type),
-    UName_(this->coeffDict().lookupOrDefault("U", word("U")))
+    UName_(this->coeffDict().lookupOrDefault("U", word("U"))),
     escapedParcels_(0),
     escapedMass_(0.0)
 {}
@@ -188,7 +188,7 @@ void Foam::PatchInteractionModel<CloudType>::info(Ostream& os)
         << "      - escape                      = " << escapedParcelsTotal
         << ", " << escapedMassTotal << endl;
 
-    if (this->outputTime())
+    if (this->writeTime())
     {
         this->setBaseProperty("escapedParcels", escapedParcelsTotal);
         escapedParcels_ = 0;
diff --git a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
index e41e4ab828c..c6d79d45b16 100644
--- a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
+++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
@@ -755,7 +755,7 @@ Foam::labelList Foam::shellSurfaces::maxGapLevel() const
 
     forAll(extendedGapLevel_, shelli)
     {
-        const List<FixedList<label, 3>>& levels = extendedGapLevel_[shellI];
+        const List<FixedList<label, 3>>& levels = extendedGapLevel_[shelli];
         forAll(levels, i)
         {
             surfaceMax[shelli] = max(surfaceMax[shelli], levels[i][2]);
diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
index 154526895dd..967f57cfc08 100644
--- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
@@ -2750,6 +2750,8 @@ bool Foam::snappyLayerDriver::writeLayerData
             {
                 fld[cellI] = cellNLayers[cellI];
             }
+            volScalarField::Boundary& fldBf = fld.boundaryFieldRef();
+
             const polyBoundaryMesh& pbm = mesh.boundaryMesh();
             forAll(patchIDs, i)
             {
@@ -2761,7 +2763,7 @@ bool Foam::snappyLayerDriver::writeLayerData
                 {
                     pfld[i] = cellNLayers[faceCells[i]];
                 }
-                fld.boundaryField()[patchI] == pfld;
+                fldBf[patchI] == pfld;
             }
             Info<< indent << fld.name() << "    : actual number of layers"
                 << endl;
@@ -2784,14 +2786,12 @@ bool Foam::snappyLayerDriver::writeLayerData
                 dimensionedScalar("zero", dimless, 0),
                 fixedValueFvPatchScalarField::typeName
             );
+            volScalarField::Boundary& fldBf = fld.boundaryFieldRef();
             const polyBoundaryMesh& pbm = mesh.boundaryMesh();
             forAll(patchIDs, i)
             {
                 label patchI = patchIDs[i];
-                fld.boundaryField()[patchI] == pbm[patchI].patchSlice
-                (
-                    faceRealThickness
-                );
+                fldBf[patchI] == pbm[patchI].patchSlice(faceRealThickness);
             }
             Info<< indent << fld.name() << "         : overall layer thickness"
                 << endl;
diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
index d429f77b6b4..f243c2eeb3a 100644
--- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
@@ -847,6 +847,8 @@ void Foam::snappySnapDriver::preSmoothPatch
         Info<< "Smoothing patch points ..." << endl;
     }
 
+    vectorField& pointDisp = meshMover.pointDisplacement().primitiveFieldRef();
+
     for
     (
         label smoothIter = 0;
@@ -865,8 +867,7 @@ void Foam::snappySnapDriver::preSmoothPatch
         if (snapParams.nSmoothInternal() > smoothIter)
         {
             // Override values on internal points on refinement interfaces
-            meshMover.pointDisplacement().internalField() =
-                smoothInternalDisplacement(meshRefiner, meshMover);
+            pointDisp = smoothInternalDisplacement(meshRefiner, meshMover);
         }
 
         // Smooth the patch points
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
index 7d50ef147dc..3e73a365969 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
@@ -352,7 +352,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
                 newSubMap.setSize(elems.size());
 
                 labelList oldToNew(targetCoarseSize, -1);
-                label newI = 0;
+                label newi = 0;
 
                 forAll(elems, i)
                 {
@@ -360,12 +360,12 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
                     label coarseElem = allRestrict[fineElem];
                     if (oldToNew[coarseElem] == -1)
                     {
-                        oldToNew[coarseElem] = newI;
+                        oldToNew[coarseElem] = newi;
                         newSubMap[newi] = coarseElem;
-                        newI++;
+                        newi++;
                     }
                 }
-                newSubMap.setSize(newI);
+                newSubMap.setSize(newi);
             }
         }
 
@@ -399,7 +399,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
             }
         }
 
-        label compactI = targetCoarseSize;
+        label compacti = targetCoarseSize;
 
         // Compact data from other processors
         forAll(map.constructMap(), proci)
@@ -431,7 +431,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
 
                     // Combine locally data coming from proci
                     labelList oldToNew(remoteTargetCoarseSize, -1);
-                    label newI = 0;
+                    label newi = 0;
 
                     forAll(elems, i)
                     {
@@ -452,7 +452,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
                             tgtCompactMap[fineElem] = newConstructMap[compacti];
                         }
                     }
-                    newConstructMap.setSize(newI);
+                    newConstructMap.setSize(newi);
                 }
             }
         }
@@ -495,7 +495,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
         (
             new mapDistribute
             (
-                compactI,
+                compacti,
                 tgtSubMap.xfer(),
                 tgtConstructMap.xfer()
             )
@@ -997,7 +997,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
         forAll(srcAddress_, i)
         {
             labelList& addressing = srcAddress_[i];
-            forAll(addressing, addrI)
+            forAll(addressing, addri)
             {
                 addressing[addri] = tgtFaceIDs[addressing[addri]];
             }
diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.C b/src/meshTools/algorithms/MeshWave/FaceCellWave.C
index f51b33af809..8518350e809 100644
--- a/src/meshTools/algorithms/MeshWave/FaceCellWave.C
+++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -49,10 +49,11 @@ int Foam::FaceCellWave<Type, TrackingData>::dummyTrackData_ = 12345;
 
 namespace Foam
 {
-    //- Combine operator for AMIInterpolation
     template<class Type, class TrackingData>
     class combine
     {
+        //- Combine operator for AMIInterpolation
+
         FaceCellWave<Type, TrackingData>& solver_;
 
         const cyclicAMIPolyPatch& patch_;
@@ -73,26 +74,26 @@ namespace Foam
             void operator()
             (
                 Type& x,
-                const label faceI,
+                const label facei,
                 const Type& y,
                 const scalar weight
             ) const
             {
                 if (y.valid(solver_.data()))
                 {
-                    label meshFaceI = -1;
+                    label meshFacei = -1;
                     if (patch_.owner())
                     {
-                        meshFaceI = patch_.start() + faceI;
+                        meshFacei = patch_.start() + facei;
                     }
                     else
                     {
-                        meshFaceI = patch_.neighbPatch().start() + faceI;
+                        meshFacei = patch_.neighbPatch().start() + facei;
                     }
                     x.updateFace
                     (
                         solver_.mesh(),
-                        meshFaceI,
+                        meshFacei,
                         y,
                         solver_.propagationTol(),
                         solver_.data()
@@ -103,24 +104,24 @@ namespace Foam
 }
 
 
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Update info for cellI, at position pt, with information from
-// neighbouring face/cell.
-// Updates:
-//      - changedCell_, changedCells_, nChangedCells_,
-//      - statistics: nEvals_, nUnvisitedCells_
 template<class Type, class TrackingData>
 bool Foam::FaceCellWave<Type, TrackingData>::updateCell
 (
-    const label cellI,
-    const label neighbourFaceI,
+    const label celli,
+    const label neighbourFacei,
     const Type& neighbourInfo,
     const scalar tol,
     Type& cellInfo
 )
 {
+    // Update info for celli, at position pt, with information from
+    // neighbouring face/cell.
+    // Updates:
+    //      - changedCell_, changedCells_
+    //      - statistics: nEvals_, nUnvisitedCells_
+
     nEvals_++;
 
     bool wasValid = cellInfo.valid(td_);
@@ -129,8 +130,8 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
         cellInfo.updateCell
         (
             mesh_,
-            cellI,
-            neighbourFaceI,
+            celli,
+            neighbourFacei,
             neighbourInfo,
             tol,
             td_
@@ -138,10 +139,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
 
     if (propagate)
     {
-        if (!changedCell_[cellI])
+        if (!changedCell_[celli])
         {
-            changedCell_[cellI] = true;
-            changedCells_[nChangedCells_++] = cellI;
+            changedCell_[celli] = true;
+            changedCells_.append(celli);
         }
     }
 
@@ -154,21 +155,22 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
 }
 
 
-// Update info for faceI, at position pt, with information from
-// neighbouring face/cell.
-// Updates:
-//      - changedFace_, changedFaces_, nChangedFaces_,
-//      - statistics: nEvals_, nUnvisitedFaces_
 template<class Type, class TrackingData>
 bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 (
-    const label faceI,
-    const label neighbourCellI,
+    const label facei,
+    const label neighbourCelli,
     const Type& neighbourInfo,
     const scalar tol,
     Type& faceInfo
 )
 {
+    // Update info for facei, at position pt, with information from
+    // neighbouring face/cell.
+    // Updates:
+    //      - changedFace_, changedFaces_,
+    //      - statistics: nEvals_, nUnvisitedFaces_
+
     nEvals_++;
 
     bool wasValid = faceInfo.valid(td_);
@@ -177,8 +179,8 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
         faceInfo.updateFace
         (
             mesh_,
-            faceI,
-            neighbourCellI,
+            facei,
+            neighbourCelli,
             neighbourInfo,
             tol,
             td_
@@ -186,10 +188,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 
     if (propagate)
     {
-        if (!changedFace_[faceI])
+        if (!changedFace_[facei])
         {
-            changedFace_[faceI] = true;
-            changedFaces_[nChangedFaces_++] = faceI;
+            changedFace_[facei] = true;
+            changedFaces_.append(facei);
         }
     }
 
@@ -202,20 +204,21 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 }
 
 
-// Update info for faceI, at position pt, with information from
-// same face.
-// Updates:
-//      - changedFace_, changedFaces_, nChangedFaces_,
-//      - statistics: nEvals_, nUnvisitedFaces_
 template<class Type, class TrackingData>
 bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 (
-    const label faceI,
+    const label facei,
     const Type& neighbourInfo,
     const scalar tol,
     Type& faceInfo
 )
 {
+    // Update info for facei, at position pt, with information from
+    // same face.
+    // Updates:
+    //      - changedFace_, changedFaces_,
+    //      - statistics: nEvals_, nUnvisitedFaces_
+
     nEvals_++;
 
     bool wasValid = faceInfo.valid(td_);
@@ -224,7 +227,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
         faceInfo.updateFace
         (
             mesh_,
-            faceI,
+            facei,
             neighbourInfo,
             tol,
             td_
@@ -232,10 +235,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 
     if (propagate)
     {
-        if (!changedFace_[faceI])
+        if (!changedFace_[facei])
         {
-            changedFace_[faceI] = true;
-            changedFaces_[nChangedFaces_++] = faceI;
+            changedFace_[facei] = true;
+            changedFaces_.append(facei);
         }
     }
 
@@ -248,20 +251,21 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
 }
 
 
-// For debugging: check status on both sides of cyclic
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
 (
     const polyPatch& patch
 ) const
 {
+    // For debugging: check status on both sides of cyclic
+
     const cyclicPolyPatch& nbrPatch =
         refCast<const cyclicPolyPatch>(patch).neighbPatch();
 
-    forAll(patch, patchFaceI)
+    forAll(patch, patchFacei)
     {
-        label i1 = patch.start() + patchFaceI;
-        label i2 = nbrPatch.start() + patchFaceI;
+        label i1 = patch.start() + patchFacei;
+        label i2 = nbrPatch.start() + patchFacei;
 
         if
         (
@@ -293,14 +297,13 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
 }
 
 
-// Check if has cyclic patches
 template<class Type, class TrackingData>
 template<class PatchType>
 bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
 {
-    forAll(mesh_.boundaryMesh(), patchI)
+    forAll(mesh_.boundaryMesh(), patchi)
     {
-        if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
+        if (isA<PatchType>(mesh_.boundaryMesh()[patchi]))
         {
             return true;
         }
@@ -309,7 +312,6 @@ bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
 }
 
 
-// Copy face information into member data
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo
 (
@@ -317,30 +319,29 @@ void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo
     const List<Type>& changedFacesInfo
 )
 {
-    forAll(changedFaces, changedFaceI)
+    forAll(changedFaces, changedFacei)
     {
-        label faceI = changedFaces[changedFaceI];
+        label facei = changedFaces[changedFacei];
 
-        bool wasValid = allFaceInfo_[faceI].valid(td_);
+        bool wasValid = allFaceInfo_[facei].valid(td_);
 
-        // Copy info for faceI
-        allFaceInfo_[faceI] = changedFacesInfo[changedFaceI];
+        // Copy info for facei
+        allFaceInfo_[facei] = changedFacesInfo[changedFacei];
 
         // Maintain count of unset faces
-        if (!wasValid && allFaceInfo_[faceI].valid(td_))
+        if (!wasValid && allFaceInfo_[facei].valid(td_))
         {
             --nUnvisitedFaces_;
         }
 
-        // Mark faceI as changed, both on list and on face itself.
+        // Mark facei as changed, both on list and on face itself.
 
-        changedFace_[faceI] = true;
-        changedFaces_[nChangedFaces_++] = faceI;
+        changedFace_[facei] = true;
+        changedFaces_.append(facei);
     }
 }
 
 
-// Merge face information into member data
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo
 (
@@ -350,20 +351,22 @@ void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo
     const List<Type>& changedFacesInfo
 )
 {
-    for (label changedFaceI = 0; changedFaceI < nFaces; changedFaceI++)
+    // Merge face information into member data
+
+    for (label changedFacei = 0; changedFacei < nFaces; changedFacei++)
     {
-        const Type& neighbourWallInfo = changedFacesInfo[changedFaceI];
-        label patchFaceI = changedFaces[changedFaceI];
+        const Type& neighbourWallInfo = changedFacesInfo[changedFacei];
+        label patchFacei = changedFaces[changedFacei];
 
-        label meshFaceI = patch.start() + patchFaceI;
+        label meshFacei = patch.start() + patchFacei;
 
-        Type& currentWallInfo = allFaceInfo_[meshFaceI];
+        Type& currentWallInfo = allFaceInfo_[meshFacei];
 
         if (!currentWallInfo.equal(neighbourWallInfo, td_))
         {
             updateFace
             (
-                meshFaceI,
+                meshFacei,
                 neighbourWallInfo,
                 propagationTol_,
                 currentWallInfo
@@ -373,31 +376,31 @@ void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo
 }
 
 
-// Construct compact patchFace change arrays for a (slice of a) single patch.
-// changedPatchFaces in local patch numbering.
-// Return length of arrays.
 template<class Type, class TrackingData>
 Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces
 (
     const polyPatch& patch,
-    const label startFaceI,
+    const label startFacei,
     const label nFaces,
     labelList& changedPatchFaces,
     List<Type>& changedPatchFacesInfo
 ) const
 {
+    // Construct compact patchFace change arrays for a (slice of a) single
+    // patch. changedPatchFaces in local patch numbering.
+    // Return length of arrays.
     label nChangedPatchFaces = 0;
 
     for (label i = 0; i < nFaces; i++)
     {
-        label patchFaceI = i + startFaceI;
+        label patchFacei = i + startFacei;
 
-        label meshFaceI = patch.start() + patchFaceI;
+        label meshFacei = patch.start() + patchFacei;
 
-        if (changedFace_[meshFaceI])
+        if (changedFace_[meshFacei])
         {
-            changedPatchFaces[nChangedPatchFaces] = patchFaceI;
-            changedPatchFacesInfo[nChangedPatchFaces] = allFaceInfo_[meshFaceI];
+            changedPatchFaces[nChangedPatchFaces] = patchFacei;
+            changedPatchFacesInfo[nChangedPatchFaces] = allFaceInfo_[meshFacei];
             nChangedPatchFaces++;
         }
     }
@@ -405,7 +408,6 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces
 }
 
 
-// Handle leaving domain. Implementation referred to Type
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::leaveDomain
 (
@@ -415,19 +417,20 @@ void Foam::FaceCellWave<Type, TrackingData>::leaveDomain
     List<Type>& faceInfo
 ) const
 {
+    // Handle leaving domain. Implementation referred to Type
+
     const vectorField& fc = mesh_.faceCentres();
 
     for (label i = 0; i < nFaces; i++)
     {
-        label patchFaceI = faceLabels[i];
+        label patchFacei = faceLabels[i];
 
-        label meshFaceI = patch.start() + patchFaceI;
-        faceInfo[i].leaveDomain(mesh_, patch, patchFaceI, fc[meshFaceI], td_);
+        label meshFacei = patch.start() + patchFacei;
+        faceInfo[i].leaveDomain(mesh_, patch, patchFacei, fc[meshFacei], td_);
     }
 }
 
 
-// Handle entering domain. Implementation referred to Type
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::enterDomain
 (
@@ -437,19 +440,20 @@ void Foam::FaceCellWave<Type, TrackingData>::enterDomain
     List<Type>& faceInfo
 ) const
 {
+    // Handle entering domain. Implementation referred to Type
+
     const vectorField& fc = mesh_.faceCentres();
 
     for (label i = 0; i < nFaces; i++)
     {
-        label patchFaceI = faceLabels[i];
+        label patchFacei = faceLabels[i];
 
-        label meshFaceI = patch.start() + patchFaceI;
-        faceInfo[i].enterDomain(mesh_, patch, patchFaceI, fc[meshFaceI], td_);
+        label meshFacei = patch.start() + patchFacei;
+        faceInfo[i].enterDomain(mesh_, patch, patchFacei, fc[meshFacei], td_);
     }
 }
 
 
-// Transform. Implementation referred to Type
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::transform
 (
@@ -458,26 +462,27 @@ void Foam::FaceCellWave<Type, TrackingData>::transform
     List<Type>& faceInfo
 )
 {
+    // Transform. Implementation referred to Type
+
     if (rotTensor.size() == 1)
     {
         const tensor& T = rotTensor[0];
 
-        for (label faceI = 0; faceI < nFaces; faceI++)
+        for (label facei = 0; facei < nFaces; facei++)
         {
-            faceInfo[faceI].transform(mesh_, T, td_);
+            faceInfo[facei].transform(mesh_, T, td_);
         }
     }
     else
     {
-        for (label faceI = 0; faceI < nFaces; faceI++)
+        for (label facei = 0; facei < nFaces; facei++)
         {
-            faceInfo[faceI].transform(mesh_, rotTensor[faceI], td_);
+            faceInfo[facei].transform(mesh_, rotTensor[facei], td_);
         }
     }
 }
 
 
-// Offset mesh face. Used for transferring from one cyclic half to the other.
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::offset
 (
@@ -487,17 +492,21 @@ void Foam::FaceCellWave<Type, TrackingData>::offset
     labelList& faces
 )
 {
-    for (label faceI = 0; faceI < nFaces; faceI++)
+    // Offset mesh face. Used for transferring from one cyclic half to the
+    // other.
+
+    for (label facei = 0; facei < nFaces; facei++)
     {
-        faces[faceI] += cycOffset;
+        faces[facei] += cycOffset;
     }
 }
 
 
-// Tranfer all the information to/from neighbouring processors
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 {
+    // Tranfer all the information to/from neighbouring processors
+
     const globalMeshData& pData = mesh_.globalData();
 
     // Which patches are processor patches
@@ -509,10 +518,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 
     forAll(procPatches, i)
     {
-        label patchI = procPatches[i];
+        label patchi = procPatches[i];
 
         const processorPolyPatch& procPatch =
-            refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
+            refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
 
         // Allocate buffers
         label nSendFaces;
@@ -540,7 +549,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 
         if (debug & 2)
         {
-            Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
+            Pout<< " Processor patch " << patchi << ' ' << procPatch.name()
                 << " communicating with " << procPatch.neighbProcNo()
                 << "  Sending:" << nSendFaces
                 << endl;
@@ -559,10 +568,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 
     forAll(procPatches, i)
     {
-        label patchI = procPatches[i];
+        label patchi = procPatches[i];
 
         const processorPolyPatch& procPatch =
-            refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
+            refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
 
         // Allocate buffers
         labelList receiveFaces;
@@ -575,7 +584,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 
         if (debug & 2)
         {
-            Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
+            Pout<< " Processor patch " << patchi << ' ' << procPatch.name()
                 << " communicating with " << procPatch.neighbProcNo()
                 << "  Receiving:" << receiveFaces.size()
                 << endl;
@@ -613,13 +622,14 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
 }
 
 
-// Transfer information across cyclic halves.
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
 {
-    forAll(mesh_.boundaryMesh(), patchI)
+    // Transfer information across cyclic halves.
+
+    forAll(mesh_.boundaryMesh(), patchi)
     {
-        const polyPatch& patch = mesh_.boundaryMesh()[patchI];
+        const polyPatch& patch = mesh_.boundaryMesh()[patchi];
 
         if (isA<cyclicPolyPatch>(patch))
         {
@@ -666,7 +676,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
 
             if (debug & 2)
             {
-                Pout<< " Cyclic patch " << patchI << ' ' << cycPatch.name()
+                Pout<< " Cyclic patch " << patchi << ' ' << cycPatch.name()
                     << "  Changed : " << nReceiveFaces
                     << endl;
             }
@@ -698,13 +708,14 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
 }
 
 
-// Transfer information across cyclic halves.
 template<class Type, class TrackingData>
 void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
 {
-    forAll(mesh_.boundaryMesh(), patchI)
+    // Transfer information across cyclicAMI halves.
+
+    forAll(mesh_.boundaryMesh(), patchi)
     {
-        const polyPatch& patch = mesh_.boundaryMesh()[patchI];
+        const polyPatch& patch = mesh_.boundaryMesh()[patchi];
 
         if (isA<cyclicAMIPolyPatch>(patch))
         {
@@ -778,9 +789,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
             // Merge into global storage
             forAll(receiveInfo, i)
             {
-                label meshFaceI = cycPatch.start()+i;
+                label meshFacei = cycPatch.start()+i;
 
-                Type& currentWallInfo = allFaceInfo_[meshFaceI];
+                Type& currentWallInfo = allFaceInfo_[meshFacei];
 
                 if
                 (
@@ -790,7 +801,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
                 {
                     updateFace
                     (
-                        meshFaceI,
+                        meshFacei,
                         receiveInfo[i],
                         propagationTol_,
                         currentWallInfo
@@ -877,7 +888,6 @@ void Foam::FaceCellWave<Type, TrackingData>::handleExplicitConnections()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Set up only. Use setFaceInfo and iterate() to do actual calculation.
 template<class Type, class TrackingData>
 Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
 (
@@ -894,10 +904,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
     td_(td),
     changedFace_(mesh_.nFaces(), false),
     changedFaces_(mesh_.nFaces()),
-    nChangedFaces_(0),
     changedCell_(mesh_.nCells(), false),
     changedCells_(mesh_.nCells()),
-    nChangedCells_(0),
     hasCyclicPatches_(hasPatch<cyclicPolyPatch>()),
     hasCyclicAMIPatches_
     (
@@ -925,8 +933,6 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
 }
 
 
-// Iterate, propagating changedFacesInfo across mesh, until no change (or
-// maxIter reached). Initial cell values specified.
 template<class Type, class TrackingData>
 Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
 (
@@ -946,10 +952,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
     td_(td),
     changedFace_(mesh_.nFaces(), false),
     changedFaces_(mesh_.nFaces()),
-    nChangedFaces_(0),
     changedCell_(mesh_.nCells(), false),
     changedCells_(mesh_.nCells()),
-    nChangedCells_(0),
     hasCyclicPatches_(hasPatch<cyclicPolyPatch>()),
     hasCyclicAMIPatches_
     (
@@ -986,20 +990,18 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
         FatalErrorInFunction
             << "Maximum number of iterations reached. Increase maxIter." << endl
             << "    maxIter:" << maxIter << endl
-            << "    nChangedCells:" << nChangedCells_ << endl
-            << "    nChangedFaces:" << nChangedFaces_ << endl
+            << "    nChangedCells:" << changedCells_.size() << endl
+            << "    nChangedFaces:" << changedFaces_.size() << endl
             << exit(FatalError);
     }
 }
 
 
-// Iterate, propagating changedFacesInfo across mesh, until no change (or
-// maxIter reached). Initial cell values specified.
 template<class Type, class TrackingData>
 Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
 (
     const polyMesh& mesh,
-    const List<labelPair>& explicitConnections,
+    const labelPairList& explicitConnections,
     const bool handleCyclicAMI,
     const labelList& changedFaces,
     const List<Type>& changedFacesInfo,
@@ -1016,10 +1018,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
     td_(td),
     changedFace_(mesh_.nFaces(), false),
     changedFaces_(mesh_.nFaces()),
-    nChangedFaces_(0),
     changedCell_(mesh_.nCells(), false),
     changedCells_(mesh_.nCells()),
-    nChangedCells_(0),
     hasCyclicPatches_(hasPatch<cyclicPolyPatch>()),
     hasCyclicAMIPatches_
     (
@@ -1057,8 +1057,8 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
         FatalErrorInFunction
             << "Maximum number of iterations reached. Increase maxIter." << endl
             << "    maxIter:" << maxIter << endl
-            << "    nChangedCells:" << nChangedCells_ << endl
-            << "    nChangedFaces:" << nChangedFaces_ << endl
+            << "    nChangedCells:" << changedCells_.size() << endl
+            << "    nChangedFaces:" << changedFaces_.size() << endl
             << exit(FatalError);
     }
 }
@@ -1066,7 +1066,6 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-
 template<class Type, class TrackingData>
 Foam::label Foam::FaceCellWave<Type, TrackingData>::getUnsetCells() const
 {
@@ -1081,46 +1080,41 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::getUnsetFaces() const
 }
 
 
-
-// Propagate cell to face
 template<class Type, class TrackingData>
 Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
 {
+    // Propagate face to cell
+
     const labelList& owner = mesh_.faceOwner();
     const labelList& neighbour = mesh_.faceNeighbour();
     label nInternalFaces = mesh_.nInternalFaces();
 
-    for
-    (
-        label changedFaceI = 0;
-        changedFaceI < nChangedFaces_;
-        changedFaceI++
-    )
+    forAll(changedFaces_, changedFacei)
     {
-        label faceI = changedFaces_[changedFaceI];
-        if (!changedFace_[faceI])
+        label facei = changedFaces_[changedFacei];
+        if (!changedFace_[facei])
         {
             FatalErrorInFunction
-                << "Face " << faceI
+                << "Face " << facei
                 << " not marked as having been changed"
                 << abort(FatalError);
         }
 
 
-        const Type& neighbourWallInfo = allFaceInfo_[faceI];
+        const Type& neighbourWallInfo = allFaceInfo_[facei];
 
         // Evaluate all connected cells
 
         // Owner
-        label cellI = owner[faceI];
-        Type& currentWallInfo = allCellInfo_[cellI];
+        label celli = owner[facei];
+        Type& currentWallInfo = allCellInfo_[celli];
 
         if (!currentWallInfo.equal(neighbourWallInfo, td_))
         {
             updateCell
             (
-                cellI,
-                faceI,
+                celli,
+                facei,
                 neighbourWallInfo,
                 propagationTol_,
                 currentWallInfo
@@ -1128,17 +1122,17 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
         }
 
         // Neighbour.
-        if (faceI < nInternalFaces)
+        if (facei < nInternalFaces)
         {
-            cellI = neighbour[faceI];
-            Type& currentWallInfo2 = allCellInfo_[cellI];
+            celli = neighbour[facei];
+            Type& currentWallInfo2 = allCellInfo_[celli];
 
             if (!currentWallInfo2.equal(neighbourWallInfo, td_))
             {
                 updateCell
                 (
-                    cellI,
-                    faceI,
+                    celli,
+                    facei,
                     neighbourWallInfo,
                     propagationTol_,
                     currentWallInfo2
@@ -1147,19 +1141,19 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
         }
 
         // Reset status of face
-        changedFace_[faceI] = false;
+        changedFace_[facei] = false;
     }
 
     // Handled all changed faces by now
-    nChangedFaces_ = 0;
+    changedFaces_.clear();
 
     if (debug & 2)
     {
-        Pout<< " Changed cells            : " << nChangedCells_ << endl;
+        Pout<< " Changed cells            : " << changedCells_.size() << endl;
     }
 
-    // Sum nChangedCells over all procs
-    label totNChanged = nChangedCells_;
+    // Sum changedCells over all procs
+    label totNChanged = changedCells_.size();
 
     reduce(totNChanged, sumOp<label>());
 
@@ -1167,43 +1161,39 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
 }
 
 
-// Propagate cell to face
 template<class Type, class TrackingData>
 Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
 {
+    // Propagate cell to face
+
     const cellList& cells = mesh_.cells();
 
-    for
-    (
-        label changedCellI = 0;
-        changedCellI < nChangedCells_;
-        changedCellI++
-    )
+    forAll(changedCells_, changedCelli)
     {
-        label cellI = changedCells_[changedCellI];
-        if (!changedCell_[cellI])
+        label celli = changedCells_[changedCelli];
+        if (!changedCell_[celli])
         {
             FatalErrorInFunction
-                << "Cell " << cellI << " not marked as having been changed"
+                << "Cell " << celli << " not marked as having been changed"
                 << abort(FatalError);
         }
 
-        const Type& neighbourWallInfo = allCellInfo_[cellI];
+        const Type& neighbourWallInfo = allCellInfo_[celli];
 
         // Evaluate all connected faces
 
-        const labelList& faceLabels = cells[cellI];
+        const labelList& faceLabels = cells[celli];
         forAll(faceLabels, faceLabelI)
         {
-            label faceI = faceLabels[faceLabelI];
-            Type& currentWallInfo = allFaceInfo_[faceI];
+            label facei = faceLabels[faceLabelI];
+            Type& currentWallInfo = allFaceInfo_[facei];
 
             if (!currentWallInfo.equal(neighbourWallInfo, td_))
             {
                 updateFace
                 (
-                    faceI,
-                    cellI,
+                    facei,
+                    celli,
                     neighbourWallInfo,
                     propagationTol_,
                     currentWallInfo
@@ -1212,11 +1202,11 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
         }
 
         // Reset status of cell
-        changedCell_[cellI] = false;
+        changedCell_[celli] = false;
     }
 
     // Handled all changed cells by now
-    nChangedCells_ = 0;
+    changedCells_.clear();
 
 
     // Transfer across any explicitly provided internal connections
@@ -1241,11 +1231,11 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
 
     if (debug & 2)
     {
-        Pout<< " Changed faces            : " << nChangedFaces_ << endl;
+        Pout<< " Changed faces            : " << changedFaces_.size() << endl;
     }
 
     // Sum nChangedFaces over all procs
-    label totNChanged = nChangedFaces_;
+    label totNChanged = changedFaces_.size();
 
     reduce(totNChanged, sumOp<label>());
 
diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.H b/src/meshTools/algorithms/MeshWave/FaceCellWave.H
index 40f0e1d1d3d..0653e255c13 100644
--- a/src/meshTools/algorithms/MeshWave/FaceCellWave.H
+++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.H
@@ -370,7 +370,7 @@ public:
 
             //- Propagate from face to cell. Returns total number of cells
             //  (over all processors) changed.
-            virtual label faceToCell();
+           virtual label faceToCell();
 
             //- Propagate from cell to face. Returns total number of faces
             //  (over all processors) changed. (Faces on processorpatches are
diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
index d5f8646240c..00223a009e6 100644
--- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
+++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
@@ -183,8 +183,8 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
             << " nearest face:" << facei;
     }
 
-    const typename PatchType::FaceType& localF = patch_.localFaces()[faceI];
-    const typename PatchType::FaceType& f = patch_[faceI];
+    const typename PatchType::FaceType& localF = patch_.localFaces()[facei];
+    const typename PatchType::FaceType& f = patch_[facei];
     const pointField& points = patch_.points();
     const labelList& mp = patch_.meshPoints();
 
diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C
index a2624930b3d..3815c31eeac 100644
--- a/src/meshTools/searchableSurface/triSurfaceMesh.C
+++ b/src/meshTools/searchableSurface/triSurfaceMesh.C
@@ -821,7 +821,7 @@ void Foam::triSurfaceMesh::getVolumeType
                 {
                     outsideVolType_ = tree().shapes().getVolumeType(tree(), pt);
                 }
-                volType[pointI] = outsideVolType_;
+                volType[pointi] = outsideVolType_;
             }
             else
             {
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
index 8d26147127b..fd9c7a9fd09 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
@@ -510,7 +510,7 @@ Foam::label Foam::intersectedSurface::nextEdge
     {
         // No unvisited edge found
         {
-            Pout<< "Writing face:" << faceI << " to face.obj" << endl;
+            Pout<< "Writing face:" << facei << " to face.obj" << endl;
             OFstream str("face.obj");
             writeOBJ(points, edges, fEdges, str);
 
@@ -714,7 +714,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
 
             label nVisits = iter();
 
-            Pout<< "point:" << pointI << "  nVisited:" << nVisits
+            Pout<< "point:" << pointi << "  nVisited:" << nVisits
                 << "  pointEdges:" << facePointEdges[pointi].size() << endl;
         }
     }
@@ -1097,11 +1097,11 @@ Foam::intersectedSurface::intersectedSurface
     DynamicList<labelledTri> newTris(eSurf.edges().size()/2);
 
     // Start in newTris for decomposed face.
-    labelList startTriI(surf.size(), 0);
+    labelList startTrii(surf.size(), 0);
 
     forAll(surf, facei)
     {
-        startTriI[facei] = newTris.size();
+        startTrii[facei] = newTris.size();
 
         if (eSurf.faceEdges()[facei].size() != surf.faceEdges()[facei].size())
         {
@@ -1176,7 +1176,7 @@ Foam::intersectedSurface::intersectedSurface
 
     for (label facei = 0; facei < surf.size()-1; facei++)
     {
-        for (label trii = startTrii[facei]; triI < startTrii[facei+1]; trii++)
+        for (label trii = startTrii[facei]; trii < startTrii[facei+1]; trii++)
         {
             faceMap_[trii] = facei;
         }
@@ -1202,7 +1202,7 @@ Foam::intersectedSurface::intersectedSurface
     )
     {
         // Get edge vertices in triSurface local numbering
-        const edge& e = eSurf.edges()[edgeI];
+        const edge& e = eSurf.edges()[edgei];
         label surfStarti = meshPointMap()[e.start()];
         label surfEndi = meshPointMap()[e.end()];
 
diff --git a/src/postProcessing/functionObjects/field/valueAverage/IOvalueAverage.H b/src/postProcessing/functionObjects/field/valueAverage/IOvalueAverage.H
deleted file mode 100644
index d6d58060b9b..00000000000
--- a/src/postProcessing/functionObjects/field/valueAverage/IOvalueAverage.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOvalueAverage
-
-Description
-    Instance of the generic IOOutputFilter for valueAverage.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOvalueAverage_H
-#define IOvalueAverage_H
-
-#include "valueAverage.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<valueAverage> IOvalueAverage;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.C b/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.C
deleted file mode 100644
index 347cc28b52c..00000000000
--- a/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "valueAverageFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(valueAverageFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        valueAverageFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.H b/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.H
deleted file mode 100644
index 0845bc655cc..00000000000
--- a/src/postProcessing/functionObjects/field/valueAverage/valueAverageFunctionObject.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::valueAverageFunctionObject
-
-Description
-    FunctionObject wrapper around valueAverageFunctionObject to allow them
-    to be created via the functions entry within controlDict.
-
-SourceFiles
-    fieldMinMaxFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef valueAverageFunctionObject_H
-#define valueAverageFunctionObject_H
-
-#include "valueAverage.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<valueAverage>
-        valueAverageFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/IOrunTimeControl.H b/src/postProcessing/functionObjects/jobControl/runTimeControl/IOrunTimeControl.H
deleted file mode 100644
index da73cb5db36..00000000000
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/IOrunTimeControl.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOrunTimeControl
-
-Description
-    Instance of the generic IOOutputFilter for runTimeControl.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOrunTimeControl_H
-#define IOrunTimeControl_H
-
-#include "runTimeControl.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<runTimeControl> IOrunTimeControl;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.C b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.C
deleted file mode 100644
index 7ba3518564a..00000000000
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "runTimeControlFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(runTimeControlFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        runTimeControlFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.H b/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.H
deleted file mode 100644
index 6b600c33d15..00000000000
--- a/src/postProcessing/functionObjects/jobControl/runTimeControl/runTimeControlFunctionObject.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::runTimeControlFunctionObject
-
-Description
-    FunctionObject wrapper around runTimeControl to allow it to be created
-    via the functions entry within controlDict.
-
-SourceFiles
-    runTimeControlFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef runTimeControlFunctionObject_H
-#define runTimeControlFunctionObject_H
-
-#include "runTimeControl.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<runTimeControl>
-        runTimeControlFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C
deleted file mode 100644
index 1578ebdc3af..00000000000
--- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C
+++ /dev/null
@@ -1,206 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "DESModelRegions.H"
-#include "volFields.H"
-#include "DESModelBase.H"
-#include "turbulenceModel.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-defineTypeNameAndDebug(DESModelRegions, 0);
-}
-
-
-// * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
-
-void Foam::DESModelRegions::writeFileHeader(Ostream& os) const
-{
-    writeHeader(os, "DES model region coverage (% volume)");
-
-    writeCommented(os, "Time");
-    writeTabbed(os, "LES");
-    writeTabbed(os, "RAS");
-    os << endl;
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-Foam::DESModelRegions::DESModelRegions
-(
-    const word& name,
-    const objectRegistry& obr,
-    const dictionary& dict,
-    const bool loadFromFiles
-)
-:
-    functionObjectFile(obr, name, typeName, dict),
-    name_(name),
-    obr_(obr),
-    active_(true),
-    resultName_(name),
-    log_(true)
-{
-    // Check if the available mesh is an fvMesh, otherwise deactivate
-    if (!isA<fvMesh>(obr_))
-    {
-        active_ = false;
-        WarningInFunction
-            << "No fvMesh available, deactivating " << name_ << nl
-            << endl;
-    }
-
-    read(dict);
-
-    if (active_)
-    {
-        const fvMesh& mesh = refCast<const fvMesh>(obr_);
-
-        volScalarField* DESModelRegionsPtr
-        (
-            new volScalarField
-            (
-                IOobject
-                (
-                    resultName_,
-                    mesh.time().timeName(),
-                    mesh,
-                    IOobject::NO_READ,
-                    IOobject::NO_WRITE
-                ),
-                mesh,
-                dimensionedScalar("0", dimless, 0.0)
-            )
-        );
-
-        mesh.objectRegistry::store(DESModelRegionsPtr);
-
-        writeFileHeader(file());
-    }
-}
-
-
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-Foam::DESModelRegions::~DESModelRegions()
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-void Foam::DESModelRegions::read(const dictionary& dict)
-{
-    if (active_)
-    {
-        functionObjectFile::read(dict);
-
-        log_.readIfPresent("log", dict);
-        dict.readIfPresent("resultName", resultName_);
-    }
-}
-
-
-void Foam::DESModelRegions::execute()
-{
-    if (active_)
-    {
-        const fvMesh& mesh = refCast<const fvMesh>(obr_);
-
-        if (log_) Info<< type() << " " << name_ <<  " output:" << nl;
-
-        volScalarField& DESModelRegions =
-            const_cast<volScalarField&>
-            (
-                mesh.lookupObject<volScalarField>(resultName_)
-            );
-
-
-        if (mesh.foundObject<DESModelBase>(turbulenceModel::propertiesName))
-        {
-            const DESModelBase& model =
-                mesh.lookupObject<DESModelBase>
-                (
-                    turbulenceModel::propertiesName
-                );
-
-            DESModelRegions == model.LESRegion();
-
-            scalar prc =
-                gSum(DESModelRegions.internalField()*mesh.V())
-               /gSum(mesh.V())*100.0;
-
-            file() << obr_.time().value()
-                << token::TAB << prc
-                << token::TAB << 100.0 - prc
-                << endl;
-
-            if (log_) Info
-                << "    LES = " << prc << " % (volume)" << nl
-                << "    RAS = " << 100.0 - prc << " % (volume)" << nl
-                << endl;
-        }
-        else
-        {
-            if (log_) Info
-                << "    No DES turbulence model found in database" << nl
-                << endl;
-        }
-    }
-}
-
-
-void Foam::DESModelRegions::end()
-{
-    // Do nothing
-}
-
-
-void Foam::DESModelRegions::timeSet()
-{
-    // Do nothing
-}
-
-
-void Foam::DESModelRegions::write()
-{
-    if (active_)
-    {
-        const volScalarField& DESModelRegions =
-            obr_.lookupObject<volScalarField>(resultName_);
-
-        if (log_) Info
-            << type() << " " << name_ <<  " output:" << nl
-            << "    writing field " << DESModelRegions.name() << nl
-            << endl;
-
-        DESModelRegions.write();
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.C
deleted file mode 100644
index 2312e6f5fb8..00000000000
--- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "DESModelRegionsFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(DESModelRegionsFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        DESModelRegionsFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.H b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.H
deleted file mode 100644
index 7e9a6ba45cb..00000000000
--- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegionsFunctionObject.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::DESModelRegionsFunctionObject
-
-Description
-    FunctionObject wrapper around DESModelRegions to allow it to be created
-    via the functions entry within controlDict.
-
-SourceFiles
-    DESModelRegionsFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef DESModelRegionsFunctionObject_H
-#define DESModelRegionsFunctionObject_H
-
-#include "DESModelRegions.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<DESModelRegions>
-        DESModelRegionsFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/IODESModelRegions.H b/src/postProcessing/functionObjects/utilities/DESModelRegions/IODESModelRegions.H
deleted file mode 100644
index 17cc16b74ee..00000000000
--- a/src/postProcessing/functionObjects/utilities/DESModelRegions/IODESModelRegions.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IODESModelRegions
-
-Description
-    Instance of the generic IOOutputFilter for DESModelRegions.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IODESModelRegions_H
-#define IODESModelRegions_H
-
-#include "DESModelRegions.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<DESModelRegions> IODESModelRegions;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/IOfluxSummary.H b/src/postProcessing/functionObjects/utilities/fluxSummary/IOfluxSummary.H
deleted file mode 100644
index f29c2e41d17..00000000000
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/IOfluxSummary.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOfluxSummary
-
-Description
-    Instance of the generic IOOutputFilter for fluxSummary.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOfluxSummary_H
-#define IOfluxSummary_H
-
-#include "fluxSummary.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<fluxSummary> IOfluxSummary;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.C b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.C
deleted file mode 100644
index 32c61e2df39..00000000000
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fluxSummaryFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(fluxSummaryFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        fluxSummaryFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.H b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.H
deleted file mode 100644
index b0b4380bff5..00000000000
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummaryFunctionObject.H
+++ /dev/null
@@ -1,53 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::fluxSummaryFunctionObject
-
-Description
-    FunctionObject wrapper around fluxSummary to allow them to be created
-    via the functions entry within controlDict.
-
-SourceFiles
-    fluxSummaryFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef fluxSummaryFunctionObject_H
-#define fluxSummaryFunctionObject_H
-
-#include "fluxSummary.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<fluxSummary> fluxSummaryFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/IOmapFields.H b/src/postProcessing/functionObjects/utilities/mapFields/IOmapFields.H
deleted file mode 100644
index abcd07e3b27..00000000000
--- a/src/postProcessing/functionObjects/utilities/mapFields/IOmapFields.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOmapFields
-
-Description
-    Instance of the generic IOOutputFilter for mapFields.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOmapFields_H
-#define IOmapFields_H
-
-#include "mapFields.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<mapFields> IOmapFields;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.C b/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.C
deleted file mode 100644
index f9d94f7b517..00000000000
--- a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.C
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "mapFieldsFunctionObject.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    defineNamedTemplateTypeNameAndDebug(mapFieldsFunctionObject, 0);
-
-    addToRunTimeSelectionTable
-    (
-        functionObject,
-        mapFieldsFunctionObject,
-        dictionary
-    );
-}
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.H b/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.H
deleted file mode 100644
index 087d93d230a..00000000000
--- a/src/postProcessing/functionObjects/utilities/mapFields/mapFieldsFunctionObject.H
+++ /dev/null
@@ -1,53 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::mapFieldsFunctionObject
-
-Description
-    FunctionObject wrapper around mapFields to allow it to be created
-    via the functions entry within controlDict.
-
-SourceFiles
-    mapFieldsFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef mapFieldsFunctionObject_H
-#define mapFieldsFunctionObject_H
-
-#include "mapFields.H"
-#include "OutputFilterFunctionObject.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject<mapFieldsFO> mapFieldsFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.H b/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.H
deleted file mode 100644
index 77f90831ed4..00000000000
--- a/src/postProcessing/functionObjects/utilities/reactionSensitivityAnalysis/reactionsSensitivityAnalysisFunctionObject.H
+++ /dev/null
@@ -1,64 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::reactionsSensitivityAnalysisFunctionObject
-
-Description
-    FunctionObject wrapper around reactionsSensitivityAnalysis to allow
-    it to be created via the functions entry within controlDict.
-
-SourceFiles
-    reactionsSensitivityAnalysisFunctionObject.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef reactionsSensitivityAnalysisFunctionObject_H
-#define reactionsSensitivityAnalysisFunctionObject_H
-
-#include "OutputFilterFunctionObject.H"
-#include "reactionsSensitivityAnalysis.H"
-#include "rhoChemistryModel.H"
-#include "psiChemistryModel.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef OutputFilterFunctionObject
-    <
-        reactionsSensitivityAnalysis<rhoChemistryModel>
-    > rhoReactionsSensitivityAnalysisFunctionObject;
-
-
-    typedef OutputFilterFunctionObject
-    <
-        reactionsSensitivityAnalysis<psiChemistryModel>
-    > psiReactionsSensitivityAnalysisFunctionObject;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C
index 3d7c7a51bc0..2da4dde3e0d 100644
--- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C
+++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C
@@ -79,14 +79,14 @@ void Foam::regionModels::regionModel1D::initialise()
     {
         const label patchi = intCoupledPatchIDs_[i];
         const polyPatch& ppCoupled = rbm[patchi];
-        localPyrolysisFaceI += ppCoupled.size();
+        localPyrolysisFacei += ppCoupled.size();
     }
 
     boundaryFaceOppositeFace_.setSize(localPyrolysisFacei);
     boundaryFaceFaces_.setSize(localPyrolysisFacei);
     boundaryFaceCells_.setSize(localPyrolysisFacei);
 
-    localPyrolysisFaceI = 0;
+    localPyrolysisFacei = 0;
 
     forAll(intCoupledPatchIDs_, i)
     {
@@ -113,11 +113,11 @@ void Foam::regionModels::regionModel1D::initialise()
                 const cell& cFaces = regionMesh().cells()[celli];
                 faceIDs.append(facei);
                 label face0 =
-                    cFaces.opposingFaceLabel(faceI, regionMesh().faces());
-                faceI = face0;
+                    cFaces.opposingFaceLabel(facei, regionMesh().faces());
+                facei = face0;
             } while (regionMesh().isInternalFace(facei));
 
-            boundaryFaceOppositeFace_[localPyrolysisFacei] = faceI;
+            boundaryFaceOppositeFace_[localPyrolysisFacei] = facei;
             //faceIDs.remove(); //remove boundary face.
 
             boundaryFaceFaces_[localPyrolysisFacei].transfer(faceIDs);
@@ -217,7 +217,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
         label patchi = intCoupledPatchIDs_[localPatchi];
         const polyPatch& pp = bm[patchi];
 
-        forAll (pp, patchFacei)
+        forAll(pp, patchFacei)
         {
             const labelList& faces = boundaryFaceFaces_[totalFacei];
             const labelList& cells = boundaryFaceCells_[totalFacei];
@@ -229,14 +229,14 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
             List<point> oldCf(faces.size() + 1, vector::zero);
             List<bool> frozen(faces.size(), false);
 
-            forAll (faces, i)
+            forAll(faces, i)
             {
                 oldCf[i] = regionMesh().faceCentres()[faces[i]];
             }
 
             oldCf[faces.size()] = regionMesh().faceCentres()[oFace];
 
-            forAll (faces, i)
+            forAll(faces, i)
             {
                 const label celli = cells[i];
 
@@ -257,17 +257,17 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
                 j++;
             }
 
-            forAll (faces, i)
+            forAll(faces, i)
             {
                 const label facei = faces[i];
                 const face f = regionMesh().faces()[facei];
 
-                forAll(f, pti)
+                if (!frozen[i])
                 {
-                    const label pointi = f[pti];
-
-                    if (!frozen[i])
+                    forAll(f, pti)
                     {
+                        const label pointi = f[pti];
+
                         newPoints[pointi] =
                             oldPoints[pointi]
                           + newDelta[newDelta.size() - 1 - i];
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
index a432dc3abe9..d2ba5990dac 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
@@ -139,7 +139,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
     // Note: normal pointing into the domain
     const vectorField n(-patch().nf());
 
-    const scalarField gTan(film.gTan(patchI) & n);
+    const scalarField gTan(film.gTan(patchi) & n);
 
     if (patch().size() && (max(mag(gTan)) < SMALL))
     {
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
index fc7101a0819..d619afb9221 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
@@ -123,7 +123,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
 
     const label patchi = patch().index();
 
-    // retrieve the film region from the database
+    // Retrieve the film region from the database
 
     const regionModels::regionModel& region =
         db().time().lookupObject<regionModels::regionModel>(filmRegionName_);
@@ -134,11 +134,12 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
             const regionModels::surfaceFilmModels::kinematicSingleLayer&
         >(region);
 
-    // calculate the vector tangential to the patch
+
+    // Calculate the vector tangential to the patch
     // note: normal pointing into the domain
     const vectorField n(-patch().nf());
 
-    const scalarField gTan(film.gTan(patchI) & n);
+    const scalarField gTan(film.gTan(patchi) & n);
 
     if (patch().size() && (max(mag(gTan)) < SMALL))
     {
@@ -155,12 +156,14 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
     vectorField nTan(nHatp ^ n);
     nTan /= mag(nTan) + ROOTVSMALL;
 
-    // calculate distance in patch tangential direction
+
+    // Calculate distance in patch tangential direction
 
     const vectorField& Cf = patch().Cf();
     scalarField d(nTan & Cf);
 
-    // calculate the wavy film height
+
+    // Calculate the wavy film height
 
     const scalar t = db().time().timeOutputValue();
 
diff --git a/src/renumber/renumberMethods/Make/options b/src/renumber/renumberMethods/Make/options
index a2c13ec7217..a97467a3329 100644
--- a/src/renumber/renumberMethods/Make/options
+++ b/src/renumber/renumberMethods/Make/options
@@ -7,4 +7,3 @@ EXE_INC = \
 LIB_LIBS = \
     -ldecompositionMethods \
     -ldynamicMesh
-    -ldynamicMesh \
diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C
index 79ee577bfcd..957b910f7b7 100644
--- a/src/sampling/meshToMesh/meshToMesh.C
+++ b/src/sampling/meshToMesh/meshToMesh.C
@@ -63,7 +63,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -76,7 +76,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -89,7 +89,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -102,7 +102,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -115,7 +115,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -128,7 +128,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -141,7 +141,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -154,7 +154,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -167,7 +167,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -180,7 +180,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -193,7 +193,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
@@ -206,7 +206,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapSrcToTgt(field, cop, result.internalField());
+    mapSrcToTgt(field, cop, result.primitiveFieldRef());
 }
 
 
diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C
index fe27ca06b00..30b0e37c560 100644
--- a/src/sampling/meshToMesh/meshToMeshTemplates.C
+++ b/src/sampling/meshToMesh/meshToMeshTemplates.C
@@ -554,7 +554,7 @@ void Foam::meshToMesh::mapSrcToTgt
     const bool secondOrder
 ) const
 {
-    mapInternalSrcToTgt(field, cop, result.primitiveFieldRef(), secondOrder);
+    mapInternalSrcToTgt(field, cop, result, secondOrder);
 
     const PtrList<AMIPatchToPatchInterpolation>& AMIList = patchAMIs();
 
@@ -751,14 +751,14 @@ void Foam::meshToMesh::mapInternalTgtToSrc
         mapTgtToSrc
         (
             field,
-            fvc::grad(field)().internalField(),
+            fvc::grad(field)().primitiveField(),
             cop,
-            result.internalField()
+            result.primitiveFieldRef()
         );
     }
     else
     {
-        mapTgtToSrc(field, cop, result.internalField());
+        mapTgtToSrc(field, cop, result.primitiveFieldRef());
     }
 }
 
@@ -784,27 +784,6 @@ void Foam::meshToMesh::mapAndOpTgtToSrc
 }
 
 
-template<class Type, class CombineOp>
-void Foam::meshToMesh::mapAndOpTgtToSrc
-(
-    const AMIPatchToPatchInterpolation& AMI,
-    Field<Type>& srcField,
-    const Field<Type>& tgtField,
-    const CombineOp& cop
-) const
-{
-    srcField = pTraits<Type>::zero;
-
-    AMI.interpolateToSource
-    (
-        tgtField,
-        multiplyWeightedOp<Type, CombineOp>(cop),
-        srcField,
-        UList<Type>::null()
-    );
-}
-
-
 template<class Type, class CombineOp>
 void Foam::meshToMesh::mapTgtToSrc
 (
@@ -814,7 +793,7 @@ void Foam::meshToMesh::mapTgtToSrc
     const bool secondOrder
 ) const
 {
-    mapInternalTgtToSrc(field, cop, result.primitiveFieldRef(), secondOrder);
+    mapInternalTgtToSrc(field, cop, result, secondOrder);
 
     const PtrList<AMIPatchToPatchInterpolation>& AMIList = patchAMIs();
 
diff --git a/src/sampling/probes/IOprobes.H b/src/sampling/probes/IOprobes.H
deleted file mode 100644
index b7c4817bbb4..00000000000
--- a/src/sampling/probes/IOprobes.H
+++ /dev/null
@@ -1,51 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOprobes
-
-Description
-    Instance of the generic IOOutputFilter for probes.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOprobes_H
-#define IOprobes_H
-
-#include "probes.H"
-#include "patchProbes.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<probes> IOprobes;
-    typedef IOOutputFilter<patchProbes> IOpatchProbes;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C
index 70d586fec18..f03c6c6cf79 100644
--- a/src/sampling/probes/patchProbes.C
+++ b/src/sampling/probes/patchProbes.C
@@ -154,10 +154,10 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
                 (
                     true,
                     facePt,
-                    faceI
+                    facei
                 );
 
-                sampleInfo.second().first() = magSqr(facePt-sample);
+                sampleInfo.second().first() = magSqr(facePt - sample);
                 sampleInfo.second().second() = Pstream::myProcNo();
 
                 nearest[probei]= sampleInfo;
@@ -172,24 +172,24 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
 
 
     // Update actual probe locations
-    forAll(nearest, sampleI)
+    forAll(nearest, samplei)
     {
-        operator[](sampleI) = nearest[sampleI].first().rawPoint();
+        operator[](samplei) = nearest[samplei].first().rawPoint();
     }
 
 
     if (debug)
     {
         InfoInFunction << endl;
-        forAll(nearest, sampleI)
+        forAll(nearest, samplei)
         {
-            label proci = nearest[sampleI].second().second();
-            label localI = nearest[sampleI].first().index();
+            label proci = nearest[samplei].second().second();
+            label locali = nearest[samplei].first().index();
 
-            Info<< "    " << sampleI << " coord:"<< operator[](sampleI)
-                << " found on processor:" << procI
-                << " in local face:" << localI
-                << " with location:" << nearest[sampleI].first().rawPoint()
+            Info<< "    " << samplei << " coord:"<< operator[](samplei)
+                << " found on processor:" << proci
+                << " in local face:" << locali
+                << " with location:" << nearest[samplei].first().rawPoint()
                 << endl;
         }
     }
@@ -212,31 +212,23 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
 }
 
 
-void Foam::patchProbes::readDict(const dictionary& dict)
-{
-    probes::readDict(dict);
-}
-
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::patchProbes::patchProbes
 (
     const word& name,
     const Time& t,
-    const dictionary& dict
+    const dictionary& dict,
+    const bool loadFromFiles,
+    const bool readFields
 )
 :
-    probes(name, t, dict)
+    probes(name, t, dict, loadFromFiles, false)
 {
-    // When constructing probes above it will have called the
-    // probes::findElements (since the virtual mechanism not yet operating).
-    // Not easy to workaround (apart from feeding through flag into constructor)
-    // so clear out any cells found for now.
-    elementList_.clear();
-    faceList_.clear();
-
-    read(dict);
+    if (readFields)
+    {
+        read(dict);
+    }
 }
 
 
@@ -246,7 +238,7 @@ Foam::patchProbes::patchProbes
     const objectRegistry& obr,
     const dictionary& dict,
     const bool loadFromFiles,
-)   const bool readFields
+    const bool readFields
 )
 :
     probes(name, obr, dict, loadFromFiles, false)
diff --git a/src/sampling/probes/patchProbes.H b/src/sampling/probes/patchProbes.H
index 6d03ea2797c..d2742b2f682 100644
--- a/src/sampling/probes/patchProbes.H
+++ b/src/sampling/probes/patchProbes.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -147,9 +147,6 @@ protected:
         //- Find elements containing patchProbes
         virtual void findElements(const fvMesh&);
 
-        //- Read dictionary settings
-        void readDict(const dictionary& dict);
-
 
 private:
 
@@ -173,7 +170,9 @@ public:
         (
             const word& name,
             const Time& time,
-            const dictionary& dict
+            const dictionary& dict,
+            const bool loadFromFiles = false,
+            const bool readFields = true
         );
 
         //- Construct for given objectRegistry and dictionary.
@@ -184,7 +183,7 @@ public:
             const objectRegistry&,
             const dictionary&,
             const bool loadFromFiles = false,
-            const bool findElements = true
+            const bool readFields = true
         );
 
 
diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C
index ccfe38192a1..c6991df35fb 100644
--- a/src/sampling/probes/patchProbesTemplates.C
+++ b/src/sampling/probes/patchProbesTemplates.C
@@ -208,11 +208,7 @@ Foam::patchProbes::sample
 
     forAll(*this, probei)
     {
-<<<<<<< HEAD
-        label faceI = faceList_[probeI];
-=======
-        label facei = elementList_[probei];
->>>>>>> foundation-github
+        label facei = faceList_[probei];
 
         if (facei >= 0)
         {
@@ -263,11 +259,7 @@ Foam::patchProbes::sample
 
     forAll(*this, probei)
     {
-<<<<<<< HEAD
-        label faceI = faceList_[probeI];
-=======
-        label facei = elementList_[probei];
->>>>>>> foundation-github
+        label facei = faceList_[probei];
 
         if (facei >= 0)
         {
diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C
index b3f02a8b556..54e8d298cea 100644
--- a/src/sampling/probes/probes.C
+++ b/src/sampling/probes/probes.C
@@ -214,7 +214,7 @@ Foam::label Foam::probes::prepare()
         {
             if (!currentFields.erase(iter.key()))
             {
-                DdebugInfo<< "close probe stream: " << iter()->name() << endl;
+                DebugInfo<< "close probe stream: " << iter()->name() << endl;
 
                 delete probeFilePtrs_.remove(iter);
             }
@@ -267,18 +267,33 @@ Foam::label Foam::probes::prepare()
 Foam::probes::probes
 (
     const word& name,
-    const Time& t,
-    const dictionary& dict
+    const Time& runTime,
+    const dictionary& dict,
+    const bool loadFromFiles,
+    const bool readFields
 )
 :
-    fvMeshFunctionObject(t, name),
+    functionObject(name),
     pointField(0),
-    loadFromFiles_(false),
+    mesh_
+    (
+        refCast<const fvMesh>
+        (
+            runTime.lookupObject<objectRegistry>
+            (
+                dict.lookupOrDefault("region", polyMesh::defaultRegion)
+            )
+        )
+    ),
+    loadFromFiles_(loadFromFiles),
     fieldSelection_(),
     fixedLocations_(true),
     interpolationScheme_("cell")
 {
-    read(dict);
+    if (readFields)
+    {
+        read(dict);
+    }
 }
 
 
@@ -291,8 +306,9 @@ Foam::probes::probes
     const bool readFields
 )
 :
-    fvMeshFunctionObject(obr, name),
+    functionObject(name),
     pointField(0),
+    mesh_(refCast<const fvMesh>(obr)),
     loadFromFiles_(loadFromFiles),
     fieldSelection_(),
     fixedLocations_(true),
@@ -393,7 +409,7 @@ void Foam::probes::updateMesh(const mapPolyMesh& mpm)
                 label celli = elementList_[i];
                 if (celli != -1)
                 {
-                    label newCelli = reverseMap[cellI];
+                    label newCelli = reverseMap[celli];
                     if (newCelli == -1)
                     {
                         // cell removed
diff --git a/src/sampling/probes/probes.H b/src/sampling/probes/probes.H
index 9296d34216b..9f6e898cf63 100644
--- a/src/sampling/probes/probes.H
+++ b/src/sampling/probes/probes.H
@@ -76,7 +76,7 @@ SourceFiles
 #ifndef probes_H
 #define probes_H
 
-#include "fvMeshFunctionObject.H"
+#include "functionObject.H"
 #include "HashPtrTable.H"
 #include "OFstream.H"
 #include "polyMesh.H"
@@ -104,7 +104,7 @@ class mapPolyMesh;
 
 class probes
 :
-    public fvMeshFunctionObject,
+    public functionObject,
     public pointField
 {
 protected:
@@ -128,6 +128,9 @@ protected:
 
     // Protected data
 
+        //- Const reference to fvMesh
+        const fvMesh& mesh_;
+
         //- Load fields from files (not from objectRegistry)
         bool loadFromFiles_;
 
@@ -236,7 +239,9 @@ public:
         (
             const word& name,
             const Time& runTime,
-            const dictionary& dict
+            const dictionary& dict,
+            const bool loadFromFiles = false,
+            const bool readFields = true
         );
 
         //- Construct for given objectRegistry and dictionary.
@@ -246,7 +251,7 @@ public:
             const word& name,
             const objectRegistry& obr,
             const dictionary& dict,
-            const bool loadFromFiles = false
+            const bool loadFromFiles = false,
             const bool readFields = true
         );
 
diff --git a/src/sampling/probes/probesGrouping.C b/src/sampling/probes/probesGrouping.C
index 4465c515a2b..5d228f1152d 100644
--- a/src/sampling/probes/probesGrouping.C
+++ b/src/sampling/probes/probesGrouping.C
@@ -115,7 +115,7 @@ Foam::label Foam::probes::classifyFields()
 
     if (loadFromFiles_)
     {
-        // check files for a particular time
+        // Check files for a particular time
         IOobjectList objects(mesh_, mesh_.time().timeName());
         wordList allFields = objects.sortedNames();
 
@@ -134,7 +134,7 @@ Foam::label Foam::probes::classifyFields()
     }
     else
     {
-        // check currently available fields
+        // Check currently available fields
         wordList allFields = mesh_.sortedNames();
         labelList indices = findStrings(fieldSelection_, allFields);
 
@@ -153,4 +153,5 @@ Foam::label Foam::probes::classifyFields()
     return nFields;
 }
 
+
 // ************************************************************************* //
diff --git a/src/sampling/sampledSet/sampledSets/IOsampledSets.H b/src/sampling/sampledSet/sampledSets/IOsampledSets.H
deleted file mode 100644
index 10c8502ea39..00000000000
--- a/src/sampling/sampledSet/sampledSets/IOsampledSets.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOsampledSets
-
-Description
-    Instance of the generic IOOutputFilter for sampledSets.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOsampledSets_H
-#define IOsampledSets_H
-
-#include "sampledSets.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<sampledSets> IOsampledSets;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C
index 97d5bef1fcf..2115280372a 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSets.C
+++ b/src/sampling/sampledSet/sampledSets/sampledSets.C
@@ -141,22 +141,13 @@ void Foam::sampledSets::combineSampledSets
 Foam::sampledSets::sampledSets
 (
     const word& name,
-    const Time& t,
+    const Time& runTime,
     const dictionary& dict
 )
 :
-    functionObject(name),
+    functionObjects::regionFunctionObject(name, runTime, dict),
     PtrList<sampledSet>(),
-    mesh_
-    (
-        refCast<const fvMesh>
-        (
-            t.lookupObject<objectRegistry>
-            (
-                dict.lookupOrDefault("region", polyMesh::defaultRegion)
-            )
-        )
-    ),
+    mesh_(refCast<const fvMesh>(obr_)),
     loadFromFiles_(false),
     outputPath_(fileName::null),
     searchEngine_(mesh_),
@@ -188,7 +179,7 @@ Foam::sampledSets::sampledSets
     const bool loadFromFiles
 )
 :
-    stateFunctionObject(obr, name),
+    functionObjects::regionFunctionObject(name, obr, dict),
     PtrList<sampledSet>(),
     mesh_(refCast<const fvMesh>(obr)),
     loadFromFiles_(loadFromFiles),
diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.H b/src/sampling/sampledSet/sampledSets/sampledSets.H
index 6cfb3130cc7..20d8b3c5769 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSets.H
+++ b/src/sampling/sampledSet/sampledSets/sampledSets.H
@@ -62,7 +62,7 @@ class fvMesh;
 
 class sampledSets
 :
-    public regionFunctionObject,
+    public functionObjects::regionFunctionObject,
     public PtrList<sampledSet>
 {
     // Private classes
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C
index 5d6bb2ae88f..d168b4513f6 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurface.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C
@@ -1257,7 +1257,7 @@ void Foam::isoSurface::trimToBox
 }
 
 
-bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
+bool Foam::isoSurface::validTri(const triSurface& surf, const label facei)
 {
     // Simple check on indices ok.
 
@@ -1407,6 +1407,7 @@ Foam::isoSurface::isoSurface
     const scalarField& pVals,
     const scalar iso,
     const bool regularise,
+    const boundBox& bounds,
     const scalar mergeTol
 )
 :
@@ -1414,6 +1415,7 @@ Foam::isoSurface::isoSurface
     pVals_(pVals),
     iso_(iso),
     regularise_(regularise),
+    bounds_(bounds),
     mergeDistance_(mergeTol*mesh_.bounds().mag())
 {
     if (debug)
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.H b/src/sampling/sampledSurface/isoSurface/isoSurface.H
index dfea89a2805..267cc04c900 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurface.H
+++ b/src/sampling/sampledSurface/isoSurface/isoSurface.H
@@ -378,7 +378,7 @@ class isoSurface
         );
 
         //- Check single triangle for (topological) validity
-        static bool validTri(const triSurface&, const label);
+        static bool validTri(const triSurface&, const label facei);
 
         static triSurface subsetMesh
         (
diff --git a/src/sampling/sampledSurface/sampledSurfaces/IOsampledSurfaces.H b/src/sampling/sampledSurface/sampledSurfaces/IOsampledSurfaces.H
deleted file mode 100644
index e1fce601659..00000000000
--- a/src/sampling/sampledSurface/sampledSurfaces/IOsampledSurfaces.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Typedef
-    Foam::IOsampledSurfaces
-
-Description
-    Instance of the generic IOOutputFilter for sampledSurfaces.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef IOsampledSurfaces_H
-#define IOsampledSurfaces_H
-
-#include "sampledSurfaces.H"
-#include "IOOutputFilter.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    typedef IOOutputFilter<sampledSurfaces> IOsampledSurfaces;
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
index bfd64b6f88b..88eb52b0919 100644
--- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
+++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
@@ -96,12 +96,13 @@ void Foam::sampledSurfaces::writeGeometry() const
 Foam::sampledSurfaces::sampledSurfaces
 (
     const word& name,
-    const Time& t,
+    const Time& runTime,
     const dictionary& dict
 )
 :
-    regionFunctionObject(t, name),
+    functionObjects::regionFunctionObject(name, runTime, dict),
     PtrList<sampledSurface>(),
+    mesh_(refCast<const fvMesh>(obr_)),
     loadFromFiles_(false),
     outputPath_(fileName::null),
     fieldSelection_(),
@@ -130,8 +131,9 @@ Foam::sampledSurfaces::sampledSurfaces
     const bool loadFromFiles
 )
 :
-    regionFunctionObject(obr, name),
+    functionObjects::regionFunctionObject(name, obr, dict),
     PtrList<sampledSurface>(),
+    mesh_(refCast<const fvMesh>(obr)),
     loadFromFiles_(loadFromFiles),
     outputPath_(fileName::null),
     fieldSelection_(),
@@ -143,11 +145,11 @@ Foam::sampledSurfaces::sampledSurfaces
 
     if (Pstream::parRun())
     {
-        outputPath_ = time_.path()/".."/"postProcessing"/name_;
+        outputPath_ = time_.path()/".."/"postProcessing"/name;
     }
     else
     {
-        outputPath_ = time_.path()/"postProcessing"/name_;
+        outputPath_ = time_.path()/"postProcessing"/name;
     }
 
     read(dict);
diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
index efccd1f3d37..5d817632b5b 100644
--- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
+++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
@@ -61,7 +61,7 @@ class dictionary;
 
 class sampledSurfaces
 :
-    public regionFunctionObject,
+    public functionObjects::regionFunctionObject,
     public PtrList<sampledSurface>
 {
     // Private classes
@@ -95,6 +95,9 @@ class sampledSurfaces
 
     // Private data
 
+        //- Const reference to fvMesh
+        const fvMesh& mesh_;
+
         //- Load fields from files (not from objectRegistry)
         const bool loadFromFiles_;
 
diff --git a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
index 1abe638e484..ec0db202d58 100644
--- a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
+++ b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -28,7 +28,6 @@ License
 #include "IOmanip.H"
 #include "Time.H"
 #include "pointIOField.H"
-#include "AverageIOField.H"
 #include "primitivePatch.H"
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
@@ -113,30 +112,9 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate
 
     // Write field
     {
-        AverageIOField<Type> vals
-        (
-            IOobject
-            (
-                baseDir/timeName/fieldName,
-                dummyTime,
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            Type(Zero),
-            values
-        );
-
-        // Do like regIOobject::writeObject but don't do instance() adaptation
-        // since this would write to e.g. 0/ instead of postProcessing/
-
-        // Try opening an OFstream for object
-        mkDir(vals.path());
-        OFstream os(vals.objectPath());
-
-        vals.writeHeader(os);
-        vals.writeData(os);
-        vals.writeEndDivider(os);
+        fileName valsFile(baseDir/timeName/fieldName);
+        OFstream os(valsFile);
+        os  << values;
     }
 
     return baseDir;
diff --git a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C
index caff65a7dbc..4471a002ee7 100644
--- a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -38,49 +38,6 @@ namespace Foam
 }
 
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
-template<class Type>
-void Foam::foamSurfaceWriter::writeTemplate
-(
-    const fileName& outputDir,
-    const fileName& surfaceName,
-    const pointField& points,
-    const faceList& faces,
-    const word& fieldName,
-    const Field<Type>& values,
-    const bool isNodeValues,
-    const bool verbose
-) const
-{
-    fileName surfaceDir(outputDir/surfaceName);
-
-    if (!isDir(surfaceDir))
-    {
-        mkDir(surfaceDir);
-    }
-
-    if (verbose)
-    {
-        Info<< "Writing field " << fieldName << " to " << surfaceDir << endl;
-    }
-
-    // geometry should already have been written
-    // Values to separate directory (e.g. "scalarField/p")
-
-    fileName foamName(pTraits<Type>::typeName);
-    fileName valuesDir(surfaceDir  / (foamName + Field<Type>::typeName));
-
-    if (!isDir(valuesDir))
-    {
-        mkDir(valuesDir);
-    }
-
-    // values
-    OFstream(valuesDir/fieldName)()  << values;
-}
-
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::foamSurfaceWriter::foamSurfaceWriter()
@@ -97,7 +54,7 @@ Foam::foamSurfaceWriter::~foamSurfaceWriter()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::foamSurfaceWriter::write
+Foam::fileName Foam::foamSurfaceWriter::write
 (
     const fileName& outputDir,
     const fileName& surfaceName,
@@ -127,7 +84,7 @@ void Foam::foamSurfaceWriter::write
 
     // Face centers. Not really necessary but very handy when reusing as inputs
     // for e.g. timeVaryingMapped bc.
-    pointField faceCentres(faces.size(),point::zero);
+    pointField faceCentres(faces.size(), Zero);
 
     forAll(faces, facei)
     {
@@ -135,6 +92,8 @@ void Foam::foamSurfaceWriter::write
     }
 
     OFstream(surfaceDir/"faceCentres")() << faceCentres;
+
+    return surfaceDir;
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.H b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.H
index d9bd30b9857..8b541c6162a 100644
--- a/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.H
+++ b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriter.H
@@ -25,7 +25,7 @@ Class
     Foam::foamSurfaceWriter
 
 Description
-    A surfaceWriter for foams
+    A surfaceWriter for OpenFOAM surfaces
 
 SourceFiles
     foamSurfaceWriter.C
@@ -182,7 +182,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-    #include "foamFileSurfaceWriterTemplates.C"
+    #include "foamSurfaceWriterTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriterTemplates.C
similarity index 94%
rename from src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterTemplates.C
rename to src/sampling/sampledSurface/writers/foam/foamSurfaceWriterTemplates.C
index 2ab563fc10d..c21909d653d 100644
--- a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterTemplates.C
+++ b/src/sampling/sampledSurface/writers/foam/foamSurfaceWriterTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::fileName Foam::foamFileSurfaceWriter::writeTemplate
+Foam::fileName Foam::foamSurfaceWriter::writeTemplate
 (
     const fileName& outputDir,
     const fileName& surfaceName,
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C
index de13a49d018..e74591c4f7f 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -80,7 +80,7 @@ Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel
 
             // Check if the species file is provided, if not set inactive
             // and NO_WRITE
-            if (!header.headerOk())
+            if (!header.typeHeaderOk<volScalarField>(true))
             {
                 composition.setInactive(i);
                 this->Y()[i].writeOpt() = IOobject::NO_WRITE;
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
index d6b81645200..a9a6b4af6b1 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
@@ -50,7 +50,7 @@ namespace Foam
 class fvMesh;
 
 /*---------------------------------------------------------------------------*\
-                   class basicChemistryModel Declaration
+                     class basicChemistryModel Declaration
 \*---------------------------------------------------------------------------*/
 
 class basicChemistryModel
@@ -179,9 +179,6 @@ public:
 
                 //- Return the heat release, i.e. enthalpy/sec [m2/s3]
                 virtual tmp<volScalarField> dQ() const = 0;
-
-                //- Return number of reactions
-                virtual label nReaction() const = 0;
 };
 
 
diff --git a/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.C b/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.C
index f882381aa23..22fe72c6305 100644
--- a/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.C
+++ b/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.C
@@ -33,26 +33,26 @@ template<class ChemistryModelType>
 void Foam::functionObjects::specieReactionRates<ChemistryModelType>::
 writeFileHeader
 (
-    const label i
-)
+    Ostream& os
+) const
 {
-    writeHeader(file(), "Specie reaction rates");
-    volRegion::writeFileHeader(*this, file());
-    writeHeaderValue(file(), "nSpecie", chemistryModel_.nSpecie());
-    writeHeaderValue(file(), "nReaction", chemistryModel_.nReaction());
+    writeHeader(os, "Specie reaction rates");
+    volRegion::writeFileHeader(*this, os);
+    writeHeaderValue(os, "nSpecie", chemistryModel_.nSpecie());
+    writeHeaderValue(os, "nReaction", chemistryModel_.nReaction());
 
-    writeCommented(file(), "Time");
-    writeTabbed(file(), "Reaction");
+    writeCommented(os, "Time");
+    writeTabbed(os, "Reaction");
 
     const wordList& speciesNames =
         chemistryModel_.thermo().composition().species();
 
     forAll (speciesNames, si)
     {
-        writeTabbed(file(), speciesNames[si]);
+        writeTabbed(os, speciesNames[si]);
     }
 
-    file() << endl;
+    os  << endl;
 }
 
 
@@ -69,7 +69,7 @@ specieReactionRates
 :
     fvMeshFunctionObject(name, runTime, dict),
     volRegion(fvMeshFunctionObject::mesh_, dict),
-    logFiles(obr_, name),
+    writeFile(obr_, name, typeName, dict),
     chemistryModel_
     (
         fvMeshFunctionObject::mesh_.lookupObject<ChemistryModelType>
@@ -78,7 +78,7 @@ specieReactionRates
         )
     )
 {
-    resetName("specieReactionRates");
+    writeFileHeader(file());
 }
 
 
@@ -114,8 +114,6 @@ bool Foam::functionObjects::specieReactionRates<ChemistryModelType>::execute()
 template<class ChemistryModelType>
 bool Foam::functionObjects::specieReactionRates<ChemistryModelType>::write()
 {
-    logFiles::write();
-
     const label nSpecie = chemistryModel_.nSpecie();
     const label nReaction = chemistryModel_.nReaction();
 
@@ -124,11 +122,8 @@ bool Foam::functionObjects::specieReactionRates<ChemistryModelType>::write()
 
     for (label ri=0; ri<nReaction; ri++)
     {
-        if (Pstream::master())
-        {
-            writeTime(file());
-            file() << token::TAB << ri;
-        }
+        writeTime(file());
+        file() << token::TAB << ri;
 
         for (label si=0; si<nSpecie; si++)
         {
@@ -151,23 +146,14 @@ bool Foam::functionObjects::specieReactionRates<ChemistryModelType>::write()
                 );
             }
 
-            if (Pstream::master())
-            {
-                file() << token::TAB << sumVRRi/V;
-            }
+            file() << token::TAB << sumVRRi/V;
         }
 
-        if (Pstream::master())
-        {
-            file() << nl;
-        }
-    }
-
-    if (Pstream::master())
-    {
-        file() << nl << endl;
+        file() << nl;
     }
 
+    file() << nl << endl;
+  
     return true;
 }
 
diff --git a/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.H b/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.H
index 176c6be18b9..efde2df327c 100644
--- a/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.H
+++ b/src/thermophysicalModels/chemistryModel/functionObjects/specieReactionRates/specieReactionRates.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -46,7 +46,7 @@ SourceFiles
 
 #include "fvMeshFunctionObject.H"
 #include "volRegion.H"
-#include "logFiles.H"
+#include "writeFile.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -56,7 +56,7 @@ namespace functionObjects
 {
 
 /*---------------------------------------------------------------------------*\
-                          Class specieReactionRates Declaration
+                     Class specieReactionRates Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class ChemistryModelType>
@@ -64,7 +64,7 @@ class specieReactionRates
 :
     public fvMeshFunctionObject,
     public volRegion,
-    public logFiles
+    public writeFile
 {
     // Private Member Data
 
@@ -74,7 +74,7 @@ class specieReactionRates
     // Private Member Functions
 
         //- File header information
-        virtual void writeFileHeader(const label i);
+        virtual void writeFileHeader(Ostream& os) const;
 
         //- Disallow default bitwise copy construct
         specieReactionRates(const specieReactionRates&);
diff --git a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
index 4e32aedf592..758e837d6ec 100644
--- a/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/properties/liquidPropertiesFvPatchFields/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -247,8 +247,8 @@ humidityTemperatureCoupledMixedFvPatchScalarField
             << "\n    patch type '" << p.type()
             << "' not type '" << mappedPatchBase::typeName << "'"
             << "\n    for patch " << p.name()
-            << " of field " << dimensionedInternalField().name()
-            << " in file " << dimensionedInternalField().objectPath()
+            << " of field " << internalField().name()
+            << " in file " << internalField().objectPath()
             << exit(FatalIOError);
     }
 
@@ -635,7 +635,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
                 (
                     fieldName,
                     refCast<const fvMesh>(mesh)
-                ).boundaryField()[patch().index()];
+                ).boundaryFieldRef()[patch().index()];
 
 
             pDelta = mass_/liquidRho/magSf;
@@ -710,10 +710,10 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs()
 
             Info<< mesh.name() << ':'
                 << patch().name() << ':'
-                << dimensionedInternalField().name() << " <- "
+                << internalField().name() << " <- "
                 << nbrMesh.name() << ':'
                 << nbrPatch.name() << ':'
-                << dimensionedInternalField().name() << " :" << nl
+                << internalField().name() << " :" << nl
                 << "    Total mass flux   [Kg/s] : " << Qdm << nl
                 << "    Total mass on the wall [Kg] : " << QMass << nl
                 << "    Total heat (>0 leaving the wall to the fluid) [W] : "
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
index 935d2884b88..751e1ece9e5 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -160,7 +160,7 @@ void Foam::radiation::MarshakRadiationFvPatchScalarField::updateCoeffs()
         patch().lookupPatchField<volScalarField, scalar>("gammaRad");
 
     const boundaryRadiationProperties& boundaryRadiation =
-        boundaryRadiationProperties::New(dimensionedInternalField().mesh());
+        boundaryRadiationProperties::New(internalField().mesh());
 
     const tmp<scalarField> temissivity
     (
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C
index 99e61bc5245..c92ff74cede 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -159,7 +159,7 @@ updateCoeffs()
 
     //const scalarField temissivity = emissivity();
     const boundaryRadiationProperties& boundaryRadiation =
-        boundaryRadiationProperties::New(dimensionedInternalField().mesh());
+        boundaryRadiationProperties::New(internalField().mesh());
 
     const tmp<scalarField> temissivity
     (
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
index 6138abf45fd..a518336a0c6 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -152,9 +152,9 @@ updateCoeffs()
 
     label rayId = -1;
     label lambdaId = -1;
-    dom.setRayIdLambdaId(dimensionedInternalField().name(), rayId, lambdaId);
+    dom.setRayIdLambdaId(internalField().name(), rayId, lambdaId);
 
-    const label patchI = patch().index();
+    const label patchi = patch().index();
 
     if (dom.nLambda() != 1)
     {
@@ -172,10 +172,10 @@ updateCoeffs()
 
     const scalarField nAve(n & ray.dAve());
 
-    ray.Qr().boundaryField()[patchI] += Iw*nAve;
+    ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve;
 
     const boundaryRadiationProperties& boundaryRadiation =
-        boundaryRadiationProperties::New(dimensionedInternalField().mesh());
+        boundaryRadiationProperties::New(internalField().mesh());
 
     const tmp<scalarField> temissivity
     (
@@ -184,18 +184,18 @@ updateCoeffs()
 
     const scalarField& emissivity = temissivity();
 
-    scalarField& Qem = ray.Qem().boundaryField()[patchI];
-    scalarField& Qin = ray.Qin().boundaryField()[patchI];
+    scalarField& Qem = ray.Qem().boundaryFieldRef()[patchi];
+    scalarField& Qin = ray.Qin().boundaryFieldRef()[patchi];
 
     const vector& myRayId = dom.IRay(rayId).d();
 
     // Use updated Ir while iterating over rays
     // avoids to used lagged Qin
-    scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
+    scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchi];
 
     for (label rayI=1; rayI < dom.nRay(); rayI++)
     {
-        Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
+        Ir += dom.IRay(rayI).Qin().boundaryField()[patchi];
     }
 
     if (solarLoad_)
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
index 6843c685e43..b37192b6e08 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
@@ -140,9 +140,9 @@ updateCoeffs()
 
     label rayId = -1;
     label lambdaId = -1;
-    dom.setRayIdLambdaId(dimensionedInternalField().name(), rayId, lambdaId);
+    dom.setRayIdLambdaId(internalField().name(), rayId, lambdaId);
 
-    const label patchI = patch().index();
+    const label patchi = patch().index();
 
     if (dom.nLambda() == 0)
     {
@@ -159,15 +159,15 @@ updateCoeffs()
 
     const scalarField nAve(n & ray.dAve());
 
-    ray.Qr().boundaryField()[patchI] += Iw*nAve;
+    ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve;
 
     const scalarField Eb
     (
-        dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
+        dom.blackBody().bLambda(lambdaId).boundaryField()[patchi]
     );
 
     const boundaryRadiationProperties& boundaryRadiation =
-        boundaryRadiationProperties::New(dimensionedInternalField().mesh());
+        boundaryRadiationProperties::New(internalField().mesh());
 
 
     const tmp<scalarField> temissivity
@@ -177,67 +177,67 @@ updateCoeffs()
 
     const scalarField& emissivity = temissivity();
 
-    scalarField& Qem = ray.Qem().boundaryField()[patchI];
-    scalarField& Qin = ray.Qin().boundaryField()[patchI];
+    scalarField& Qem = ray.Qem().boundaryFieldRef()[patchi];
+    scalarField& Qin = ray.Qin().boundaryFieldRef()[patchi];
 
     // Use updated Ir while iterating over rays
     // avoids to used lagged Qin
     /*
-    scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
+    scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchi];
 
     for (label rayI=1; rayI < dom.nRay(); rayI++)
     {
-        Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
+        Ir += dom.IRay(rayI).Qin().boundaryField()[patchi];
     }
     */
 
     // Calculate Ir into the wall on the same lambdaId
     scalarField Ir(patch().size(), 0.0);
-    forAll(Iw, faceI)
+    forAll(Iw, facei)
     {
-        for (label rayI=0; rayI < dom.nRay(); rayI++)
+        for (label rayi=0; rayi < dom.nRay(); rayi++)
         {
-            const vector& d = dom.IRay(rayI).d();
+            const vector& d = dom.IRay(rayi).d();
 
-            if ((-n[faceI] & d) < 0.0)
+            if ((-n[facei] & d) < 0.0)
             {
                 // q into the wall
                 const scalarField& IFace =
-                    dom.IRay(rayI).ILambda(lambdaId).boundaryField()[patchI];
+                    dom.IRay(rayi).ILambda(lambdaId).boundaryField()[patchi];
 
-                const vector& rayDave = dom.IRay(rayI).dAve();
-                Ir[faceI] += IFace[faceI]*(n[faceI] & rayDave);
+                const vector& rayDave = dom.IRay(rayi).dAve();
+                Ir[facei] += IFace[facei]*(n[facei] & rayDave);
             }
         }
     }
 
-    forAll(Iw, faceI)
+    forAll(Iw, facei)
     {
         const vector& d = dom.IRay(rayId).d();
 
-        if ((-n[faceI] & d) > 0.0)
+        if ((-n[facei] & d) > 0.0)
         {
             // direction out of the wall
-            refGrad()[faceI] = 0.0;
-            valueFraction()[faceI] = 1.0;
-            refValue()[faceI] =
+            refGrad()[facei] = 0.0;
+            valueFraction()[facei] = 1.0;
+            refValue()[facei] =
                 (
-                    Ir[faceI]*(1.0 - emissivity[faceI])
-                  + emissivity[faceI]*Eb[faceI]
+                    Ir[facei]*(1.0 - emissivity[facei])
+                  + emissivity[facei]*Eb[facei]
                 )/pi;
 
             // Emmited heat flux from this ray direction (sum over lambdaId)
-            Qem[faceI] += refValue()[faceI]*nAve[faceI];
+            Qem[facei] += refValue()[facei]*nAve[facei];
         }
         else
         {
             // direction into the wall
-            valueFraction()[faceI] = 0.0;
-            refGrad()[faceI] = 0.0;
-            refValue()[faceI] = 0.0; //not used
+            valueFraction()[facei] = 0.0;
+            refGrad()[facei] = 0.0;
+            refValue()[facei] = 0.0; //not used
 
             // Incident heat flux on this ray direction (sum over lambdaId)
-            Qin[faceI] += Iw[faceI]*nAve[faceI];
+            Qin[facei] += Iw[facei]*nAve[facei];
         }
     }
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C
index 87fb4d61567..d7b66a87e04 100644
--- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C
+++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -118,8 +118,8 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T)
     firstIter_(true),
     absorptionEmission_(nullptr),
     scatter_(nullptr),
-    soot_(nullptr)
-    transmissivity_(nullPtr)
+    soot_(nullptr),
+    transmissivity_(nullptr)
 {}
 
 
@@ -139,8 +139,8 @@ Foam::radiation::radiationModel::radiationModel
     firstIter_(true),
     absorptionEmission_(nullptr),
     scatter_(nullptr),
-    soot_(nullptr)
-    transmissivity_(nullPtr)
+    soot_(nullptr),
+    transmissivity_(nullptr)
 {
     if (readOpt() == IOobject::NO_READ)
     {
@@ -179,8 +179,8 @@ Foam::radiation::radiationModel::radiationModel
     firstIter_(true),
     absorptionEmission_(nullptr),
     scatter_(nullptr),
-    soot_(nullPtr),
-    transmissivity_(nullPtr)
+    soot_(nullptr),
+    transmissivity_(nullptr)
 {
     initialise();
 }
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
index d162635f342..f976ceb902c 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
@@ -386,14 +386,15 @@ void Foam::faceShading::calculate()
         );
 
         volScalarField& hitFaces = thitFaces.ref();
+        volScalarField::Boundary& hitFacesBf = hitFaces.boundaryFieldRef();
 
-        hitFaces.boundaryField() = 0.0;
+        hitFacesBf = 0.0;
         forAll(rayStartFaces_, i)
         {
             const label faceI = rayStartFaces_[i];
             label patchID = patches.whichPatch(faceI);
             const polyPatch& pp = patches[patchID];
-            hitFaces.boundaryField()[patchID][faceI - pp.start()] = 1.0;
+            hitFacesBf[patchID][faceI - pp.start()] = 1.0;
         }
         hitFaces.write();
     }
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
index a69cfbd0ebb..b6eb14b4a7a 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
@@ -119,6 +119,7 @@ void Foam::radiation::solarLoad::updateDirectHitRadiation
 {
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const scalarField& V = mesh_.V();
+    volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
 
     forAll(hitFacesId, i)
     {
@@ -134,7 +135,7 @@ void Foam::radiation::solarLoad::updateDirectHitRadiation
 
             for (label bandI = 0; bandI < nBands_; bandI++)
             {
-                Qr_.boundaryField()[patchID][localFaceI] +=
+                QrBf[patchID][localFaceI] +=
                     (qPrim & n[localFaceI])
                   * spectralDistribution_[bandI]
                   * absorptivity_[patchID][bandI]()[localFaceI];
@@ -157,6 +158,7 @@ void Foam::radiation::solarLoad::updateDirectHitRadiation
     }
 }
 
+
 void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
 (
     const labelHashSet& includePatches,
@@ -165,6 +167,7 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
 {
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const scalarField& V = mesh_.V();
+    volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
 
     switch(solarCalc_.sunLoadModel())
     {
@@ -228,7 +231,7 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                     {
                         for (label bandI = 0; bandI < nBands_; bandI++)
                         {
-                            Qr_.boundaryField()[patchID][faceI] +=
+                            QrBf[patchID][faceI] +=
                                 (Ed + Er)
                               * spectralDistribution_[bandI]
                               * absorptivity_[patchID][bandI]()[faceI];
@@ -266,7 +269,7 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                     {
                         for (label bandI = 0; bandI < nBands_; bandI++)
                         {
-                            Qr_.boundaryField()[patchID][faceI] +=
+                            QrBf[patchID][faceI] +=
                                 solarCalc_.diffuseSolarRad()
                               * spectralDistribution_[bandI]
                               * absorptivity_[patchID][bandI]()[faceI];
@@ -294,7 +297,6 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
 
 void Foam::radiation::solarLoad::initialise(const dictionary& coeffs)
 {
-
     if (coeffs.found("gridUp"))
     {
          coeffs.lookup("gridUp") >> verticalDir_;
@@ -347,7 +349,6 @@ void Foam::radiation::solarLoad::calculateQdiff
     const labelHashSet& includeMappedPatchBasePatches
 )
 {
-
     scalarListIOList FmyProc
     (
         IOobject
@@ -535,10 +536,8 @@ void Foam::radiation::solarLoad::calculateQdiff
             }
 
             const scalarList& vf = FmyProc[locaFaceI];
-
             const labelList& compactFaces = visibleFaceFaces_[locaFaceI];
 
-
             forAll(compactFaces, j)
             {
                 label compactI = compactFaces[j];
@@ -556,6 +555,8 @@ void Foam::radiation::solarLoad::calculateQdiff
         }
     }
 
+    volScalarField::Boundary& QsBf = QsecondRad_.boundaryFieldRef();
+
     // Fill QsecondRad_
     label compactId = 0;
     forAll(includePatches_, i)
@@ -565,7 +566,7 @@ void Foam::radiation::solarLoad::calculateQdiff
 
         if (pp.size() > 0)
         {
-            scalarField& Qrp = QsecondRad_.boundaryField()[patchID];
+            scalarField& Qrp = QsBf[patchID];
 
             const labelList& coarsePatchFace =
                 coarseMesh_->patchFaceMap()[patchID];
@@ -586,6 +587,7 @@ void Foam::radiation::solarLoad::calculateQdiff
 
     const scalarField& V = mesh_.V();
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
+    volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
 
     forAllConstIter(labelHashSet, includePatches, iter)
     {
@@ -593,7 +595,7 @@ void Foam::radiation::solarLoad::calculateQdiff
         const scalarField& qSecond = QsecondRad_.boundaryField()[patchID];
         if (includeMappedPatchBasePatches[patchID])
         {
-            Qr_.boundaryField()[patchID] += qSecond;
+            QrBf[patchID] += qSecond;
         }
         else
         {
@@ -940,12 +942,13 @@ void Foam::radiation::solarLoad::calculate()
     }
 
     bool facesChanged = updateHitFaces();
+    volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
 
     if (facesChanged)
     {
         // Reset Ru and Qr
         Ru_ = dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0);
-        Qr_.boundaryField() = 0.0;
+        QrBf = 0.0;
 
         // Add direct hit radation
         const labelList& hitFacesId = hitFaces_->rayStartFaces();
diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
index 4a950f0edda..ef1a71d71f4 100644
--- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
+++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -403,6 +403,8 @@ void Foam::radiation::viewFactor::calculate()
     const boundaryRadiationProperties& boundaryRadiation =
         boundaryRadiationProperties::New(mesh_);
 
+    volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
+
     forAll(selectedPatches_, i)
     {
         label patchID = selectedPatches_[i];
@@ -410,7 +412,7 @@ void Foam::radiation::viewFactor::calculate()
         const scalarField& Tp = T_.boundaryField()[patchID];
         const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
 
-        fvPatchScalarField& QrPatch = Qr_.boundaryField()[patchID];
+        fvPatchScalarField& QrPatch = QrBf[patchID];
 
         greyDiffusiveViewFactorFixedValueFvPatchScalarField& Qrp =
             refCast
@@ -614,7 +616,6 @@ void Foam::radiation::viewFactor::calculate()
     Pstream::listCombineScatter(q);
     Pstream::listCombineGather(q, maxEqOp<scalar>());
 
-
     label globCoarseId = 0;
     forAll(selectedPatches_, i)
     {
@@ -622,7 +623,7 @@ void Foam::radiation::viewFactor::calculate()
         const polyPatch& pp = mesh_.boundaryMesh()[patchID];
         if (pp.size() > 0)
         {
-            scalarField& Qrp = Qr_.boundaryField()[patchID];
+            scalarField& Qrp = QrBf[patchID];
             const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
             const labelList& agglom = finalAgglom_[patchID];
             label nAgglom = max(agglom)+1;
@@ -653,9 +654,9 @@ void Foam::radiation::viewFactor::calculate()
 
     if (debug)
     {
-        forAll(Qr_.boundaryField(), patchID)
+        forAll(QrBf, patchID)
         {
-            const scalarField& Qrp = Qr_.boundaryField()[patchID];
+            const scalarField& Qrp = QrBf[patchID];
             const scalarField& magSf = mesh_.magSf().boundaryField()[patchID];
             scalar heatFlux = gSum(Qrp*magSf);
 
@@ -720,4 +721,5 @@ Foam::radiation::viewFactor::Ru() const
     );
 }
 
+
 // ************************************************************************* //
-- 
GitLab