Merge branch 'master' of ssh://hunt//home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
graham
2010-10-06 17:25:25 +01:00
5 changed files with 55 additions and 35 deletions

View File

@ -20,7 +20,8 @@ The disadvantages:
- a patch-wise loop now might need to store data to go to the neighbour half
since it is no longer handled in a single patch.
- decomposed cyclics now require overlapping communications so will
only work in non-blocking mode. Hence the underlying message passing library
only work in 'nonBlocking' mode or 'blocking' (=buffered) mode but not
in 'scheduled' mode. The underlying message passing library
will require overlapping communications with message tags.
- it is quite a code-change and there might be some oversights.
- once converted (see foamUpgradeCyclics below) cases are not backwards
@ -103,19 +104,14 @@ type 'processorCyclic'.
- processor patches use overlapping communication using a different message
tag. This maps straight through into the MPI message tag.
See processorCyclicPolyPatch::tag(). This needs to be calculated the
same on both sides so is calculated as
Pstream::nProcs()*max(myProcNo, neighbProcNo)
+ min(myProcNo, neighbProcNo)
which is
- unique
- commutative
- does not interfere with the default tag (= 1)
tag. This maps straight through into the MPI message tag. Each processor
'interface' (processorPolyPatch, processorFvPatch, etc.) has a 'tag()'
to use for communication.
- when constructing a GeometricField from a dictionary it will explicitly
check for non-existing entries for cyclic patches and exit with an error message
warning to run foamUpgradeCyclics.
warning to run foamUpgradeCyclics. (1.7.x will check if you are trying
to run a case which has split cyclics)

View File

@ -112,13 +112,6 @@ directMappedVelocityFluxFixedValueFvPatchField
<< " in file " << dimensionedInternalField().objectPath()
<< exit(FatalError);
}
// Force calculation of schedule (uses parallel comms)
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
(
this->patch().patch()
);
(void)mpp.map().schedule();
}

View File

@ -42,24 +42,26 @@ void Foam::singleCellFvMesh::agglomerateMesh
const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
// Check agglomeration within patch face range and continuous
labelList nAgglom(oldPatches.size());
labelList nAgglom(oldPatches.size(), 0);
forAll(oldPatches, patchI)
{
const polyPatch& pp = oldPatches[patchI];
nAgglom[patchI] = max(agglom[patchI])+1;
forAll(pp, i)
if (pp.size() > 0)
{
if (agglom[patchI][i] < 0 || agglom[patchI][i] >= pp.size())
nAgglom[patchI] = max(agglom[patchI])+1;
forAll(pp, i)
{
FatalErrorIn
(
"singleCellFvMesh::agglomerateMesh(..)"
) << "agglomeration on patch " << patchI
<< " is out of range 0.." << pp.size()-1
<< exit(FatalError);
if (agglom[patchI][i] < 0 || agglom[patchI][i] >= pp.size())
{
FatalErrorIn
(
"singleCellFvMesh::agglomerateMesh(..)"
) << "agglomeration on patch " << patchI
<< " is out of range 0.." << pp.size()-1
<< exit(FatalError);
}
}
}
}
@ -155,6 +157,8 @@ void Foam::singleCellFvMesh::agglomerateMesh
forAll(oldPatches, patchI)
{
patchStarts[patchI] = coarseI;
const polyPatch& pp = oldPatches[patchI];
if (pp.size() > 0)
@ -170,8 +174,6 @@ void Foam::singleCellFvMesh::agglomerateMesh
// From agglomeration to compact patch face
labelList agglomToFace(nAgglom[patchI], -1);
patchStarts[patchI] = coarseI;
forAll(pp, i)
{
label myAgglom = agglom[patchI][i];
@ -223,9 +225,9 @@ void Foam::singleCellFvMesh::agglomerateMesh
);
}
}
patchSizes[patchI] = coarseI-patchStarts[patchI];
}
patchSizes[patchI] = coarseI-patchStarts[patchI];
}
//Pout<< "patchStarts:" << patchStarts << endl;

View File

@ -2794,6 +2794,30 @@ Foam::indexedOctree<Type>::getVolumeType
}
template <class Type>
template <class CompareOp>
void Foam::indexedOctree<Type>::findNear
(
const scalar nearDist,
const indexedOctree<Type>& tree2,
CompareOp& cop
) const
{
findNear
(
nearDist,
true,
*this,
nodePlusOctant(0, 0),
bb(),
tree2,
nodePlusOctant(0, 0),
tree2.bb(),
cop
);
}
// Print contents of nodeI
template <class Type>
void Foam::indexedOctree<Type>::print

View File

@ -168,7 +168,6 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
td.keepParticle
&& !td.switchProcessor
&& lifeTime_ > 0
&& tEnd > ROOTVSMALL
)
{
// TBD: implement subcycling so step through cells in more than
@ -191,6 +190,12 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
tEnd -= dt;
stepFraction() = 1.0 - tEnd/deltaT;
if (tEnd <= ROOTVSMALL)
{
// Force removal
lifeTime_ = 0;
}
}
if (!td.keepParticle || lifeTime_ == 0)