Go to the documentation of this file.
36 return this->patch_.boundaryMesh().mesh().time().
libs();
47 if (context.
code().empty())
50 <<
"No code section in input dictionary for patch "
51 << this->patch_.name()
78 "-I$(LIB_SRC)/meshTools/lnInclude \\\n"
79 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
81 +
"\n\nLIB_LIBS = \\\n"
83 " -lfiniteVolume \\\n"
103 :
dict.subDict(name_)
112 return codeDict(dict_);
120 return "CodedField " + name_;
128 redirectFunctionPtr_.clear();
138 const word& redirectType,
139 const word& entryName,
141 const bool faceValues
147 name_(
dict.getOrDefault<
word>(
"name", entryName))
149 updateLibrary(name_);
183 if (!redirectFunctionPtr_)
190 completeDict.set(
"type", name_);
193 dict.add(name_, completeDict);
195 redirectFunctionPtr_.reset
206 return *redirectFunctionPtr_;
218 updateLibrary(name_);
220 return redirectFunction().value(
x);
233 updateLibrary(name_);
235 return redirectFunction().integrate(x1, x2);
246 if (redirectFunctionPtr_)
248 redirectFunctionPtr_->autoMap(mapper);
261 if (redirectFunctionPtr_)
263 redirectFunctionPtr_->rmap(pf1, addr);
278 dict_.writeEntry(this->
name(), os);
const string & libs() const
Return the code-libs.
A table of dynamically loaded libraries.
A class for handling words, derived from Foam::string.
Tools for handling dynamic code compilation.
A class for managing temporary objects.
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
Encapsulation of dynamic code dictionaries.
virtual void rmap(const PatchFunction1< Type > &pf1, const labelList &addr)
Reverse map the given PatchFunction1 onto this PatchFunction1.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
Abstract base class to hold the Field mapping addressing and weights.
A class for handling character strings derived from std::string.
virtual void autoMap(const FieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
CodedField(const polyPatch &pp, const word &redirectType, const word &entryName, const dictionary &dict, const bool faceValues=true)
Construct from entry name and dictionary.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
virtual tmp< Field< Type > > value(const scalar x) const
Return CodedField value.
A patch is a list of labels that address the faces in the global face list.
word name(const complex &c)
Return string representation of complex.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
const string & code() const
Return the code.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const string & options() const
Return the code-options.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual tmp< Field< Type > > integrate(const scalar x1, const scalar x2) const
Integrate between two values.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
static dlLibraryTable & libs()
Table of global libraries.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setFieldTemplates()
Define a filter variables TemplateType and FieldType.
virtual const dictionary & codeDict() const
virtual void clearRedirect() const
void setMakeOptions(const std::string &content)
Define contents for Make/options.
const std::string patch
OpenFOAM patch number as a std::string.
virtual void writeData(Ostream &os) const
Write in dictionary format.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
virtual string description() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
PatchFunction1 with the code supplied by an on-the-fly compiled C++ expression.