| 53 | // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // |
| 54 | |
| 55 | void Foam::patchToFace::combine(topoSet& set, const bool add) const |
| 56 | { |
| 57 | labelHashSet patchIDs = mesh_.boundaryMesh().patchSet |
| 58 | ( |
| 59 | List<wordRe>(1, patchName_), |
| 60 | true, // warn if not found |
| 61 | true // use patch groups if available |
| 62 | ); |
| 63 | |
| 64 | forAllConstIter(labelHashSet, patchIDs, iter) |
| 65 | { |
| 66 | label patchi = iter.key(); |
| 67 | |
| 68 | const polyPatch& pp = mesh_.boundaryMesh()[patchi]; |
| 69 | |
| 70 | Info<< " Found matching patch " << pp.name() |
| 71 | << " with " << pp.size() << " faces." << endl; |
| 72 | |
| 73 | for |
| 74 | ( |
| 75 | label facei = pp.start(); |
| 76 | facei < pp.start() + pp.size(); |
| 77 | facei++ |
| 78 | ) |
| 79 | { |
| 80 | addOrDelete(set, facei, add); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | if (patchIDs.empty()) |
| 85 | { |
| 86 | WarningInFunction |
| 87 | << "Cannot find any patch named " << patchName_ << endl |
| 88 | << "Valid names are " << mesh_.boundaryMesh().names() << endl; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | |
| 93 | // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // |
no test coverage detected