73 const word& fieldSourceType,
77 typename nullConstructorTable::iterator cstrIter =
78 nullConstructorTablePtr_->find(fieldSourceType);
80 if (cstrIter == nullConstructorTablePtr_->end())
83 <<
"Unknown null-constructable fieldSource type " << fieldSourceType
84 <<
nl <<
nl <<
"Valid fieldSource types are :" <<
endl
85 << nullConstructorTablePtr_->sortedToc()
89 return cstrIter()(iF);
103 libs.
open(
dict,
"libs", dictionaryConstructorTablePtr_);
105 typename dictionaryConstructorTable::iterator cstrIter =
106 dictionaryConstructorTablePtr_->find(fieldSourceType);
108 if (cstrIter == dictionaryConstructorTablePtr_->end())
110 if (!disallowGenericFvFieldSource)
112 cstrIter = dictionaryConstructorTablePtr_->find(
"generic");
115 if (cstrIter == dictionaryConstructorTablePtr_->end())
118 <<
"Unknown fieldSource type " << fieldSourceType
120 <<
"Valid fieldSource types are :" <<
endl
121 << dictionaryConstructorTablePtr_->sortedToc()
126 return cstrIter()(iF,
dict);
142 return internalField_.mesh();
150 return internalField_;
160 return (1 - internalCoeff(source))*sourceValue(source);
175 return sourceCoeff(source) + internalCoeff(source)*setInternalField;
180 template<
class OtherType>
188 db().template lookupObject<VolField<OtherType>>(
name);
195 template<
class OtherType>
202 return fieldSource<OtherType>(
name, source).value(source);
225 os.
check(
"Ostream& operator<<(Ostream&, const fvFieldSource<Type>&");
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pre-declare SubField and related Field type.
Generic GeometricField class.
const Sources & sources() const
Return const-reference to the sources.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A List with indirect addressing.
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 keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
Base class for finite-volume field sources.
virtual void write(Ostream &) const
Write.
tmp< Field< Type > > value(const fvSource &) const
Return the value.
fvFieldSource(const DimensionedField< Type, volMesh > &)
Construct from internal field.
const objectRegistry & db() const
Return the local object registry.
const fvFieldSource< OtherType > & fieldSource(const word &name, const fvSource &) const
Lookup and return another field source.
static autoPtr< fvFieldSource< Type > > New(const word &fieldSourceType, const DimensionedField< Type, volMesh > &)
Return a pointer to a new field source.
virtual ~fvFieldSource()
Destructor.
tmp< Field< Type > > sourceCoeff(const fvSource &) const
Return the source coefficient.
const DimensionedField< Type, volMesh > & internalField() const
Return the internal field reference.
const word & name() const
Return const access to the source name.
Base class for finite volume sources.
virtual labelUList cells() const =0
Return the cells that the source applies to.
Registry of regIOobjects.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.