ENH: added ZoneMesh indices(), selection() with wordRes matcher

- rationalized code dealing with extraction of name or indices from
  coordinateSystems, polyBoundaryMesh, faBoundaryMesh, fvBoundaryMesh,
  ZoneMesh to use internal implementations that allow direct
  searching/matching without building an intermediate list of names.

- simpler and more efficient handling of patch group matching.
This commit is contained in:
Mark Olesen
2018-08-03 22:40:19 +02:00
parent c0c59b9abd
commit 84e2df4994
29 changed files with 854 additions and 526 deletions

View File

@ -88,10 +88,9 @@ int main(int argc, char *argv[])
forAllConstIter(dictionary, agglomDict, iter)
{
labelList patchids = boundary.findIndices(iter().keyword());
forAll(patchids, i)
labelList patchids = boundary.indices(iter().keyword());
for (const label patchi : patchids)
{
label patchi = patchids[i];
const polyPatch& pp = boundary[patchi];
if (!pp.coupled())

View File

@ -338,12 +338,11 @@ int main(int argc, char *argv[])
const polyBoundaryMesh& patches = mesh.boundaryMesh();
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
labelList viewFactorsPatches(patches.findIndices(viewFactorWall));
forAll(viewFactorsPatches, i)
labelList viewFactorsPatches(patches.indices(viewFactorWall));
for (const label patchi : viewFactorsPatches)
{
label patchI = viewFactorsPatches[i];
nCoarseFaces += coarsePatches[patchI].size();
nFineFaces += patches[patchI].size();
nCoarseFaces += coarsePatches[patchi].size();
nFineFaces += patches[patchi].size();
}
// total number of coarse faces
@ -370,10 +369,8 @@ int main(int argc, char *argv[])
DynamicList<label> localAgg(nCoarseFaces);
labelHashSet includePatches;
forAll(viewFactorsPatches, i)
for (const label patchID : viewFactorsPatches)
{
const label patchID = viewFactorsPatches[i];
const polyPatch& pp = patches[patchID];
const labelList& agglom = finalAgglom[patchID];