diff --git a/applications/test/dimensionedType/Test-dimensionedType.C b/applications/test/dimensionedType/Test-dimensionedType.C index 5c826d256f26db4f78c9a69cde68aff5b56c83ec..ccf56fff6bc14d9e8022b67273a65dbd9debd6e8 100644 --- a/applications/test/dimensionedType/Test-dimensionedType.C +++ b/applications/test/dimensionedType/Test-dimensionedType.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,6 +41,45 @@ int main(int argc, char *argv[]) Info<< ds*dt << " " << dt*ds << endl; + + // dimensionSet + { + Pout<< "dimensionSet construct from is:" + << dimensionSet(IStringStream("[Pa m^2 s^-2]")()) + << endl; + + IStringStream is("[Pa m^2 s^-2]"); + dimensionSet dset(dimless); + is >> dset; + Pout<< "dimensionSet read:" << dset << endl; + } + // dimensionedType + { + Pout<< "construct from is:" + << dimensionedScalar(IStringStream("bla [Pa mm^2 s^-2] 3.0")()) + << endl; + Pout<< "construct from name,is:" + << dimensionedScalar + ( + "ABC", + IStringStream("[Pa mm^2 s^-2] 3.0")() + ) << endl; + Pout<< "construct from name,dimensionSet,is:" + << dimensionedScalar + ( + "ABC", + dimLength, + IStringStream("bla [mm] 3.0")() + ) << endl; + { + IStringStream is("bla [mm] 3.0"); + dimensionedScalar ds; + is >> ds; + Pout<< "read:" << ds << endl; + } + } + + Info<< "End\n" << endl; return 0;