56int main(
int argc,
char *argv[])
60 "Add patches (regions) to a surface with a user-selectable method"
62 argList::noParallel();
63 argList::addOption(
"dict",
"file",
"Alternative surfacePatchDict");
82 triSurfaceMesh::meshSubDir,
88 meshDict.getOrDefault(
"singleRegionName",
true)
94 for (
const entry& dEntry : surfacesDict)
98 const word& surfName = dEntry.keyword();
105 bool changed =
false;
108 if (surfDict.
found(
"type"))
112 searchableSurfaceModifier::New
127 if (surfDict.
found(
"regions"))
131 for (
const entry&
e : regionsDict)
138 searchableSurfaceModifier::New
149 if (modifier().modify(regionIDs, surf))
162 Info<<
"Writing repatched surface " <<
name <<
" to "
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
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
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
A keyword and a list of tokens is an 'entry'.
A class for handling file names.
A class for handling keywords in dictionaries.
virtual bool write(const bool valid=true) const
Write using setting from DB.
virtual void rename(const word &newName)
Rename.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual const wordList & regions() const =0
Names of regions.
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
A class for handling words, derived from Foam::string.
word ext() const
Return file name extension (part after last .)
word lessExt() const
Return word without extension (part before last .)
Foam::word regionName(Foam::polyMesh::defaultRegion)
const IOdictionary & meshDict
const word dictName("faMeshDefinition")
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
constexpr char nl
The newline '\n' character (0x0a)