Permalink
Browse files

Merge branch 'master' of github.com:OpenCFD/OpenFOAM-1.7.x

  • Loading branch information...
2 parents 3eea815 + 84b9ac9 commit 6c20862effe98d70c854f60c1bb37d99bd25f287 Henry committed Mar 6, 2011
Showing with 20 additions and 36 deletions.
  1. +1 −0 etc/controlDict
  2. +5 −2 src/finiteVolume/fvMesh/fvMeshGeometry.C
  3. +14 −34 src/sampling/probes/patchProbes.C
View
@@ -636,6 +636,7 @@ DebugSwitches
partialSlip 0;
passiveParticle 0;
patch 0;
+ patchProbes 0;
patchToFace 0;
patchZones 0;
pdf 0;
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+ \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -64,7 +64,10 @@ void fvMesh::makeSf() const
"S",
pointsInstance(),
meshSubDir,
- *this
+ *this,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE,
+ false
),
*this,
dimArea,
@@ -47,7 +47,6 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
if (elementList_.empty())
{
-
elementList_.setSize(probeLocations_.size());
// Octree based search engine
@@ -59,23 +58,15 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
label faceI = meshSearchEngine.findNearestBoundaryFace(sample);
- if (faceI == -1)
- {
- nearest[probeI].second().first() = Foam::sqr(GREAT);
- nearest[probeI].second().second() = Pstream::myProcNo();
- }
- else
- {
- const point& fc = mesh.faceCentres()[faceI];
- nearest[probeI].first() = pointIndexHit
- (
- true,
- fc,
- faceI
- );
- nearest[probeI].second().first() = magSqr(fc-sample);
- nearest[probeI].second().second() = Pstream::myProcNo();
- }
+ const point& fc = mesh.faceCentres()[faceI];
+ nearest[probeI].first() = pointIndexHit
+ (
+ true,
+ fc,
+ faceI
+ );
+ nearest[probeI].second().first() = magSqr(fc-sample);
+ nearest[probeI].second().second() = Pstream::myProcNo();
}
}
@@ -98,27 +89,16 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
}
}
-
-
// Check if all patchProbes have been found.
forAll(nearest, sampleI)
{
- label localI = nearest[sampleI].first().index();
-
- if (localI == -1)
+ label localI = -1;
+ if (nearest[sampleI].second().second() == Pstream::myProcNo())
{
- if (Pstream::master())
- {
- WarningIn("patchProbes::findElements()")
- << "Did not find location "
- << nearest[sampleI].second().first()
- << " in any cell. Skipping location." << endl;
- }
- }
- else
- {
- elementList_[sampleI] = localI;
+ localI = nearest[sampleI].first().index();
}
+
+ elementList_[sampleI] = localI;
}
}

0 comments on commit 6c20862

Please sign in to comment.