diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 6c3a0c315a..5fd94ef38d 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -321,7 +321,7 @@ endOfSection {space}")"{space} pointGroupEndIndex.append(strtol(endPtr, &endPtr, 16) - 1); // point group type skipped - strtol(endPtr, &endPtr, 16); + (void)strtol(endPtr, &endPtr, 16); pointi = pointGroupStartIndex.last(); @@ -435,7 +435,7 @@ endOfSection {space}")"{space} faceGroupEndIndex.append(strtol(endPtr, &endPtr, 16) - 1); // face group type - strtol(endPtr, &endPtr, 16); + (void)strtol(endPtr, &endPtr, 16); faceGroupElementType = strtol(endPtr, &endPtr, 16); @@ -583,7 +583,7 @@ endOfSection {space}")"{space} cellGroupType.append(strtol(endPtr, &endPtr, 16)); // Note. Potentially skip cell set if type is zero. - strtol(endPtr, &endPtr, 16); + (void)strtol(endPtr, &endPtr, 16); Info<< "CellGroup: " << cellGroupZoneID.last() diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index 49fd63f8e1..fb019694da 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -955,6 +955,12 @@ int main(int argc, char *argv[]) argList::validArgs.append("faceZones"); argList::validArgs.append("thickness"); + Foam::argList::addBoolOption + ( + "oneD", + "generate columns of 1D cells" + ); + #include "addRegionOption.H" #include "addOverwriteOption.H" #include "setRootCase.H" @@ -966,6 +972,7 @@ int main(int argc, char *argv[]) const wordList zoneNames(IStringStream(args.additionalArgs()[1])()); scalar thickness = readScalar(IStringStream(args.additionalArgs()[2])()); bool overwrite = args.optionFound("overwrite"); + bool oneD = args.optionFound("oneD"); Info<< "Extruding zones " << zoneNames @@ -1225,9 +1232,25 @@ int main(int argc, char *argv[]) label nSide = 0; forAll(zoneSidePatch, zoneI) { - if (zoneSidePatch[zoneI] > 0) + if (oneD) + { + // Always add empty patches, one per zone. + word patchName = faceZones[zoneI].name() + "_" + "side"; + + zoneSidePatch[zoneI] = addPatch + ( + mesh, + patchName + ); + + Info<< zoneSidePatch[zoneI] << '\t' << patchName << nl; + + nSide++; + } + else if (zoneSidePatch[zoneI] > 0) { word patchName = faceZones[zoneI].name() + "_" + "side"; + zoneSidePatch[zoneI] = addPatch ( mesh, @@ -1257,47 +1280,53 @@ int main(int argc, char *argv[]) ); label nInter = 0; - forAll(zoneZonePatch_min, minZone) + if (!oneD) { - for (label maxZone = minZone; maxZone < faceZones.size(); maxZone++) + forAll(zoneZonePatch_min, minZone) { - label index = minZone*faceZones.size()+maxZone; - - if (zoneZonePatch_min[index] > 0) + for (label maxZone = minZone; maxZone < faceZones.size(); maxZone++) { - word minToMax = - faceZones[minZone].name() - + "_to_" - + faceZones[maxZone].name(); - word maxToMin = - faceZones[maxZone].name() - + "_to_" - + faceZones[minZone].name(); - { - transformDict.set("neighbourPatch", maxToMin); - zoneZonePatch_min[index] = - addPatch - ( - mesh, - minToMax, - transformDict - ); - Info<< zoneZonePatch_min[index] << '\t' << minToMax << nl; - nInter++; - } - { - transformDict.set("neighbourPatch", minToMax); - zoneZonePatch_max[index] = - addPatch - ( - mesh, - maxToMin, - transformDict - ); - Info<< zoneZonePatch_max[index] << '\t' << maxToMin << nl; - nInter++; - } + label index = minZone*faceZones.size()+maxZone; + if (zoneZonePatch_min[index] > 0) + { + word minToMax = + faceZones[minZone].name() + + "_to_" + + faceZones[maxZone].name(); + word maxToMin = + faceZones[maxZone].name() + + "_to_" + + faceZones[minZone].name(); + + { + transformDict.set("neighbourPatch", maxToMin); + zoneZonePatch_min[index] = + addPatch + ( + mesh, + minToMax, + transformDict + ); + Info<< zoneZonePatch_min[index] << '\t' << minToMax + << nl; + nInter++; + } + { + transformDict.set("neighbourPatch", minToMax); + zoneZonePatch_max[index] = + addPatch + ( + mesh, + maxToMin, + transformDict + ); + Info<< zoneZonePatch_max[index] << '\t' << maxToMin + << nl; + nInter++; + } + + } } } } @@ -1323,7 +1352,16 @@ int main(int argc, char *argv[]) labelList& ePatches = extrudeEdgePatches[edgeI]; - if (eFaces.size() == 2) + if (oneD) + { + nonManifoldEdge[edgeI] = 1; + ePatches.setSize(eFaces.size()); + forAll(eFaces, i) + { + ePatches[i] = zoneSidePatch[zoneID[eFaces[i]]]; + } + } + else if (eFaces.size() == 2) { label zone0 = zoneID[eFaces[0]]; label zone1 = zoneID[eFaces[1]]; diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index ad67095ad9..2b82a234ba 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -1171,7 +1171,11 @@ int main(int argc, char *argv[]) + "_" + procFile.name() ); - system(cmd.c_str()); + if (system(cmd.c_str()) == -1) + { + WarningIn(args.executable()) + << "Could not execute command " << cmd << endl; + } } } } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake index 82a07df11f..1e2ebd6c43 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -6,6 +6,13 @@ if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then case "$ParaView_VERSION" in 3* | git) + + if [ ! -d "${PV_PLUGIN_PATH}" ] + then + echo "$0 : PV_PLUGIN_PATH not a valid directory." + exit 1 + fi + wmake libso vtkPV3Readers PV3blockMeshReader/Allwmake PV3FoamReader/Allwmake diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C index 380f7fb931..5c39ebd503 100644 --- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C +++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C @@ -398,7 +398,12 @@ int main(int argc, char *argv[]) ) { // Make the eigenvectors a right handed orthogonal triplet - eVec.z() *= sign((eVec.x() ^ eVec.y()) & eVec.z()); + eVec = tensor + ( + eVec.x(), + eVec.y(), + eVec.z() * sign((eVec.x() ^ eVec.y()) & eVec.z()) + ); // Finding the most natural transformation. Using Lists // rather than tensors to allow indexed permutation. @@ -557,9 +562,7 @@ int main(int argc, char *argv[]) eVal = tEVal; } - eVec.x() = principal[0]; - eVec.y() = principal[1]; - eVec.z() = principal[2]; + eVec = tensor(principal[0], principal[1], principal[2]); // { // tensor R = rotationTensor(vector(1, 0, 0), eVec.x()); diff --git a/bin/mpirunDebug b/bin/mpirunDebug index 151eedd5c4..b7fb377f0f 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -239,6 +239,11 @@ MPICH) cmd="${cmd} -n 1 ${procXtermCmdFile}" done < $PWD/mpirun.schema ;; +*) + echo + echo "Unsupported WM_MPLIB setting : $WM_MPLIB" + printUsage + exit 1 esac echo "Constructed $PWD/mpirun.schema file." diff --git a/bin/tools/scanpackages b/bin/tools/scanpackages new file mode 100755 index 0000000000..ed30adb677 --- /dev/null +++ b/bin/tools/scanpackages @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Generate Packages file on debian repositories. + +for D in `find . -mindepth 4 -type d` +do + dpkg-scanpackages $D | gzip -9c > ${D}/Packages.gz +done diff --git a/src/Allwmake b/src/Allwmake index e1589a4046..33966ddb97 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -32,14 +32,12 @@ parallel/decompose/AllwmakeLnInclude # dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools dummyThirdParty/Allwmake -# Build the proper scotchDecomp, metisDecomp etc. -parallel/decompose/Allwmake - wmake libso meshTools wmake libso finiteVolume wmake libso genericPatchFields -parallel/reconstruct/Allwmake +# Build the proper scotchDecomp, metisDecomp etc. +parallel/Allwmake wmake libso sampling diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 9560986fbd..ec202a76ee 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -530,6 +530,7 @@ $(constraintPointPatchFields)/processorCyclic/processorCyclicPointPatchFields.C derivedPointPatchFields = $(pointPatchFields)/derived $(derivedPointPatchFields)/slip/slipPointPatchFields.C +$(derivedPointPatchFields)/fixedNormalSlip/fixedNormalSlipPointPatchFields.C /* $(derivedPointPatchFields)/global/globalPointPatchFields.C */ diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index 531ae0443a..e5c5a7cced 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -66,7 +66,7 @@ template Field::Field ( const UList& mapF, - const labelList& mapAddressing + const UList