mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Creation of OpenFOAM-dev repository 15/04/2008
This commit is contained in:
3
applications/test/vector/Make/files
Normal file
3
applications/test/vector/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
vectorTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/vectorTest
|
||||
0
applications/test/vector/Make/options
Normal file
0
applications/test/vector/Make/options
Normal file
33
applications/test/vector/vectorTest.C
Normal file
33
applications/test/vector/vectorTest.C
Normal file
@ -0,0 +1,33 @@
|
||||
#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) << " " << cmptMag(d2) << endl;
|
||||
Info<< min(d, d2) << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user