diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict index 27ff9d287e..a9dae64b47 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict +++ b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict @@ -19,13 +19,18 @@ FoamFile // - or converting boundary faces into a boundary face // (internalFacesOnly=false)(though should use really createPatch // to do this) -// - can also create duplicate (overlapping) sets of baffles: -// - internalFacesOnly = false -// - have 4 entries in patches: -// - master -// - slave -// - additional master -// - additional slave +// - specification in one of two modes: +// - patchPairs : create two patches of same type, same input +// - patches : create patches separately, full control over what +// to create on what side +// (this mode can also create duplicate (overlapping) +// sets of baffles: +// - internalFacesOnly = false +// - have 4 entries in patches: +// - master +// - slave +// - additional master +// - additional slave) // Whether to convert internal faces only (so leave boundary faces intact). diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H index e27a2507d2..240ec43645 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H @@ -56,12 +56,12 @@ public: //- The output control options enum outputControls { - ocTimeStep, /*!< execution is coupled to the time-step */ - ocOutputTime, /*!< execution is coupled to the output-time */ + ocTimeStep, /*!< execution is coupled to the time-step */ + ocOutputTime, /*!< execution is coupled to the output-time */ ocAdjustableTime, /*!< Adjust time step for dumping */ ocRunTime, /*!< run time for dumping */ ocClockTime, /*!< clock time for dumping */ - ocCpuTime /*!< cpu time for dumping */ + ocCpuTime /*!< cpu time for dumping */ }; @@ -82,7 +82,7 @@ private: // a value <= 1 means execute at every time step label outputInterval_; - //- Dumping counter for ocOutputTime + //- Dumping counter for ocOutputTime or index dump for ocAdjustableTime label outputTimeLastDump_; //- Dump each deltaT (adjust Ttime) @@ -123,19 +123,19 @@ public: bool output(); //- Return outputControl - outputControls outputControl() + outputControls outputControl() const { return outputControl_; } //- Return writeInterval - scalar writeInterval() + scalar writeInterval() const { return writeInterval_; } //- Return outputTimeLastDump - label outputTimeLastDump() + label outputTimeLastDump() const { return outputTimeLastDump_; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 1f27017968..af15b5edf5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1378,15 +1378,16 @@ bool Foam::polyMesh::pointInCell nextPointI = f[fp]; } - const point& p0 = points()[pointI]; - const point& p1 = points()[nextPointI]; - const point& p2 = fc; + triPointRef faceTri + ( + points()[pointI], + points()[nextPointI], + fc + ); - vector twoFaceArea = (p1 - p0)^(p2 - p0); - point centre = (p0 + p1 + p2)/3.0; - vector proj = p - centre; + vector proj = p - faceTri.centre(); - if ((twoFaceArea & proj) > 0) + if ((faceTri.normal() & proj) > 0) { return false; } diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C b/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C index dfbb95674b..8a355ca9a6 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C +++ b/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Foam::autoPtr > Foam::DataEntry::New const dictionary& dict ) { - Istream& is(dict.lookup(entryName)); + Istream& is(dict.lookup(entryName, false)); token firstToken(is); diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files index f769607f94..c9c748ec4a 100644 --- a/src/dynamicMesh/Make/files +++ b/src/dynamicMesh/Make/files @@ -84,7 +84,9 @@ polyMeshAdder/polyMeshAdder.C fvMeshTools/fvMeshTools.C motionSmoother/motionSmoother.C -motionSmoother/motionSmootherCheck.C +motionSmoother/motionSmootherAlgo.C +motionSmoother/motionSmootherAlgoCheck.C +motionSmoother/motionSmootherData.C motionSmoother/polyMeshGeometry/polyMeshGeometry.C motionSmoother/badQualityToCell/badQualityToCell.C motionSmoother/badQualityToFace/badQualityToFace.C diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.C b/src/dynamicMesh/motionSmoother/motionSmoother.C index 3e87fbd7d5..d30ee35732 100644 --- a/src/dynamicMesh/motionSmoother/motionSmoother.C +++ b/src/dynamicMesh/motionSmoother/motionSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,14 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "motionSmoother.H" -#include "twoDPointCorrector.H" -#include "faceSet.H" -#include "pointSet.H" -#include "fixedValuePointPatchFields.H" -#include "pointConstraint.H" -#include "syncTools.H" -#include "meshTools.H" -#include "OFstream.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -41,473 +33,6 @@ namespace Foam } -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::motionSmoother::testSyncPositions -( - const pointField& fld, - const scalar maxMag -) const -{ - pointField syncedFld(fld); - - syncTools::syncPointPositions - ( - mesh_, - syncedFld, - minEqOp(), // combine op - point(GREAT,GREAT,GREAT) // null - ); - - forAll(syncedFld, i) - { - if (mag(syncedFld[i] - fld[i]) > maxMag) - { - FatalErrorIn - ( - "motionSmoother::testSyncPositions" - "(" - "const pointField&, " - "const scalar" - ")" - ) << "On point " << i << " point:" << fld[i] - << " synchronised point:" << syncedFld[i] - << abort(FatalError); - } - } -} - - -//Foam::tmp Foam::motionSmoother::sumWeights -//( -// const scalarField& edgeWeight -//) const -//{ -// tmp tsumWeight -// ( -// new scalarField -// ( -// mesh_.nPoints(), -// 0.0 -// ) -// ); -// scalarField& sumWeight = tsumWeight(); -// -// const edgeList& edges = mesh_.edges(); -// -// forAll(edges, edgeI) -// { -// if (isMasterEdge_.get(edgeI) == 1) -// { -// const edge& e = edges[edgeI]; -// const scalar w = edgeWeight[edgeI]; -// sumWeight[e[0]] += w; -// sumWeight[e[1]] += w; -// } -// } -// -// -// // Add coupled contributions -// // ~~~~~~~~~~~~~~~~~~~~~~~~~ -// syncTools::syncPointList -// ( -// mesh, -// sumWeight, -// plusEqOp(), -// scalar(0) // null value -// ); -// -// return tsumWeight; -//} - - -// From pointPatchInterpolation -void Foam::motionSmoother::makePatchPatchAddressing() -{ - if (debug) - { - Pout<< "motionSmoother::makePatchPatchAddressing() : " - << "constructing boundary addressing" - << endl; - } - - const polyBoundaryMesh& bm = mesh_.boundaryMesh(); - const pointBoundaryMesh& pbm = pMesh_.boundary(); - - // first count the total number of patch-patch points - - label nPatchPatchPoints = 0; - - forAll(bm, patchi) - { - if (!isA(bm[patchi])) - { - nPatchPatchPoints += bm[patchi].boundaryPoints().size(); - } - } - - - // Go through all patches and mark up the external edge points - Map