mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Initial set of changes.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
|
||||
@ -27,7 +27,6 @@ License
|
||||
#include "domainDecomposition.H"
|
||||
#include "decompositionMethod.H"
|
||||
#include "cpuTime.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "cellSet.H"
|
||||
#include "regionSplit.H"
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user