diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 7afe8356a6..7922d487a2 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -490,11 +490,17 @@ void syncPoints int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" -# include "addRegionOption.H" + #include "addOverwriteOption.H" + #include "addRegionOption.H" + argList::addOption + ( + "dict", + "word", + "name of dictionary to provide patch information" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); Foam::word meshRegionName = polyMesh::defaultRegion; @@ -502,13 +508,18 @@ int main(int argc, char *argv[]) const bool overwrite = args.optionFound("overwrite"); - Info<< "Reading createPatchDict." << nl << endl; + word dictName + ( + args.optionLookupOrDefault("dict", "createPatchDict") + ); + + Info<< "Reading " << dictName << nl << endl; IOdictionary dict ( IOobject ( - "createPatchDict", + dictName, runTime.system(), ( meshRegionName != polyMesh::defaultRegion @@ -526,7 +537,7 @@ int main(int argc, char *argv[]) // Whether to synchronise points const Switch pointSync(dict.lookup("pointSync")); -# include "createNamedPolyMesh.H" + #include "createNamedPolyMesh.H" const word oldInstance = mesh.pointsInstance(); @@ -607,6 +618,11 @@ int main(int argc, char *argv[]) ).ptr() ); } + else + { + Info<< "Patch '" << patchName << "' already exists. Only " + << "moving patch faces - type will remain the same" << endl; + } } // Copy old patches. diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C index 99631e1e49..3841e16bf3 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C @@ -61,6 +61,8 @@ int main(int argc, char *argv[]) ); argList::noParallel(); + #include "addOverwriteOption.H" + argList::validArgs.append("masterCase"); argList::addOption ( @@ -83,6 +85,8 @@ int main(int argc, char *argv[]) FatalError.exit(); } + const bool overwrite = args.optionFound("overwrite"); + fileName masterCase = args[1]; word masterRegion = polyMesh::defaultRegion; args.optionReadIfPresent("masterRegion", masterRegion); @@ -126,7 +130,10 @@ int main(int argc, char *argv[]) ) ); - runTimeMaster++; + if (!overwrite) + { + runTimeMaster++; + } Info<< "Writing combined mesh to " << runTimeMaster.timeName() << endl; diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C index 6641e4301c..159b70c082 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C @@ -128,7 +128,7 @@ void Foam::ReactingParcel::readFields wordList stateLabels(nPhases, ""); if (compModel.nPhase() == 1) { - stateLabels = compModel.stateLabels(); + stateLabels = compModel.stateLabels()[0]; } @@ -198,7 +198,7 @@ void Foam::ReactingParcel::writeFields wordList stateLabels(phaseTypes.size(), ""); if (compModel.nPhase() == 1) { - stateLabels = compModel.stateLabels(); + stateLabels = compModel.stateLabels()[0]; } forAll(phaseTypes, j) diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties index eff5806ae7..ec1061eb2d 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -136,7 +136,7 @@ charCoeffs thermodynamics { Hf 0; - C0 611.0;; // Cp = C0*(T/Tref)^n0 + C0 611.0; // Cp = C0*(T/Tref)^n0 Tref 300; n0 1.31; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/heater/solidThermophysicalProperties index d169d6aebd..b345dace24 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/heater/solidThermophysicalProperties @@ -141,7 +141,7 @@ charCoeffs thermodynamics { Hf 0; - C0 611.0;; // Cp = C0*(T/Tref)^n0 + C0 611.0; // Cp = C0*(T/Tref)^n0 Tref 300; n0 1.31; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties index fdad307ca2..54ca602eee 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties @@ -136,7 +136,7 @@ charCoeffs thermodynamics { Hf 0; - C0 611.0;; // Cp = C0*(T/Tref)^n0 + C0 611.0; // Cp = C0*(T/Tref)^n0 Tref 300; n0 1.31; } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/solidThermophysicalProperties index 4921a907f1..004cda2c14 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/solidThermophysicalProperties @@ -141,7 +141,7 @@ charCoeffs thermodynamics { Hf 0; - C0 611.0;; // Cp = C0*(T/Tref)^n0 + C0 611.0; // Cp = C0*(T/Tref)^n0 Tref 300; n0 1.31; }