35 #ifndef fvFieldSource_H
36 #define fvFieldSource_H
149 const word& fieldSourceType,
234 template<
class OtherType>
242 template<
class OtherType>
251 template<
class OtherType>
280 #define makeFvFieldSource(fvTypeFieldSource) \
281 defineNamedTemplateTypeNameAndDebug(fvTypeFieldSource, 0); \
283 int fvTypeFieldSource::disallowGenericFvFieldSource \
285 debug::debugSwitch("disallowGenericFvFieldSource", 0) \
287 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, null); \
288 defineTemplateRunTimeSelectionTable(fvTypeFieldSource, dictionary)
291 #define addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource) \
292 addToRunTimeSelectionTable \
295 typeTypeFieldSource, \
300 #define addNullConstructableToFieldSourceRunTimeSelection( \
301 TypeFieldSource, typeTypeFieldSource) \
302 addToRunTimeSelectionTable \
305 typeTypeFieldSource, \
308 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
311 #define makeTypeFieldSource(TypeFieldSource, typeTypeFieldSource) \
312 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
313 addToFieldSourceRunTimeSelection(TypeFieldSource, typeTypeFieldSource)
316 #define makeNullConstructableTypeFieldSource( \
317 TypeFieldSource, typeTypeFieldSource) \
318 defineTypeNameAndDebug(typeTypeFieldSource, 0); \
319 addNullConstructableToFieldSourceRunTimeSelection \
322 typeTypeFieldSource \
326 #define makeTemplateTypeFieldSource(fieldType, type) \
327 defineNamedTemplateTypeNameAndDebug \
329 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
332 addToFieldSourceRunTimeSelection \
334 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
335 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
339 #define makeNullConstructableTemplateTypeFieldSource(fieldType, type) \
340 defineNamedTemplateTypeNameAndDebug \
342 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
345 addNullConstructableToFieldSourceRunTimeSelection \
347 CAT3(fv, CAPITALIZE(fieldType), FieldSource), \
348 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource) \
352 #define makeFieldSources(type) \
353 FOR_ALL_FIELD_TYPES(makeTemplateTypeFieldSource, type)
356 #define makeNullConstructableFieldSources(type) \
357 FOR_ALL_FIELD_TYPES(makeNullConstructableTemplateTypeFieldSource, type)
360 #define makeFieldSourceTypeName(fieldType, type) \
361 defineNamedTemplateTypeNameAndDebug \
363 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource), \
368 #define makeFieldSourceTypeNames(type) \
369 FOR_ALL_FIELD_TYPES(makeFieldSourceTypeName, type)
372 #define makeTypeFieldSourceTypedef(fieldType, type) \
373 typedef type##FvFieldSource<fieldType> \
374 CAT4(type, Fv, CAPITALIZE(fieldType), FieldSource);
377 #define makeTypeFieldSourceTypedefs(type) \
378 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 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.
virtual tmp< DimensionedField< scalar, volMesh > > internalCoeff(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const =0
Return the internal coefficient.
virtual tmp< DimensionedField< Type, volMesh > > sourceValue(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const =0
Return the source value.
virtual void write(Ostream &) const
Write.
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 &model) 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< DimensionedField< Type, volMesh > > sourceCoeff(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
Return the source coefficient.
virtual ~fvFieldSource()
Destructor.
tmp< DimensionedField< Type, volMesh > > value(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
Return the 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 LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)