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

Function initialise

src/functionObjects/forces/forces/forces.C:172–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170
171
172void Foam::functionObjects::forces::initialise()
173{
174 if (initialised_)
175 {
176 return;
177 }
178
179 if (directForceDensity_)
180 {
181 if (!obr_.foundObject<volVectorField>(fDName_))
182 {
183 FatalErrorInFunction
184 << "Could not find " << fDName_ << " in database."
185 << exit(FatalError);
186 }
187 }
188 else
189 {
190 if
191 (
192 !obr_.foundObject<volVectorField>(UName_)
193 || !obr_.foundObject<volScalarField>(pName_)
194
195 )
196 {
197 FatalErrorInFunction
198 << "Could not find " << UName_ << ", " << pName_
199 << exit(FatalError);
200 }
201
202 if
203 (
204 rhoName_ != "rhoInf"
205 && !obr_.foundObject<volScalarField>(rhoName_)
206 )
207 {
208 FatalErrorInFunction
209 << "Could not find " << rhoName_
210 << exit(FatalError);
211 }
212 }
213
214 initialised_ = true;
215}
216
217
218Foam::tmp<Foam::volSymmTensorField>

Callers 5

calcForcesMomentFunction · 0.70
DSMCCloud.CFile · 0.50
AMIMethod.CFile · 0.50

Calls 1

exitFunction · 0.50

Tested by

no test coverage detected