From bdfab2bc482f7b128b0baf8ee175d24613168086 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Sat, 30 Nov 2013 13:55:08 +0100 Subject: [PATCH 1/4] Enable multiSolver example in test loop --- .../parTeeFitting2d/system/controlDict | 14 +++----------- .../teeFitting2d/system/controlDict | 14 +++----------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict index 132d74cc6..ff050b1d7 100644 --- a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict +++ b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict @@ -15,15 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -writeFormat ascii; - -writePrecision 6; - -writeCompression uncompressed; - -runTimeModifiable yes; - -application icoFoam; +application multiSolverDemo deltaT 0.01; @@ -33,9 +25,9 @@ writeInterval 1; startFrom startTime; -startTime 0.1; +startTime 0; -stopAt endTime; +stopAt noWriteNow; endTime 0.1; diff --git a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/controlDict b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/controlDict index 132d74cc6..d669edb19 100644 --- a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/controlDict +++ b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/controlDict @@ -15,15 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -writeFormat ascii; - -writePrecision 6; - -writeCompression uncompressed; - -runTimeModifiable yes; - -application icoFoam; +application multiSolverDemo; deltaT 0.01; @@ -33,9 +25,9 @@ writeInterval 1; startFrom startTime; -startTime 0.1; +startTime 0; -stopAt endTime; +stopAt noWriteNow; endTime 0.1; From 9f384472d4f7d24dcd89dbec45b1e4e25ef119ce Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Sat, 30 Nov 2013 13:58:02 +0100 Subject: [PATCH 2/4] BUGFIX: options treatment in metisDecomp --- .../metisDecomp/metisDecomp.C | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/decompositionMethods/metisDecomp/metisDecomp.C b/src/decompositionMethods/metisDecomp/metisDecomp.C index 724638ae1..24e3f58d0 100644 --- a/src/decompositionMethods/metisDecomp/metisDecomp.C +++ b/src/decompositionMethods/metisDecomp/metisDecomp.C @@ -70,7 +70,8 @@ Foam::label Foam::metisDecomp::decompose int numCells = xadj.size()-1; // decomposition options. 0 = use defaults - List options(5, 0); + idx_t options[METIS_NOPTIONS]; + METIS_SetDefaultOptions(options); // processor weights initialised with no size, only used if specified in // a file @@ -139,18 +140,24 @@ Foam::label Foam::metisDecomp::decompose << nl << endl; } - if (metisCoeffs.readIfPresent("options", options)) + List mOptions; + if (metisCoeffs.readIfPresent("options", mOptions)) { - if (options.size() != 5) + if (mOptions.size() != METIS_NOPTIONS) { FatalErrorIn("metisDecomp::decompose()") << "Number of options in metisCoeffs in dictionary : " << decompositionDict_.name() - << " should be 5" + << " should be " << METIS_NOPTIONS << exit(FatalError); } - Info<< "metisDecomp : Using Metis options " << options + forAll(mOptions, i) + { + options[i] = mOptions[i]; + } + + Info<< "metisDecomp : Using Metis options " << mOptions << nl << endl; } @@ -232,7 +239,7 @@ Foam::label Foam::metisDecomp::decompose &nProcs, processorWeights.begin(), NULL, - options.begin(), + options, &edgeCut, finalDecomp.begin() ); @@ -251,7 +258,7 @@ Foam::label Foam::metisDecomp::decompose &nProcs, processorWeights.begin(), NULL, - options.begin(), + options, &edgeCut, finalDecomp.begin() ); From 15b425603345d2772ddfefa85eecc8523c345c85 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Sat, 30 Nov 2013 15:32:37 +0100 Subject: [PATCH 3/4] STYLE: Quench compiler warnings --- .../solvers/basic/PODSolver/PODSolver.C | 3 --- .../solvers/combustion/XiFoam/createFields.H | 4 ++++ .../engine/icoDyMEngineFoam/readControls.H | 6 ------ .../icoDyMSimpleFoam/Make/options | 2 +- .../compressibleInterDyMFoam.C | 2 -- .../compressibleInterDyMFoam/readControls.H | 5 ----- .../compressibleInterFoam/readControls.H | 5 ----- .../viscoElasticSolidFoam.C | 2 +- .../bubbleHistory/bubbleHistory.C | 6 ------ .../mesh/conversion/starToFoam/readPoints.C | 7 +++---- .../generation/blockMesh/createMergeList.C | 9 +-------- .../dataConversion/foamToEnsight/ensightMesh.C | 5 ----- .../changeDictionary/changeDictionary.C | 2 +- .../fluentDataToFoam/fluentDataToFoam.L | 10 ++++------ .../dynamicTopoFvMeshCoupled.C | 6 +++++- .../eMesh/eMeshDemandDrivenData.C | 18 ++++++++++++------ src/multiSolver/multiSolver/multiSolver.C | 2 +- .../chemkinReader/chemkinLexer.L | 4 ++-- .../triSurface/interfaces/STL/readSTLASCII.L | 2 +- 19 files changed, 36 insertions(+), 64 deletions(-) diff --git a/applications/solvers/basic/PODSolver/PODSolver.C b/applications/solvers/basic/PODSolver/PODSolver.C index 29980eb93..9ee67a2c8 100644 --- a/applications/solvers/basic/PODSolver/PODSolver.C +++ b/applications/solvers/basic/PODSolver/PODSolver.C @@ -76,9 +76,6 @@ int main(int argc, char *argv[]) // Read required accuracy scalar eps = readScalar(PODsolverDict.lookup("eps")); - // Interpolation coefficients - scalarField& PODcoeffs = equation->coeffs(); - Info<< "\nStarting time loop\n" << endl; for (runTime++; !runTime.end(); runTime++) diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 93aa61ea0..a40c9e9ef 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -30,6 +30,10 @@ const volScalarField& T = thermo.T(); + // dummy statement to quench compiler warning + // Note: T is used in engineFoam + T.size(); + Info<< "\nReading field U\n" << endl; volVectorField U ( diff --git a/applications/solvers/engine/icoDyMEngineFoam/readControls.H b/applications/solvers/engine/icoDyMEngineFoam/readControls.H index 9336616a1..e4ade2696 100644 --- a/applications/solvers/engine/icoDyMEngineFoam/readControls.H +++ b/applications/solvers/engine/icoDyMEngineFoam/readControls.H @@ -1,12 +1,6 @@ # include "readTimeControls.H" # include "readPISOControls.H" - bool correctPhi = false; - if (piso.found("correctPhi")) - { - correctPhi = Switch(piso.lookup("correctPhi")); - } - bool checkMeshCourantNo = false; if (piso.found("checkMeshCourantNo")) { diff --git a/applications/solvers/incompressible/icoDyMSimpleFoam/Make/options b/applications/solvers/incompressible/icoDyMSimpleFoam/Make/options index 4da36def3..c5d3bb76c 100644 --- a/applications/solvers/incompressible/icoDyMSimpleFoam/Make/options +++ b/applications/solvers/incompressible/icoDyMSimpleFoam/Make/options @@ -11,4 +11,4 @@ EXE_LIBS = \ -lmeshTools \ -lfiniteVolume \ -llduSolvers \ - -L$(MESQUITE_LIB_DIR) -lmesquite \ No newline at end of file + -L$(MESQUITE_LIB_DIR) -lmesquite diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C index af8ef2b52..4e9c7f3e1 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -80,8 +80,6 @@ int main(int argc, char *argv[]) // Store divU from the previous mesh for the correctPhi volScalarField divU = fvc::div(phi); - scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - bool meshChanged = mesh.update(); reduce(meshChanged, orOp()); diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H b/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H index a2e4ef374..440c8a473 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/readControls.H @@ -1,11 +1,6 @@ #include "readPISOControls.H" #include "readTimeControls.H" - label nAlphaCorr - ( - readLabel(piso.lookup("nAlphaCorr")) - ); - label nAlphaSubCycles ( readLabel(piso.lookup("nAlphaSubCycles")) diff --git a/applications/solvers/multiphase/compressibleInterFoam/readControls.H b/applications/solvers/multiphase/compressibleInterFoam/readControls.H index 7e23354f4..0c8d35532 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/readControls.H +++ b/applications/solvers/multiphase/compressibleInterFoam/readControls.H @@ -1,11 +1,6 @@ #include "readPISOControls.H" #include "readTimeControls.H" - label nAlphaCorr - ( - readLabel(piso.lookup("nAlphaCorr")) - ); - label nAlphaSubCycles ( readLabel(piso.lookup("nAlphaSubCycles")) diff --git a/applications/solvers/solidMechanics/viscoElasticSolidFoam/viscoElasticSolidFoam.C b/applications/solvers/solidMechanics/viscoElasticSolidFoam/viscoElasticSolidFoam.C index 8e0ed9c05..dde81867f 100644 --- a/applications/solvers/solidMechanics/viscoElasticSolidFoam/viscoElasticSolidFoam.C +++ b/applications/solvers/solidMechanics/viscoElasticSolidFoam/viscoElasticSolidFoam.C @@ -78,8 +78,8 @@ int main(int argc, char *argv[]) scalar initialResidual = 1.0; scalar residual = 1.0; surfaceSymmTensorField DSigmaCorrf = fvc::interpolate(DSigmaCorr); - label nCrackedFaces = 0; + //label nCrackedFaces = 0; // cracking loop if you use cohesive boundaries //do //{ diff --git a/applications/solvers/surfaceTracking/freeSurface/functionObjects/bubbleHistory/bubbleHistory.C b/applications/solvers/surfaceTracking/freeSurface/functionObjects/bubbleHistory/bubbleHistory.C index 0a982de6e..581691da9 100644 --- a/applications/solvers/surfaceTracking/freeSurface/functionObjects/bubbleHistory/bubbleHistory.C +++ b/applications/solvers/surfaceTracking/freeSurface/functionObjects/bubbleHistory/bubbleHistory.C @@ -212,17 +212,14 @@ bool Foam::bubbleHistory::start() vector F = fs.totalViscousForce() + fs.totalPressureForce(); vector dragDir; - scalar Uref; if(mag(U.value()) > SMALL) { dragDir = -U.value()/mag(U.value()); - Uref = mag(U.value()); } else { dragDir = fs.g().value()/(mag(fs.g().value()) + SMALL); - Uref = SMALL; } scalar dragForce = (dragDir&F); @@ -331,17 +328,14 @@ bool Foam::bubbleHistory::execute() vector F = fs.totalViscousForce() + fs.totalPressureForce(); vector dragDir; - scalar Uref; if(mag(U.value()) > SMALL) { dragDir = -U.value()/mag(U.value()); - Uref = mag(U.value()); } else { dragDir = fs.g().value()/(mag(fs.g().value()) + SMALL); - Uref = SMALL; } scalar dragForce = (dragDir&F); diff --git a/applications/utilities/mesh/conversion/starToFoam/readPoints.C b/applications/utilities/mesh/conversion/starToFoam/readPoints.C index 757a68ad9..414eb6944 100644 --- a/applications/utilities/mesh/conversion/starToFoam/readPoints.C +++ b/applications/utilities/mesh/conversion/starToFoam/readPoints.C @@ -87,7 +87,6 @@ void starMesh::readPoints(const scalar scaleFactor) if (pointsFile.good()) { label pointLabel; - scalar x, y, z; maxLabel = -1; while (pointsFile) @@ -98,9 +97,9 @@ void starMesh::readPoints(const scalar scaleFactor) maxLabel = max(maxLabel, pointLabel); - x = readVtxCmpt(pointsFile); - y = readVtxCmpt(pointsFile); - z = readVtxCmpt(pointsFile); + readVtxCmpt(pointsFile); + readVtxCmpt(pointsFile); + readVtxCmpt(pointsFile); readToNl(pointsFile); diff --git a/applications/utilities/mesh/generation/blockMesh/createMergeList.C b/applications/utilities/mesh/generation/blockMesh/createMergeList.C index f4ea6bf30..af9b0f9da 100644 --- a/applications/utilities/mesh/generation/blockMesh/createMergeList.C +++ b/applications/utilities/mesh/generation/blockMesh/createMergeList.C @@ -199,9 +199,6 @@ Foam::labelList Foam::blockMesh::createMergeList() << exit(FatalError); } - - bool found = false; - // N-squared point search over all points of all faces of // master block over all point of all faces of slave block forAll(blockPfaceFaces, blockPfaceFaceLabel) @@ -215,7 +212,7 @@ Foam::labelList Foam::blockMesh::createMergeList() forAll(blockPfaceFacePoints, blockPfaceFacePointLabel) { - found = false; + bool found = false; forAll(blockNfaceFaces, blockNfaceFaceLabel) { @@ -307,7 +304,6 @@ Foam::labelList Foam::blockMesh::createMergeList() const labelListList& curPairs = glueMergePairs[blockFaceLabel]; - bool foundFace = false; label blockPfaceLabel; for ( @@ -322,12 +318,10 @@ Foam::labelList Foam::blockMesh::createMergeList() == blockInternalFaces[blockFaceLabel] ) { - foundFace = true; break; } } - foundFace = false; label blockNfaceLabel; for ( @@ -342,7 +336,6 @@ Foam::labelList Foam::blockMesh::createMergeList() == blockInternalFaces[blockFaceLabel] ) { - foundFace = true; break; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 0ab9a871b..a79b3bfc5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -396,11 +396,6 @@ void Foam::ensightMesh::writePrimsBinary { label po = pointOffset + 1; - // Create a temp int array - int numElem; - - numElem = cellShapes.size(); - if (cellShapes.size()) { // All the cellShapes have the same number of elements! diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index 1e2d6f8d0..5fe2e50c6 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -136,7 +136,7 @@ bool merge const bool literalRE ) { - auto bool wildCardInMergeDict = false; + bool wildCardInMergeDict = false; bool changed = false; diff --git a/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L b/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L index c1918f443..4cf872546 100644 --- a/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L +++ b/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L @@ -188,10 +188,6 @@ endOfSection {space}")"{space} // Data index label curNEntriesPerObject = 0; - // Dummy, not used - label nTimeLevels; - label nPhases; - label curFirstID = 0; label curLastID = 0; label objI = 0; @@ -320,8 +316,10 @@ endOfSection {space}")"{space} nEntriesPerObject.append(curNEntriesPerObject); // Dummy, not used - nTimeLevels = readLabel(fieldDataStream); - nPhases = readLabel(fieldDataStream); + //nTimeLevels = + readLabel(fieldDataStream); + //nPhases = + readLabel(fieldDataStream); // Start and end of list curFirstID = readLabel(fieldDataStream); diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C index 87275ddd7..4f0281f0a 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C @@ -5433,6 +5433,10 @@ void dynamicTopoFvMesh::buildProcessorPatchMesh // Check if this is a direct neighbour const polyBoundaryMesh& boundary = boundaryMesh(); +/* + // unused code section - to be removed + // HR: 30/11/2013 + label patchIndex = -1; forAll(boundary, patchI) @@ -5447,11 +5451,11 @@ void dynamicTopoFvMesh::buildProcessorPatchMesh if (pp.neighbProcNo() == proc) { patchIndex = patchI; - break; } } } +*/ // Add sub-mesh points first. // Additional halo points will be added later. diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C index 032b08991..394e138a1 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C @@ -233,8 +233,7 @@ void eMesh::calcEdgePoints() const // Counter-clockwise. Pick the owner. cellIndex = owner[faceIndex]; } - else - if (mesh_.isInternalFace(faceIndex)) + else if (mesh_.isInternalFace(faceIndex)) { // Clockwise. Pick the neighbour. cellIndex = neighbour[faceIndex]; @@ -260,7 +259,8 @@ void eMesh::calcEdgePoints() const ) { faceIndex = cellToCheck[0]; - found = true; break; + found = true; + break; } if @@ -270,7 +270,8 @@ void eMesh::calcEdgePoints() const ) { faceIndex = cellToCheck[1]; - found = true; break; + found = true; + break; } if @@ -280,7 +281,8 @@ void eMesh::calcEdgePoints() const ) { faceIndex = cellToCheck[2]; - found = true; break; + found = true; + break; } if @@ -290,7 +292,8 @@ void eMesh::calcEdgePoints() const ) { faceIndex = cellToCheck[3]; - found = true; break; + found = true; + break; } } @@ -308,6 +311,9 @@ void eMesh::calcEdgePoints() const << "edgeFaces: " << eFace << abort(FatalError); } +# else + // dummy statement to quech compiler warning + found = found; # endif } } diff --git a/src/multiSolver/multiSolver/multiSolver.C b/src/multiSolver/multiSolver/multiSolver.C index ac1add78c..dc00989d6 100644 --- a/src/multiSolver/multiSolver/multiSolver.C +++ b/src/multiSolver/multiSolver/multiSolver.C @@ -190,7 +190,7 @@ void Foam::multiSolver::synchronizeParallel() const // Recieve go signal { IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); - bool okayToGo(readBool(fromMaster)); + readBool(fromMaster); } } } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index fa2a2e115..33d8d2b3b 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -309,8 +309,8 @@ List currentSpecieComposition(5); scalar currentLowT = 0; scalar currentHighT = 0; scalar currentCommonT = 0; -gasThermoPhysics::coeffArray highCpCoeffs; -gasThermoPhysics::coeffArray lowCpCoeffs; +gasThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); +gasThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); gasReaction::specieCoeffs currentSpecieCoeff; diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L index efbcda9f6..578e8d262 100644 --- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -209,7 +209,7 @@ endsolid {space}("endsolid"|"ENDSOLID")({some_space}{word})* %{ // End of read character pointer returned by strtof - char* endPtr; + //char* endPtr; STLpoint normal; STLpoint vertex; From 8eb207223a00f161e5b8939cbdbb1ec1ea21b509 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Sat, 30 Nov 2013 18:41:11 +0100 Subject: [PATCH 4/4] BUGFIX: missing ; in parTeeFitting2d (multiSolver) --- .../teeFitting2d/parTeeFitting2d/system/controlDict | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict index ff050b1d7..d669edb19 100644 --- a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict +++ b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/parTeeFitting2d/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application multiSolverDemo +application multiSolverDemo; deltaT 0.01;