mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
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:
@ -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())
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user