From c3680028e9667324cf51156a3c66a849080c7678 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:20:58 +0100 Subject: [PATCH 01/52] BUG: PointEdgeWave : n cyclics bool instead of label --- src/meshTools/PointEdgeWave/PointEdgeWave.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshTools/PointEdgeWave/PointEdgeWave.H b/src/meshTools/PointEdgeWave/PointEdgeWave.H index 2164ae1da1..1a8c7984ae 100644 --- a/src/meshTools/PointEdgeWave/PointEdgeWave.H +++ b/src/meshTools/PointEdgeWave/PointEdgeWave.H @@ -125,7 +125,7 @@ class PointEdgeWave label nChangedEdges_; //- Number of cyclic patches - bool nCyclicPatches_; + label nCyclicPatches_; //- For every cyclic patch two primitivePatches PtrList cycHalves_; From 5dd7b646abcca9f02cac1f283cf72f5fe83e1998 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:24:20 +0100 Subject: [PATCH 02/52] COMP: momentScalarError: removed extraneous link line --- .../utilities/errorEstimation/momentScalarError/Make/options | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/utilities/errorEstimation/momentScalarError/Make/options b/applications/utilities/errorEstimation/momentScalarError/Make/options index e9a68290c0..e6f16fc705 100644 --- a/applications/utilities/errorEstimation/momentScalarError/Make/options +++ b/applications/utilities/errorEstimation/momentScalarError/Make/options @@ -3,7 +3,6 @@ EXE_INC = \ -I$(LIB_SRC)/errorEstimation/lnInclude EXE_LIBS = \ - -lerrorEstimation \ -lmeshTools \ -ldynamicMesh \ -lfiniteVolume From 6a53dae3c28b0b710ea800a0b435115548380718 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:24:50 +0100 Subject: [PATCH 03/52] COMP:metisDecomp : added dummm metis.h --- src/parallel/decompose/metisDecomp/Make/options | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parallel/decompose/metisDecomp/Make/options b/src/parallel/decompose/metisDecomp/Make/options index a7d5398f03..00bdb28b59 100644 --- a/src/parallel/decompose/metisDecomp/Make/options +++ b/src/parallel/decompose/metisDecomp/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include \ + -I../../dummyThirdParty/metisDecomp /* location of dummy metis.h */ \ -I../decompositionMethods/lnInclude LIB_LIBS = \ From 317ea696f96045257403994df06d0b7339668932 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:25:30 +0100 Subject: [PATCH 04/52] COMP: STLsurfaceFormatCore : signed/unsigned comparison --- src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C index 772dbc5f8a..590adc0086 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C @@ -123,8 +123,8 @@ bool Foam::fileFormats::STLsurfaceFormatCore::readBINARY ( !is || nTris < 0 - || nTris < (dataFileSize - headerSize)/50 - || nTris > (dataFileSize - headerSize)/25 + || nTris < int(dataFileSize - headerSize)/50 + || nTris > int(dataFileSize - headerSize)/25 ) { FatalErrorIn From e7be590a4ebc1c5a93264409c3de77bf0c5ad6ff Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:25:54 +0100 Subject: [PATCH 05/52] STYLE: cylinderToCell : typo in message --- .../sets/cellSources/cylinderToCell/cylinderToCell.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C index d9eaf6327e..93a84017e6 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,7 +139,7 @@ void Foam::cylinderToCell::applyToSet } else if (action == topoSetSource::DELETE) { - Info<< " Removing cells with centre within sphere, with p1 = " + Info<< " Removing cells with centre within cylinder, with p1 = " << p1_ << ", p2 = " << p2_ << " and radius = " << radius_ << endl; combine(set, false); From d70bd8ec76b0d046c6302a08c18e8baad716ef4f Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:28:21 +0100 Subject: [PATCH 06/52] COMP: epsilonWallFunction : unused var --- .../epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 5cce898e22..3f613b3040 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -204,8 +204,6 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs() const tmp tk = rasModel.k(); const volScalarField& k = tk(); - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const tmp tmut = rasModel.mut(); From 5b01d2bf27fb06403727237f230f51f5310dfb46 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:28:52 +0100 Subject: [PATCH 07/52] COMP: Allwmake : check for existence of Thirdparty --- Allwmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Allwmake b/Allwmake index 36d7658f19..ebe159e376 100755 --- a/Allwmake +++ b/Allwmake @@ -12,7 +12,10 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || { ( cd wmake/src && make ) # build ThirdParty sources -$WM_THIRD_PARTY_DIR/Allwmake +if [ -d "$WM_THIRD_PARTY_DIR" ] +then + $WM_THIRD_PARTY_DIR/Allwmake +fi # build OpenFOAM libraries and applications src/Allwmake From e8a44202edf5533afd4409bbad1dcf682c046bce Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 22 Jun 2010 17:29:10 +0100 Subject: [PATCH 08/52] COMP:metisDecomp : added dummm metis.h --- src/dummyThirdParty/metisDecomp/metis.h | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/dummyThirdParty/metisDecomp/metis.h diff --git a/src/dummyThirdParty/metisDecomp/metis.h b/src/dummyThirdParty/metisDecomp/metis.h new file mode 100644 index 0000000000..7b6ca31fc6 --- /dev/null +++ b/src/dummyThirdParty/metisDecomp/metis.h @@ -0,0 +1,46 @@ +#ifndef METIS_H +#define METIS_H 1 + +/* *** DUMMY VERSION of metis.h - this file should not be included if you have metis + * installed in the correct position in $WM_THIRD_PARTY_DIR - see + * decompositionMethods/metisDecomp/Make/options + */ + +#warning "Dummy metis.h - gets included since it cannot find metis installation." + +#define IDXTYPEWIDTH 32 + +/*------------------------------------------------------------------------ +* Undefine the following #define in order to use short idxtype as the idxtype +*-------------------------------------------------------------------------*/ +#if IDXTYPEWIDTH == 32 + #define SCNIDX SCNd32 + #define PRIIDX PRId32 + + typedef int32_t idxtype; +#elif IDXTYPEWIDTH == 64 + #define SCNIDX SCNd64 + #define PRIIDX PRId64 + + typedef int64_t idxtype; +#else + #error "Incorrect user-supplied value fo IDXTYPEWIDTH" +#endif + + +void METIS_WPartGraphRecursive(idxtype *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, + idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *nparts, float *tpwgts, + idxtype *options, idxtype *edgecut, idxtype *part); +void METIS_PartGraphRecursive(idxtype *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, + idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *nparts, idxtype *options, + idxtype *edgecut, idxtype *part); +void METIS_WPartGraphKway(idxtype *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, + idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *nparts, float *tpwgts, + idxtype *options, idxtype *edgecut, idxtype *part); +void METIS_PartGraphKway(idxtype *nvtxs, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, + idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *nparts, idxtype *options, + idxtype *edgecut, idxtype *part); + + + +#endif From 3ef7831a1ed92037b24a9fa89c5c3b2da7be6d20 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:04:39 +0200 Subject: [PATCH 09/52] STYLE: correct header format (as per ccfb6e32a6a2) --- .../functionObjects/field/fieldMinMax/controlDict | 2 +- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/leftSolid/solidThermophysicalProperties | 4 ++-- .../constant/rightSolid/solidThermophysicalProperties | 4 ++-- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/leftSolid/solidThermophysicalProperties | 4 ++-- .../constant/rightSolid/solidThermophysicalProperties | 2 +- tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U | 2 +- .../incompressible/simpleFoam/windTurbineTerrain/0/epsilon | 2 +- .../simpleFoam/windTurbineTerrain/0/include/ABLConditions | 2 +- .../windTurbineTerrain/0/include/initialConditions | 2 +- tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k | 2 +- .../windTurbineTerrain/constant/polyMesh/blockMeshDict | 5 ++--- .../simpleFoam/windTurbineTerrain/constant/polyMesh/boundary | 2 +- .../simpleFoam/windTurbineTerrain/constant/sourcesProperties | 2 +- .../windTurbineTerrain/constant/transportProperties | 2 +- .../simpleFoam/windTurbineTerrain/system/controlDict | 2 +- .../simpleFoam/windTurbineTerrain/system/fvSchemes | 2 +- .../simpleFoam/windTurbineTerrain/system/fvSolution | 2 +- .../simpleFoam/windTurbineTerrain/system/snappyHexMeshDict | 2 +- 21 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/controlDict b/src/postProcessing/functionObjects/field/fieldMinMax/controlDict index d90c5c84fe..4a20373246 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/controlDict +++ b/src/postProcessing/functionObjects/field/fieldMinMax/controlDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties index c27f08c9f1..b301ae2e0d 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U index 806874149e..f23d0ce783 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon index 0663cafd8c..a49793464e 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions index 7a66146f67..ce4fb20918 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions index b7847f97cf..f38c46f61a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k index 54ed104991..b42f64236c 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict index 17849fcf99..99d86d5d23 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict @@ -1,11 +1,10 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.openfoam.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ - FoamFile { version 2.0; diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary index 0ae74fcca8..e47d69bab0 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties index 0b880a8571..90b086769a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties index a9799687c1..6b86c0cf8f 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict index 654f1c9889..e4c516e48e 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes index 60d14bfab4..30ee3b82f4 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution index ed73a38677..948be6e57a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict index 66e1715156..2d64f74634 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile From 51ac7a297bcaaa0c81440f698af6c3e1906b7141 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:13:42 +0200 Subject: [PATCH 10/52] STYLE: make sampledPlane note doxygen-compatible --- src/sampling/sampledSurface/sampledPlane/sampledPlane.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H index 5142c63143..0262860a94 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H @@ -27,7 +27,8 @@ Class Description A sampledSurface defined by a cuttingPlane. Always triangulated. - Note: does not actually cut until update() called. +Note + Does not actually cut until update() called. SourceFiles sampledPlane.C From 824e5eeb2b2515777e759044535d9e10dfcae87c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:25:12 +0200 Subject: [PATCH 11/52] ENH: add sutherlandTransport/hConstThermo combination --- .../mixtures/basicMixture/basicMixtures.C | 9 ++-- .../basic/psiThermo/ePsiThermo/ePsiThermos.C | 1 + .../hCombustionThermo/hCombustionThermos.C | 41 ++++++++++++++++++- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C index 77ea290e62..0de4b2162a 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C @@ -57,7 +57,7 @@ makeBasicMixture ( pureMixture, constTransport, - hConstThermo, + eConstThermo, perfectGas ); @@ -65,15 +65,16 @@ makeBasicMixture ( pureMixture, sutherlandTransport, - hConstThermo, + eConstThermo, perfectGas ); + makeBasicMixture ( pureMixture, constTransport, - eConstThermo, + hConstThermo, perfectGas ); @@ -81,7 +82,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, - eConstThermo, + hConstThermo, perfectGas ); diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C index 156de029b0..fc39529ff5 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C @@ -63,6 +63,7 @@ makeBasicPsiThermo perfectGas ); + makeBasicPsiThermo ( ePsiThermo, diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C index 6e6cef2959..419e000f9b 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,6 +53,8 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// constTransport, hConstThermo + makeCombustionThermo ( hCombustionThermo, @@ -83,6 +85,42 @@ makeCombustionThermo perfectGas ); + +// sutherlandTransport, hConstThermo + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + homogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + inhomogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + veryInhomogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + + +// sutherlandTransport, janafThermo + makeCombustionThermo ( hCombustionThermo, @@ -113,6 +151,7 @@ makeCombustionThermo perfectGas ); + makeCombustionThermo ( hCombustionThermo, From aec1bace6c742e0f3f879e8912a2bcf3279c769a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 28 Jun 2010 09:24:14 +0200 Subject: [PATCH 12/52] ENH: use volume field name for interpolated fields - avoids things like "volPointInterpolate(U)", but will likely cause issues when used together with identically named Lagrangian fields! --- .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H | 10 ++++---- .../vtkPV3Foam/vtkPV3FoamPointFields.H | 8 ++++++- .../vtkPV3Foam/vtkPV3FoamVolFields.H | 24 ++++++++++--------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index 62e7d42ed1..3446d3fd8e 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -594,20 +594,22 @@ class vtkPV3Foam vtkMultiBlockDataSet* output ); - //- Point field - all selected parts + //- Point field - all selected parts, use specified display name template void convertPointFieldBlock ( + const word& displayName, const GeometricField&, vtkMultiBlockDataSet* output, const arrayRange&, const List& ); - //- Point fields + //- Point field, use specified display name template void convertPointField ( + const word& displayName, const GeometricField&, const GeometricField&, vtkMultiBlockDataSet* output, @@ -616,11 +618,11 @@ class vtkPV3Foam const polyDecomp& ); - //- Patch point field + //- Patch point field, use specified display name template void convertPatchPointField ( - const word& name, + const word& displayName, const Field&, vtkMultiBlockDataSet* output, const arrayRange&, diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H index a243d81a7c..f762e03530 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H @@ -76,6 +76,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated internalMesh regions convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeVolume_, @@ -85,6 +86,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated cellZones convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeCellZones_, @@ -94,6 +96,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated cellSets convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeCellSets_, @@ -136,6 +139,7 @@ void Foam::vtkPV3Foam::convertPointFields template void Foam::vtkPV3Foam::convertPointFieldBlock ( + const word& displayName, const GeometricField& ptf, vtkMultiBlockDataSet* output, const arrayRange& range, @@ -150,6 +154,7 @@ void Foam::vtkPV3Foam::convertPointFieldBlock { convertPointField ( + displayName, ptf, GeometricField::null(), output, @@ -165,6 +170,7 @@ void Foam::vtkPV3Foam::convertPointFieldBlock template void Foam::vtkPV3Foam::convertPointField ( + const word& displayName, const GeometricField& ptf, const GeometricField& tf, vtkMultiBlockDataSet* output, @@ -192,7 +198,7 @@ void Foam::vtkPV3Foam::convertPointField pointData->SetNumberOfTuples(nPoints + addPointCellLabels.size()); pointData->SetNumberOfComponents(nComp); pointData->Allocate(nComp*(nPoints + addPointCellLabels.size())); - pointData->SetName(ptf.name().c_str()); + pointData->SetName(displayName.c_str()); if (debug) { diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H index cad7ffb011..0046aed0b8 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H @@ -113,8 +113,7 @@ void Foam::vtkPV3Foam::convertVolFields // The name for the interpolated patch point field must be consistent // with the interpolated volume point field. - // This could be done better. - const word pointFldName = "volPointInterpolate(" + tf.name() + ')'; + const word& pointFldName = tf.name(); for ( @@ -276,21 +275,14 @@ void Foam::vtkPV3Foam::convertVolFieldBlock const List& decompLst ) { + const word& pointFldName = tf.name(); + for (int partId = range.start(); partId < range.end(); ++partId) { const label datasetNo = partDataset_[partId]; if (datasetNo >= 0 && partStatus_[partId]) { - convertVolField - ( - tf, - output, - range, - datasetNo, - decompLst[datasetNo] - ); - if (!ptfPtr.valid()) { if (debug) @@ -305,8 +297,18 @@ void Foam::vtkPV3Foam::convertVolFieldBlock ); } + convertVolField + ( + tf, + output, + range, + datasetNo, + decompLst[datasetNo] + ); + convertPointField ( + pointFldName, ptfPtr(), tf, output, From ca7a6f51576c530d7255fe0e48a1c502164519eb Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 28 Jun 2010 09:38:25 +0200 Subject: [PATCH 13/52] ENH: add provisioning for alternative display name for lagrangian fields --- .../PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H | 3 ++- .../PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index 3446d3fd8e..c51769eaa5 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -574,10 +574,11 @@ class vtkPV3Foam const label datasetNo ); - //- Lagrangian field + //- Lagrangian field, use specified display name template void convertLagrangianField ( + const word& displayName, const IOField&, vtkMultiBlockDataSet* output, const arrayRange&, diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H index dd4c3b450a..618eaaaf86 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H @@ -51,7 +51,9 @@ void Foam::vtkPV3Foam::convertLagrangianFields if (iter()->headerClassName() == IOField::typeName) { IOField tf(*iter()); - convertLagrangianField(tf, output, range, datasetNo); + // display name for lagrangian field + const word& displayName = tf.name(); + convertLagrangianField(displayName, tf, output, range, datasetNo); } } } @@ -60,6 +62,7 @@ void Foam::vtkPV3Foam::convertLagrangianFields template void Foam::vtkPV3Foam::convertLagrangianField ( + const word& displayName, const IOField& tf, vtkMultiBlockDataSet* output, const arrayRange& range, @@ -72,7 +75,7 @@ void Foam::vtkPV3Foam::convertLagrangianField pointData->SetNumberOfTuples(tf.size()); pointData->SetNumberOfComponents(nComp); pointData->Allocate(nComp*tf.size()); - pointData->SetName(tf.name().c_str()); + pointData->SetName(displayName.c_str()); if (debug) { From 3bbd7ef1bb8d4d9603f0a1967b69a38f9b6bb59f Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Jun 2010 12:34:34 +0100 Subject: [PATCH 14/52] STYLE: directMappedPatchBase.C: added space in message --- .../directMapped/directMappedPolyPatch/directMappedPatchBase.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C index 1c9b5dd5ca..e5d6a0d713 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C @@ -362,7 +362,7 @@ void Foam::directMappedPatchBase::findSamples "(const pointField&, labelList&" ", labelList&, pointField&)" ) << "Did not find sample " << samples[sampleI] - << " on any processor of region" << sampleRegion_ + << " on any processor of region " << sampleRegion_ << exit(FatalError); } } From d71c87ff95374d90a23c09678b9a7c5b7e1b9d53 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Jun 2010 12:34:56 +0100 Subject: [PATCH 15/52] ENH: foamFileSurfaceWriter.C : output faceCentres for convenient use with e.g. timeVaryingMapped --- .../writers/foamFile/foamFileSurfaceWriter.C | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C index e228debe5f..045b8dd432 100644 --- a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C @@ -73,6 +73,17 @@ void Foam::foamFileSurfaceWriter::write // Faces OFstream(surfaceDir/"faces")() << faces; + + // Face centers. Not really necessary but very handy when reusing as inputs + // for e.g. timeVaryingMapped bc. + pointField faceCentres(faces.size(),point::zero); + + forAll (faces, faceI) + { + faceCentres[faceI] = faces[faceI].centre(points); + } + + OFstream(surfaceDir/"faceCentres")() << faceCentres; } From ed650a1643a74013803c12f29892d4057548a836 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Jun 2010 13:45:14 +0100 Subject: [PATCH 16/52] ENH: debian/ pack files initial versions --- bin/{foamPackGeneral => foamBinDirs} | 59 ++-- bin/foamPack | 58 +--- bin/foamPackBin | 12 +- bin/foamPackSource | 29 +- ...ckThirdPartyGeneral => foamPackThirdParty} | 8 +- bin/foamSourceFiles | 81 +++++ bin/mpigammarun | 288 ------------------ bin/tools/foamConfigurePaths | 108 +++++++ debian/changelog | 5 + debian/compat | 1 + debian/control | 19 ++ debian/copyright | 30 ++ debian/docs | 0 debian/postinst | 48 +++ debian/rules | 109 +++++++ 15 files changed, 440 insertions(+), 415 deletions(-) rename bin/{foamPackGeneral => foamBinDirs} (60%) rename bin/{foamPackThirdPartyGeneral => foamPackThirdParty} (91%) create mode 100755 bin/foamSourceFiles delete mode 100755 bin/mpigammarun create mode 100755 bin/tools/foamConfigurePaths create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/postinst create mode 100755 debian/rules diff --git a/bin/foamPackGeneral b/bin/foamBinDirs similarity index 60% rename from bin/foamPackGeneral rename to bin/foamBinDirs index 886f62a275..ef96dee328 100755 --- a/bin/foamPackGeneral +++ b/bin/foamBinDirs @@ -1,11 +1,11 @@ #!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. # @@ -23,47 +23,38 @@ # along with OpenFOAM. If not, see . # # Script -# foamPackGeneral [outputDir] +# foamBinDirs # # Description -# Packs and compresses the OpenFOAM directory for release +# Returns all directories containing binary files of OpenFOAM # #------------------------------------------------------------------------------ -timeStamp=$(date +%Y-%m-%d) -packDir=$WM_PROJECT-$WM_PROJECT_VERSION -packFile=${packDir}.General_${timeStamp}.gtgz - -if [ ! -d $packDir ] +if [ $# -ne 2 ] then - echo "Error: directory $packDir does not exist" + echo "Error: architecture type expected, exiting" + echo + echo "Usage : ${0##*/} " + echo exit 1 fi +packDir=$1 +arch=$2 -# add optional output directory -if [ -d "$1" ] -then - packFile="$1/$packFile" -fi +# base arch (w/o precision, optimization, etc) +baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@') -if [ -f $packFile ] -then - echo "Error: $packFile already exists" - exit 1 -fi - -# Create time stamp file -# ~~~~~~~~~~~~~~~~~~~~~~ - -echo $timeStamp 2>/dev/null > $packDir/.timeStamp - -# Pack and compress the packFile -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -echo -echo "Packing $packDir source files into $packFile" -echo - -foamPackSource $packDir $packFile +# get list of directories +( + for dir in \ + $packDir/lib/$arch \ + $packDir/applications/bin/$arch \ + $packDir/wmake/rules \ + $packDir/wmake/bin/$baseArch \ + ; + do + [ -d $dir ] && echo $dir + done +) #------------------------------------------------------------------------------ diff --git a/bin/foamPack b/bin/foamPack index ed1200f246..920bfaf52b 100755 --- a/bin/foamPack +++ b/bin/foamPack @@ -1,11 +1,11 @@ #!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. # @@ -29,7 +29,6 @@ # Packs and compresses the OpenFOAM directory for release # #------------------------------------------------------------------------------ -tmpFile=${TMPDIR:-/tmp}/foamPackFiles.$$ timeStamp=$(date +%Y-%m-%d) packDir=$WM_PROJECT-$WM_PROJECT_VERSION @@ -37,7 +36,7 @@ packFile=${packDir}_${timeStamp}.gtgz if [ ! -d $packDir ] then - echo "Error: directory $packDir does not exist" 1>&2 + echo "Error: directory $packDir does not exist" exit 1 fi @@ -49,7 +48,7 @@ fi if [ -f $packFile ] then - echo "Error: $packFile already exists" 1>&2 + echo "Error: $packFile already exists" exit 1 fi @@ -58,54 +57,13 @@ fi echo $timeStamp 2>/dev/null > $packDir/.timeStamp -# Clean up on termination and on Ctrl-C -trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT - - -# Pack and compress the packFile using GNU tar -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Pack and compress the packFile +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -echo "Packing foam version $packDir into $packFile" +echo "Packing $packDir source files into $packFile" echo -echo "finding and packing" -find -H $packDir \ - ! -type d -type f \ - ! -name "*~" \ - -a ! -name ".*~" \ - -a ! -name "*.orig" \ - -a ! -name "*.dep" \ - -a ! -name "*.o" \ - -a ! -name "*.so" \ - -a ! -name "*.a" \ - -a ! -name "core" \ - -a ! -name "core.[1-9]*" \ - -a ! -name "pvml.[1-9]*" \ - -a ! -name "log[0-9]*" \ - -a ! -name "so_locations" \ -| sed \ - -e "\@$packDir/lib/@d" \ - -e '\@/\.git/@d' \ - -e '\@applications/bin/@d' \ - -e '\@wmake/bin/@d' \ - -e '\@/t/@d' \ - -e '\@Make[.A-Za-z]*/[^/]*/@d' \ - -e '\@doc/[Dd]oxygen/html@d' \ - -e '\@doc/[Dd]oxygen/latex@d' \ - -e '\@doc/[Dd]oxygen/man@d' \ - -e '\@/lnInclude@d' \ - -e '\@/ii_files@d' \ - | tee $tmpFile - -tar czpf $packFile --files-from $tmpFile - -if [ $? -eq 0 ] -then - echo "Finished packing and compressing $packDir into file $packFile" -else - echo "Error: failure packing $packDir into file $packFile" 1>&2 - rm -f $packFile 2>/dev/null -fi +foamPackSource $packDir $packFile #------------------------------------------------------------------------------ diff --git a/bin/foamPackBin b/bin/foamPackBin index 8f356521d1..3a6358f597 100755 --- a/bin/foamPackBin +++ b/bin/foamPackBin @@ -70,17 +70,7 @@ do done # get list of directories -dirList=$( - for dir in \ - $packDir/lib/$arch \ - $packDir/applications/bin/$arch \ - $packDir/wmake/rules \ - $packDir/wmake/bin/$baseArch \ - ; - do - [ -d $dir ] && echo $dir - done -) +dirList=`foamBinDirs $packDir $arch` echo echo "Packing $arch ($baseArch) port of $packDir into $packFile" diff --git a/bin/foamPackSource b/bin/foamPackSource index 6af0c145ab..8305a929a8 100755 --- a/bin/foamPackSource +++ b/bin/foamPackSource @@ -61,34 +61,7 @@ fi # Clean up on termination and on Ctrl-C trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT -find -H $packDir \ - ! -type d \ - \( -type f -o -type l \) \ - ! -name "*~" \ - -a ! -name ".*~" \ - -a ! -name "*.orig" \ - -a ! -name "*.dep" \ - -a ! -name "*.o" \ - -a ! -name "*.so" \ - -a ! -name "*.a" \ - -a ! -name "*.tgz" \ - -a ! -name "core" \ - -a ! -name "core.[1-9]*" \ - -a ! -name "libccmio*" \ -| sed \ - -e "\@$packDir/lib/@d" \ - -e '\@/\.git/@d' \ - -e '\@/\.tags/@d' \ - -e '\@/\README\.org@d' \ - -e '\@applications/bin/@d' \ - -e '\@wmake/bin/@d' \ - -e '\@/t/@d' \ - -e '\@/Make[.A-Za-z]*/[^/]*/@d'\ - -e '\@/platforms/@d' \ - -e '\@/download/@d' \ - -e '\@/libccmio-.*/@d' \ - -e '\@/debian/@d' - > $tmpFile +foamSourceFiles $packDir > $tmpFile # provide some feedback diff --git a/bin/foamPackThirdPartyGeneral b/bin/foamPackThirdParty similarity index 91% rename from bin/foamPackThirdPartyGeneral rename to bin/foamPackThirdParty index 2a14492af5..4cd5b9c9ee 100755 --- a/bin/foamPackThirdPartyGeneral +++ b/bin/foamPackThirdParty @@ -1,11 +1,11 @@ #!/bin/sh -#------------------------------------------------------------------------------ +#---------------------------------*- sh -*------------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. # \\/ M anipulation | -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. # @@ -23,7 +23,7 @@ # along with OpenFOAM. If not, see . # # Script -# foamPackThirdPartyGeneral [outputDir] +# foamPackThirdParty [outputDir] # # Description # Packs and compresses the OpenFOAM ThirdParty directory for release @@ -33,7 +33,7 @@ timeStamp=$(date +%Y-%m-%d) packDir=${WM_THIRD_PARTY_DIR:-ThirdParty} packDir=${packDir##*/} -packFile=${packDir}.General_${timeStamp}.gtgz +packFile=${packDir}_${timeStamp}.gtgz if [ ! -d $packDir ] then diff --git a/bin/foamSourceFiles b/bin/foamSourceFiles new file mode 100755 index 0000000000..f20e7927ce --- /dev/null +++ b/bin/foamSourceFiles @@ -0,0 +1,81 @@ +#!/bin/sh +#---------------------------------*- sh -*------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2010 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 . +# +# Script +# foamSourceFiles +# +# Description +# Returns all the .C and .H files and Make/options +# and Make/files in a given directory. +# +#------------------------------------------------------------------------------ + +if [ $# -ne 1 ] +then + echo "Usage : ${0##*/} directory" + echo "" + echo "Returns all .C and .H files and Make/options and Make/files." + echo "" + exit 1 +fi + +# canonical form (no double and no trailing dashes) +packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@') + +if [ ! -d $packDir ] +then + echo "Error: directory $packDir does not exist" + exit 1 +fi + +find -H $packDir \ + ! -type d \ + \( -type f -o -type l \) \ + ! -name "*~" \ + -a ! -name ".*~" \ + -a ! -name "*.orig" \ + -a ! -name "*.dep" \ + -a ! -name "*.o" \ + -a ! -name "*.so" \ + -a ! -name "*.a" \ + -a ! -name "*.tgz" \ + -a ! -name "core" \ + -a ! -name "core.[1-9]*" \ + -a ! -name "libccmio*" \ +| sed \ + -e "\@$packDir/lib/@d" \ + -e '\@/\.git/@d' \ + -e '\@/\.gitignore@d' \ + -e '\@/\.tags/@d' \ + -e '\@/\README\.org@d' \ + -e '\@applications/bin/@d' \ + -e '\@wmake/bin/@d' \ + -e '\@/t/@d' \ + -e '\@/Make[.A-Za-z]*/[^/]*/@d'\ + -e '\@/platforms/@d' \ + -e '\@/download/@d' \ + -e '\@/libccmio-.*/@d' \ + -e '\@/debian/@d' + +#------------------------------------------------------------------------------ diff --git a/bin/mpigammarun b/bin/mpigammarun deleted file mode 100755 index fa789ddf55..0000000000 --- a/bin/mpigammarun +++ /dev/null @@ -1,288 +0,0 @@ -#! /bin/sh -# -# Giuseppe Ciaccio 15 November 2000 -# This script is derived from the mpirun.args original script of MPICH . -# -hasprinthelp=1 -progname= -cmdLineArgs= -machineFile= -machineFileArg= -fake_progname= -np=1 -mpirun_verbose=0 -just_testing=0 -machineFileArg= -machineFile= -Show=eval -# -PrintHelp() { -# -# If you change this, make the corresponding changes in README so that -# the man pages are updated. -# -cat < [options...] - - mpirun_options: - -h This help - -machinefile - The file is a list of machines to be involved in the job run. - Local machine is always involved (and hosts instance #0). - Default machine file is /etc/gamma.conf - -np - specify the number of process instances to be generated. - -t Testing - do not actually run, just print what would be - executed - -v Verbose - throw in some comments - -Multiple architectures as well as multiple pathnames for the executables -cannot be handled yet. - -EOF -} - -while [ 1 -le $# ] ; do - arg=$1 - #echo $arg - #echo $# - shift - case $arg in - -arch) - shift - ;; - -np) - np="$1" - nodigits=`echo $np | sed 's/^[0-9]*$//'` - if [ "$nodigits" != "" -o $np -lt 1 ] ; then - echo np: $np is an invalid number of processors. Exiting. - exit 1 - fi - shift - ;; - -machine) - shift - ;; - -machinefile) - machineFileArg="-machinefile" - machineFile="$1" - shift - ;; - -device) - shift - ;; - -stdin) - shift - ;; - -stdout) - shift - ;; - -stderr) - shift - ;; - -nolocal) - ;; - -h) - if [ "$hasprinthelp" = 1 ] ; then - PrintHelp - fi - exit 1 - ;; - -e) - ;; - -pg) - ;; - -leave_pg|-keep_pg) - ;; - -batch) - ;; - -jid) - shift - ;; - -globusrsl) - shift - ;; - -globusdb) - shift - ;; - -globusargs) - shift - ;; - -p4pg) - shift - ;; - -p4wd) - shift - ;; - -tcppg) - shift - ;; - -p4ssport) - shift - ;; - -paragontype) - shift - ;; - -paragonname) - shift - ;; - -paragonpn) - shift - ;; - -v) - mpirun_verbose=1 - ;; - -t) - just_testing=1 - Show=echo - ;; - -tv|-totalview) - ;; - -ksq) - ;; - -dbx) - ;; - -gdb) - ;; - -xxgdb) - ;; - -ddd) - ;; - -pedb) - ;; - -nopoll) - ;; - -maxtime|-cpu) - shift - ;; - -mem) - shift - ;; - -mvhome) - ;; - -mvback) - shift - ;; - -cac) - shift - ;; - -echo) - ;; - -usage|-help|-\?) - # Accept these for help until the program name is provided. - if [ "$progname" = "" ] ; then - if [ "$hasprinthelp" = "1" ] ; then - PrintHelp - fi - exit 1 - fi - ;; - *) - # The first unrecognized argument is assumed to be the name of - # the program, but only if it is executable - proginstance=`echo $arg | sed "s/%a/$arch/g"` - if [ "$progname" = "" -a "$fake_progname" = "" -a \ - ! -x "$proginstance" ] ; then - fake_progname="$arg" - elif [ "$progname" = "" -a -x "$proginstance" ] ; then - progname="$arg" - # any following unrecognized arguments are assumed to be arguments - # to be passed to the program, as well as all future args - while [ 1 -le $# ] ; do - cmdLineArgs="$cmdLineArgs $1" - shift - done - else - echo "Warning: Command line arguments for program should be given" - echo "after the program name. Assuming that $arg is a" - echo "command line argument for the program." - cmdLineArgsExecer="$cmdLineArgsExecer -arg=$arg" - cmdLineArgs="$cmdLineArgs $arg" - fi - ;; - esac -done - -# We need at least the program name - -if [ "$progname" = "" ] ; then - echo "Missing: program name" - if [ "$fake_progname" != "" ] ; then - echo "Program $fake_progname either does not exist, is not " - echo "executable, or is an erroneous argument to mpirun." - fi - exit 1 -fi -# -# Fill out relative program pathnames -# -# Get the current directory -# Note that PWD may NOT be `pwd` if an explicit "cd", outside of the csh -# shell, is used. A downside of this is that PWD may have a more reasonable -# version of the path. To try and fix this, we create a test file and see -# if it is accessible from PWD and pwd; if so, we take the PWD value -# -# Why can't automounters work!???!! -# -# For those unfamiliar with the problem, the automounter creates -# paths like /tmp_mnt/.... . But if you try to open a file with that path, -# and the ACTUAL path has not been accessed before, the automounter fails -# to mount the partition. In otherwords, the automounter is so mind-bogglingly -# stupid as to not recognize its OWN MOUNTS. Network computing indeed. -# -# Note that PWD may ALSO be damaged, so we need to sed PWD as well... -# -# We should move this to the point in the code where it needs to know a -# particular filename, since this will fail if the directory is not -# writable by the user. -# -if [ -n "sed -e s@/tmp_mnt/@/@g" ] ; then - PWDtest=`pwd | sed -e s@/tmp_mnt/@/@g` - if [ ! -d $PWDtest ] ; then - PWDtest=`pwd` - fi - if [ -n "$PWD" ] ; then - # Use a process-specific filename - PWDtest2=`echo $PWD | sed -e s@/tmp_mnt/@/@g` - /bin/rm -f $PWDtest/.mpirtmp$$ $PWDtest2/.mpirtmp$$ - if `eval "echo test > $PWDtest2/.mpirtmp$$" 2>/dev/null` ; then - if [ ! -s $PWDtest/.mpirtmp$$ ] ; then - /bin/rm -f $PWDtest2/.mpirtmp$$ - PWD=$PWDtest - else - PWD=$PWDtest2 - fi - else - # Current directory is not writable. Hope for the best - PWD=$PWDtest - fi - /bin/rm -f $PWDtest/.mpirtmp$$ $PWDtest2/.mpirtmp$$ - else - PWD=$PWDtest - fi -else - PWD=`pwd` -fi -# -if [ -n "$PWD" ] ; then - PWD_TRIAL=$PWD -else - PWD_TRIAL=$PWDtest -fi -# The test for PWD_TRIAL usable is within the p4/execer/tcp test (since that -# is where it matters) -# -tail=`echo $progname | sed 's/\/.*//'` -if [ "$tail" = "" ] ; then - #echo Absolute path, don't need to change anything - true -else - #echo Relative path - progname="$PWD_TRIAL/$progname" -fi - -if [ $mpirun_verbose = 1 ] ; then - echo "running $progname on $np $arch $machine processors" -fi - -$Show $progname $cmdLineArgs $machineFileArg $machineFile -GAMMANP $np diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths new file mode 100755 index 0000000000..5bd2494b81 --- /dev/null +++ b/bin/tools/foamConfigurePaths @@ -0,0 +1,108 @@ +#!/bin/sh +#---------------------------------*- sh -*------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2010 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 . +# +# Script +# foamConfigurePaths +# +# Description +# hardcode installation directory +# +#------------------------------------------------------------------------------ +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat< Mon, 14 Jun 2010 16:50:46 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000000..7f8f011eb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000..7f1ffece57 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: openfoamdev +Section: optional +Priority: optional +Maintainer: OpenCFD Ltd. +Build-Depends: debhelper (>= 7), quilt +Standards-Version: 3.8.4 +Homepage: http://www.openfoam.com + +Package: openfoamdev +Architecture: any +Depends: csh,g++,${shlibs:Depends}, ${misc:Depends},binutils-dev,flex,libscotch-dev,libopenmpi-dev,libxt-dev,openmpi-bin +Description: OpenFOAM + OpenFOAM is a free, open source CFD software package produced by a + commercial company, OpenCFD Ltd. It has a large user base across + most areas of engineering and science, from both commercial and academic + organisations. OpenFOAM has an extensive range of features to solve + anything from complex fluid flows involving chemical reactions, turbulence + and heat transfer, to solid dynamics and electromagnetics. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000000..2106c078bd --- /dev/null +++ b/debian/copyright @@ -0,0 +1,30 @@ +This work was packaged for Debian by: + + OpenCFD Ltd. on Mon, 14 Jun 2010 16:50:46 +0100 + +Copyright: + + Copyright (C) 1991-2010 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 . + +The Debian packaging is: + + Copyright (C) 2010 OpenCFD Ltd. + + and is licensed under the GPL version 3 diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000000..e28adbc93f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,48 @@ +#!/bin/sh +# postinst script for OpenFOAM +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + #echo "** postinst called with $*" + echo "" + echo "** To use OpenFOAM please add" + echo "**" + echo "** . /opt/openfoamdev/etc/bashrc" + echo "**" + echo "** To your ~/.bashrc" + echo "" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000..ce5f53f5c0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,109 @@ +#!/usr/bin/make -f +#-*- makefile -*- +# After debian/rules from less package + +include /usr/share/quilt/quilt.make + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. + +#DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +#DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +#ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +#CONFARGS= --host=$(DEB_HOST_GNU_TYPE) +#endif +# +#CFLAGS = -Wall -g #-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +# +#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +#CFLAGS += -O0 +#else +#CFLAGS += -O2 +#endif + +DEB_BUILD_ARCH_BITS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS) +foamArch= +ifeq ($(DEB_BUILD_ARCH_BITS),64) +foamArch=linux64GccDPOpt +else +foamArch=linuxGccDPOpt +endif + +packageName = $(shell dh_listpackages) +installDir = debian/$(packageName)/opt/$(packageName) +paraviewInstallDir = /opt/paraviewopenfoam380 + +DEB_DH_SHLIBDEPS_ARGS=-L$(installDir)/lib/$(foamArch) + +build: patch build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + #./Allwmake + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + #./Allwclean + #set + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Install source files into debian/. + install -d $(installDir) + tar cf - `bin/foamSourceFiles .` | (cd $(installDir); tar xfp -) + (cd $(installDir); bin/tools/foamConfigurePaths --foamInstall /opt --projectName $(packageName) --paraviewInstall $(paraviewInstallDir) ) + + # Install binary files into debian/. + tar cf - `bin/foamBinDirs . $(foamArch)` | (cd $(installDir); tar xfp -) + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installemacsen +# dh_installinit + dh_installmime + dh_installcron + #dh_installman debian/lesspipe.1 + #dh_undocumented + dh_installchangelogs + #dh_link + #dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps -- --ignore-missing-info #We depend on vtk libs without info + dh_gencontrol + dh_md5sums + dh_builddeb + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary From 5810f991d7b034a35fe55f7a6b671e7a16347de5 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 2 Jul 2010 09:06:04 +0200 Subject: [PATCH 17/52] STYLE: report when skipping ThirdParty build --- Allwmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Allwmake b/Allwmake index ebe159e376..035b24811b 100755 --- a/Allwmake +++ b/Allwmake @@ -15,6 +15,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || { if [ -d "$WM_THIRD_PARTY_DIR" ] then $WM_THIRD_PARTY_DIR/Allwmake +else + echo "no ThirdParty sources found - skipping" fi # build OpenFOAM libraries and applications From 266c4c61dac3e5204b1b4747b935e0db6ca911a8 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 2 Jul 2010 09:14:10 +0200 Subject: [PATCH 18/52] STYLE: remove tabs and trailing space from new scripts --- bin/tools/foamConfigurePaths | 41 ++++++++++++++++++------------------ debian/copyright | 2 +- debian/rules | 4 ++-- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index 5bd2494b81..823c816d51 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -34,10 +34,10 @@ usage() { cat< - and is licensed under the GPL version 3 + and is licensed under the GPL version 3 diff --git a/debian/rules b/debian/rules index ce5f53f5c0..696fcc9216 100755 --- a/debian/rules +++ b/debian/rules @@ -96,13 +96,13 @@ binary-arch: build install dh_fixperms dh_makeshlibs dh_installdeb -# dh_perl +# dh_perl dh_shlibdeps -- --ignore-missing-info #We depend on vtk libs without info dh_gencontrol dh_md5sums dh_builddeb -source diff: +source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch From d8c7792e9c9e759b854caf29468dbc7bcf9b6212 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 6 Jul 2010 11:42:26 +0100 Subject: [PATCH 19/52] ENH: renumberMesh.C : renumber XXXXProcAddressing maps in parallel --- .../manipulation/renumberMesh/renumberMesh.C | 89 ++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 3394b928b2..c04d87bc91 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -430,6 +430,59 @@ int main(int argc, char *argv[]) << "Band before renumbering: " << returnReduce(band, maxOp