如何得到processor 的编号?
-
https://github.com/OpenFOAM/OpenFOAM-4.x/blob/master/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H:?
// get the number of processors label n=Pstream::nProcs(); Pout << Pstream::myProcNo() << nl; if (Pstream::myProcNo() == 0) {}
分布点值:
label x = 0; if (Pstream::master()) { x = 1; } Pout<< x << endl; Pstream::scatter(x); Pout<< x << endl;