35 #ifndef fvFieldSource_H
36 #define fvFieldSource_H
149 const word& fieldSourceType,
186 template<
class OtherType>
194 template<
class OtherType>
221 #define makeFvFieldSource(fvTypeFieldSource) \
222 defineNamedTemplateTypeNameAndDebug(fvTypeFieldSource, 0); \
224 int fvTypeFieldSource::disallowGenericFvFieldSource \
226 debug::debugSwitch("disallowGenericFvFieldSource", 0) \
228 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, null); \
229 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, dictionary)
232 #define addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource) \
233 addToRunTimeSelectionTable \
236 typeTypeFieldSource, \
241 #define addNullConstructableToFieldSourceRunTimeSelection( \
242 TypeFieldSource, typeTypeFieldSource) \
243 addToRunTimeSelectionTable \
246 typeTypeFieldSource, \
249 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
252 #define makeTypeFieldSource(TypeFieldSource, typeTypeFieldSource) \
253 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
254 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
257 #define makeNullConstructableTypeFieldSource( \
258 TypeFieldSource, typeTypeFieldSource) \
259 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
260 addNullConstructableToFieldSourceRunTimeSelection \
263 typeTypeFieldSource \
267 #define makeTemplateTypeFieldSource(fieldType, type) \
268 defineNamedTemplateTypeNameAndDebug \
270 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
273 addToFieldSourceRunTimeSelection \
275 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
276 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
280 #define makeNullConstructableTemplateTypeFieldSource(fieldType, type) \
281 defineNamedTemplateTypeNameAndDebug \
283 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
286 addNullConstructableToFieldSourceRunTimeSelection \
288 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
289 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
293 #define makeFieldSources(type) \
294 FOR_ALL_FIELD_TYPES(makeTemplateTypeFieldSource, type)
297 #define makeNullConstructableFieldSources(type) \
298 FOR_ALL_FIELD_TYPES(makeNullConstructableTemplateTypeFieldSource, type)
301 #define makeFieldSourceTypeName(fieldType, type) \
302 defineNamedTemplateTypeNameAndDebug \
304 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
309 #define makeFieldSourceTypeNames(type) \
310 FOR_ALL_FIELD_TYPES(makeFieldSourceTypeName, type)
313 #define makeTypeFieldSourceTypedef(fieldType, type) \
314 typedef type##FvFieldSource<fieldType> \
315 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource);
318 #define makeTypeFieldSourceTypedefs(type) \
319 FOR_ALL_FIELD_TYPES(makeTypeFieldSourceTypedef, type)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Base class for finite-volume field sources.
autoPtr< fvFieldSource< Type > > clone() const
Disallow clone without setting internal field reference.
virtual void write(Ostream &) const
Write.
tmp< Field< Type > > value(const fvSource &) const
Return the value.
TypeName("fvFieldSource")
Runtime type information.
fvFieldSource(const DimensionedField< Type, volMesh > &)
Construct from internal field.
declareRunTimeSelectionTable(autoPtr, fvFieldSource, null,(const DimensionedField< Type, volMesh > &iF),(iF))
Select given internal field.
const objectRegistry & db() const
Return the local object registry.
static int disallowGenericFvFieldSource
Debug switch to disallow the use of genericFvFieldSource.
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 tmp< scalarField > internalCoeff(const fvSource &) const =0
Return the internal coefficient.
virtual ~fvFieldSource()
Destructor.
tmp< Field< Type > > sourceCoeff(const fvSource &) const
Return the source coefficient.
virtual tmp< Field< Type > > sourceValue(const fvSource &) const =0
Return the source value.
const DimensionedField< Type, volMesh > & internalField() const
Return the internal field reference.
Base class for finite volume sources.
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
word name(const bool)
Return a word representation of a bool.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)