ENH: initial overhaul of volPointInterpolation.

- removed globalPointPatch*
- removed pointPatchInterpolate*
since all is now inside volPointInterpolation.
This commit is contained in:
mattijs
2010-02-17 14:01:44 +00:00
parent 3989723067
commit 62637d8471
47 changed files with 1078 additions and 2187 deletions

View File

@ -666,7 +666,7 @@ int main(int argc, char *argv[])
)
);
pointMesh procPMesh(procMesh, true);
pointMesh procPMesh(procMesh);
pointFieldDecomposer fieldDecomposer
(

View File

@ -109,7 +109,6 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io)
procNeighbourProcessors_(nProcs_),
procProcessorPatchSize_(nProcs_),
procProcessorPatchStartIndex_(nProcs_),
globallySharedPoints_(0),
cyclicParallel_(false)
{
if (decompositionDict_.found("distributed"))
@ -132,15 +131,6 @@ bool Foam::domainDecomposition::writeDecomposition()
{
Info<< "\nConstructing processor meshes" << endl;
// Make a lookup map for globally shared points
Map<label> sharedPointLookup(2*globallySharedPoints_.size());
forAll(globallySharedPoints_, pointi)
{
sharedPointLookup.insert(globallySharedPoints_[pointi], pointi);
}
// Mark point/faces/cells that are in zones.
// -1 : not in zone
// -2 : in multiple zones

View File

@ -103,9 +103,6 @@ class domainDecomposition
//- Start indices for inter-processor patches
labelListList procProcessorPatchStartIndex_;
//- List of globally shared point labels
labelList globallySharedPoints_;
//- Are there cyclic-parallel faces
bool cyclicParallel_;

View File

@ -643,79 +643,6 @@ void Foam::domainDecomposition::decomposeMesh()
// Reset the size of used points
procPointLabels.setSize(nUsedPoints);
}
// Gather data about globally shared points
// Memory management
{
labelList pointsUsage(nPoints(), 0);
// Globally shared points are the ones used by more than 2 processors
// Size the list approximately and gather the points
labelHashSet gSharedPoints
(
min(100, nPoints()/1000)
);
// Loop through all the processors and mark up points used by
// processor boundaries. When a point is used twice, it is a
// globally shared point
for (label procI = 0; procI < nProcs_; procI++)
{
// Get list of face labels
const labelList& curFaceLabels = procFaceAddressing_[procI];
// Get start of processor faces
const labelList& curProcessorPatchStarts =
procProcessorPatchStartIndex_[procI];
const labelList& curProcessorPatchSizes =
procProcessorPatchSize_[procI];
// Reset the lookup list
pointsUsage = 0;
forAll(curProcessorPatchStarts, patchi)
{
const label curStart = curProcessorPatchStarts[patchi];
const label curEnd = curStart + curProcessorPatchSizes[patchi];
for
(
label facei = curStart;
facei < curEnd;
facei++
)
{
// Mark the original face as used
// Remember to decrement the index by one (turning index)
//
const label curF = mag(curFaceLabels[facei]) - 1;
const face& f = fcs[curF];
forAll(f, pointi)
{
if (pointsUsage[f[pointi]] == 0)
{
// Point not previously used
pointsUsage[f[pointi]] = patchi + 1;
}
else if (pointsUsage[f[pointi]] != patchi + 1)
{
// Point used by some other patch = global point!
gSharedPoints.insert(f[pointi]);
}
}
}
}
}
// Grab the result from the hash list
globallySharedPoints_ = gSharedPoints.toc();
sort(globallySharedPoints_);
}
}
// ************************************************************************* //

View File

@ -26,7 +26,6 @@ License
#include "pointFieldDecomposer.H"
#include "processorPointPatchFields.H"
#include "globalPointPatchFields.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -40,12 +39,8 @@ Foam::pointFieldDecomposer::decomposeField
// Create and map the internal field values
Field<Type> internalField(field.internalField(), pointAddressing_);
// Create a list of pointers for the patchFields including one extra
// for the global patch
PtrList<pointPatchField<Type> > patchFields
(
boundaryAddressing_.size() + 1
);
// Create a list of pointers for the patchFields
PtrList<pointPatchField<Type> > patchFields(boundaryAddressing_.size());
// Create and map the patch field values
forAll(boundaryAddressing_, patchi)
@ -78,17 +73,6 @@ Foam::pointFieldDecomposer::decomposeField
}
}
// Add the global patch
patchFields.set
(
boundaryAddressing_.size(),
new globalPointPatchField<Type>
(
procMesh_.boundary().globalPatch(),
DimensionedField<Type, pointMesh>::null()
)
);
// Create the field for the processor
return tmp<GeometricField<Type, pointPatchField, pointMesh> >
(