diff --git a/applications/solvers/incompressible/channelFoam/Make/files b/applications/solvers/incompressible/channelFoam/Make/files
deleted file mode 100644
index 35d5b4e617..0000000000
--- a/applications/solvers/incompressible/channelFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-channelFoam.C
-
-EXE = $(FOAM_APPBIN)/channelFoam
diff --git a/applications/solvers/incompressible/channelFoam/Make/options b/applications/solvers/incompressible/channelFoam/Make/options
deleted file mode 100644
index 76a1a299dd..0000000000
--- a/applications/solvers/incompressible/channelFoam/Make/options
+++ /dev/null
@@ -1,14 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/turbulenceModels \
- -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \
- -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude
-
-EXE_LIBS = \
- -lincompressibleLESModels \
- -lincompressibleTransportModels \
- -lfiniteVolume \
- -lmeshTools
diff --git a/applications/solvers/incompressible/channelFoam/channelFoam.C b/applications/solvers/incompressible/channelFoam/channelFoam.C
deleted file mode 100644
index 8c719c5f29..0000000000
--- a/applications/solvers/incompressible/channelFoam/channelFoam.C
+++ /dev/null
@@ -1,154 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Application
- channelFoam
-
-Description
- Incompressible LES solver for flow in a channel.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "singlePhaseTransportModel.H"
-#include "LESModel.H"
-#include "IFstream.H"
-#include "OFstream.H"
-#include "Random.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- #include "setRootCase.H"
- #include "createTime.H"
- #include "createMesh.H"
- #include "readTransportProperties.H"
- #include "createFields.H"
- #include "initContinuityErrs.H"
- #include "createGradP.H"
-
- Info<< "\nStarting time loop\n" << endl;
-
- while (runTime.loop())
- {
- Info<< "Time = " << runTime.timeName() << nl << endl;
-
- #include "readPISOControls.H"
-
- #include "CourantNo.H"
-
- sgsModel->correct();
-
- fvVectorMatrix UEqn
- (
- fvm::ddt(U)
- + fvm::div(phi, U)
- + sgsModel->divDevBeff(U)
- ==
- flowDirection*gradP
- );
-
- if (momentumPredictor)
- {
- solve(UEqn == -fvc::grad(p));
- }
-
-
- // --- PISO loop
-
- volScalarField rAU(1.0/UEqn.A());
-
- for (int corr=0; corr sgsModel
- (
- incompressible::LESModel::New(U, phi, laminarTransport)
- );
diff --git a/applications/solvers/incompressible/channelFoam/createGradP.H b/applications/solvers/incompressible/channelFoam/createGradP.H
deleted file mode 100644
index 643509c46f..0000000000
--- a/applications/solvers/incompressible/channelFoam/createGradP.H
+++ /dev/null
@@ -1,24 +0,0 @@
- dimensionedScalar gradP
- (
- "gradP",
- dimensionSet(0, 1, -2, 0, 0),
- 0.0
- );
-
-
- IFstream gradPFile
- (
- runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
- );
-
- if (gradPFile.good())
- {
- gradPFile >> gradP;
- Info<< "Reading average pressure gradient" <::readTable()
// Read data from file
reader_()(fName, *this);
- //IFstream(fName)() >> *this;
if (this->empty())
{
@@ -361,7 +360,6 @@ void Foam::interpolation2DTable::write(Ostream& os) const
{
reader_->write(os);
}
- //*this >> os;
}
@@ -654,100 +652,6 @@ Type Foam::interpolation2DTable::operator()
}
}
- label loY2 = 0;
- label hiY2 = 0;
-
- nY = matrix::operator[](hiX).second().size();
-
- minLimit = matrix::operator[](loX).second()[0].first();
- maxLimit = matrix::operator[](loX).second()[nY-1].first();
-
- if (lookupValue < minLimit)
- {
- switch (boundsHandling_)
- {
- case interpolation2DTable::ERROR:
- {
- FatalErrorIn
- (
- "Foam::interpolation2DTable::operator[]"
- "(const scalar, const scalar) const"
- ) << "value (" << lookupValue << ") underflow" << nl
- << exit(FatalError);
- break;
- }
- case interpolation2DTable::WARN:
- {
- WarningIn
- (
- "Foam::interpolation2DTable::operator[]"
- "(const scalar, const scalar) const"
- ) << "value (" << lookupValue << ") underflow" << nl
- << " Continuing with the first entry"
- << endl;
- // fall-through to 'CLAMP'
- }
- case interpolation2DTable::CLAMP:
- {
- loY2 = 0;
- loY2 = 1;
- break;
- }
- }
- }
- else if (lookupValue >= maxLimit)
- {
- switch (boundsHandling_)
- {
- case interpolation2DTable::ERROR:
- {
- FatalErrorIn
- (
- "Foam::interpolation2DTable::operator[]"
- "(const scalar, const scalar) const"
- ) << "value (" << lookupValue << ") overflow" << nl
- << exit(FatalError);
- break;
- }
- case interpolation2DTable::WARN:
- {
- WarningIn
- (
- "Foam::interpolation2DTable::operator[]"
- "(const scalar, const scalar) const"
- ) << "value (" << lookupValue << ") overflow" << nl
- << " Continuing with the last entry"
- << endl;
- // fall-through to 'CLAMP'
- }
- case interpolation2DTable::CLAMP:
- {
- loY2 = nY-1;
- loY2 = nY;
- break;
- }
- }
- }
- else
- {
- // Finds the lo and hi of Y on the high x
- for (label i = 0; i < nY; ++i)
- {
- if
- (
- lookupValue >= matrix::operator[](hiX).second()[i].first()
- )
- {
- loY2 = hiY2 = i;
- }
- else
- {
- hiY2 = i;
- break;
- }
- }
- }
-
if (loX == hiX)
{
// we are at the end of the table - or there is only a single entry
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C
index e7d84ce484..396845ffe8 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.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) 2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -36,6 +36,8 @@ void Foam::processorLduInterface::send
const UList& f
) const
{
+ label nBytes = f.byteSize();
+
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
{
OPstream::write
@@ -43,32 +45,32 @@ void Foam::processorLduInterface::send
commsType,
neighbProcNo(),
reinterpret_cast(f.begin()),
- f.byteSize(),
+ nBytes,
tag()
);
}
else if (commsType == Pstream::nonBlocking)
{
- resizeBuf(receiveBuf_, f.size()*sizeof(Type));
+ resizeBuf(receiveBuf_, nBytes);
IPstream::read
(
commsType,
neighbProcNo(),
receiveBuf_.begin(),
- receiveBuf_.size(),
+ nBytes,
tag()
);
- resizeBuf(sendBuf_, f.byteSize());
- memcpy(sendBuf_.begin(), f.begin(), f.byteSize());
+ resizeBuf(sendBuf_, nBytes);
+ memcpy(sendBuf_.begin(), f.begin(), nBytes);
OPstream::write
(
commsType,
neighbProcNo(),
sendBuf_.begin(),
- f.byteSize(),
+ nBytes,
tag()
);
}
@@ -172,7 +174,7 @@ void Foam::processorLduInterface::compressedSend
commsType,
neighbProcNo(),
receiveBuf_.begin(),
- receiveBuf_.size(),
+ nBytes,
tag()
);
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H
index f0dea9aad8..4eb21b6ac9 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H
@@ -28,6 +28,24 @@ Description
Storage and named access for the indices of a tet which is part of
the decomposition of a cell.
+ Tets are designated by
+ - cell (of course)
+ - face on cell
+ - three points on face (faceBasePt, facePtA, facePtB)
+ When constructing from a mesh and index in the face (tetPtI):
+ - faceBasePt is the mesh.tetBasePtIs() base point
+ - facePtA is tetPtI away from faceBasePt
+ - facePtB is next one after/before facePtA
+ e.g.:
+
+ +---+
+ |2 /|
+ | / |
+ |/ 1| <- tetPt (so 1 for first triangle, 2 for second)
+ +---+
+ ^
+ faceBasePt
+
SourceFiles
tetIndicesI.H
tetIndices.C
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C
index c15b1c1be7..6fbb215002 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C
@@ -45,11 +45,7 @@ void processorFvPatchField::initInterfaceMatrixUpdate
{
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
- if
- (
- Pstream::defaultCommsType == Pstream::nonBlocking
- && !Pstream::floatTransfer
- )
+ if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
{
// Fast path.
if (debug && !this->ready())
@@ -122,6 +118,7 @@ void processorFvPatchField::updateInterfaceMatrix
{
UPstream::waitRequest(outstandingRecvRequest_);
}
+ // Recv finished so assume sending finished as well.
outstandingSendRequest_ = -1;
outstandingRecvRequest_ = -1;
diff --git a/src/sampling/Make/files b/src/sampling/Make/files
index 17099071a5..649f05523d 100644
--- a/src/sampling/Make/files
+++ b/src/sampling/Make/files
@@ -11,7 +11,7 @@ sampledSet/polyLine/polyLineSet.C
sampledSet/face/faceOnlySet.C
sampledSet/midPoint/midPointSet.C
sampledSet/midPointAndFace/midPointAndFaceSet.C
-/* sampledSet/patchSeed/patchSeedSet.C */
+sampledSet/patchSeed/patchSeedSet.C
sampledSet/sampledSet/sampledSet.C
sampledSet/sampledSets/sampledSets.C
sampledSet/sampledSets/sampledSetsGrouping.C
diff --git a/src/sampling/sampledSet/patchSeed/patchSeedSet.C b/src/sampling/sampledSet/patchSeed/patchSeedSet.C
new file mode 100644
index 0000000000..09da94f70e
--- /dev/null
+++ b/src/sampling/sampledSet/patchSeed/patchSeedSet.C
@@ -0,0 +1,239 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "patchSeedSet.H"
+#include "polyMesh.H"
+#include "addToRunTimeSelectionTable.H"
+#include "treeBoundBox.H"
+#include "treeDataFace.H"
+#include "Time.H"
+#include "meshTools.H"
+//#include "Random.H"
+// For 'facePoint' helper function only
+#include "mappedPatchBase.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ defineTypeNameAndDebug(patchSeedSet, 0);
+ addToRunTimeSelectionTable(sampledSet, patchSeedSet, word);
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+void Foam::patchSeedSet::calcSamples
+(
+ DynamicList& samplingPts,
+ DynamicList