Go to the documentation of this file.
53 label nNeighbours = 0;
74 refCast<const processorPolyPatch>(patch);
78 neighbours[nNeighbours++] = procId;
96 int main(
int argc,
char *argv[])
130 Info<<
"connections:" << connections <<
endl;
131 Info<<
"meshCentres:" << meshCentres <<
endl;
138 fileName fName(
"decomposition.obj");
140 Info<<
"Writing decomposition to " << fName <<
endl;
145 forAll(meshCentres, procI)
147 const point& pt = meshCentres[procI];
149 objFile <<
"v " << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
endl;
152 forAll(connections, procI)
154 const labelList& nbs = connections[procI];
158 objFile <<
"l " << procI + 1 <<
' ' << nbs[nbI] + 1 <<
endl;
186 while (nOk < paths.
size())
188 Info<<
"Iteration:" << iter <<
endl;
195 Info<<
"Writing route to " << fName <<
endl;
199 forAll(meshCentres, procI)
201 const point& pt = meshCentres[procI];
203 objFile <<
"v " << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z()
209 router cellRouter(connections, meshCentres);
218 Info<<
"Trying to route path " << pathI
221 routeOk[pathI] = cellRouter.
route(
path, -(pathI + 1));
223 Info<<
"Result of routing:" << routeOk[pathI] <<
endl;
232 for (
label elemI = 1; elemI < route.
size(); elemI++)
235 <<
"l " << route[elemI-1]+1 <<
' '
236 << route[elemI]+1 <<
endl;
virtual const pointField & points() const
Return raw points.
A class for handling words, derived from string.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
labelList getRoute(const label pathValue) const
Extract labels of route with given value.
static bool & parRun()
Is this a parallel run?
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool route(const labelList &path, const label pathValue)
Find path from first element in path to all other elements.
int neighbProcNo() const
Return neigbour processor number.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
int main(int argc, char *argv[])
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A patch is a list of labels that address the faces in the global face list.
Neighbour processor patch.
labelList procNeighbours(const polyMesh &mesh)
Lee's PCB routing algorithm. Construct with list of connections between nodes (i.e....
A list of keyword definitions, which are a keyword followed by any number of values (e....
static int firstSlave()
Process index of first slave.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
point meshCentre(const polyMesh &mesh)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
void size(const label)
Override size to be inconsistent with allocated storage.
Gather data from all processors onto all processors.
word name(const complex &)
Return a string representation of a complex.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)