Initial set of changes.

This commit is contained in:
mattijs
2009-01-15 18:29:08 +00:00
parent 73426723b0
commit 2dbf42085d
84 changed files with 4747 additions and 2764 deletions

View File

@ -63,7 +63,7 @@ Usage
#include "OSspecific.H"
#include "fvCFD.H"
#include "IOobjectList.H"
#include "processorFvPatchFields.H"
//#include "processorFvPatchFields.H"
#include "domainDecomposition.H"
#include "labelIOField.H"
#include "scalarIOField.H"

View File

@ -27,7 +27,6 @@ License
#include "domainDecomposition.H"
#include "decompositionMethod.H"
#include "cpuTime.H"
#include "cyclicPolyPatch.H"
#include "cellSet.H"
#include "regionSplit.H"

View File

@ -91,8 +91,8 @@ domainDecomposition::domainDecomposition(const IOobject& io)
procNeighbourProcessors_(nProcs_),
procProcessorPatchSize_(nProcs_),
procProcessorPatchStartIndex_(nProcs_),
globallySharedPoints_(0),
cyclicParallel_(false)
procProcessorPatchSubPatchIDs_(nProcs_),
procProcessorPatchSubPatchStarts_(nProcs_)
{
if (decompositionDict_.found("distributed"))
{
@ -114,15 +114,6 @@ bool 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
@ -293,6 +284,12 @@ bool domainDecomposition::writeDecomposition()
const labelList& curProcessorPatchStarts =
procProcessorPatchStartIndex_[procI];
const labelListList& curSubPatchIDs =
procProcessorPatchSubPatchIDs_[procI];
const labelListList& curSubStarts =
procProcessorPatchSubPatchStarts_[procI];
const polyPatchList& meshPatches = boundaryMesh();
List<polyPatch*> procPatches
@ -331,12 +328,24 @@ bool domainDecomposition::writeDecomposition()
nPatches,
procMesh.boundaryMesh(),
procI,
curNeighbourProcessors[procPatchI]
curNeighbourProcessors[procPatchI],
curSubPatchIDs[procPatchI],
curSubStarts[procPatchI]
);
nPatches++;
}
forAll(procPatches, patchI)
{
Pout<< " " << patchI
<< '\t' << "name:" << procPatches[patchI]->name()
<< '\t' << "type:" << procPatches[patchI]->type()
<< '\t' << "size:" << procPatches[patchI]->size()
<< endl;
}
// Add boundary patches
procMesh.addPatches(procPatches);

View File

@ -30,6 +30,7 @@ Description
SourceFiles
domainDecomposition.C
decomposeMesh.C
\*---------------------------------------------------------------------------*/
@ -78,9 +79,9 @@ class domainDecomposition
// index is negative, the processor face is the reverse of the
// original face. In order to do this properly, all face
// indices will be incremented by 1 and the decremented as
// necessary t avoid the problem of face number zero having no
// necessary to avoid the problem of face number zero having no
// sign.
labelListList procFaceAddressing_;
List<DynamicList<label> > procFaceAddressing_;
//- Labels of cells for each processor
labelListList procCellAddressing_;
@ -96,21 +97,23 @@ class domainDecomposition
// Excludes inter-processor boundaries
labelListList procPatchStartIndex_;
// Per inter-processor patch information
//- Neighbour processor ID for inter-processor boundaries
labelListList procNeighbourProcessors_;
//- Sizes for inter-processor patches
labelListList procProcessorPatchSize_;
//- Start indices for inter-processor patches
//- Start indices (in procFaceAddressing_) for inter-processor patches
labelListList procProcessorPatchStartIndex_;
//- List of globally shared point labels
labelList globallySharedPoints_;
//- Are there cyclic-parallel faces
bool cyclicParallel_;
//- Sub patch IDs for inter-processor patches
List<labelListList> procProcessorPatchSubPatchIDs_;
//- Sub patch sizes for inter-processor patches
List<labelListList> procProcessorPatchSubPatchStarts_;
// Private Member Functions
@ -124,6 +127,21 @@ class domainDecomposition
labelList& elementToZone
);
//- Append single element to list
static void append(labelList&, const label);
//- Add face to interProcessor patch.
void addInterProcFace
(
const label facei,
const label ownerProc,
const label nbrProc,
List<Map<label> >&,
List<DynamicList<DynamicList<label> > >&
) const;
public:
// Constructors