Add the OpenFOAM source tree

This commit is contained in:
Henry
2014-12-10 22:40:10 +00:00
parent ee487c860d
commit 446e5777f0
13379 changed files with 3983377 additions and 0 deletions

View File

@ -0,0 +1,39 @@
#include "primitiveFields.H"
#include "cpuTime.H"
#include "IOstreams.H"
#include "OFstream.H"
using namespace Foam;
int main()
{
const label nIter = 100;
const label size = 1000000;
Info<< "Initialising fields" << endl;
vectorField
vf1(size, vector::one),
vf2(size, vector::one),
vf3(size, vector::one),
vf4(size);
Info<< "Done\n" << endl;
{
cpuTime executionTime;
Info<< "vectorField algebra" << endl;
for (register int j=0; j<nIter; j++)
{
vf4 = vf1 + vf2 - vf3;
}
Info<< "ExecutionTime = "
<< executionTime.elapsedCpuTime()
<< " s\n" << endl;
Snull<< vf4[1] << endl << endl;
}
}