Commit 6a62c6bd authored by mattijs's avatar mattijs
Browse files

Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

parents 57110616 922ea566
......@@ -31,8 +31,7 @@ Description
#include "CompactListList.H"
#include "IOstreams.H"
#include "OStringStream.H"
#include "IStringStream.H"
#include "StringStream.H"
#include "faceList.H"
using namespace Foam;
......
......@@ -29,8 +29,7 @@ License
#include "DynamicList.H"
#include "FlatOutput.H"
#include "IOstreams.H"
#include "IStringStream.H"
#include "OStringStream.H"
#include "StringStream.H"
using namespace Foam;
......
......@@ -25,7 +25,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "IStringStream.H"
#include "StringStream.H"
#include "wordList.H"
#include "IOstreams.H"
......
......@@ -37,7 +37,7 @@ See also
#include "wordReList.H"
#include "IOstreams.H"
#include "IStringStream.H"
#include "StringStream.H"
#include "scalar.H"
#include "vector.H"
......
......@@ -25,8 +25,8 @@ Description
\*---------------------------------------------------------------------------*/
#include "OStringStream.H"
#include "IOstreams.H"
#include "StringStream.H"
using namespace Foam;
......@@ -35,15 +35,28 @@ using namespace Foam;
int main(int argc, char *argv[])
{
Info<< "khkj" << endl;
OStringStream testStream;
testStream << "hello " << 1 << endl;
Info<< testStream.str() << endl;
testStream.rewind();
Info<< testStream.str() << endl;
testStream << "hello " << 2 << endl;
Info<< testStream.str() << endl;
Info<< "Begin test OStringStream" << endl;
OStringStream os;
os << "output with some values " << 1 << " entry" << endl;
Info<< "contains:" << nl
<< os.str() << endl;
os.rewind();
Info<< "after rewind:" << nl
<< os.str() << endl;
os << "####";
Info<< "overwrite with short string:" << nl
<< os.str() << endl;
os.reset();
os << "%%%% reset";
Info<< "after reset:" << nl
<< os.str() << endl;
Info<< "End\n" << endl;
......
......@@ -30,7 +30,7 @@ Description
#include "uLabel.H"
#include "IOstreams.H"
#include "PackedBoolList.H"
#include "IStringStream.H"
#include "StringStream.H"
using namespace Foam;
......
......@@ -29,7 +29,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "IStringStream.H"
#include "StringStream.H"
#include "Polynomial.H"
#include "polynomialFunction.H"
#include "Random.H"
......
......@@ -25,8 +25,7 @@ License
#include "StaticHashTable.H"
#include "IOstreams.H"
#include "IStringStream.H"
#include "OStringStream.H"
#include "StringStream.H"
using namespace Foam;
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object testDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Test some parsing
// #default
internalField uniform 10;
// #default
dimensions [ 0 2 -2 0 0 0 0 ];
active
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.1;
value $internalField;
}
// #inputMode error
active
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.1;
value 100;
}
(U|k|epsilon|omega)
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
}
/*
;
*/
(rho) smoothSolver
//OK smoothSolver // <- missing ';' as well
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -47,8 +47,24 @@ int main(int argc, char *argv[])
IOWarningInFunction(dict) << "warning 3" << endl;
FatalErrorInFunction << "error 1" << endl;
FatalErrorInFunction << "error 2" << exit(FatalError);
FatalErrorInFunction
<< "This is an error from 1" << nl
<< "Explanation to follow:" << endl;
FatalErrorInFunction
<< "Error 2"
<< exit(FatalError);
}
catch (Foam::error& fErr)
{
Serr<< "Caught Foam error " << fErr << nl << endl;
}
try
{
FatalErrorInFunction
<< "Error# 3"
<< exit(FatalError);
}
catch (Foam::error& fErr)
{
......
Test-externalCoupler.C
EXE = $(FOAM_USER_APPBIN)/Test-externalCoupler
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lumpedPointMotion/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-llumpedPointMotion
Test-externalFileCoupler.C
EXE = $(FOAM_USER_APPBIN)/Test-externalFileCoupler
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lfiniteVolume
......@@ -22,14 +22,14 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
Test-externalCoupler
Test-externalFileCoupler
Description
Test of master/slave communication etc.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "externalCoupler.H"
#include "externalFileCoupler.H"
using namespace Foam;
......@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
const label maxCount = args.optionLookupOrDefault<label>("max", 1000);
externalCoupler coupler;
externalFileCoupler coupler;
if (args.optionFound("slave"))
{
......
......@@ -26,7 +26,6 @@ License
#include "argList.H"
#include "Time.H"
#include "fvMesh.H"
#include "IStringStream.H"
#include "indexedOctree.H"
#include "treeDataCell.H"
#include "OFstream.H"
......
......@@ -26,7 +26,6 @@ License
#include "argList.H"
#include "Time.H"
#include "fvMesh.H"
#include "IStringStream.H"
#include "indexedOctree.H"
#include "treeDataEdge.H"
#include "OFstream.H"
......
......@@ -34,8 +34,6 @@ Description
#include "Time.H"
#include "polyMesh.H"
#include "IOstreams.H"
#include "OStringStream.H"
#include "IStringStream.H"
using namespace Foam;
......
......@@ -36,7 +36,6 @@ Description
#include "meshTools.H"
#include "Time.H"
#include "OFstream.H"
#include "volFields.H"
#include "mappedPolyPatch.H"
#include "mappedFixedValueFvPatchFields.H"
......
......@@ -31,7 +31,6 @@ Description
#include "OSspecific.H"
#include "IOstreams.H"
#include "IStringStream.H"
#include "scalar.H"
#include "vector.H"
#include "ListOps.H"
......@@ -49,31 +48,26 @@ int main(int argc, char *argv[])
//Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] ";
List<vector> list(IStringStream("1 ((0 1 2))")());
List<vector> list{{0, 1, 2}};
Info<< list << endl;
List<vector> list2
(
IStringStream
(
"(\
(0 1 2)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
(3 4 5)\
)"
)()
);
{
{0, 1, 2},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
{3, 4, 5},
};
Pout<< list2 << endl;
Info<< findIndex(list2, vector(3, 4, 5)) << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment