41 return this->db().time().
libs();
52 + this->internalField().name();
59 redirectPatchFieldPtr_.reset(
nullptr);
68 return (ptr ? *ptr : dictionary::null);
81 : codedBase::codeDict(this->db()).subDict(name_)
108 <<
"compile " << name_ <<
" sha1: " << context.
sha1() <<
endl;
115 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 116 "-I$(LIB_SRC)/meshTools/lnInclude \\\n" 118 +
"\n\nLIB_LIBS = \\\n" 120 " -lfiniteVolume \\\n" 136 parent_bctype(
p, iF),
138 redirectPatchFieldPtr_(nullptr)
151 parent_bctype(rhs,
p, iF, mapper),
155 redirectPatchFieldPtr_(nullptr)
167 parent_bctype(
p, iF,
dict),
179 "value",
"refValue",
"refGradient",
"valueFraction" 183 name_(
dict.
getCompat<word>(
"name", {{
"redirectType", 1706}})),
184 redirectPatchFieldPtr_(
nullptr)
186 updateLibrary(name_);
200 redirectPatchFieldPtr_(nullptr)
211 parent_bctype(rhs, iF),
215 redirectPatchFieldPtr_(nullptr)
225 if (!redirectPatchFieldPtr_)
238 constructDict.set(
"type", name_);
240 redirectPatchFieldPtr_.reset
242 dynamic_cast<parent_bctype*>
247 this->internalField(),
259 contentPtr->
dict(this->codeContext());
264 << name_ <<
" Did not derive from dictionaryContent" 268 return *redirectPatchFieldPtr_;
281 updateLibrary(name_);
283 const parent_bctype& fvp = redirectPatchField();
284 const_cast<parent_bctype&
>(fvp).updateCoeffs();
287 this->refValue() = fvp.refValue();
288 this->refGrad() = fvp.refGrad();
289 this->valueFraction() = fvp.valueFraction();
291 this->parent_bctype::updateCoeffs();
302 updateLibrary(name_);
304 const parent_bctype& fvp = redirectPatchField();
308 const_cast<parent_bctype&
>(fvp).
evaluate(commsType);
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void setMakeOptions(const std::string &content)
Define contents for Make/options.
constexpr char nl
The newline '\n' character (0x0a)
virtual const dictionary & codeContext() const
Additional 'codeContext' dictionary to pass through.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a base class for 'mixed' type boundary conditions, i.e. conditions that mix fixed value and patch-normal gradient conditions.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
static dlLibraryTable & libs()
Table of global libraries.
Macros for easy insertion into run-time selection tables.
const mixedFvPatchField< Type > & redirectPatchField() const
Get reference to the underlying patchField.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
const string & options() const noexcept
The code options (Make/options)
const dictionary & dict() const noexcept
Read-access to the content.
A FieldMapper for finite-volume patch fields.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
virtual void clearRedirect() const
Clear redirected object(s)
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
A table of dynamically loaded libraries.
A wrapper for dictionary content, without operators that could affect inheritance patterns...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
codedMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T using any compatibility names if needed. FatalIOError if not found, or if there are excess tokens.
virtual void write(Ostream &) const
Write.
Tools for handling dynamic code compilation.
Encapsulation of dynamic code dictionaries.
Constructs on-the-fly a new boundary condition (derived from mixedFvPatchField) which is then used to...
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
#define WarningInFunction
Report a warning using Foam::Warning.
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual string description() const
Description (type + name) for the output.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
const std::string patch
OpenFOAM patch number as a std::string.
const string & libs() const noexcept
The code libs (LIB_LIBS)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void setFieldTemplates()
Define a filter variables TemplateType and FieldType.
virtual const dictionary & codeDict() const
The code dictionary. Inline "code" or from system/codeDict.
A class for handling character strings derived from std::string.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.
static void writeCodeDict(Ostream &os, const dictionary &dict)
Write code-dictionary contents.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
const SHA1 & sha1() const noexcept
The SHA1 calculated from options, libs, include, code, etc.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and a sub-dictionary) otherwise return nullptr...