MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / readDict

Function readDict

src/OpenFOAM/db/Time/TimeIO.C:35–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
34
35void Foam::Time::readDict()
36{
37 word application;
38 if (controlDict_.readIfPresent("application", application))
39 {
40 // Do not override if already set so external application can override
41 setEnv("FOAM_APPLICATION", application, false);
42 }
43
44
45 // Check for local switches and settings
46 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
48 // Debug switches
49 if (controlDict_.found("DebugSwitches"))
50 {
51 Info<< "Overriding DebugSwitches according to " << controlDict_.name()
52 << endl;
53
54 simpleObjectRegistry& objects = debug::debugObjects();
55 const dictionary& localSettings = controlDict_.subDict("DebugSwitches");
56 forAllConstIter(dictionary, localSettings, iter)
57 {
58 const word& name = iter().keyword();
59
60 simpleObjectRegistryEntry* objPtr = objects.lookupPtr(name);
61
62 if (objPtr)
63 {
64 Info<< " " << iter() << endl;
65
66 const List<simpleRegIOobject*>& objects = *objPtr;
67
68 if (iter().isDict())
69 {
70 forAll(objects, i)
71 {
72 OStringStream os(IOstream::ASCII);
73 os << iter().dict();
74 IStringStream is(os.str());
75 objects[i]->readData(is);
76 }
77 }
78 else
79 {
80 forAll(objects, i)
81 {
82 objects[i]->readData(iter().stream());
83 }
84 }
85 }
86 }
87 }
88
89 // Optimisation Switches
90 if (controlDict_.found("OptimisationSwitches"))
91 {
92 Info<< "Overriding OptimisationSwitches according to "

Callers 3

setControlsFunction · 0.70
readFunction · 0.70
readModifiedObjectsFunction · 0.70

Calls 15

setEnvFunction · 0.85
fileHandlerFunction · 0.85
forAllReverseFunction · 0.85
fileOperationClass · 0.85
labelFunction · 0.85
versionNumberClass · 0.85
readUintFunction · 0.85
readIfPresentMethod · 0.80
lookupMethod · 0.80
precisionMethod · 0.80
forAllConstIterFunction · 0.50
forAllFunction · 0.50

Tested by

no test coverage detected