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

Function read

src/functionObjects/field/wallHeatFlux/wallHeatFlux.C:146–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
145
146bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
147{
148 fvMeshFunctionObject::read(dict);
149 writeLocalObjects::read(dict);
150
151 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
152
153 patchSet_ =
154 mesh_.boundaryMesh().patchSet
155 (
156 wordReList(dict.lookupOrDefault("patches", wordReList()))
157 );
158
159 Info<< type() << " " << name() << ":" << nl;
160
161 if (patchSet_.empty())
162 {
163 forAll(pbm, patchi)
164 {
165 if (isA<wallPolyPatch>(pbm[patchi]))
166 {
167 patchSet_.insert(patchi);
168 }
169 }
170
171 Info<< " processing all wall patches" << nl << endl;
172 }
173 else
174 {
175 Info<< " processing wall patches: " << nl;
176 labelHashSet filteredPatchSet;
177 forAllConstIter(labelHashSet, patchSet_, iter)
178 {
179 label patchi = iter.key();
180 if (isA<wallPolyPatch>(pbm[patchi]))
181 {
182 filteredPatchSet.insert(patchi);
183 Info<< " " << pbm[patchi].name() << endl;
184 }
185 else
186 {
187 WarningInFunction
188 << "Requested wall heat-flux on non-wall boundary "
189 << "type patch: " << pbm[patchi].name() << endl;
190 }
191 }
192
193 Info<< endl;
194
195 patchSet_ = filteredPatchSet;
196 }
197
198 return true;
199}
200
201
202bool Foam::functionObjects::wallHeatFlux::execute()

Callers 3

wallHeatFlux.CFile · 0.70
writeCellCentres.CFile · 0.50
writeCellVolumes.CFile · 0.50

Calls 8

typeEnum · 0.50
nameFunction · 0.50
forAllFunction · 0.50
forAllConstIterFunction · 0.50
emptyMethod · 0.45
insertMethod · 0.45
keyMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected