49 internalNonDynamicField_
69 internalNonDynamicField_
89 internalNonDynamicField_
102 const word& fieldSourceType,
106 typename nullConstructorTable::iterator cstrIter =
107 nullConstructorTablePtr_->find(fieldSourceType);
109 if (cstrIter == nullConstructorTablePtr_->end())
112 <<
"Unknown null-constructable fieldSource type " << fieldSourceType
113 <<
nl <<
nl <<
"Valid fieldSource types are :" <<
endl
114 << nullConstructorTablePtr_->sortedToc()
118 return cstrIter()(iIo);
132 libs.
open(
dict,
"libs", dictionaryConstructorTablePtr_);
134 typename dictionaryConstructorTable::iterator cstrIter =
135 dictionaryConstructorTablePtr_->find(fieldSourceType);
137 if (cstrIter == dictionaryConstructorTablePtr_->end())
139 if (!disallowGenericLagrangianFieldSource)
141 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
144 if (cstrIter == dictionaryConstructorTablePtr_->end())
147 <<
"Unknown fieldSource type " << fieldSourceType
149 <<
"Valid fieldSource types are :" <<
endl
150 << dictionaryConstructorTablePtr_->sortedToc()
155 return cstrIter()(iIo,
dict);
174 return internalField_.dimensions();
177 if (
notNull(internalNonDynamicField_))
179 return internalNonDynamicField_.dimensions();
183 <<
"Dimensions of internal object " << internalIo_.name()
184 <<
" could not be determined"
187 return NullObjectRef<dimensionSet>();
197 return internalField_;
201 <<
"Internal field " << internalIo_.name() <<
" is not of type "
205 return NullObjectRef<LagrangianInternalDynamicField<Type>>();
218 <<
"The " <<
type() <<
" condition for source " << source.
name()
219 <<
" of field " << this->internalName()
220 <<
" does not define a value for a continuous source "
236 <<
"The " <<
type() <<
" condition for source " << source.
name()
237 <<
" of field " << this->internalName()
238 <<
" does not define a value for a continuous source "
253 return (1 - internalCoeff(source, subMesh))*sourceValue(source, subMesh);
266 sourceCoeff(source, subMesh)
267 + internalCoeff(source, subMesh)*subMesh.
sub(internalField());
280 <<
"The " <<
type() <<
" condition for injection " << injection.
name()
281 <<
" of field " << this->internalName()
282 <<
" does not define a value for an instantaneous injection"
297 <<
"The " <<
type() <<
" condition for field "
298 << this->internalName() <<
" does not define a value without a model"
325 "Ostream& operator<<(Ostream&, const LagrangianFieldSource<Type>&)"
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Base class for Lagrangian source conditions.
Base class for Lagrangian source conditions.
virtual const dimensionSet & internalDimensions() const
Return internal dimensions reference.
virtual void write(Ostream &) const
Write.
static autoPtr< LagrangianFieldSource< Type > > New(const word &fieldSourceType, const regIOobject &)
Return a pointer to a new field source.
tmp< LagrangianSubField< Type > > value(const LagrangianSource &, const LagrangianSubMesh &) const
Return the value for a continuous source.
tmp< LagrangianSubField< Type > > sourceCoeff(const LagrangianSource &, const LagrangianSubMesh &) const
Return the source coefficient.
virtual tmp< LagrangianSubField< Type > > sourceValue(const LagrangianSource &, const LagrangianSubMesh &) const
Return the source value.
virtual ~LagrangianFieldSource()
Destructor.
virtual tmp< LagrangianSubScalarField > internalCoeff(const LagrangianSource &, const LagrangianSubMesh &) const
Return the internal coefficient.
LagrangianFieldSource(const regIOobject &)
Construct from internal field.
const LagrangianInternalDynamicField< Type > & internalField() const
Return internal field reference.
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
const word & name() const
The source name.
Base class for Lagrangian sources. Minimal wrapper over LagrangianModel that provides an interface to...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
word sub(const word &fieldName) const
Return the name of a field corresponding to this sub-mesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & write(const token &)
Write token.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const word dictName() const
Return the local dictionary name (final part of scoped name)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Dimension set for the base types.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dlLibraryTable libs
Table of loaded dynamic libraries.
To & refCastNull(From &r)
Reference type cast template function,.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.