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)
149 if (modifier().modify(regionIDs, surf))
160 surf.
rename(oldName.lessExt() +
"_patched." + oldName.ext());
162 Info<<
"Writing repatched surface " << oldName <<
" to " const IOdictionary & meshDict
A class for handling keywords in dictionaries.
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.
Foam::word regionName(Foam::polyMesh::defaultRegion)
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)
A class for handling words, derived from Foam::string.
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.
const word & constant() const noexcept
Return constant name.
virtual void rename(const word &newName)
Rename.
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...
virtual bool write(const bool valid=true) const
Write using setting from DB.
Defines the attributes of an object for which implicit objectRegistry management is supported...
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
A keyword and a list of tokens is an 'entry'.