Random: Replaced drand48 with an in-class implementation

This is faster than the library functionality that it replaces, as it
allows the compiler to do inlining. It also does not utilise any static
state so generators do not interfere with each other. It is also faster
than the the array lookup in cachedRandom. The cachedRandom class
therefore offers no advantage over Random and has been removed.
This commit is contained in:
Will Bainbridge
2018-06-07 17:33:16 +01:00
parent 88a218ce84
commit 002e7d7b06
96 changed files with 625 additions and 1358 deletions

View File

@ -163,7 +163,7 @@ int main(int argc, char *argv[])
}
// Remove face
label candidateFacei = rndGen.integer(0, mesh.nInternalFaces()-1);
label candidateFacei = rndGen.sampleAB<label>(0, mesh.nInternalFaces());
Info<< "Wanting to delete face " << mesh.faceCentres()[candidateFacei]
<< nl << endl;