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

Function read

src/functionObjects/field/wallShearStress/wallShearStress.C:134–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
133
134bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
135{
136 fvMeshFunctionObject::read(dict);
137 writeLocalObjects::read(dict);
138
139 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
140
141 patchSet_ =
142 mesh_.boundaryMesh().patchSet
143 (
144 wordReList(dict.lookupOrDefault("patches", wordReList()))
145 );
146
147 Info<< type() << " " << name() << ":" << nl;
148
149 if (patchSet_.empty())
150 {
151 forAll(pbm, patchi)
152 {
153 if (isA<wallPolyPatch>(pbm[patchi]))
154 {
155 patchSet_.insert(patchi);
156 }
157 }
158
159 Info<< " processing all wall patches" << nl << endl;
160 }
161 else
162 {
163 Info<< " processing wall patches: " << nl;
164 labelHashSet filteredPatchSet;
165 forAllConstIter(labelHashSet, patchSet_, iter)
166 {
167 label patchi = iter.key();
168 if (isA<wallPolyPatch>(pbm[patchi]))
169 {
170 filteredPatchSet.insert(patchi);
171 Info<< " " << pbm[patchi].name() << endl;
172 }
173 else
174 {
175 WarningInFunction
176 << "Requested wall shear stress on non-wall boundary "
177 << "type patch: " << pbm[patchi].name() << endl;
178 }
179 }
180
181 Info<< endl;
182
183 patchSet_ = filteredPatchSet;
184 }
185
186 return true;
187}
188
189
190bool Foam::functionObjects::wallShearStress::execute()

Callers 1

wallShearStress.CFile · 0.70

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