diff --git a/Guides-a4/ProgrammersGuide.pdf b/Guides-a4/ProgrammersGuide.pdf deleted file mode 100644 index ebd495d608..0000000000 Binary files a/Guides-a4/ProgrammersGuide.pdf and /dev/null differ diff --git a/Guides-a4/UserGuide.pdf b/Guides-a4/UserGuide.pdf deleted file mode 100644 index 7524e9d800..0000000000 Binary files a/Guides-a4/UserGuide.pdf and /dev/null differ diff --git a/Guides-usletter/ProgrammersGuide.pdf b/Guides-usletter/ProgrammersGuide.pdf deleted file mode 100644 index a97bc6d99d..0000000000 Binary files a/Guides-usletter/ProgrammersGuide.pdf and /dev/null differ diff --git a/Guides-usletter/UserGuide.pdf b/Guides-usletter/UserGuide.pdf deleted file mode 100644 index 8960561f15..0000000000 Binary files a/Guides-usletter/UserGuide.pdf and /dev/null differ diff --git a/applications/solvers/DNS/dnsFoam/Allwmake b/applications/solvers/DNS/dnsFoam/Allwmake new file mode 100755 index 0000000000..759041a131 --- /dev/null +++ b/applications/solvers/DNS/dnsFoam/Allwmake @@ -0,0 +1,14 @@ +#!/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 + wmake +else + echo + echo "Skipping dnsFoam solver (no FFTW)" + echo +fi + +#------------------------------------------------------------------------------ diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index cda60d98b2..c778ef40a8 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -41,7 +41,6 @@ p_rghDDtEqn = ( fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) - + fvc::div(phiHbyA) == fvOptions(psi, p_rgh, rho.name()) ); @@ -52,6 +51,7 @@ fvScalarMatrix p_rghEqn ( p_rghDDtEqn() + + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p_rgh) ); diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C index 5db8e7ede5..d9932d06dd 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 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C b/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C index 6124bf2522..193501ea42 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C +++ b/applications/solvers/multiphase/MPPICInterFoam/CompressibleTwoPhaseMixtureTurbulenceModels/CompressibleTwoPhaseMixtureTurbulenceModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C index 35797278d7..07a6b062bb 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C +++ b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/interCondensatingEvaporatingFoam.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/interCondensatingEvaporatingFoam.C index b935398866..2fb0013224 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/interCondensatingEvaporatingFoam.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/interCondensatingEvaporatingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C index 7543b9c856..6d3f21c2fb 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.H index dd23e97024..ba6780e91b 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C index 8dbb7c038c..88497f6222 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C index fe8923d3af..bc2cf7f2d1 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.H index f829297ad8..9d748fd737 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C index 6822e0bbc5..4be68f4c26 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.H index ea2bec1b5d..0d39b94b9e 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index 19eb8ddca7..a2c2b71fcf 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H index 8616713b19..cc61acf674 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/test/NamedEnum/Make/files b/applications/test/NamedEnum/Make/files index 755b72ba5e..a1a7086041 100644 --- a/applications/test/NamedEnum/Make/files +++ b/applications/test/NamedEnum/Make/files @@ -1,3 +1,3 @@ -Test-namedEnum.C +Test-NamedEnum.C EXE = $(FOAM_USER_APPBIN)/Test-NamedEnum diff --git a/applications/test/NamedEnum/Test-NamedEnum.C b/applications/test/NamedEnum/Test-NamedEnum.C new file mode 100644 index 0000000000..63386ed79e --- /dev/null +++ b/applications/test/NamedEnum/Test-NamedEnum.C @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Description + +\*---------------------------------------------------------------------------*/ + +#include "NamedEnum.H" +#include "IOstreams.H" + +using namespace Foam; + +class namedEnumTest +{ +public: + + enum option + { + a, + b, + c, + d + }; + + static const Foam::NamedEnum namedEnum; +}; + + +template<> +const char* Foam::NamedEnum::names[] = +{ + "a", + "b", + "c", + "d" +}; + +const Foam::NamedEnum namedEnumTest::namedEnum; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + const List options + = namedEnumTest::namedEnum.enums(); + + Info<< "enums: " << options << nl; + + Info<< "loop over enums (as list):" << nl; + forAll(options, i) + { + const namedEnumTest::option& opt = options[i]; + + Info<< "option[" << opt + << "] = '" << namedEnumTest::namedEnum[opt] << "'" << nl; + } + +#if __cplusplus > 201100L + // C++11 + Info<< "loop over enums (C++11 for range):" << nl; + for (auto const& opt : options) + { + Info<< "option[" << opt + << "] = '" << namedEnumTest::namedEnum[opt] << "'" << nl; + } +#else + Info<< "loop over enums (via iterator):" << nl; + forAllConstIter(List, options, iter) + { + const namedEnumTest::option& opt = *iter; + + Info<< "option[" << opt + << "] = '" << namedEnumTest::namedEnum[opt] << "'" << nl; + } +#endif + + Info<< nl + << namedEnumTest::namedEnum["a"] << nl + << namedEnumTest::namedEnum[namedEnumTest::a] << nl; + + Info<< "--- test read construction ---" << endl; + + namedEnumTest::option dummy(namedEnumTest::namedEnum.read(Sin)); + Info<< namedEnumTest::namedEnum[dummy] << endl; + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/boundBox/Make/files b/applications/test/boundBox/Make/files new file mode 100644 index 0000000000..ebb8e6fb12 --- /dev/null +++ b/applications/test/boundBox/Make/files @@ -0,0 +1,3 @@ +Test-boundBox.C + +EXE = $(FOAM_USER_APPBIN)/Test-boundBox diff --git a/applications/test/boundBox/Make/options b/applications/test/boundBox/Make/options new file mode 100644 index 0000000000..d27c95d033 --- /dev/null +++ b/applications/test/boundBox/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/test/NamedEnum/Test-namedEnum.C b/applications/test/boundBox/Test-boundBox.C similarity index 65% rename from applications/test/NamedEnum/Test-namedEnum.C rename to applications/test/boundBox/Test-boundBox.C index 22f3596932..cb72b9ca87 100644 --- a/applications/test/NamedEnum/Test-namedEnum.C +++ b/applications/test/boundBox/Test-boundBox.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) 2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,38 +22,28 @@ License along with OpenFOAM. If not, see . Description + Test bounding box behaviour \*---------------------------------------------------------------------------*/ -#include "NamedEnum.H" -#include "IOstreams.H" +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" +#include "boundBox.H" +#include "treeBoundBox.H" +#include "cellModeller.H" using namespace Foam; -class namedEnumTest +//- simple helper to create a cube +boundBox cube(scalar start, scalar width) { -public: - - enum options - { - a, - b, - c - }; - - static const Foam::NamedEnum namedEnum; -}; - - -template<> -const char* Foam::NamedEnum::names[] = -{ - "a", - "b", - "c" -}; - -const Foam::NamedEnum namedEnumTest::namedEnum; + return boundBox + ( + point(start, start, start), + point(start + width, start + width, start + width) + ); +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,13 +51,14 @@ const Foam::NamedEnum namedEnumTest::namedEnum; int main(int argc, char *argv[]) { - Info<< namedEnumTest::namedEnum["a"] << endl; - Info<< namedEnumTest::namedEnum[namedEnumTest::a] << endl; + #include "setRootCase.H" + // #include "createTime.H" + // #include "createMesh.H" - namedEnumTest::options hmm(namedEnumTest::namedEnum.read(Sin)); - Info<< namedEnumTest::namedEnum[hmm] << endl; + const cellModel& hex = *(cellModeller::lookup("hex")); - Info<< "End\n" << endl; + Info<<"boundBox faces: " << boundBox::faces << endl; + Info<<"hex faces: " << hex.modelFaces() << endl; return 0; } diff --git a/applications/test/codeStream/codeStreamDict1 b/applications/test/codeStream/codeStreamDict1 index 8360f3ff4f..a552f5ec68 100644 --- a/applications/test/codeStream/codeStreamDict1 +++ b/applications/test/codeStream/codeStreamDict1 @@ -30,7 +30,8 @@ writeInterval #codeStream codeOptions #{ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude #}; localCode diff --git a/applications/test/cstring/Make/files b/applications/test/cstring/Make/files new file mode 100644 index 0000000000..eb7e33dc8b --- /dev/null +++ b/applications/test/cstring/Make/files @@ -0,0 +1,3 @@ +Test-cstring.C + +EXE = $(FOAM_USER_APPBIN)/Test-cstring diff --git a/applications/test/cstring/Make/options b/applications/test/cstring/Make/options new file mode 100644 index 0000000000..6a9e9810b3 --- /dev/null +++ b/applications/test/cstring/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ +/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/cstring/Test-cstring.C b/applications/test/cstring/Test-cstring.C new file mode 100644 index 0000000000..fc4605cfa4 --- /dev/null +++ b/applications/test/cstring/Test-cstring.C @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Description + Test some string functionality + +\*---------------------------------------------------------------------------*/ + +#include "CStringList.H" +#include "DynamicList.H" +#include "IOstreams.H" +#include "fileNameList.H" +#include "stringList.H" +#include "wordList.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int print(int argc, char *argv[]) +{ + Info<< "argc=" << argc << endl; + for (int i=0; i dynlst; + dynlst.reserve(16); + + dynlst.append("string1 with content"); + dynlst.append("string2 other content"); + dynlst.append("string3 done"); + + { + CStringList inC(dynlst); + + Info<< "input: " << dynlst << endl; + print(inC); + } + + Info<<"command-line with " << CStringList::count(argv) << " items"<< endl; + + print(argc, argv); + { + dynlst.clear(); + for (int i=0; i " << findEtcFile("controlDict") << nl diff --git a/applications/test/fvc2D/Make/files b/applications/test/fvc2D/Make/files new file mode 100644 index 0000000000..ffd2664354 --- /dev/null +++ b/applications/test/fvc2D/Make/files @@ -0,0 +1,3 @@ +Test-fvc2D.C + +EXE = $(FOAM_USER_APPBIN)/Test-fvc2D diff --git a/applications/test/fvc2D/Make/options b/applications/test/fvc2D/Make/options new file mode 100644 index 0000000000..d27c95d033 --- /dev/null +++ b/applications/test/fvc2D/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/test/fvc2D/Test-fvc2D.C b/applications/test/fvc2D/Test-fvc2D.C new file mode 100644 index 0000000000..c1fbdf5cf9 --- /dev/null +++ b/applications/test/fvc2D/Test-fvc2D.C @@ -0,0 +1,75 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-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 . + +Application + test + +Description + Finite volume method test code. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "vector2D.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + typedef GeometricField volVector2DField; + + defineTemplate2TypeNameAndDebug + ( + volVector2DField::DimensionedInternalField, + 0 + ); + defineTemplateTypeNameAndDebug(volVector2DField, 0); + + typedef fvPatchField fvPatchVector2DField; + makeFvPatchField(fvPatchVector2DField) +} + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + + GeometricField fld + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "end" << endl; +} + + +// ************************************************************************* // diff --git a/applications/utilities/doc/utilities.dox b/applications/utilities/doc/utilities.dox new file mode 100644 index 0000000000..f9cbceeb99 --- /dev/null +++ b/applications/utilities/doc/utilities.dox @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +\page pageUtilities Utilities + +\section secUtilities Overview +The available utilities are grouped into the following categories: + - \ref grpMeshUtilities + - \ref grpMiscUtilities + - \ref grpPreProcessingUtilities + - \ref grpPostProcessingUtilities + - \ref grpThermoUtilities + - \ref grpSurfaceUtilities + +\*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/doc/utilitiesDoc.H b/applications/utilities/doc/utilitiesDoc.H new file mode 100644 index 0000000000..d953a47480 --- /dev/null +++ b/applications/utilities/doc/utilitiesDoc.H @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +\defgroup grpUtilities Utilities +@{ + This group contains utilities +@} + +\defgroup grpMeshUtilities Mesh +@{ + \ingroup grpUtilities + This group contains meshing utilities +@} + +\defgroup grpPreProcessingUtilities Pre-processing +@{ + \ingroup grpUtilities + This group contains pre-processing utilities +@} + +\defgroup grpPostProcessingUtilities Post-processing +@{ + \ingroup grpUtilities + This group contains post-processing utilities +@} + +\defgroup grpParallelUtilities Parallel +@{ + \ingroup grpUtilities + This group contains parallel utilities +@} + +\defgroup grpSurfaceUtilities Surface +@{ + \ingroup grpUtilities + This group contains surface utilities +@} + +\defgroup grpThermophysicalUtilities Thermophysical +@{ + \ingroup grpUtilities + This group contains thermophysical utilities +@} + +\defgroup grpMiscUtilities Miscellaneous +@{ + \ingroup grpUtilities + This group contains miscellaneous utilities +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index e38319f481..f936134e9a 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -24,6 +24,9 @@ License Application PDRMesh +Group + grpMeshAdvancedUtilities + Description Mesh and field preparation utility for PDR type simulations. diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index b3099f4f28..7cbfa6d9cb 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -24,6 +24,9 @@ License Application collapseEdges +Group + grpMeshAdvancedUtilities + Description Collapses short edges and combines edges that are in line. diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 9854ec2fef..2666d4c9de 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -24,6 +24,9 @@ License Application combinePatchFaces +Group + grpMeshAdvancedUtilities + Description Checks for multiple patch faces on same cell and combines them. Multiple patch faces can result from e.g. removal of refined diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 766cd6a6e5..320a1f2d96 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -24,6 +24,9 @@ License Application modifyMesh +Group + grpMeshAdvancedUtilities + Description Manipulates mesh elements. diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index dc797fdcee..fcdd7ec8f1 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -24,6 +24,9 @@ License Application refineHexMesh +Group + grpMeshAdvancedUtilities + Description Refines a hex mesh by 2x2x2 cell splitting. diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index ba5b7f8548..754568cc4a 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -24,6 +24,9 @@ License Application refineWallLayer +Group + grpMeshAdvancedUtilities + Description Utility to refine cells next to patches. diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index a12adf8413..744fcf5c5a 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -24,6 +24,9 @@ License Application refinementLevel +Group + grpMeshAdvancedUtilities + Description Tries to figure out what the refinement level is on refined cartesian meshes. Run BEFORE snapping. diff --git a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C index 64191b8bb0..ca82886601 100644 --- a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C +++ b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C @@ -24,6 +24,9 @@ License Application removeFaces +Group + grpMeshAdvancedUtilities + Description Utility to remove faces (combines cells on both sides). diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index c71929e500..87b4398d28 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -24,6 +24,9 @@ License Application selectCells +Group + grpMeshAdvancedUtilities + Description Select cells in relation to surface. diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/Make/files b/applications/utilities/mesh/advanced/snappyRefineMesh/Make/files similarity index 100% rename from applications/utilities/mesh/advanced/autoRefineMesh/Make/files rename to applications/utilities/mesh/advanced/snappyRefineMesh/Make/files diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/Make/options b/applications/utilities/mesh/advanced/snappyRefineMesh/Make/options similarity index 100% rename from applications/utilities/mesh/advanced/autoRefineMesh/Make/options rename to applications/utilities/mesh/advanced/snappyRefineMesh/Make/options diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C similarity index 99% rename from applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C rename to applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index abb29b1dea..4e4f7e0263 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -24,6 +24,9 @@ License Application snappyRefineMesh +Group + grpMeshAdvancedUtilities + Description Utility to refine cells near to a surface. diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMeshDict b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMeshDict similarity index 100% rename from applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMeshDict rename to applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMeshDict diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 0e1eb5b1e5..7e44c20d36 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -24,6 +24,9 @@ License Application splitCells +Group + grpMeshAdvancedUtilities + Description Utility to split cells with flat faces. diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake index f84479c089..6d02ede6f4 100755 --- a/applications/utilities/mesh/conversion/Optional/Allwmake +++ b/applications/utilities/mesh/conversion/Optional/Allwmake @@ -8,15 +8,15 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # Get version info and arch-path . $WM_PROJECT_DIR/etc/config.sh/functions -_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/libccmio) +_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) set -x -# Build libccmio (.so) -$WM_THIRD_PARTY_DIR/makeCCMIO +# Build libccmio (.a|.so) +$WM_THIRD_PARTY_DIR/makeCCMIO lib # libso if [ -e $CCMIO_ARCH_PATH/include/libccmio/ccmio.h \ - -a -e $FOAM_EXT_LIBBIN/libccmio.so ] + -a \( -e $CCMIO_ARCH_PATH/lib/libccmio.a -o $FOAM_EXT_LIBBIN/libccmio.so \) ] then wmake ccm26ToFoam fi diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options index 410b53c73c..7e3235bf81 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/Make/options @@ -6,4 +6,4 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -L$(FOAM_EXT_LIBBIN) -lccmio + -L$(CCMIO_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN) -lccmio diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C index d97133244c..c244c6379c 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C @@ -21,6 +21,12 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . +Application + ccm26ToFoam + +Group + grpMeshConversionUtilities + Description Reads CCM files as written by Prostar/ccm using ccm 2.6 (not 2.4) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 9a21299127..3f17812bb4 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -24,6 +24,9 @@ License Application ansysToFoam +Group + grpMeshConversionUtilities + Description Converts an ANSYS input mesh file, exported from I-DEAS, to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index c3d2fef073..af7f86f7b6 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -24,6 +24,9 @@ License Application cfx4ToFoam +Group + grpMeshConversionUtilities + Description Converts a CFX 4 mesh to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C index 4ee10d1f15..2b1956e51f 100644 --- a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C +++ b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C @@ -24,6 +24,9 @@ License Application datToFoam +Group + grpMeshConversionUtilities + Description Reads in a datToFoam mesh file and outputs a points file. Used in conjunction with blockMesh. diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 1d28f046dc..3d1875d717 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -24,6 +24,9 @@ License Application fluent3DMeshToFoam +Group + grpMeshConversionUtilities + Description Converts a Fluent mesh to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 3300ba9778..6cff0ce962 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -24,6 +24,9 @@ License Application fluentMeshToFoam +Group + grpMeshConversionUtilities + Description Converts a Fluent mesh to OpenFOAM format including multiple region and region boundary handling. diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/foamMeshToFluent.C b/applications/utilities/mesh/conversion/foamMeshToFluent/foamMeshToFluent.C index 31ca1f9db4..d532e27d5f 100644 --- a/applications/utilities/mesh/conversion/foamMeshToFluent/foamMeshToFluent.C +++ b/applications/utilities/mesh/conversion/foamMeshToFluent/foamMeshToFluent.C @@ -24,6 +24,9 @@ License Application foamMeshToFluent +Group + grpMeshConversionUtilities + Description Writes out the OpenFOAM mesh in Fluent mesh format. diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C index a345d30015..adc86dc4b5 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C +++ b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C @@ -24,6 +24,9 @@ License Application foamToStarMesh +Group + grpMeshConversionUtilities + Description Reads an OpenFOAM mesh and writes a pro-STAR (v4) bnd/cel/vrt format. diff --git a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C index 9654b33fc2..16a6752cfb 100644 --- a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C +++ b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C @@ -24,6 +24,9 @@ License Application foamToSurface +Group + grpMeshConversionUtilities + Description Reads an OpenFOAM mesh and writes the boundaries in a surface format. diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 6821af8fba..c2dfdf4355 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -24,6 +24,9 @@ License Application gambitToFoam +Group + grpMeshConversionUtilities + Description Converts a GAMBIT mesh to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 5de646c441..9d466f64f2 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -24,6 +24,9 @@ License Application gmshToFoam +group + grpMeshConversionUtilities + Description Reads .msh file as written by Gmsh. diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 7a94b27299..8c14a5373d 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -24,6 +24,9 @@ License Application ideasUnvToFoam +Group + grpMeshConversionUtilities + Description I-Deas unv format mesh conversion. diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 99d522f741..56653cc921 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -24,6 +24,9 @@ License Application kivaToFoam +Group + grpMeshConversionUtilities + Description Converts a KIVA3v grid to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C index a69f6047a5..81cc0322fc 100644 --- a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C +++ b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C @@ -24,6 +24,9 @@ License Application mshToFoam +Group + grpMeshConversionUtilities + Description Converts .msh file generated by the Adventure system. diff --git a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C index e004220723..93c4267f77 100644 --- a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C +++ b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C @@ -24,6 +24,9 @@ License Application netgenNeutralToFoam +Group + grpMeshConversionUtilities + Description Converts neutral file format as written by Netgen v4.4. diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index 891af306e1..63ddfd1e69 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -24,6 +24,9 @@ License Application plot3dToFoam +Group + grpMeshConversionUtilities + Description Plot3d mesh (ascii/formatted format) converter. diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C index 5bceed621f..543b71cba3 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C @@ -24,6 +24,9 @@ License Application sammToFoam +Group + grpMeshConversionUtilities + Description Converts a Star-CD (v3) SAMM mesh to OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C b/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C index 9668741305..4e6449b9fd 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C @@ -24,6 +24,9 @@ License Application star3ToFoam +Group + grpMeshConversionUtilities + Description Converts a Star-CD (v3) pro-STAR mesh into OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C index f8e1657e79..cefbf009d1 100644 --- a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C +++ b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C @@ -24,6 +24,9 @@ License Application star4ToFoam +Group + grpMeshConversionUtilities + Description Converts a Star-CD (v4) pro-STAR mesh into OpenFOAM format. diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index 46ea78e599..7eac643583 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -24,6 +24,9 @@ License Application tetgenToFoam +Group + grpMeshConversionUtilities + Description Converts .ele and .node and .face files, written by tetgen. diff --git a/applications/utilities/mesh/conversion/vtkUnstructuredToFoam/vtkUnstructuredToFoam.C b/applications/utilities/mesh/conversion/vtkUnstructuredToFoam/vtkUnstructuredToFoam.C index 4c6c7af788..507d8575e7 100644 --- a/applications/utilities/mesh/conversion/vtkUnstructuredToFoam/vtkUnstructuredToFoam.C +++ b/applications/utilities/mesh/conversion/vtkUnstructuredToFoam/vtkUnstructuredToFoam.C @@ -21,6 +21,12 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . +Application + vtkUnstructuredToFoam + +Group + grpMeshConversionUtilities + Description Converts ascii .vtk (legacy format) file generated by vtk/paraview. diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 3b0a226933..98923ea6ee 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -24,6 +24,9 @@ License Application writeMeshObj +Group + grpMeshConversionUtilities + Description For mesh debugging: writes mesh as three separate OBJ files which can be viewed with e.g. javaview. diff --git a/applications/utilities/mesh/doc/meshUtilitiesDoc.H b/applications/utilities/mesh/doc/meshUtilitiesDoc.H new file mode 100644 index 0000000000..f0ff94b39c --- /dev/null +++ b/applications/utilities/mesh/doc/meshUtilitiesDoc.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +\defgroup grpMeshGenerationUtilities Generation +@{ + \ingroup grpMeshUtilities + This group contains mesh generation utilities +@} + +\defgroup grpMeshConversionUtilities Conversion +@{ + \ingroup grpMeshUtilities + This group contains mesh conversion utilities +@} + +\defgroup grpMeshManipulationUtilities Manipulation +@{ + \ingroup grpMeshUtilities + This group contains mesh generation utilities +@} + +\defgroup grpMeshAdvancedUtilities Advanced +@{ + \ingroup grpMeshUtilities + This group contains advanced mesh utilities +@} + +\*---------------------------------------------------------------------------*/ + diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 0c92180830..3d0624f745 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -24,6 +24,9 @@ License Application blockMesh +Group + grpMeshGenerationUtilities + Description A multi-block mesh generator. diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 00ced168eb..d52ed1b29f 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -24,6 +24,9 @@ License Application extrudeMesh +Group + grpMeshGenerationUtilities + Description Extrude mesh from existing patch (by default outwards facing normals; optional flips faces) or from patch read from file. diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 91aab57a1b..7f35de4b22 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -24,6 +24,9 @@ License Application extrudeToRegionMesh +Group + grpMeshGenerationUtilities + Description Extrude faceZones (internal or boundary faces) or faceSets (boundary faces only) into a separate mesh (as a different region). diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C index a6916b7076..ef6cd069e9 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C @@ -24,6 +24,9 @@ License Application extrude2DMesh +Group + grpMeshGenerationUtilities + Description Takes 2D mesh (all faces 2 points only, no front and back faces) and creates a 3D mesh by extruding with specified thickness. diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C index fd8d6f1224..3588a9878f 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C @@ -24,6 +24,9 @@ License Application foamyHexMesh +Group + grpMeshGenerationUtilities + Description Conformal Voronoi automatic mesh generator diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C index 997726bba6..f8d6054644 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C @@ -24,6 +24,9 @@ License Application foamyQuadMesh +Group + grpMeshGenerationUtilities + Description Conformal-Voronoi 2D extruding automatic mesher with grid or read initial points and point position relaxation with optional diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index b5187f1e94..fa856b6fc2 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -24,6 +24,9 @@ License Application snappyHexMesh +Group + grpMeshGenerationUtilities + Description Automatic split hex mesher. Refines and snaps to surface. @@ -610,6 +613,7 @@ void writeMesh int main(int argc, char *argv[]) { + #include "addRegionOption.H" #include "addOverwriteOption.H" Foam::argList::addBoolOption ( @@ -759,20 +763,29 @@ int main(int argc, char *argv[]) // } // else { - Foam::Info - << "Create mesh for time = " - << runTime.timeName() << Foam::nl << Foam::endl; + word regionName; + if (args.optionReadIfPresent("region", regionName)) + { + Info<< "Create mesh " << regionName << " for time = " + << runTime.timeName() << nl << endl; + } + else + { + regionName = fvMesh::defaultRegion; + Info<< "Create mesh for time = " + << runTime.timeName() << nl << endl; + } meshPtr.set ( new fvMesh ( - Foam::IOobject + IOobject ( - Foam::fvMesh::defaultRegion, + regionName, runTime.timeName(), runTime, - Foam::IOobject::MUST_READ + IOobject::MUST_READ ) ) ); diff --git a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C index bf0dff94b0..7dea889f86 100644 --- a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C +++ b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C @@ -24,6 +24,9 @@ License Application attachMesh +Group + grpMeshManipulationUtilities + Description Attach topologically detached mesh using prescribed mesh modifiers. diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index f35f70b45b..abd73d8445 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -24,6 +24,9 @@ License Application autoPatch +Group + grpMeshManipulationUtilities + Description Divides external faces into patches based on (user supplied) feature angle. diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index 9a3ab3871e..c1a07e9fca 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -24,6 +24,9 @@ License Application checkMesh +Group + grpMeshManipulationUtilities + Description Checks validity of a mesh. diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index d0d1439b85..e5892bef4b 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -24,6 +24,9 @@ License Application createBaffles +Group + grpMeshManipulationUtilities + Description Makes internal faces into boundary faces. Does not duplicate points, unlike mergeOrSplitBaffles. diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index eb89288a30..a97916281d 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -24,6 +24,9 @@ License Application createPatch +Group + grpMeshManipulationUtilities + Description Utility to create patches out of selected boundary faces. Faces come either from existing patches or from a faceSet. diff --git a/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C b/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C index 58f7447506..181e80e12d 100644 --- a/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C +++ b/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C @@ -24,6 +24,9 @@ License Application deformedGeom +Group + grpMeshManipulationUtilities + Description Deforms a polyMesh using a displacement field U and a scaling factor supplied as an argument. diff --git a/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C b/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C index f10405674d..7e2fd95c58 100644 --- a/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C +++ b/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C @@ -24,6 +24,9 @@ License Application flattenMesh +Group + grpMeshManipulationUtilities + Description Flattens the front and back planes of a 2D cartesian mesh. diff --git a/applications/utilities/mesh/manipulation/insideCells/insideCells.C b/applications/utilities/mesh/manipulation/insideCells/insideCells.C index 31d1473294..a751b6e7d0 100644 --- a/applications/utilities/mesh/manipulation/insideCells/insideCells.C +++ b/applications/utilities/mesh/manipulation/insideCells/insideCells.C @@ -24,6 +24,9 @@ License Application insideCells +Group + grpMeshManipulationUtilities + Description Picks up cells with cell centre 'inside' of surface. Requires surface to be closed and singly connected. diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C index 26c67575c7..cb80039e79 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C @@ -24,6 +24,9 @@ License Application mergeMeshes +Group + grpMeshManipulationUtilities + Description Merges two meshes. diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index 6db0d3abc6..5d52574886 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -24,6 +24,9 @@ License Application mergeOrSplitBaffles +Group + grpMeshManipulationUtilities + Description Detects faces that share points (baffles). Either merge them or duplicate the points. diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C index f7383289cb..e06acc0205 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C @@ -24,6 +24,9 @@ License Application mirrorMesh +Group + grpMeshManipulationUtilities + Description Mirrors a mesh around a given plane. diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 2fac9f25c0..7fed198993 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -24,6 +24,9 @@ License Application moveDynamicMesh +Group + grpMeshManipulationUtilities + Description Mesh motion and topological mesh changes utility. diff --git a/applications/utilities/mesh/manipulation/moveEngineMesh/moveEngineMesh.C b/applications/utilities/mesh/manipulation/moveEngineMesh/moveEngineMesh.C index 54727b825a..9757be6655 100644 --- a/applications/utilities/mesh/manipulation/moveEngineMesh/moveEngineMesh.C +++ b/applications/utilities/mesh/manipulation/moveEngineMesh/moveEngineMesh.C @@ -24,6 +24,9 @@ License Application moveEngineMesh +Group + grpMeshManipulationUtilities + Description Solver for moving meshes for engine calculations. diff --git a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C index f2ef289053..0f4049ad7c 100644 --- a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C +++ b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C @@ -24,6 +24,9 @@ License Application moveMesh +Group + grpMeshManipulationUtilities + Description Solver for moving meshes. diff --git a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C index e0da25a526..7b61f097cf 100644 --- a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C +++ b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C @@ -24,6 +24,9 @@ License Application objToVTK +Group + grpMeshManipulationUtilities + Description Read obj line (not surface!) file and convert into vtk. diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C index 5595138322..a13594496f 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C +++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C @@ -24,6 +24,9 @@ License Application orientFaceZone +Group + grpMeshManipulationUtilities + Description Corrects orientation of faceZone. diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C index f0c4c16d71..27209b9793 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C @@ -24,6 +24,9 @@ License Application polyDualMesh +Group + grpMeshManipulationUtilities + Description Calculates the dual of a polyMesh. Adheres to all the feature and patch edges. diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 4877c45319..37cce07659 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -24,6 +24,9 @@ License Application refineMesh +Group + grpMeshManipulationUtilities + Description Utility to refine cells in multiple directions. diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 167afe59dd..a4fb8169b0 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -24,6 +24,9 @@ License Application renumberMesh +Group + grpMeshManipulationUtilities + Description Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories. diff --git a/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C b/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C index fb49b074fa..00ebde5cd5 100644 --- a/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C +++ b/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C @@ -24,6 +24,9 @@ License Application rotateMesh +Group + grpMeshManipulationUtilities + Description Rotates the mesh and fields from the direction n1 to direction n2. diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 1cd3ad6958..4919e21d70 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -24,6 +24,9 @@ License Application setSet +Group + grpMeshManipulationUtilities + Description Manipulate a cell/face/point/ set or zone interactively. diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index 8b23cfe5cd..d855e98ca1 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -24,6 +24,9 @@ License Application setsToZones +Group + grpMeshManipulationUtilities + Description Add pointZones/faceZones/cellZones to the mesh from similar named pointSets/faceSets/cellSets. diff --git a/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C b/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C index 7ce51edf61..93efe4341f 100644 --- a/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.C +++ b/applications/utilities/mesh/manipulation/singleCellMesh/singleCellMesh.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. @@ -24,6 +24,9 @@ License Application singleCellMesh +Group + grpMeshManipulationUtilities + Description Reads all fields and maps them to a mesh with all internal faces removed (singleCellFvMesh) which gets written to region "singleCell". @@ -97,7 +100,7 @@ int main(int argc, char *argv[]) IOobject ( singleCellName, - mesh.polyMesh::instance(), + mesh.pointsInstance(), runTime, IOobject::NO_READ, IOobject::AUTO_WRITE @@ -105,6 +108,8 @@ int main(int argc, char *argv[]) mesh ) ); + scMesh().setInstance(mesh.pointsInstance()); + // For convenience create any fv* files if (!exists(scMesh().fvSolution::objectPath())) { @@ -137,7 +142,7 @@ int main(int argc, char *argv[]) IOobject ( singleCellName, - mesh.polyMesh::instance(), + mesh.pointsInstance(), runTime, IOobject::NO_READ, IOobject::AUTO_WRITE diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index 5cac0dad7d..09a3d25d59 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -24,6 +24,9 @@ License Application splitMesh +Group + grpMeshManipulationUtilities + Description Splits mesh by making internal faces external. Uses attachDetach. diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 529153f812..a5789e7ebd 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -24,6 +24,9 @@ License Application splitMeshRegions +Group + grpMeshManipulationUtilities + Description Splits mesh into multiple regions. diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 1902f1543d..1718d725f9 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -24,6 +24,10 @@ License Application stitchMesh +Group + grpMeshManipulationUtilities + + Description 'Stitches' a mesh. diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index c158b74842..19489611c4 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -24,6 +24,9 @@ License Application subsetMesh +Group + grpMeshManipulationUtilities + Description Selects a section of mesh based on a cellSet. diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSet.C b/applications/utilities/mesh/manipulation/topoSet/topoSet.C index 8f368f1b3f..d5e5358bf5 100644 --- a/applications/utilities/mesh/manipulation/topoSet/topoSet.C +++ b/applications/utilities/mesh/manipulation/topoSet/topoSet.C @@ -24,6 +24,9 @@ License Application topoSet +Group + grpMeshManipulationUtilities + Description Operates on cellSets/faceSets/pointSets through a dictionary. diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C index cfddb19c2e..eb13245ec3 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C +++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C @@ -24,6 +24,9 @@ License Application transformPoints +Group + grpMeshManipulationUtilities + Description Transforms the mesh points in the polyMesh directory according to the translate, rotate and scale options. diff --git a/applications/utilities/mesh/manipulation/zipUpMesh/zipUpMesh.C b/applications/utilities/mesh/manipulation/zipUpMesh/zipUpMesh.C index f4df1dd062..4dbc6a4a75 100644 --- a/applications/utilities/mesh/manipulation/zipUpMesh/zipUpMesh.C +++ b/applications/utilities/mesh/manipulation/zipUpMesh/zipUpMesh.C @@ -24,6 +24,9 @@ License Application zipUpMesh +Group + grpMeshManipulationUtilities + Description Reads in a mesh with hanging vertices and zips up the cells to guarantee that all polyhedral cells of valid shape are closed. diff --git a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C index 1b8ecac86d..cdbd3c76a9 100644 --- a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C +++ b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C @@ -24,6 +24,9 @@ License Application expandDictionary +Group + grpMiscUtilities + Description Read the dictionary provided as an argument, expand the macros etc. and write the resulting dictionary to standard output. diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake b/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake new file mode 100755 index 0000000000..edc1f5f0dd --- /dev/null +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Allwmake @@ -0,0 +1,11 @@ +#!/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/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options index 0a415b6bfb..14779c3735 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options @@ -1,4 +1,5 @@ EXE_LIBS = \ + $(LINK_FLAGS) \ -lsnappyHexMesh \ -lbarotropicCompressibilityModel \ -lsolidThermo \ @@ -41,7 +42,6 @@ EXE_LIBS = \ -lOpenFOAM \ -lpotential \ -lradiationModels \ - -lrandomProcesses \ -lreactionThermophysicalModels \ -lreconstruct \ -lsampling \ diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C index 1b5670fc83..c9ad6ca0a9 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C +++ b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C @@ -24,6 +24,9 @@ License Application foamDebugSwitches +Group + grpMiscUtilities + Description Write out all library debug switches. diff --git a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C index 715af2481a..81971b85f5 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C +++ b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C @@ -24,6 +24,9 @@ License Application foamFormatConvert +Group + grpMiscUtilities + Description Converts all IOobjects associated with a case into the format specified in the controlDict. diff --git a/applications/utilities/miscellaneous/foamHelp/foamHelp.C b/applications/utilities/miscellaneous/foamHelp/foamHelp.C index 277b7a024a..d4d145ee21 100644 --- a/applications/utilities/miscellaneous/foamHelp/foamHelp.C +++ b/applications/utilities/miscellaneous/foamHelp/foamHelp.C @@ -24,6 +24,9 @@ License Application foamHelp +Group + grpMiscUtilities + Description Top level wrapper utility around foam help utilities diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index 68ae82fa50..a5b217e87e 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C @@ -151,7 +151,7 @@ void Foam::helpType::displayDoc Info<< "Source file: " << classDirectory.c_str() << classFile << nl << endl; - system(docBrowser); + Foam::system(docBrowser); } else { diff --git a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C index 74d9028c2b..3b671c5b4c 100644 --- a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C +++ b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.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. @@ -23,6 +23,11 @@ License Application foamInfoExec + To simplify parsing of the output, The normal banner information + is suppressed. + +Group + grpMiscUtilities Description Interrogates a case and prints information to stdout. diff --git a/applications/utilities/miscellaneous/patchSummary/patchSummary.C b/applications/utilities/miscellaneous/patchSummary/patchSummary.C index 074774676a..2dc5cbcacd 100644 --- a/applications/utilities/miscellaneous/patchSummary/patchSummary.C +++ b/applications/utilities/miscellaneous/patchSummary/patchSummary.C @@ -24,6 +24,9 @@ License Application patchSummary +Group + grpMiscUtilities + Description Writes fields and boundary condition info for each patch at each requested time instance. diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 45c14b5d38..07d6c45513 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.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. @@ -24,6 +24,9 @@ License Application decomposePar +Group + grpParallelUtilities + Description Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM. @@ -422,7 +425,8 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("cellDist", dimless, 0) + dimensionedScalar("cellDist", dimless, -1), + zeroGradientFvPatchScalarField::typeName ); forAll(procIds, celli) @@ -430,6 +434,7 @@ int main(int argc, char *argv[]) cellDist[celli] = procIds[celli]; } + cellDist.correctBoundaryConditions(); cellDist.write(); Info<< nl << "Wrote decomposition as volScalarField to " diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 47fc4aacce..a561f05462 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -24,6 +24,9 @@ License Application reconstructPar +Group + grpParallelUtilities + Description Reconstructs fields of a case that is decomposed for parallel execution of OpenFOAM. diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index a4ccd17bb1..182fb79f7f 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -24,6 +24,9 @@ License Application reconstructParMesh +Group + grpParallelUtilities + Description Reconstructs a mesh using geometric information only. diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index a02bf106a7..dfe0340347 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -24,6 +24,9 @@ License Application redistributePar +Group + grpParallelUtilities + Description Redistributes existing decomposed mesh and fields according to the current settings in the decomposeParDict file. @@ -2579,7 +2582,7 @@ int main(int argc, char *argv[]) || procStat == fvMesh::TOPO_PATCH_CHANGE ) { - Info<< " Detected topology change; reconstructing addressing" + Info<< " Detected topology change; reconstructing addressing" << nl << endl; if (baseMeshPtr.valid()) diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C index 8427f9b1b4..a1eb5461b6 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C @@ -24,6 +24,9 @@ License Application foamDataToFluent +Group + grpPostProcessingUtilities + Description Translates OpenFOAM data to Fluent format. diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files index 44c513a079..421e8392b8 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/files @@ -1,6 +1,5 @@ -itoa.C ensightMesh.C -ensightParticlePositions.C +ensightCloud.C foamToEnsight.C EXE = $(FOAM_APPBIN)/foamToEnsight diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options index c818403451..1424ecc536 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/conversion/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -13,5 +14,5 @@ EXE_LIBS = \ -lfileFormats \ -lsampling \ -lgenericPatchFields \ - -llagrangian - + -llagrangian \ + -lconversion diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H index 47a3540da7..50e78e781c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H @@ -1,21 +1,33 @@ -// ignore special fields or fields that we don't handle -// -bool variableGood = true; -for (label n1=0; n1 2 && fieldName(fieldName.size() - 2, 2) == "_0") + bool variableGood = false; + + forAll(timeDirs, n1) { - variableGood = false; - } - else - { - variableGood = IOobject + variableGood = ( - fieldName, - Times[n1].name(), - mesh, - IOobject::NO_READ - ).typeHeaderOk(false); + fieldName.size() > 2 && fieldName(fieldName.size()-2, 2) == "_0" + ? false + : IOobject + ( + fieldName, + timeDirs[n1].name(), + mesh, + IOobject::NO_READ + ).typeHeaderOk(false) + ); + + if (variableGood) + { + break; + } } + + reduce(variableGood, andOp()); + fieldsToUse.set(fieldName, variableGood); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H index d4027ad1c5..bda9220acb 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H @@ -1,27 +1,50 @@ // check for "points" in any of the result directories bool meshMoving = false; -if (Times.size() > 1) + +if (timeDirs.size() > 1 && Pstream::master()) { - // We already loaded a mesh (usually from constant). See if any other - // points files - forAll(Times, timeI) + // We already loaded a mesh (usually from constant). + // See if any other "polyMesh/points" files exist too. + + const fileName& baseDir = mesh.time().path(); + + Info<< "Search for moving mesh ... " << flush; + forAll(timeDirs, timeI) { - if (Times[timeI].name() != mesh.pointsInstance()) - { - IOobject io + const word& timeName = timeDirs[timeI].name(); + + meshMoving = + ( + timeName != mesh.pointsInstance() + && isDir(baseDir/timeName/polyMesh::meshSubDir) + && IOobject ( "points", - Times[timeI].name(), + timeName, polyMesh::meshSubDir, mesh, - IOobject::NO_READ - ); - if (io.typeHeaderOk(true)) - { - meshMoving = true; - break; - } + IOobject::NO_READ, + IOobject::NO_WRITE, + false // no register + ).typeHeaderOk(true) + ); + + if (meshMoving) + { + break; } } + + if (meshMoving) + { + Info<< "found." << nl + << " Writing meshes for every timestep." << endl; + } + else + { + Info<< "none detected." << endl; + } } + +reduce(meshMoving, orOp()); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightAsciiStream.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightAsciiStream.H index 68eb88e158..ceccc987ae 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightAsciiStream.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightAsciiStream.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,17 +52,17 @@ class ensightAsciiStream { // Private data - //- Description of data_ + //- Output file stream OFstream str_; // Private Member Functions //- Disallow default bitwise copy construct - ensightAsciiStream(const ensightAsciiStream&); + ensightAsciiStream(const ensightAsciiStream&) = delete; //- Disallow default bitwise assignment - void operator=(const ensightAsciiStream&); + void operator=(const ensightAsciiStream&) = delete; public: @@ -70,14 +70,14 @@ public: // Constructors //- Construct from components - ensightAsciiStream(const fileName& f, const Time& runTime) + ensightAsciiStream(const fileName& f) : ensightStream(f), str_ ( f, - runTime.writeFormat(), - runTime.writeVersion(), + IOstream::ASCII, + IOstream::currentVersion, IOstream::UNCOMPRESSED ) { @@ -139,14 +139,6 @@ public: << setw(10) << partI << nl; } - // Member Operators - - // Friend Functions - - // Friend Operators - - // IOstream Operators - }; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightBinaryStream.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightBinaryStream.H index d343567722..d1c3d6e3b3 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightBinaryStream.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightBinaryStream.H @@ -51,17 +51,17 @@ class ensightBinaryStream { // Private data - //- Description of data_ + //- Output file stream autoPtr str_; // Private Member Functions //- Disallow default bitwise copy construct - ensightBinaryStream(const ensightBinaryStream&); + ensightBinaryStream(const ensightBinaryStream&) = delete; //- Disallow default bitwise assignment - void operator=(const ensightBinaryStream&); + void operator=(const ensightBinaryStream&) = delete; public: @@ -69,7 +69,7 @@ public: // Constructors //- Construct from components - ensightBinaryStream(const fileName& f, const Time&) + ensightBinaryStream(const fileName& f) : ensightStream(f), str_ @@ -90,11 +90,6 @@ public: // Member Functions - virtual bool ascii() const - { - return false; - } - virtual void write(const char* val) { char buffer[80]; @@ -141,14 +136,6 @@ public: write(partI); } - // Member Operators - - // Friend Functions - - // Friend Operators - - // IOstream Operators - }; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseTail.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseTail.H index 6ec8373fcf..5a18a953c7 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseTail.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseTail.H @@ -1,5 +1,8 @@ if (Pstream::master()) { + ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield); + ensightCaseFile.precision(5); + ensightCaseFile << nl << "TIME" << nl << "time set: " << 1 << nl << "number of steps: " << nTimeSteps << nl @@ -8,20 +11,17 @@ if (Pstream::master()) ensightCaseFile << "time values:" << nl; - ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield); - ensightCaseFile.precision(5); - label count = 0; scalar Tcorr = 0.0; - if (Times[0].value() < 0) + if (timeDirs[0].value() < 0) { - Tcorr = - Times[0].value(); + Tcorr = -timeDirs[0].value(); Info<< "Correcting time values. Adding " << Tcorr << endl; } - forAll(Times, n) + forAll(timeDirs, n) { - ensightCaseFile << setw(12) << Times[n].value() + Tcorr << " "; + ensightCaseFile << setw(12) << timeDirs[n].value() + Tcorr << " "; if (++count % 6 == 0) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloud.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloud.C new file mode 100644 index 0000000000..08779ff0a8 --- /dev/null +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloud.C @@ -0,0 +1,180 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 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 . + +\*---------------------------------------------------------------------------*/ + +#include "ensightCloud.H" +#include "ensightFile.H" +#include "fvMesh.H" +#include "passiveParticle.H" +#include "Cloud.H" +#include "pointList.H" + +// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // + +void Foam::ensightParticlePositions +( + const fvMesh& mesh, + const fileName& dataDir, + const label timeIndex, + const word& cloudName, + const bool dataExists, + IOstream::streamFormat format +) +{ + if (dataExists) + { + Info<< " positions"; + } + else + { + Info<< " positions{0}"; + } + + // Total number of parcels on all processes + label nTotParcels = 0; + autoPtr> cloudPtr; + + if (dataExists) + { + cloudPtr.reset(new Cloud(mesh, cloudName, false)); + nTotParcels = cloudPtr().size(); + } + reduce(nTotParcels, sumOp