37 const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateC
38 =
"fixedValueFvPatchFieldTemplate.C";
41 const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateH
42 =
"fixedValueFvPatchFieldTemplate.H";
53 word fieldType(pTraits<Type>::typeName);
56 dynCode.setFilterVariable(
"TemplateType", fieldType);
59 fieldType[0] = toupper(fieldType[0]);
60 dynCode.setFilterVariable(
"FieldType", fieldType +
"Field");
69 const objectRegistry& obr = this->db();
71 if (obr.foundObject<IOdictionary>(
"codeDict"))
73 return obr.lookupObject<IOdictionary>(
"codeDict");
84 this->db().time().
system(),
86 IOobject::MUST_READ_IF_MODIFIED,
98 return const_cast<dlLibraryTable&
>(this->db().time().libs());
105 dynamicCode& dynCode,
106 const dynamicCodeContext& context
110 dynCode.setFilterVariable(
"typeName", name_);
114 setFieldTemplates(dynCode);
117 dynCode.addCompileFile(codeTemplateC);
120 dynCode.addCopyFile(codeTemplateH);
129 dynCode.setMakeOptions
132 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 134 +
"\n\nLIB_LIBS = \\\n" 136 +
" -lfiniteVolume \\\n" 151 : this->
dict().subDict(name_)
161 + this->patch().name()
163 + this->internalField().name();
171 redirectPatchFieldPtr_.
clear();
186 redirectPatchFieldPtr_()
203 redirectPatchFieldPtr_()
220 dict.
found(
"redirectType")
221 ? dict.
lookup(
"redirectType")
224 redirectPatchFieldPtr_()
226 updateLibrary(name_);
240 redirectPatchFieldPtr_()
255 redirectPatchFieldPtr_()
265 if (!redirectPatchFieldPtr_.valid())
271 os.
writeKeyword(
"type") << name_ << token::END_STATEMENT
277 redirectPatchFieldPtr_.set
282 this->internalField(),
287 return redirectPatchFieldPtr_();
300 updateLibrary(name_);
320 updateLibrary(name_);
335 << token::END_STATEMENT <<
nl;
337 if (dict_.found(
"codeInclude"))
340 << token::HASH << token::BEGIN_BLOCK;
342 os.
writeQuoted(
string(dict_[
"codeInclude"]),
false)
343 << token::HASH << token::END_BLOCK
344 << token::END_STATEMENT <<
nl;
347 if (dict_.found(
"localCode"))
350 << token::HASH << token::BEGIN_BLOCK;
353 << token::HASH << token::END_BLOCK
354 << token::END_STATEMENT <<
nl;
357 if (dict_.found(
"code"))
360 << token::HASH << token::BEGIN_BLOCK;
363 << token::HASH << token::END_BLOCK
364 << token::END_STATEMENT <<
nl;
367 if (dict_.found(
"codeOptions"))
370 << token::HASH << token::BEGIN_BLOCK;
372 os.
writeQuoted(
string(dict_[
"codeOptions"]),
false)
373 << token::HASH << token::END_BLOCK
374 << token::END_STATEMENT <<
nl;
377 if (dict_.found(
"codeLibs"))
380 << token::HASH << token::BEGIN_BLOCK;
383 << token::HASH << token::END_BLOCK
384 << token::END_STATEMENT <<
nl;
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
commsTypes
Types of communications.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
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...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets Updated to false.
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.
Foam::fvPatchFieldMapper.
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.
Constructs on-the-fly a new boundary condition (derived from fixedValueFvPatchField) which is then us...
Input from memory buffer stream.
codedFixedValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal 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.
virtual void write(Ostream &) const
Write.
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.
const fvPatchField< Type > & redirectPatchField() const
Get reference to the underlying patch.