| 132 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
| 133 | |
| 134 | bool 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 | |
| 190 | bool Foam::functionObjects::wallShearStress::execute() |
no test coverage detected