41 return this->db().time().
libs();
50 + this->
patch().name()
52 + this->internalField().name();
59 redirectPatchFieldPtr_.reset(
nullptr);
67 const dictionary* ptr = dict_.findDict(
"codeContext", keyType::LITERAL);
68 return (ptr ? *ptr : dictionary::null);
81 : codedBase::codeDict(this->db()).subDict(name_)
87void Foam::codedFixedValuePointPatchField<Type>::prepare
90 const dynamicCodeContext& context
94 dynCode.setFilterVariable(
"typeName", name_);
97 dynCode.setFieldTemplates<Type>();
100 dynCode.addCompileFile(codeTemplateC);
103 dynCode.addCopyFile(codeTemplateH);
106 dynCode.setFilterVariable(
"verbose",
"true");
108 <<
"compile " << name_ <<
" sha1: " << context.sha1() <<
endl;
112 dynCode.setMakeOptions
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)
184 name_(
dict.getCompat<word>(
"name", {{
"redirectType", 1706}})),
185 redirectPatchFieldPtr_(
nullptr)
187 updateLibrary(name_);
189 if (!this->readValueEntry(
dict))
192 this->extrapolateInternal();
203 const codedFixedValuePointPatchField<Type>&
rhs
210 redirectPatchFieldPtr_(nullptr)
221 parent_bctype(
rhs, iF),
225 redirectPatchFieldPtr_(nullptr)
235 if (!redirectPatchFieldPtr_)
241 this->writeValueEntry(
os);
245 constructDict.set(
"type", name_);
247 redirectPatchFieldPtr_.reset
252 this->internalField(),
264 contentPtr->dict(this->codeContext());
269 << name_ <<
" Did not derive from dictionaryContent"
273 return *redirectPatchFieldPtr_;
286 updateLibrary(name_);
306 updateLibrary(name_);
319 this->parent_bctype::write(
os);
320 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...
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
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.
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
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.
virtual void clearRedirect() const =0
codedBase(const codedBase &)=delete
No copy construct.
virtual dlLibraryTable & libs() const =0
Mutable access to the loaded dynamic libraries.
virtual string description() const =0
virtual const dictionary & codeDict() const =0
static void writeCodeDict(Ostream &os, const dictionary &dict)
Write code-dictionary contents.
dynamicCodeContext & codeContext()
Access to the dynamic code context.
Constructs on-the-fly a new boundary condition (derived from fixedValuePointPatchField) which is then...
virtual void write(Ostream &) const
Write.
const pointPatchField< Type > & redirectPatchField() const
Get reference to the underlying patch.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
codedFixedValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
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,...
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
A table of dynamically loaded libraries.
static dlLibraryTable & libs()
Table of global libraries.
const pointPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
static autoPtr< pointPatchField< Type > > New(const word &patchFieldType, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF)
Return a pointer to a new patchField created on freestore given.
const DimensionedField< Type, pointMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
Basic pointPatch represents a set of points from the mesh.
A class for handling character strings derived from std::string.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
const std::string patch
OpenFOAM patch number as a std::string.
List< word > wordList
List of word.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
constexpr char nl
The newline '\n' character (0x0a).