Go to the documentation of this file.
59 forAll(origPatches, patchI)
61 if (patchNameHash.
found(origPatches[patchI].name()))
71 <<
"Not all supplied patch names were found on the surface mesh" <<
endl;
118 forAll(subsetIds, subsetI)
150 forAll(subsetIds, subsetI)
177 const word& newPatchName,
187 word newPatchType = origPatches[patchIds[0]].geometricType();
194 patchAddr[origFacets[faceI].region()].
append(faceI);
200 patchAddr[newPatchId].
append(patchAddr[patchIds[patchI]]);
201 patchAddr[patchIds[patchI]].
clear();
208 label patchCount = 0;
218 newFacets[faceI] = origFacets[addr[i]];
219 newFacets[faceI].region() = patchCount;
221 newFaceAddr[addr[i]] = faceI;
227 if(addr.
size() || keepPatches)
237 forAll(origPatches, patchI)
240 if(patchAddr[patchI].size())
242 newPatches[patchCount] = origPatches[patchI];
243 newPatches[patchCount].index() = patchCount;
246 if(patchAddr[patchI].size() || keepPatches)
253 if(patchAddr[patchAddr.
size()-1].
size())
262 if(patchAddr[patchAddr.
size()-1].
size() || keepPatches)
281 newSurf->updateFacetsSubsets(newFaceAddr);
295 int main(
int argc,
char *argv[])
321 bool keepPatches =
false;
338 FatalError() <<
"Cannot specify both patch names and ids"
375 if (!patchIds.size())
391 newSurf->writeSurface(outFileName);
394 Info <<
"Final surface patches: " << newSurf->patches().size() <<
endl;
395 Info <<
"Surface written to " << outFileName <<
endl;
static SLList< string > validArgs
A list of valid (mandatory) arguments.
void pointsInSubset(const label, ListType &) const
int main(int argc, char *argv[])
void getPatchIds(const triSurf &origSurf, const wordList &patchNames, DynamicList< label > &patchIds)
word pointSubsetName(const label) const
A class for handling words, derived from string.
const stringList & args() const
Return arguments.
A class for handling file names.
label addEdgeSubset(const word &)
point subsets
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
const pointField & points() const
access to points
void edgesInSubset(const label, ListType &) const
The geometricSurfacePatch is like patchIdentifier but for surfaces. Holds type, name and index.
const Type & first() const
Return first.
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label size() const
Size of the active part of the list.
A HashTable with keys but without contents.
void addEdgeToSubset(const label, const label)
label addPointSubset(const word &)
point subsets
const edgeLongList & featureEdges() const
access to feature edges
const Foam::HashTable< string > & options() const
Return options.
void addFacetToSubset(const label, const label)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void copyFaceSubsets(const triSurf &origSurf, triSurf &newSurf)
void addPointToSubset(const label, const label)
void append(const T &)
Append an element at the end of the list.
void copyPointSubsets(const triSurf &origSurf, triSurf &newSurf)
const geometricSurfacePatchList & patches() const
access to patches
const Type & second() const
Return second.
wordList patchNames(nPatches)
label addFacetSubset(const word &)
point subsets
static HashTable< string > validOptions
A list of valid options.
bool found(const Key &) const
Return true if hashedEntry is found in table.
Input from memory buffer stream.
errorManip< error > abort(error &err)
void pointSubsetIndices(DynList< label > &) const
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void edgeSubsetIndices(DynList< label > &) const
void facetSubsetIndices(DynList< label > &) const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clear()
Clear the list, i.e. set size to zero.
void copyEdgeSubsets(const triSurf &origSurf, triSurf &newSurf)
const LongList< labelledTri > & facets() const
access to facets
word facetSubsetName(const label) const
#define WarningIn(functionName)
Report a warning using Foam::Warning.
void facetsInSubset(const label, ListType &) const
void size(const label)
Override size to be inconsistent with allocated storage.
static void noParallel()
Remove the parallel options.
word edgeSubsetName(const label) const
label size() const
Return the number of elements in the UList.
Foam::argList args(argc, argv)
autoPtr< triSurf > mergeSurfacePatches(const triSurf &origSurf, const UList< label > &patchIds, const word &newPatchName, bool keepPatches)