diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 67e9bc7f33..a19af405e7 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -309,3 +309,8 @@ * Other + compilable with =clang= In your prefs.sh set the WM_COMPILER to Clang + + dlclose error: upon exit of e.g. paraFoam you can get the error + Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion + `map->l_init_called' failed! + This seems to happen with a mix of system libraries and a thirdParty + compiler. diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index 6587398dab..7e22883256 100644 --- a/applications/solvers/basic/potentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/createFields.H @@ -47,4 +47,10 @@ label pRefCell = 0; scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); + setRefCell + ( + p, + potentialFlow, + pRefCell, + pRefValue + ); diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index a08e356697..c691dd06e7 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,8 +42,8 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" + #include "readControls.H" #include "createFields.H" - #include "readSIMPLEControls.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/basic/potentialFoam/readControls.H b/applications/solvers/basic/potentialFoam/readControls.H new file mode 100644 index 0000000000..8bda4d5017 --- /dev/null +++ b/applications/solvers/basic/potentialFoam/readControls.H @@ -0,0 +1,6 @@ + const dictionary& potentialFlow = + mesh.solutionDict().subDict("potentialFlow"); + + const int nNonOrthCorr = + potentialFlow.lookupOrDefault("nNonOrthogonalCorrectors", 0); + diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/setrDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/setrDeltaT.H index 80ccb1a560..e854f03d35 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/setrDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/setrDeltaT.H @@ -19,7 +19,7 @@ pimple.lookupOrDefault("maxDeltaT", GREAT) ); - volScalarField rDeltaT0 = rDeltaT; + volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number rDeltaT.dimensionedInternalField() = max diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/UEqn.H index 2a9b92d9f0..4efb76bd45 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/UEqn.H @@ -3,7 +3,7 @@ tmp UEqn ( //pZones.ddt(rho, U) - fvc::ddt(rho, U) + fvm::ddt(rho, U) + fvm::div(phi, U) + turbulence->divDevRhoReff(U) ); diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H index e7aec6f31a..208d01b484 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H @@ -49,7 +49,7 @@ piso.lookupOrDefault("maxDeltaT", GREAT) ); - volScalarField rDeltaT0 = rDeltaT; + volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number rDeltaT.dimensionedInternalField() = max diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H index 246a79d3c9..72ae38ba06 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H @@ -11,7 +11,7 @@ fvVectorMatrix UEqn ( //pZones.ddt(rho, U) - fvc::ddt(rho, U) + fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 5691f01034..5b36e99301 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,6 +37,7 @@ Description #include "autoLayerDriver.H" #include "searchableSurfaces.H" #include "refinementSurfaces.H" +#include "refinementFeatures.H" #include "shellSurfaces.H" #include "decompositionMethod.H" #include "fvMeshDistribute.H" @@ -250,6 +251,20 @@ int main(int argc, char *argv[]) << mesh.time().cpuTimeIncrement() << " s" << nl << endl; + // Read feature meshes + // ~~~~~~~~~~~~~~~~~~~ + + Info<< "Reading features." << endl; + refinementFeatures features + ( + mesh, + refineDict.lookup("features") + ); + Info<< "Read features in = " + << mesh.time().cpuTimeIncrement() << " s" << nl << endl; + + + // Refinement engine // ~~~~~~~~~~~~~~~~~ @@ -265,6 +280,7 @@ int main(int argc, char *argv[]) mergeDist, // tolerance used in sorting coordinates overwrite, // overwrite mesh files? surfaces, // for surface intersection refinement + features, // for feature edges/point based refinement shells // for volume (inside/outside) refinement ); Info<< "Calculated surface intersections in = " @@ -429,13 +445,19 @@ int main(int argc, char *argv[]) // Snap parameters snapParameters snapParams(snapDict); + // Temporary hack to get access to resolveFeatureAngle + scalar curvature; + { + refinementParameters refineParams(refineDict); + curvature = refineParams.curvature(); + } if (!overwrite) { const_cast(mesh.time())++; } - snapDriver.doSnap(snapDict, motionDict, snapParams); + snapDriver.doSnap(snapDict, motionDict, curvature, snapParams); writeMesh ( diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 8ee2c4b74c..da7a8ac63c 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -217,10 +217,10 @@ snapControls // to surface nSmoothPatch 3; - //- Relative distance for points to be attracted by surface feature point - // or edge. True distance is this factor times local - // maximum edge length. - tolerance 4.0; + //- Maximum relative distance for points to be attracted by surface. + // True distance is this factor times local maximum edge length. + // Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance) + tolerance 2.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; diff --git a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C index 4e9de20414..20e51284fc 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C +++ b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,6 +148,11 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" + // Make sure we do not use the master-only reading since we read + // fields (different per processor) as dictionaries. + regIOobject::fileModificationChecking = regIOobject::timeStamp; + + fileName meshDir = polyMesh::meshSubDir; fileName regionPrefix = ""; word regionName = polyMesh::defaultRegion; diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index c5df6ef79f..9dd677a61a 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -305,6 +305,11 @@ int main(int argc, char *argv[]) instance = args.options()["instance"]; } + // Make sure we do not use the master-only reading since we read + // fields (different per processor) as dictionaries. + regIOobject::fileModificationChecking = regIOobject::timeStamp; + + // Get the replacement rules from a dictionary IOdictionary dict ( diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C index f1a7ab5301..456fd53953 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -405,6 +405,12 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" + + // Make sure we do not use the master-only reading since we read + // fields (different per processor) as dictionaries. + regIOobject::fileModificationChecking = regIOobject::timeStamp; + + instantList timeDirs = timeSelector::select0(runTime, args); const bool isTestRun = args.optionFound("test"); diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 6d83d18363..1376525577 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -40,6 +40,7 @@ Description #include "treeBoundBox.H" #include "meshTools.H" #include "OFstream.H" +#include "unitConversion.H" using namespace Foam; @@ -90,6 +91,55 @@ void deleteBox } +// Unmark non-manifold edges if individual triangles are not features +void unmarkBaffles +( + const triSurface& surf, + const scalar includedAngle, + List& edgeStat +) +{ + scalar minCos = Foam::cos(degToRad(180.0 - includedAngle)); + + const labelListList& edgeFaces = surf.edgeFaces(); + + forAll(edgeFaces, edgeI) + { + const labelList& eFaces = edgeFaces[edgeI]; + + if (eFaces.size() > 2) + { + label i0 = eFaces[0]; + //const labelledTri& f0 = surf[i0]; + const vector& n0 = surf.faceNormals()[i0]; + + //Pout<< "edge:" << edgeI << " n0:" << n0 << endl; + + bool same = true; + + for (label i = 1; i < eFaces.size(); i++) + { + //const labelledTri& f = surf[i]; + const vector& n = surf.faceNormals()[eFaces[i]]; + + //Pout<< " mag(n&n0): " << mag(n&n0) << endl; + + if (mag(n&n0) < minCos) + { + same = false; + break; + } + } + + if (same) + { + edgeStat[edgeI] = surfaceFeatures::NONE; + } + } + } +} + + // Main program: int main(int argc, char *argv[]) @@ -138,6 +188,11 @@ int main(int argc, char *argv[]) "((x0 y0 z0)(x1 y1 z1))", "remove edges within specified bounding box" ); + argList::addBoolOption + ( + "writeObj", + "write extendedFeatureEdgeMesh obj files" + ); # include "setRootCase.H" # include "createTime.H" @@ -145,6 +200,7 @@ int main(int argc, char *argv[]) Info<< "Feature line extraction is only valid on closed manifold surfaces." << endl; + bool writeObj = args.optionFound("writeObj"); const fileName surfFileName = args[1]; const fileName outFileName = args[2]; @@ -153,6 +209,8 @@ int main(int argc, char *argv[]) << "Output feature set : " << outFileName << nl << endl; + fileName sFeatFileName = surfFileName.lessExt().name(); + // Read // ~~~~ @@ -164,7 +222,6 @@ int main(int argc, char *argv[]) Info<< endl; - // Either construct features from surface&featureangle or read set. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -187,9 +244,9 @@ int main(int argc, char *argv[]) set = surfaceFeatures(surf, includedAngle); - Info<< nl << "Writing initial features" << endl; - set.write("initial.fSet"); - set.writeObj("initial"); + // Info<< nl << "Writing initial features" << endl; + // set.write("initial.fSet"); + // set.writeObj("initial"); } else { @@ -200,7 +257,6 @@ int main(int argc, char *argv[]) << exit(FatalError); } - Info<< nl << "Initial feature set:" << nl << " feature points : " << set.featurePoints().size() << nl @@ -281,11 +337,12 @@ int main(int argc, char *argv[]) surfaceFeatures newSet(surf); newSet.setFromStatus(edgeStat); - Info<< endl << "Writing trimmed features to " << outFileName << endl; - newSet.write(outFileName); + Info<< endl << "Writing trimmed features to " + << runTime.constant()/"featureEdgeMesh"/outFileName << endl; + newSet.write(runTime.constant()/"featureEdgeMesh"/outFileName); - Info<< endl << "Writing edge objs." << endl; - newSet.writeObj("final"); + // Info<< endl << "Writing edge objs." << endl; + // newSet.writeObj("final"); Info<< nl << "Final feature set:" << nl @@ -297,20 +354,22 @@ int main(int argc, char *argv[]) << " internal edges : " << newSet.nInternalEdges() << nl << endl; - // Extracting and writing a featureEdgeMesh + // Extracting and writing a extendedFeatureEdgeMesh extendedFeatureEdgeMesh feMesh ( newSet, runTime, - surfFileName.lessExt().name() + ".featureEdgeMesh" + sFeatFileName + ".extendedFeatureEdgeMesh" ); Info<< nl << "Writing extendedFeatureEdgeMesh to " << feMesh.objectPath() << endl; - - feMesh.writeObj(surfFileName.lessExt().name()); + if (writeObj) + { + feMesh.writeObj(surfFileName.lessExt().name()); + } feMesh.write(); diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index 3e66f9e97e..0a006348a5 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -95,6 +95,7 @@ cleanCase() > /dev/null 2>&1 \ ) rm -rf VTK > /dev/null 2>&1 + rm -f 0/cellLevel 0/pointLevel if [ -e constant/polyMesh/blockMeshDict.m4 ] then diff --git a/etc/bashrc b/etc/bashrc index f5a29a3d89..2de27d0513 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -62,7 +62,7 @@ foamInstall=$HOME/$WM_PROJECT foamCompiler=system #- Compiler: -# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) +# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc) export WM_COMPILER=Gcc unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH diff --git a/etc/cshrc b/etc/cshrc index b932679ad0..a23a607fff 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -61,7 +61,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall set foamCompiler=system #- Compiler: -# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc) +# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc) setenv WM_COMPILER Gcc setenv WM_COMPILER_ARCH # defined but empty unsetenv WM_COMPILER_LIB_ARCH diff --git a/etc/settings.csh b/etc/settings.csh index 4e5677e3d9..0e15cef31e 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -207,6 +207,13 @@ case ThirdParty: set gmp_version=gmp-5.0.1 set mpfr_version=mpfr-2.4.2 breaksw + case Gcc46: + case Gcc46++0x: + set gcc_version=gcc-4.6.0 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw case Gcc45: case Gcc45++0x: set gcc_version=gcc-4.5.2 @@ -381,6 +388,10 @@ case SYSTEMOPENMPI: setenv PLIBS "`mpicc --showme:link`" set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'` + # Bit of a hack: strip off 'lib' and hope this is the path to openmpi + # include files and libraries. + setenv MPI_ARCH_PATH "${libDir:h}" + if ($?FOAM_VERBOSE && $?prompt) then echo "Using system installed MPI:" echo " compile flags : $PINC" diff --git a/etc/settings.sh b/etc/settings.sh index d7fcf2e254..f3ccaebb18 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -227,6 +227,12 @@ OpenFOAM | ThirdParty) gmp_version=gmp-5.0.1 mpfr_version=mpfr-2.4.2 ;; + Gcc46 | Gcc46++0x) + gcc_version=gcc-4.6.0 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; Gcc45 | Gcc45++0x) gcc_version=gcc-4.5.2 gmp_version=gmp-5.0.1 @@ -402,6 +408,10 @@ SYSTEMOPENMPI) export PLIBS="`mpicc --showme:link`" libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'` + # Bit of a hack: strip off 'lib' and hope this is the path to openmpi + # include files and libraries. + export MPI_ARCH_PATH="${libDir%/*}" + if [ "$FOAM_VERBOSE" -a "$PS1" ] then echo "Using system installed MPI:" diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index c528f8fa16..0ea4168bd2 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C @@ -126,7 +126,7 @@ Foam::treeDataCell::treeDataCell // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::treeDataCell::points() const +Foam::pointField Foam::treeDataCell::shapePoints() const { pointField cc(cellLabels_.size()); diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H index 7cebddafa9..0e55f5168a 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H @@ -125,7 +125,7 @@ public: //- Get representative point cloud for all shapes inside // (one point per shape) - pointField points() const; + pointField shapePoints() const; // Search diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C index 94d6308658..550e6caf2b 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -287,7 +287,7 @@ Foam::Xfer Foam::PackedBoolList::used() const // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // Foam::PackedBoolList& -Foam::PackedBoolList::operator=(const UList& lst) +Foam::PackedBoolList::operator=(const Foam::UList& lst) { this->setSize(lst.size()); diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H index f9948d719a..697c7983c1 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H @@ -115,7 +115,7 @@ public: inline PackedBoolList(const Xfer >&); //- Construct from a list of bools - explicit inline PackedBoolList(const UList&); + explicit inline PackedBoolList(const Foam::UList&); //- Construct from a list of labels // using the labels as indices to indicate which bits are set diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H index 219fb79b37..c5a4770bb3 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -73,7 +73,7 @@ inline Foam::PackedBoolList::PackedBoolList(const Xfer >& lst) {} -inline Foam::PackedBoolList::PackedBoolList(const UList& lst) +inline Foam::PackedBoolList::PackedBoolList(const Foam::UList& lst) : PackedList<1>() { diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H index f7622cae55..3bf061522f 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,9 +47,6 @@ SourceFiles namespace Foam { -class Istream; -class Ostream; - // Forward declaration of friend functions and operators template class CompactIOField; @@ -58,6 +55,7 @@ template Istream& operator>> Istream&, CompactIOField& ); + template Ostream& operator<< ( Ostream&, @@ -122,23 +120,6 @@ public: void operator=(const CompactIOField&); void operator=(const Field&); - - - // IOstream operators - - //- Read Field from Istream, discarding contents of existing Field. - friend Istream& operator>> - ( - Istream&, - CompactIOField& - ); - - // Write Field to Ostream. - friend Ostream& operator<< - ( - Ostream&, - const CompactIOField& - ); }; diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index 0954a23a7e..2c5087c120 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C @@ -124,16 +124,14 @@ Foam::IOdictionary::IOdictionary(const IOobject& io) regIOobject(io) { // Temporary warning - if (io.readOpt() == IOobject::MUST_READ) + if (debug && io.readOpt() == IOobject::MUST_READ) { WarningIn("IOdictionary::IOdictionary(const IOobject&)") - //FatalErrorIn("IOdictionary::IOdictionary(const IOobject&)") << "Dictionary " << name() << " constructed with IOobject::MUST_READ" " instead of IOobject::MUST_READ_IF_MODIFIED." << nl << "Use MUST_READ_IF_MODIFIED if you need automatic rereading." << endl; - //<< abort(FatalError); } // Everyone check or just master @@ -182,7 +180,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict) regIOobject(io) { // Temporary warning - if (io.readOpt() == IOobject::MUST_READ) + if (debug && io.readOpt() == IOobject::MUST_READ) { WarningIn ( diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index da542524b7..437a0773e8 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -168,6 +168,12 @@ void Foam::Time::readDict() Pout.precision(IOstream::defaultPrecision()); Perr.precision(IOstream::defaultPrecision()); + + FatalError().precision(IOstream::defaultPrecision()); + FatalIOError.error::operator()().precision + ( + IOstream::defaultPrecision() + ); } if (controlDict_.found("writeCompression")) diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C index 09537c8e73..3d1878a5f7 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C +++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C @@ -55,6 +55,10 @@ Foam::dlLibraryTable::~dlLibraryTable() { forAllConstIter(dlLibraryTable, *this, iter) { + // bug in dlclose - does not call static destructors of + // loaded library when actually unloading the library. + // See https://bugzilla.novell.com/show_bug.cgi?id=680125 and 657627. + // Seems related to using a non-system compiler! dlClose(iter.key()); } } diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H index e1870f4f47..5069408597 100644 --- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,6 +55,7 @@ Ostream& operator<< Ostream&, const DynamicField& ); + template Istream& operator>> ( @@ -234,23 +235,6 @@ public: //- Assignment from UList inline void operator=(const UList&); - - - // IOstream operators - - // Write DynamicField to Ostream. - friend Ostream& operator<< - ( - Ostream&, - const DynamicField& - ); - - //- Read from Istream, discarding contents of existing DynamicField. - friend Istream& operator>> - ( - Istream&, - DynamicField& - ); }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 9891c79e5b..4c08d917e7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -34,6 +34,8 @@ License #include "OSspecific.H" #include "demandDrivenData.H" #include "polyMeshTetDecomposition.H" +#include "indexedOctree.H" +#include "treeDataCell.H" #include "pointMesh.H" diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index b0e83ce670..d14807abf8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -25,6 +25,8 @@ License #include "primitiveMesh.H" #include "demandDrivenData.H" +#include "indexedOctree.H" +#include "treeDataCell.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index cc3bc2c80a..92937ed158 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -67,14 +67,16 @@ SourceFiles #include "Map.H" #include "EdgeMap.H" #include "boundBox.H" -#include "indexedOctree.H" -#include "treeDataCell.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of classes +class treeDataCell; +template class indexedOctree; + /*---------------------------------------------------------------------------*\ Class primitiveMesh Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index cdce53e932..97fe34d586 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -445,6 +445,13 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const dictPtr->write(os); } + // thermalModel + if (const dictionary* dictPtr = dict_.subDictPtr("thermalModel")) + { + os << indent << "thermalModel"; + dictPtr->write(os); + } + os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C index ef22aeee8e..c30dfd0722 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/mesh/autoMesh/Make/files b/src/mesh/autoMesh/Make/files index ec877c5f94..66cb3c6202 100644 --- a/src/mesh/autoMesh/Make/files +++ b/src/mesh/autoMesh/Make/files @@ -4,6 +4,7 @@ autoHexMeshDriver = $(autoHexMesh)/autoHexMeshDriver $(autoHexMeshDriver)/autoLayerDriver.C $(autoHexMeshDriver)/autoLayerDriverShrink.C $(autoHexMeshDriver)/autoSnapDriver.C +$(autoHexMeshDriver)/autoSnapDriverFeature.C $(autoHexMeshDriver)/autoRefineDriver.C $(autoHexMeshDriver)/layerParameters/layerParameters.C @@ -16,6 +17,7 @@ $(autoHexMesh)/meshRefinement/meshRefinement.C $(autoHexMesh)/meshRefinement/meshRefinementMerge.C $(autoHexMesh)/meshRefinement/meshRefinementProblemCells.C $(autoHexMesh)/meshRefinement/meshRefinementRefine.C +$(autoHexMesh)/refinementFeatures/refinementFeatures.C $(autoHexMesh)/refinementSurfaces/refinementSurfaces.C $(autoHexMesh)/shellSurfaces/shellSurfaces.C $(autoHexMesh)/trackedParticle/trackedParticle.C diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index ca38821229..cdaa9f83c7 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -59,622 +59,6 @@ defineTypeNameAndDebug(autoLayerDriver, 0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::label Foam::autoLayerDriver::mergePatchFacesUndo -( - const scalar minCos, - const scalar concaveCos, - const dictionary& motionDict -) -{ - fvMesh& mesh = meshRefiner_.mesh(); - - // Patch face merging engine - combineFaces faceCombiner(mesh, true); - - // Pick up all candidate cells on boundary - labelHashSet boundaryCells(mesh.nFaces()-mesh.nInternalFaces()); - - { - labelList patchIDs(meshRefiner_.meshedPatches()); - - const polyBoundaryMesh& patches = mesh.boundaryMesh(); - - forAll(patchIDs, i) - { - label patchI = patchIDs[i]; - - const polyPatch& patch = patches[patchI]; - - if (!patch.coupled()) - { - forAll(patch, i) - { - boundaryCells.insert(mesh.faceOwner()[patch.start()+i]); - } - } - } - } - - // Get all sets of faces that can be merged - labelListList allFaceSets - ( - faceCombiner.getMergeSets - ( - minCos, - concaveCos, - boundaryCells - ) - ); - - label nFaceSets = returnReduce(allFaceSets.size(), sumOp