Go to the documentation of this file.
36 const dlLibraryTable& timeLibs =
37 this->patch_.boundaryMesh().mesh().time().libs();
39 return const_cast<dlLibraryTable&
>(timeLibs);
47 const dynamicCodeContext& context
50 if (context.code().empty())
53 <<
"No code section in input dictionary for patch "
54 << this->patch_.name()
60 dynCode.setFilterVariable(
"typeName", name_);
63 dynCode.setFieldTemplates<Type>();
66 dynCode.addCompileFile(codeTemplateC);
69 dynCode.addCopyFile(codeTemplateH);
78 dynCode.setMakeOptions
81 "-I$(LIB_SRC)/meshTools/lnInclude \\\n"
82 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
84 +
"\n\nLIB_LIBS = \\\n"
86 " -lfiniteVolume \\\n"
96 const dictionary&
dict
106 :
dict.subDict(name_)
115 return codeDict(dict_);
123 return "CodedField " + name_;
131 redirectFunctionPtr_.clear();
142 const word& entryName,
144 const bool faceValues
150 name_(
dict.getOrDefault<
word>(
"name", entryName))
152 updateLibrary(name_);
189 if (!redirectFunctionPtr_)
196 completeDict.set(
"type", name_);
199 dict.add(name_, completeDict);
201 redirectFunctionPtr_.reset
212 return *redirectFunctionPtr_;
224 updateLibrary(name_);
226 return redirectFunction().value(
x);
239 updateLibrary(name_);
241 return redirectFunction().integrate(x1, x2);
252 if (redirectFunctionPtr_)
254 redirectFunctionPtr_->autoMap(mapper);
267 if (redirectFunctionPtr_)
269 redirectFunctionPtr_->rmap(pf1, addr);
284 dict_.writeEntry(this->
name(), os);
A table of dynamically loaded libraries.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
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.
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
CodedField(const polyPatch &pp, const word &type, const word &entryName, const dictionary &dict, const bool faceValues=true)
Construct from entry name and dictionary.
virtual tmp< Field< Type > > integrate(const scalar x1, const scalar x2) const
Integrate between two values.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
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.