diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index c65d8618f1..875e42683e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -195,10 +195,8 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const << thermalCreep_ << token::END_STATEMENT << nl; os.writeKeyword("curvature") << curvature_ << token::END_STATEMENT << nl; - os.writeKeyword("refValue") - << refValue() << token::END_STATEMENT << nl; - os.writeKeyword("valueFraction") - << valueFraction() << token::END_STATEMENT << nl; + refValue().writeEntry("refValue", os); + valueFraction().writeEntry("valueFraction", os); writeEntry("value", os); } diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index ef479dbbbb..b3be8fe96f 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -310,6 +310,10 @@ addLayersControls // make straight angle. featureAngle 60; + //- At non-patched sides allow mesh to slip if extrusion direction makes + // angle larger than slipFeatureAngle. + slipFeatureAngle 30; + //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options index 43615129c9..6fe40ed9f1 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options @@ -56,7 +56,6 @@ EXE_LIBS = \ -lsolidMixtureProperties \ -lsolidParticle \ -lsolidProperties \ - -lsolid \ -lspecie \ -lsurfaceFilmModels \ -lsurfMesh \ diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options index 38f94e13c7..444af26ce0 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options @@ -13,6 +13,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lgenericPatchFields \ -lspecie \ - -lsolid \ -lfluidThermophysicalModels \ -lsolidThermo diff --git a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H index 4576661137..b49ab8ccb9 100644 --- a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H +++ b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,13 @@ Description ) \ { \ construct##argNames##ConstructorTables(); \ - argNames##ConstructorTablePtr_->insert(lookup, New); \ + if (!argNames##ConstructorTablePtr_->insert(lookup, New)) \ + { \ + std::cerr<< "Duplicate entry " << lookup \ + << " in runtime selection table " << #baseType \ + << std::endl; \ + error::safePrintStack(std::cerr); \ + } \ } \ \ ~add##argNames##ConstructorToTable() \ @@ -167,11 +173,20 @@ Description ) \ { \ construct##argNames##ConstructorTables(); \ - argNames##ConstructorTablePtr_->insert \ + if \ ( \ - lookup, \ - New##baseType \ - ); \ + !argNames##ConstructorTablePtr_->insert \ + ( \ + lookup, \ + New##baseType \ + ) \ + ) \ + { \ + std::cerr<< "Duplicate entry " << lookup \ + << " in runtime selection table " << #baseType \ + << std::endl; \ + error::safePrintStack(std::cerr); \ + } \ } \ \ ~add##argNames##ConstructorToTable() \ diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 6e19f299f0..58c0b57673 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -84,7 +84,6 @@ fvPatchFields = fields/fvPatchFields $(fvPatchFields)/fvPatchField/fvPatchFields.C basicFvPatchFields = $(fvPatchFields)/basic -$(basicFvPatchFields)/basicSymmetry/basicSymmetryFvPatchFields.C $(basicFvPatchFields)/basicSymmetry/basicSymmetryFvPatchScalarField.C $(basicFvPatchFields)/calculated/calculatedFvPatchFields.C $(basicFvPatchFields)/coupled/coupledFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index 2e19ff1d2c..c6caad802e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,6 @@ class basicSymmetryFvPatchField public: - //- Runtime type information - TypeName(symmetryFvPatch::typeName_()); - - // Constructors //- Construct from patch and internal field diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/MUSCL/MUSCL.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/MUSCL/MUSCL.C index 2b23afdabd..f58b91238e 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/MUSCL/MUSCL.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/MUSCL/MUSCL.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,6 +54,7 @@ namespace Foam scalar ) +/* makeLimitedSurfaceInterpolationTypeScheme ( MUSCL, @@ -71,6 +72,7 @@ namespace Foam rhoMagSqr, vector ) +*/ } // ************************************************************************* // diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 464fdd2b8f..5fb2d150e6 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2800,7 +2800,7 @@ void Foam::autoLayerDriver::addLayers layerParams.nSmoothNormals(), layerParams.nSmoothSurfaceNormals(), layerParams.minMedianAxisAngleCos(), - layerParams.featureAngle(), + layerParams.slipFeatureAngle(), dispVec, medialRatio, diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C index 7124875465..828ee0e710 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C @@ -1323,7 +1323,7 @@ Foam::labelPair Foam::autoSnapDriver::findNearFeaturePoint patchConstraints[oldPointI] = pointConstraint(); label edgeFeatI; - const pointIndexHit nearInfo = findNearFeatureEdge + findNearFeatureEdge ( pp, snapDist, @@ -1919,7 +1919,7 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges // the old point to attract to nearest edge // instead. label edgeFeatI; - const pointIndexHit nearInfo = findNearFeatureEdge + findNearFeatureEdge ( pp, snapDist, @@ -1950,7 +1950,7 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges // << endl; label featI; - const pointIndexHit nearInfo = findNearFeatureEdge + findNearFeatureEdge ( pp, snapDist, diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C index cc466df4be..cfc9b3703c 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C @@ -61,6 +61,12 @@ Foam::layerParameters::layerParameters readScalar(dict.lookup("minThickness")) ), featureAngle_(readScalar(dict.lookup("featureAngle"))), + slipFeatureAngle_ + ( + dict.found("slipFeatureAngle") + ? readScalar(dict.lookup("slipFeatureAngle")) + : 0.5*featureAngle_ + ), concaveAngle_ ( dict.lookupOrDefault("concaveAngle", defaultConcaveAngle) diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H index 4a48784ee9..5298006b04 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H @@ -79,6 +79,8 @@ class layerParameters scalar featureAngle_; + scalar slipFeatureAngle_; + scalar concaveAngle_; label nGrow_; @@ -178,6 +180,13 @@ public: return featureAngle_; } + //- At non-patched sides allow mesh to slip if extrusion + // direction makes angle larger than slipFeatureAngle. + scalar slipFeatureAngle() const + { + return slipFeatureAngle_; + } + scalar concaveAngle() const { return concaveAngle_; diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 77e1ca4346..70b0759c71 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -69,7 +69,7 @@ void Foam::regionSplit::transferCoupledFaceRegion "regionSplit::transferCoupledFaceRegion" "(const label, const label, labelList&, labelList&) const" ) << "Problem : coupled face " << faceI - << " on patch " << mesh_.boundaryMesh().whichPatch(faceI) + << " on patch " << mesh().boundaryMesh().whichPatch(faceI) << " has region " << faceRegion[faceI] << " but coupled face " << otherFaceI << " has region " << faceRegion[otherFaceI] @@ -109,7 +109,7 @@ void Foam::regionSplit::fillSeedMask // Collect faces on seed cell - const cell& cFaces = mesh_.cells()[seedCellID]; + const cell& cFaces = mesh().cells()[seedCellID]; label nFaces = 0; @@ -144,7 +144,7 @@ void Foam::regionSplit::fillSeedMask { label faceI = changedFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh().faceOwner()[faceI]; if (cellRegion[own] == -1) { @@ -152,9 +152,9 @@ void Foam::regionSplit::fillSeedMask changedCells.append(own); } - if (mesh_.isInternalFace(faceI)) + if (mesh().isInternalFace(faceI)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh().faceNeighbour()[faceI]; if (cellRegion[nei] == -1) { @@ -178,7 +178,7 @@ void Foam::regionSplit::fillSeedMask { label cellI = changedCells[i]; - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh().cells()[cellI]; forAll(cFaces, cFaceI) { @@ -203,7 +203,7 @@ void Foam::regionSplit::fillSeedMask // Check for changes to any locally coupled face. // Global connections are done later. - const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + const polyBoundaryMesh& patches = mesh().boundaryMesh(); forAll(patches, patchI) { @@ -274,7 +274,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit { // Check that blockedFace is synced. boolList syncBlockedFace(blockedFace); - syncTools::swapFaceList(mesh_, syncBlockedFace); + syncTools::swapFaceList(mesh(), syncBlockedFace); forAll(syncBlockedFace, faceI) { @@ -295,7 +295,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit // Region per face. // -1 unassigned // -2 blocked - labelList faceRegion(mesh_.nFaces(), -1); + labelList faceRegion(mesh().nFaces(), -1); if (blockedFace.size()) { @@ -321,7 +321,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit { // Find first unset cell - for (; unsetCellI < mesh_.nCells(); unsetCellI++) + for (; unsetCellI < mesh().nCells(); unsetCellI++) { if (cellRegion[unsetCellI] == -1) { @@ -329,7 +329,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit } } - if (unsetCellI >= mesh_.nCells()) + if (unsetCellI >= mesh().nCells()) { break; } @@ -430,9 +430,9 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit } - const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + const polyBoundaryMesh& patches = mesh().boundaryMesh(); - labelList nbrRegion(mesh_.nFaces()-mesh_.nInternalFaces(), -1); + labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces(), -1); forAll(patches, patchI) { const polyPatch& pp = patches[patchI]; @@ -444,7 +444,7 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit ( nbrRegion, pp.size(), - pp.start()-mesh_.nInternalFaces() + pp.start()-mesh().nInternalFaces() ); forAll(patchCells, i) @@ -457,9 +457,9 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit } } } - syncTools::swapBoundaryFaceList(mesh_, nbrRegion); + syncTools::swapBoundaryFaceList(mesh(), nbrRegion); - Map