37 const Foam::word Foam::codedFixedValuePointPatchField<Type>::codeTemplateC
38 =
"fixedValuePointPatchFieldTemplate.C";
41 const Foam::word Foam::codedFixedValuePointPatchField<Type>::codeTemplateH
42 =
"fixedValuePointPatchFieldTemplate.H";
53 word fieldType(pTraits<Type>::typeName);
56 dynCode.setFilterVariable(
"TemplateType", fieldType);
59 fieldType[0] = toupper(fieldType[0]);
60 dynCode.setFilterVariable(
"FieldType", fieldType +
"Field");
70 const objectRegistry& obr = this->db();
72 if (obr.foundObject<IOdictionary>(
"codeDict"))
74 return obr.lookupObject<IOdictionary>(
"codeDict");
85 this->db().time().
system(),
87 IOobject::MUST_READ_IF_MODIFIED,
99 return const_cast<dlLibraryTable&
>(this->db().time().libs());
106 dynamicCode& dynCode,
107 const dynamicCodeContext& context
111 dynCode.setFilterVariable(
"typeName", name_);
115 setFieldTemplates(dynCode);
118 dynCode.addCompileFile(codeTemplateC);
121 dynCode.addCopyFile(codeTemplateH);
130 dynCode.setMakeOptions
133 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 135 +
"\n\nLIB_LIBS = \\\n" 137 +
" -lfiniteVolume \\\n" 152 : this->
dict().subDict(name_)
162 + this->patch().name()
164 + this->internalField().name();
172 redirectPatchFieldPtr_.
clear();
187 redirectPatchFieldPtr_()
204 redirectPatchFieldPtr_()
214 const bool valueRequired
222 dict.found(
"redirectType")
223 ? dict.lookup(
"redirectType")
224 : dict.lookup(
"name")
226 redirectPatchFieldPtr_()
228 updateLibrary(name_);
242 redirectPatchFieldPtr_()
257 redirectPatchFieldPtr_()
267 if (!redirectPatchFieldPtr_.valid())
273 os.
writeKeyword(
"type") << name_ << token::END_STATEMENT
279 redirectPatchFieldPtr_.set
284 this->internalField(),
289 return redirectPatchFieldPtr_();
302 updateLibrary(name_);
322 updateLibrary(name_);
337 << token::END_STATEMENT <<
nl;
339 if (dict_.found(
"codeInclude"))
342 << token::HASH << token::BEGIN_BLOCK;
344 os.
writeQuoted(
string(dict_[
"codeInclude"]),
false)
345 << token::HASH << token::END_BLOCK
346 << token::END_STATEMENT <<
nl;
349 if (dict_.found(
"localCode"))
352 << token::HASH << token::BEGIN_BLOCK;
355 << token::HASH << token::END_BLOCK
356 << token::END_STATEMENT <<
nl;
359 if (dict_.found(
"code"))
362 << token::HASH << token::BEGIN_BLOCK;
365 << token::HASH << token::END_BLOCK
366 << token::END_STATEMENT <<
nl;
369 if (dict_.found(
"codeOptions"))
372 << token::HASH << token::BEGIN_BLOCK;
374 os.
writeQuoted(
string(dict_[
"codeOptions"]),
false)
375 << token::HASH << token::END_BLOCK
376 << token::END_STATEMENT <<
nl;
379 if (dict_.found(
"codeLibs"))
382 << token::HASH << token::BEGIN_BLOCK;
385 << token::HASH << token::END_BLOCK
386 << token::END_STATEMENT <<
nl;
string str() const
Return the string.
const pointPatchField< Type > & redirectPatchField() const
Get reference to the underlying patch.
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.
Foam::pointPatchFieldMapper.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::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.
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.
virtual void write(Ostream &) const
Write.
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...
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.