63 const wordRes& regionNameMatcher
74 if (regionNameMatcher.match(
names[regioni]))
76 regionIds[
count++] = regioni;
79 regionIds.setSize(count);
85Foam::triSurface Foam::subTriSurfaceMesh::subset
96 if (
s.type() ==
"distributedTriSurfaceMesh")
99 <<
"Found surface " << subGeomName <<
" of type " <<
s.type()
100 <<
". subTriSurfaceMesh only works with non-distributed surfaces."
108 if (regionMap.empty())
111 <<
"Found no regions in triSurface matching " <<
regionNames
116 labelList reverseRegionMap(
s.patches().size(), -1);
119 reverseRegionMap[regionMap[i]] = i;
125 if (reverseRegionMap[
s.triSurface::operator[](triI).region()] != -1)
127 isSelected[triI] =
true;
131 return s.subsetMesh(isSelected);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const objectRegistry & db() const noexcept
Return the local objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
wordList names() const
The unsorted names of all objects.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
On-the-fly subset of triSurfaceMesh (based on selected patches).
subTriSurfaceMesh(const IOobject &io, const dictionary &dict)
Construct from IO and dictionary.
IOoject and searching on triSurface.
triSurfaceMesh(const triSurfaceMesh &)=delete
No copy construct.
Triangulated surface description with patch information.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
List< word > wordList
List of word.
List< label > labelList
A List of labels.
List< T > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
List< bool > boolList
A List of bools.
errorManipArg< error, int > exit(error &err, const int errNo=1)
wordList patchNames(nPatches)
#define forAll(list, i)
Loop across all elements in list.