28 template<
class Matcher,
class StringType>
31 const Matcher& matcher,
32 const UList<StringType>& lst,
43 indices[nElem++] = elemI;
46 indices.setSize(nElem);
52 template<
class Matcher,
class StringListType>
55 const Matcher& matcher,
56 const StringListType& lst,
61 StringListType newLst(lst.size());
64 newLst.setSize(lst.size());
71 newLst[nElem++] = lst[elemI];
74 newLst.setSize(nElem);
80 template<
class Matcher,
class StringListType>
83 const Matcher& matcher,
93 lst[nElem++] = lst[elemI];
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
StringListType subsetMatchingStrings(const Matcher &, const StringListType &, const bool invert=false)
Extract elements of StringList when regular expression matches.
labelList findMatchingStrings(const Matcher &, const UList< StringType > &, const bool invert=false)
Return list indices for matching strings.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
List< label > labelList
A List of labels.
void inplaceSubsetMatchingStrings(const Matcher &, StringListType &, const bool invert=false)
Inplace extract elements of StringList when regular expression matches.