41 return this->
db().time().libs();
59 redirectPatchFieldPtr_.reset(
nullptr);
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)
200 redirectPatchFieldPtr_(nullptr)
211 parent_bctype(
rhs, iF),
215 redirectPatchFieldPtr_(nullptr)
225 if (!redirectPatchFieldPtr_)
232 this->parent_bctype::write(
os);
237 constructDict.set(
"type", name_);
239 redirectPatchFieldPtr_.reset
241 dynamic_cast<parent_bctype*
>
246 this->internalField(),
258 contentPtr->dict(this->codeContext());
263 << name_ <<
" Did not derive from dictionaryContent"
267 return *redirectPatchFieldPtr_;
280 updateLibrary(name_);
282 const parent_bctype& fvp = redirectPatchField();
283 const_cast<parent_bctype&
>(fvp).updateCoeffs();
286 this->refValue() = fvp.refValue();
287 this->refGrad() = fvp.refGrad();
301 updateLibrary(name_);
303 const parent_bctype& fvp = redirectPatchField();
307 const_cast<parent_bctype&
>(fvp).evaluate(commsType);
317 this->parent_bctype::write(
os);
318 os.writeEntry(
"name", name_);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
An OSstream with internal List storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
commsTypes
Communications types.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
void updateLibrary(const word &name, const dynamicCodeContext &context) const
Update library as required, using the given context.
codedBase(const codedBase &)=delete
No copy construct.
static void writeCodeDict(Ostream &os, const dictionary &dict)
Write code-dictionary contents.
static const dictionary & codeDict(const objectRegistry &obr, const word &dictName="codeDict")
Return "codeDict" from objectRegistry or read from disk.
Constructs on-the-fly a new boundary condition (derived from mixedFvPatchField) which is then used to...
virtual const dictionary & codeContext() const
Additional 'codeContext' dictionary to pass through.
virtual void write(Ostream &) const
Write.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static constexpr const char *const codeTemplateC
Name of the C code template to be used.
virtual const dictionary & codeDict() const
The code dictionary. Inline "code" or from system/codeDict.
const mixedFvPatchField< Type > & redirectPatchField() const
Get reference to the underlying patchField.
virtual void clearRedirect() const
Clear redirected object(s).
static constexpr const char *const codeTemplateH
Name of the H code template to be used.
codedMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
virtual string description() const
Description (type + name) for the output.
A wrapper for dictionary content, without operators that could affect inheritance patterns.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
A table of dynamically loaded libraries.
Encapsulation of dynamic code dictionaries.
const string & libs() const noexcept
The code libs (LIB_LIBS).
const SHA1 & sha1() const noexcept
The SHA1 calculated from options, libs, include, code, etc.
const string & options() const noexcept
The code options (Make/options).
Tools for handling dynamic code compilation.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setFieldTemplates()
Define a filter variables TemplateType and FieldType.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
const objectRegistry & db() const
The associated objectRegistry.
const fvPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
const DimensionedField< Type, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual void write(Ostream &) const
Write.
virtual Field< Type > & refGrad()
virtual Field< Type > & refValue()
virtual scalarField & valueFraction()
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
A class for handling character strings derived from std::string.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
List< word > wordList
List of word.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
constexpr char nl
The newline '\n' character (0x0a).