|
5 | 5 | #include "fvCFD.H"
|
6 | 6 | #include "fvMesh.H"
|
7 | 7 |
|
8 |
| -#include <csetjmp> |
9 |
| -#include <csignal> |
10 |
| -#include <cstdlib> |
11 |
| -#include <functional> |
| 8 | +#include "smartSimFunctionObject.H" |
| 9 | +#include "functionObjectList.H" |
12 | 10 |
|
13 | 11 | using namespace Foam;
|
14 | 12 | extern Time* timePtr;
|
15 | 13 | extern argList* argsPtr;
|
16 | 14 |
|
17 | 15 | TEST_CASE("Shared SmartRedis client", "[cavity][serial][parallel]")
|
18 | 16 | {
|
19 |
| - dictionary dict; |
20 |
| - dict.set("type", "smartSimFunctionObject"); |
21 |
| - dict.set("fieldNames", wordList()); |
22 |
| - dict.set("fieldDimensions", labelList()); |
23 |
| - functionObjects::smartSimFunctionObject fo1("smartSimFo1", *timePtr, dict); |
24 |
| - functionObjects::smartSimFunctionObject fo2("smartSimFo2", *timePtr, dict); |
25 |
| - REQUIRE(&fo1.redisDB == &fo2.redisDB); |
| 17 | + Time& runTime = *timePtr; |
| 18 | + FatalError.dontThrowExceptions(); |
| 19 | + fvMesh mesh |
| 20 | + ( |
| 21 | + IOobject |
| 22 | + ( |
| 23 | + polyMesh::defaultRegion, |
| 24 | + runTime.constant(), |
| 25 | + runTime, |
| 26 | + IOobject::MUST_READ, |
| 27 | + IOobject::NO_WRITE |
| 28 | + ) |
| 29 | + ); |
| 30 | + dictionary dict0; |
| 31 | + dict0.set("region", polyMesh::defaultRegion); |
| 32 | + dict0.set("type", "smartSimFunctionObject"); |
| 33 | + dict0.set("fieldNames", wordList()); |
| 34 | + dict0.set("fieldDimensions", labelList()); |
| 35 | + dictionary dict1; |
| 36 | + dict1.set("region", polyMesh::defaultRegion); |
| 37 | + dict1.set("type", "smartSimFunctionObject"); |
| 38 | + dict1.set("fieldNames", wordList()); |
| 39 | + dict1.set("fieldDimensions", labelList()); |
| 40 | + functionObjects::smartSimFunctionObject o0("smartSim0", runTime, dict0); |
| 41 | + functionObjects::smartSimFunctionObject o1("smartSim1", runTime, dict1); |
| 42 | + REQUIRE(&(o0.redisDB) == &(o1.redisDB)); |
26 | 43 | }
|
0 commit comments