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

Function reset

src/finiteVolume/cfdTools/general/fvOptions/fvOptionList.C:108–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
107
108void Foam::fv::optionList::reset(const dictionary& dict)
109{
110 // Count number of active fvOptions
111 label count = 0;
112 forAllConstIter(dictionary, dict, iter)
113 {
114 if (iter().isDict())
115 {
116 count++;
117 }
118 }
119
120 this->setSize(count);
121 label i = 0;
122 forAllConstIter(dictionary, dict, iter)
123 {
124 if (iter().isDict())
125 {
126 const word& name = iter().keyword();
127 const dictionary& sourceDict = iter().dict();
128
129 this->set
130 (
131 i++,
132 option::New(name, sourceDict, mesh_)
133 );
134 }
135 }
136}
137
138
139bool Foam::fv::optionList::read(const dictionary& dict)

Callers 1

fvOptionList.CFile · 0.70

Calls 5

forAllConstIterFunction · 0.50
NewFunction · 0.50
isDictMethod · 0.45
setSizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected