37 const Foam::wordList Foam::codedFixedValuePointPatchField<Type>::codeKeys_ =
38 {
"code",
"codeInclude",
"localCode"};
44 const Foam::word Foam::codedFixedValuePointPatchField<Type>::codeTemplateC =
45 "fixedValuePointPatchFieldTemplate.C";
48 const Foam::word Foam::codedFixedValuePointPatchField<Type>::codeTemplateH =
49 "fixedValuePointPatchFieldTemplate.H";
60 word fieldType(pTraits<Type>::typeName);
63 dynCode.setFilterVariable(
"TemplateType", fieldType);
66 fieldType[0] = toupper(fieldType[0]);
67 dynCode.setFilterVariable(
"FieldType", fieldType +
"Field");
77 const objectRegistry& obr = this->db();
79 if (obr.foundObject<IOdictionary>(
"codeDict"))
81 return obr.lookupObject<IOdictionary>(
"codeDict");
92 this->db().time().
system(),
94 IOobject::MUST_READ_IF_MODIFIED,
106 return const_cast<dlLibraryTable&
>(this->db().time().libs());
113 dynamicCode& dynCode,
114 const dynamicCodeContext& context
118 dynCode.setFilterVariable(
"typeName", name_);
122 setFieldTemplates(dynCode);
125 dynCode.addCompileFile(codeTemplateC);
128 dynCode.addCopyFile(codeTemplateH);
137 dynCode.setMakeOptions
140 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 142 +
"\n\nLIB_LIBS = \\\n" 144 +
" -lfiniteVolume \\\n" 159 : this->
dict().subDict(name_)
177 + this->patch().name()
179 + this->internalField().name();
187 redirectPatchFieldPtr_.
clear();
202 redirectPatchFieldPtr_()
219 redirectPatchFieldPtr_()
236 dict.
found(
"redirectType")
237 ? dict.
lookup(
"redirectType")
240 redirectPatchFieldPtr_()
242 updateLibrary(name_);
256 redirectPatchFieldPtr_()
271 redirectPatchFieldPtr_()
281 if (!redirectPatchFieldPtr_.valid())
292 redirectPatchFieldPtr_.set
297 this->internalField(),
302 return redirectPatchFieldPtr_();
315 updateLibrary(name_);
335 updateLibrary(name_);
351 if (dict_.found(
"codeInclude"))
354 << token::HASH << token::BEGIN_BLOCK;
356 os.
writeQuoted(
string(dict_[
"codeInclude"]),
false)
357 << token::HASH << token::END_BLOCK
358 << token::END_STATEMENT <<
nl;
361 if (dict_.found(
"localCode"))
364 << token::HASH << token::BEGIN_BLOCK;
367 << token::HASH << token::END_BLOCK
368 << token::END_STATEMENT <<
nl;
371 if (dict_.found(
"code"))
374 << token::HASH << token::BEGIN_BLOCK;
377 << token::HASH << token::END_BLOCK
378 << token::END_STATEMENT <<
nl;
381 if (dict_.found(
"codeOptions"))
384 << token::HASH << token::BEGIN_BLOCK;
386 os.
writeQuoted(
string(dict_[
"codeOptions"]),
false)
387 << token::HASH << token::END_BLOCK
388 << token::END_STATEMENT <<
nl;
391 if (dict_.found(
"codeLibs"))
394 << token::HASH << token::BEGIN_BLOCK;
397 << token::HASH << token::END_BLOCK
398 << token::END_STATEMENT <<
nl;
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A list of keyword definitions, which are a keyword followed by any number of values (e...
codedFixedValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
commsTypes
Types of communications.
A FixedValue boundary condition for pointField.
const pointPatchField< Type > & redirectPatchField() const
Get reference to the underlying patch.
Foam::pointPatchFieldMapper.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets Updated to false.
Macros for easy insertion into run-time selection tables.
virtual Ostream & writeQuoted(const std::string &, const bool quoted=true)=0
Write std::string surrounded by quotes.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Abstract base class for point-mesh patch fields.
Constructs on-the-fly a new boundary condition (derived from fixedValuePointPatchField) which is then...
Pre-declare SubField and related Field type.
void clear()
Clear the list, i.e. set size to zero.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
A class for handling words, derived from string.
virtual void write(Ostream &) const
Write.
Base class for function objects and boundary conditions using dynamic code.
A table of dynamically loaded libraries.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Basic pointPatch represents a set of points from the mesh.
Input from memory buffer stream.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
string str() const
Return the string.
A class for handling character strings derived from std::string.
Output to memory buffer stream.
int system(const std::string &command)
Execute the specified command.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.