35 #ifndef fvFieldSource_H
36 #define fvFieldSource_H
149 const word& fieldSourceType,
237 template<
class OtherType>
245 template<
class OtherType>
254 template<
class OtherType>
283 #define makeFvFieldSource(fvTypeFieldSource) \
284 defineNamedTemplateTypeNameAndDebug(fvTypeFieldSource, 0); \
286 int fvTypeFieldSource::disallowGenericFvFieldSource \
288 debug::debugSwitch("disallowGenericFvFieldSource", 0) \
290 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, null); \
291 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, dictionary)
294 #define addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource) \
295 addToRunTimeSelectionTable \
298 typeTypeFieldSource, \
303 #define addNullConstructableToFieldSourceRunTimeSelection( \
304 TypeFieldSource, typeTypeFieldSource) \
305 addToRunTimeSelectionTable \
308 typeTypeFieldSource, \
311 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
314 #define makeTypeFieldSource(TypeFieldSource, typeTypeFieldSource) \
315 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
316 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
319 #define makeNullConstructableTypeFieldSource( \
320 TypeFieldSource, typeTypeFieldSource) \
321 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
322 addNullConstructableToFieldSourceRunTimeSelection \
325 typeTypeFieldSource \
329 #define makeTemplateTypeFieldSource(fieldType, type) \
330 defineNamedTemplateTypeNameAndDebug \
332 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
335 addToFieldSourceRunTimeSelection \
337 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
338 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
342 #define makeNullConstructableTemplateTypeFieldSource(fieldType, type) \
343 defineNamedTemplateTypeNameAndDebug \
345 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
348 addNullConstructableToFieldSourceRunTimeSelection \
350 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
351 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
355 #define makeFieldSources(type) \
356 FOR_ALL_FIELD_TYPES(makeTemplateTypeFieldSource, type)
359 #define makeNullConstructableFieldSources(type) \
360 FOR_ALL_FIELD_TYPES(makeNullConstructableTemplateTypeFieldSource, type)
363 #define makeFieldSourceTypeName(fieldType, type) \
364 defineNamedTemplateTypeNameAndDebug \
366 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
371 #define makeFieldSourceTypeNames(type) \
372 FOR_ALL_FIELD_TYPES(makeFieldSourceTypeName, type)
375 #define makeTypeFieldSourceTypedef(fieldType, type) \
376 typedef type##FvFieldSource<fieldType> \
377 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource);
380 #define makeTypeFieldSourceTypedefs(type) \
381 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,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for finite-volume field sources.
autoPtr< fvFieldSource< Type > > clone() const
Disallow clone without setting internal field reference.
const DimensionedField< Type, fvMesh > & internalField() const
Return the internal field reference.
virtual tmp< DimensionedField< Type, fvMesh > > sourceCoeff(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
Return the source coefficient.
static autoPtr< fvFieldSource< Type > > New(const word &fieldSourceType, const DimensionedField< Type, fvMesh > &)
Return a pointer to a new field source.
const Time & time() const
Return time.
virtual void write(Ostream &) const
Write.
TypeName("fvFieldSource")
Runtime type information.
fvFieldSource(const DimensionedField< Type, fvMesh > &)
Construct from internal field.
virtual tmp< DimensionedField< Type, fvMesh > > sourceValue(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const =0
Return the source value.
const objectRegistry & db() const
Return the local object registry.
static int disallowGenericFvFieldSource
Debug switch to disallow the use of genericFvFieldSource.
declareRunTimeSelectionTable(autoPtr, fvFieldSource, null,(const DimensionedField< Type, fvMesh > &iF),(iF))
Select given internal field.
const fvFieldSource< OtherType > & fieldSource(const word &name, const fvSource &model) const
Lookup and return another field source.
tmp< DimensionedField< Type, fvMesh > > value(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
Return the value.
virtual ~fvFieldSource()
Destructor.
virtual tmp< DimensionedField< scalar, fvMesh > > internalCoeff(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const =0
Return the internal coefficient.
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 LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)