OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

parMetisDecomp Class Reference

Inheritance diagram for parMetisDecomp:
Collaboration diagram for parMetisDecomp:

List of all members.


Public Member Functions

 TypeName ("parMetis")
 Runtime type information.
 parMetisDecomp (const dictionary &decompositionDict, const polyMesh &mesh)
 Construct given the decomposition dictionary and mesh.
 ~parMetisDecomp ()
virtual bool parallelAware () const
 parMetis handles Foam processor boundaries
virtual labelList decompose (const pointField &)
 Return for every coordinate the wanted processor number. Use the.
virtual labelList decompose (const labelList &agglom, const pointField &)
 Return for every coordinate the wanted processor number. Gets.
virtual labelList decompose (const labelListList &globalCellCells, const pointField &cc)
 Return for every coordinate the wanted processor number. Explicitly.

Detailed Description

Source files

Definition at line 41 of file parMetisDecomp.H.


Constructor & Destructor Documentation

parMetisDecomp ( const dictionary &  decompositionDict,
const polyMesh &  mesh 
)

Construct given the decomposition dictionary and mesh.

Definition at line 352 of file parMetisDecomp.C.

~parMetisDecomp (  )  [inline]

Definition at line 95 of file parMetisDecomp.H.


Member Function Documentation

TypeName ( "parMetis"   ) 

Runtime type information.

virtual bool parallelAware (  )  const [inline, virtual]

parMetis handles Foam processor boundaries

Implements decompositionMethod.

Definition at line 102 of file parMetisDecomp.H.

Foam::labelList decompose ( const pointField &  points  )  [virtual]

Return for every coordinate the wanted processor number. Use the.

mesh connectivity (if needed)

Implements decompositionMethod.

Definition at line 364 of file parMetisDecomp.C.

Foam::labelList decompose ( const labelList &  agglom,
const pointField &  regionPoints 
) [virtual]

Return for every coordinate the wanted processor number. Gets.

passed agglomeration map (from fine to coarse cells) and coarse cell location. Can be overridden by decomposers that provide this functionality natively.

Reimplemented from decompositionMethod.

Definition at line 681 of file parMetisDecomp.C.

Foam::labelList decompose ( const labelListList &  globalCellCells,
const pointField &  cc 
) [virtual]

Return for every coordinate the wanted processor number. Explicitly.

provided mesh connectivity. The connectivity is equal to mesh.cellCells() except for

  • in parallel the cell numbers are global cell numbers (starting from 0 at processor0 and then incrementing all through the processors)
  • the connections are across coupled patches

faceWeights disabled. Only makes sense for cellCells from mesh.

if (metisCoeffs.readIfPresent("faceWeightsFile", weightsFile)) { Info<< "parMetisDecomp : Using face-based weights read from " << weightsFile << endl;

labelIOField weights ( IOobject ( weightsFile, mesh_.time().timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ) );

if (weights.size() != mesh_.nFaces()) { FatalErrorIn("parMetisDecomp::decompose(const pointField&)") << "Number of face weights " << weights.size() << " does not equal number of internal and boundary faces " << mesh_.nFaces() << exit(FatalError); }

faceWeights.setSize(2*mesh_.nInternalFaces()+nCoupledFaces);

Assume symmetric weights. Keep same ordering as adjncy. nFacesPerCell = 0;

Handle internal faces for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) { label w = weights[faceI];

label own = faceOwner[faceI]; label nei = faceNeighbour[faceI];

faceWeights[xadj[own] + nFacesPerCell[own]++] = w; faceWeights[xadj[nei] + nFacesPerCell[nei]++] = w; } Coupled boundary faces forAll(patches, patchI) { const polyPatch& pp = patches[patchI];

if (pp.coupled()) { label faceI = pp.start();

forAll(pp, i) { label w = weights[faceI]; label own = faceOwner[faceI]; adjncy[xadj[own] + nFacesPerCell[own]++] = w; faceI++; } } } }

Implements decompositionMethod.

Definition at line 806 of file parMetisDecomp.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd