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,3 @@
Test-vector.C
EXE = $(FOAM_USER_APPBIN)/Test-vector

View File

View File

@ -0,0 +1,37 @@
#include "vector.H"
#include "IOstreams.H"
using namespace Foam;
int main()
{
Info<< vector::zero << endl
<< vector::one << endl
<< vector::dim << endl
<< vector::rank << endl;
vector d(0.5, 0.5, 0.5);
d /= mag(d);
vector dSmall = (1e-100)*d;
dSmall /= mag(dSmall);
Info<< (dSmall - d) << endl;
d *= 4.0;
Info<< d << endl;
Info<< d + d << endl;
Info<< magSqr(d) << endl;
vector d2(0.5, 0.51, -0.5);
Info<< cmptMax(d2) << " "
<< cmptSum(d2) << " "
<< cmptProduct(d2) << " "
<< cmptMag(d2)
<< endl;
Info<< min(d, d2) << endl;
return 0;
}