56 int main(
int argc,
char *argv[])
60 "Add patches (regions) to a surface with a user-selectable method" 94 for (
const entry& dEntry : surfacesDict)
98 const word& surfName = dEntry.keyword();
105 bool changed =
false;
108 if (surfDict.
found(
"type"))
127 if (surfDict.
found(
"regions"))
131 for (
const entry&
e : regionsDict)
145 regionDict.get<
word>(
"type"),
151 if (modifier().modify(regionIDs, surf))
162 surf.
rename(oldName.lessExt() +
"_patched." + oldName.ext());
164 Info<<
"Writing repatched surface " << oldName <<
" to " const IOdictionary & meshDict
static void addNote(const string ¬e)
Add extra notes for the usage information.
void size(const label n)
Older name for setAddressableSize.
virtual const wordList & regions() const =0
Names of regions.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const word & name() const noexcept
Return the object name.
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
Ignore writing from objectRegistry::writeObject()
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.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
static word meshSubDir
Return the mesh sub-directory name (usually "triSurface")
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static autoPtr< searchableSurfaceModifier > New(const word &type, const searchableSurfaces &, const dictionary &dict)
Return a reference to the selected searchableSurfaceModifier.
const dimensionedScalar e
Elementary charge.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
A class for handling words, derived from Foam::string.
static labelList matching(const wordRe &select, const UList< StringType > &input, const bool invert=false)
Determine the list indices for all matches.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
Container for searchableSurfaces. The collection is specified as a dictionary. For example...
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
const word & constant() const noexcept
Return constant name.
virtual void rename(const word &newName)
Rename.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
Defines the attributes of an object for which implicit objectRegistry management is supported...
A keyword and a list of tokens is an 'entry'.