diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C index 9df568f1b5..ad9bb424eb 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C +++ b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.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 @@ -39,16 +39,6 @@ Usage Specify an alternative geometry scaling factor. The default is @b 1000 (scale @em [m] to @em [mm]). - @param -surface \n - Extract the surface of the volume mesh only. - This can be useful, for example, for surface morphing in an external - package. - - @param -tri \n - Extract a triangulated surface. - The @b -surface options is implicitly selected. - - Note The cellTable information available in the files @c constant/cellTable and @c constant/polyMesh/cellTableId @@ -87,34 +77,13 @@ int main(int argc, char *argv[]) "noBnd", "suppress writing the .bnd file" ); - argList::addBoolOption - ( - "tri", - "Extract a triangulated surface. Implies -surface" - ); - argList::addBoolOption - ( - "surface", - "extract the surface of the volume mesh only" - ); # include "setRootCase.H" # include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); - bool surfaceOnly = false; - if (args.optionFound("surface") || args.optionFound("tri")) - { - surfaceOnly = true; - } - fileName exportName = meshWriter::defaultMeshName; - if (surfaceOnly) - { - exportName = meshWriter::defaultSurfaceName; - } - if (args.optionFound("case")) { exportName += '-' + args.globalCaseName(); @@ -132,7 +101,6 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" - forAll(timeDirs, timeI) { runTime.setTime(timeDirs[timeI], timeI); @@ -156,21 +124,7 @@ int main(int argc, char *argv[]) meshName += '_' + runTime.timeName(); } - if (surfaceOnly) - { - if (args.optionFound("tri")) - { - writer.writeSurface(meshName, true); - } - else - { - writer.writeSurface(meshName); - } - } - else - { - writer.write(meshName); - } + writer.write(meshName); } Info<< nl << endl; diff --git a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C index f9a255c502..b1c55e3769 100644 --- a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C +++ b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C @@ -36,6 +36,9 @@ Usage Specify an alternative geometry scaling factor. Eg, use @b 1000 to scale @em [m] to @em [mm]. + @param -tri \n + Triangulate surface. + \*---------------------------------------------------------------------------*/ #include "argList.H" @@ -62,6 +65,11 @@ int main(int argc, char *argv[]) "scale", "specify geometry scaling factor" ); + argList::addBoolOption + ( + "tri", + "triangulate surface" + ); # include "setRootCase.H" @@ -69,6 +77,7 @@ int main(int argc, char *argv[]) scalar scaleFactor = 0; args.optionReadIfPresent("scale", scaleFactor); + const bool doTriangulate = args.optionFound("tri"); fileName exportName(params[0]); @@ -107,6 +116,12 @@ int main(int argc, char *argv[]) surf.scalePoints(scaleFactor); Info<< "writing " << exportName; + if (doTriangulate) + { + Info<< " triangulated"; + surf.triangulate(); + } + if (scaleFactor <= 0) { Info<< " without scaling" << endl; diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index c412010cbd..e2cd5edba2 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -260,11 +260,31 @@ int main(int argc, char *argv[]) procMeshes.boundaryProcAddressing() ); - pointReconstructor.reconstructFields(objects); - pointReconstructor.reconstructFields(objects); - pointReconstructor.reconstructFields(objects); - pointReconstructor.reconstructFields(objects); - pointReconstructor.reconstructFields(objects); + pointReconstructor.reconstructFields + ( + objects, + selectedFields + ); + pointReconstructor.reconstructFields + ( + objects, + selectedFields + ); + pointReconstructor.reconstructFields + ( + objects, + selectedFields + ); + pointReconstructor.reconstructFields + ( + objects, + selectedFields + ); + pointReconstructor.reconstructFields + ( + objects, + selectedFields + ); } else { diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 48435c749b..19920b008a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -30,13 +30,10 @@ License #include "fvMesh.H" #include "globalMeshData.H" #include "PstreamCombineReduceOps.H" -#include "processorPolyPatch.H" #include "cellModeller.H" #include "IOmanip.H" #include "itoa.H" #include "ensightWriteBinary.H" -#include "globalIndex.H" -#include "PackedBoolList.H" #include "mapDistribute.H" #include @@ -1111,14 +1108,11 @@ void Foam::ensightMesh::writeAllFacePrimsBinary writeEnsDataBinary(key,ensightGeometryFile); writeEnsDataBinary(nPrims,ensightGeometryFile); - if (&prims != NULL) - { - writeFacePrimsBinary - ( - UIndirectList(patchFaces, prims)(), - ensightGeometryFile - ); - } + writeFacePrimsBinary + ( + UIndirectList(patchFaces, prims)(), + ensightGeometryFile + ); for (int slave=1; slave globalPointsPtr = mesh_.globalData().mergePoints ( p.meshPoints(), p.meshPointMap(), pointToGlobal, - uniquePointLabels + uniqueMeshPointLabels ); - pointField uniquePoints(p.localPoints(), uniquePointLabels); + + pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels); // Renumber the patch faces faceList patchFaces(p.localFaces()); forAll(patchFaces, i) @@ -1601,16 +1596,17 @@ void Foam::ensightMesh::writeBinary // Renumber the patch points/faces into unique points labelList pointToGlobal; - labelList uniquePointLabels; + labelList uniqueMeshPointLabels; autoPtr globalPointsPtr = mesh_.globalData().mergePoints ( p.meshPoints(), p.meshPointMap(), pointToGlobal, - uniquePointLabels + uniqueMeshPointLabels ); - pointField uniquePoints(p.localPoints(), uniquePointLabels); + + pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels); // Renumber the patch faces faceList patchFaces(p.localFaces()); forAll(patchFaces, i) diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 017085c499..8267db2a49 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.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) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,6 +50,9 @@ Usage @param -to \ \n Specify a coordinate System when writing files. + @param -tri \n + Triangulate surface. + Note The filename extensions are used to determine the file format type. @@ -73,13 +76,47 @@ int main(int argc, char *argv[]) argList::validArgs.append("inputFile"); argList::validArgs.append("outputFile"); - argList::addBoolOption("clean"); + argList::addBoolOption + ( + "clean", + "perform some surface checking/cleanup on the input surface" + ); + argList::addOption + ( + "scaleIn", + "scale", + "specify input geometry scaling factor" + ); + argList::addOption + ( + "scaleOut", + "scale", + "specify output geometry scaling factor" + ); + argList::addOption + ( + "dict", + "file", + "specify alternative dictionary for the coordinateSystems descriptions" + ); + argList::addOption + ( + "from", + "system", + "specify the source coordinate system, applied after '-scaleIn'" + ); + argList::addOption + ( + "to", + "system", + "specify the target coordinate system, applied before '-scaleOut'" + ); + argList::addBoolOption + ( + "tri", + "triangulate surface" + ); - argList::addOption("scaleIn", "scale"); - argList::addOption("scaleOut", "scale"); - argList::addOption("dict", "coordinateSystemsDict"); - argList::addOption("from", "sourceCoordinateSystem"); - argList::addOption("to", "targetCoordinateSystem"); argList args(argc, argv); Time runTime(args.rootPath(), args.caseName()); @@ -242,6 +279,12 @@ int main(int argc, char *argv[]) surf.scalePoints(scaleOut); } + if (args.optionFound("tri")) + { + Info<< "triangulate" << endl; + surf.triangulate(); + } + Info<< "writing " << exportName; surf.write(exportName); } diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc index 60b40255d2..24bfa9887d 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/apps/paraview3/bashrc @@ -35,7 +35,7 @@ # determine the cmake to be used unset CMAKE_HOME -for cmake in cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 +for cmake in cmake-2.8.0 cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 do cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH if [ -r $cmake ] diff --git a/etc/apps/paraview3/cshrc b/etc/apps/paraview3/cshrc index d22f25012d..2cbfa0e281 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/apps/paraview3/cshrc @@ -35,7 +35,7 @@ # determine the cmake to be used unsetenv CMAKE_HOME -foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) +foreach cmake ( cmake-2.8.0 cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) set cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH if ( -r $cmake ) then setenv CMAKE_HOME $cmake diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index c3650ccb5a..6f9f311d11 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -1705,7 +1705,7 @@ Foam::autoPtr Foam::globalMeshData::mergePoints const labelList& meshPoints, const Map