diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C index 5ddb9d564b..e220d9a4c4 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ License namespace Foam { template<> - const char* NamedEnum:: + const char* NamedEnum:: names[] = { "timeStep", @@ -40,11 +40,12 @@ namespace Foam "runTime", "clockTime", "cpuTime", + "onEnd", "none" }; } -const Foam::NamedEnum +const Foam::NamedEnum Foam::outputFilterOutputControl::outputControlNames_; @@ -113,6 +114,7 @@ void Foam::outputFilterOutputControl::read(const dictionary& dict) break; } + case ocOnEnd: default: { // do nothing @@ -196,6 +198,13 @@ bool Foam::outputFilterOutputControl::output() break; } + case ocOnEnd: + { + scalar endTime = time_.endTime().value() - 0.5*time_.deltaTValue(); + return time_.value() > endTime; + break; + } + case ocNone: { return false; diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H index 1818fe1700..6cef209c15 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,6 +62,7 @@ public: ocRunTime, /*!< run time for dumping */ ocClockTime, /*!< clock time for dumping */ ocCpuTime, /*!< cpu time for dumping */ + ocOnEnd, /*!< on end of run*/ ocNone /*!< no output */ }; @@ -77,7 +78,7 @@ private: const word prefix_; //- String representation of outputControls enums - static const NamedEnum outputControlNames_; + static const NamedEnum outputControlNames_; //- Type of output outputControls outputControl_; diff --git a/src/TurbulenceModels/compressible/Make/files b/src/TurbulenceModels/compressible/Make/files index c4aab94251..2c2366c37d 100644 --- a/src/TurbulenceModels/compressible/Make/files +++ b/src/TurbulenceModels/compressible/Make/files @@ -10,7 +10,6 @@ $(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchSca $(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C $(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C $(BCs)/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C -$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C $(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 0b23bd4237..1c159ff7cb 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -133,7 +133,6 @@ $(derivedFvPatchFields)/advective/advectiveFvPatchFields.C $(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchFields.C $(derivedFvPatchFields)/codedMixed/codedMixedFvPatchFields.C $(derivedFvPatchFields)/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C -$(derivedFvPatchFields)/externalCoupledMixed/externalCoupledMixedFvPatchFields.C $(derivedFvPatchFields)/fan/fanFvPatchFields.C $(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C deleted file mode 100644 index f930a1ef5c..0000000000 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ /dev/null @@ -1,851 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2013 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 . - -\*---------------------------------------------------------------------------*/ - -#include "externalCoupledMixedFvPatchField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "IFstream.H" -#include "globalIndex.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template -Foam::word Foam::externalCoupledMixedFvPatchField::lockName = "OpenFOAM"; - -template -Foam::string -Foam::externalCoupledMixedFvPatchField::patchKey = "# Patch: "; - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -Foam::fileName Foam::externalCoupledMixedFvPatchField::baseDir() const -{ - word regionName(this->dimensionedInternalField().mesh().name()); - if (regionName == polyMesh::defaultRegion) - { - regionName = "."; - } - - fileName result(commsDir_/regionName); - result.clean(); - - return result; -} - - -template -void Foam::externalCoupledMixedFvPatchField::setMaster -( - const labelList& patchIDs -) -{ - const volFieldType& cvf = - static_cast(this->dimensionedInternalField()); - - volFieldType& vf = const_cast(cvf); - - typename volFieldType::GeometricBoundaryField& bf = vf.boundaryField(); - - // number of patches can be different in parallel... - label nPatch = bf.size(); - reduce(nPatch, maxOp