Go to the documentation of this file.
44 const wordList& patchGroups = boundaryInfo_.groups()[patchI];
53 if (select == patchName)
58 else if (select.match(patchName))
66 for (
const word& groupName : patchGroups)
68 if (select == groupName)
78 <<
"Boundary patch " << patchName <<
" not defined"
85 void Foam::caseInfo::updateGeometricBoundaryField()
87 forAll(boundaryInfo_.names(), i)
89 const word& patchName = boundaryInfo_.names()[i];
91 if (!boundaryInfo_.constraint()[i])
94 const label conditionI = findPatchConditionID(i, patchName);
96 const word& category = patchCategories_[conditionI];
98 boundaryInfo_.setType(i, category);
102 boundaryInfo_.write();
123 bcDict_(properties_.subDict(
"boundaryConditions")),
124 conditionNames_(bcDict_.toc()),
125 patchNames_(conditionNames_.size()),
126 patchCategories_(conditionNames_.size()),
127 patchTypes_(conditionNames_.size())
130 Info<<
" Reading case properties" <<
endl;
132 forAll(conditionNames_, i)
140 updateGeometricBoundaryField();
148 const word& regionPrefix,
153 forAll(conditionNames_, i)
174 return conditionNames_[patchI];
180 return patchCategories_[patchI];
186 return patchTypes_[patchI];
192 const word& regionPrefix,
193 const word& fieldName,
199 forAll(boundaryInfo_.names(), j)
201 const word& patchName = boundaryInfo_.names()[j];
203 if (boundaryInfo_.constraint()[j])
206 patchDict.
add(
"type", boundaryInfo_.types()[j]);
209 patchDict.
add(
"value",
"${:internalField}");
210 boundaryField.
add(patchName.c_str(), patchDict);
215 const label conditionI = findPatchConditionID(j, patchName);
217 if (conditionI == -1)
220 <<
"Unable to find patch " << patchName
221 <<
" in list of boundary conditions"
225 const word& condition = conditionNames_[conditionI];
227 const word& category = patchCategories_[conditionI];
229 const word& patchType = patchTypes_[conditionI];
251 boundaryField.
add(patchName.c_str(), patchDict);
255 return boundaryField;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
const word & conditionName(const label patchI) const
void checkPatch(const word ®ionPrefix, const word &condition, const word &category, const word &patchType) const
int system(const std::string &command, const bool bg=false)
label findPatchConditionID(const label patchI, const word &patchName) const
Ostream & endl(Ostream &os)
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
const word & patchType(const label patchI) const
const List< wordRes > & patchNames() const
dictionary generateBoundaryField(const word ®ionPrefix, const word &fieldName, const boundaryTemplates &bcTemplates) const
caseInfo(const Time &runTime, const word ®ionName)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
wordList patchNames(nPatches)
void checkPatches(const word ®ionPrefix, const boundaryTemplates &bcTemplates) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A List of wordRe with additional matching capabilities.
#define forAllReverse(list, i)
entry * add(entry *entryPtr, bool mergeEntry=false)
dictionary generatePatchDict(const word ®ionPrefix, const word &fieldName, const word &condition, const word &category, const word &patchType, const dictionary &conditionOptions) const
Class to store boundary template specifications.
const word & patchCategory(const label patchI) const
bool optionsRequired(const word ®ionPrefix, const word &category, const word &patchType) const