34 Foam::functionObjects::fieldSelection::fieldSelection
37 const bool includeComponents
42 includeComponents_(includeComponents),
52 static word cmptStr(
".component(");
60 if (
n != string::npos)
67 <<
"Component specification not allowed for " <<
name 74 <<
"Cannot use \".component option\" in combination with " 75 <<
"wildcards for " <<
name 79 word baseName =
name.substr(0,
n);
84 if (closei == string::npos)
87 <<
"Invalid field component specification for " 89 <<
". Field should be expressed as <field>.component(i)" 100 nameAndComponent.append(fieldInfo(wordRe(baseName),
component));
104 nameAndComponent.append(fieldInfo(
name));
129 return resetFieldFilters(
fields);
167 <<
"Field " << fi.
name() <<
" not found" virtual bool checkSelection()
Check that all requested fielda have been found.
A HashTable with keys but without contents that is similar to std::unordered_set. ...
void size(const label n)
Older name for setAddressableSize.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
virtual bool containsPattern() const
Return whether the field names contain a pattern.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void transfer(List< fieldInfo > &list)
Transfer the contents of the argument List into this list and annul the argument list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
constexpr char nl
The newline '\n' character (0x0a)
Helper class to store a wordRe and label used by Foam::functionObjects::fieldSelection.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
const wordRe & name() const
A class for handling words, derived from Foam::string.
virtual bool updateSelection()
Update the selection.
const bool includeComponents_
Flag to indicate whether components are allowed.
graph_traits< Graph >::vertices_size_type size_type
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
virtual void clearSelection()
Clear the current selection.
virtual bool read(const dictionary &dict)
Read the fieldSelection data from dictionary.
virtual bool resetFieldFilters(const HashSet< wordRe > &names)
Reset the field filters to the given field names.
#define WarningInFunction
Report a warning using Foam::Warning.
Registry of regIOobjects.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
bool isPattern() const noexcept
The wordRe is a pattern, not a literal string.