fvFieldSource< Type > Class Template Referenceabstract

Base class for finite-volume field sources. More...

Inheritance diagram for fvFieldSource< Type >:

Public Member Functions

 TypeName ("fvFieldSource")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, fvFieldSource, null,(const DimensionedField< Type, volMesh > &iF),(iF))
 Select given internal field. More...
 
 declareRunTimeSelectionTable (autoPtr, fvFieldSource, dictionary,(const DimensionedField< Type, volMesh > &iF, const dictionary &dict),(iF, dict))
 Select given internal field and dictionary. More...
 
 fvFieldSource (const DimensionedField< Type, volMesh > &)
 Construct from internal field. More...
 
 fvFieldSource (const DimensionedField< Type, volMesh > &, const dictionary &)
 Construct from internal field and dictionary. More...
 
 fvFieldSource (const fvFieldSource< Type > &)=delete
 Disallow copy without setting internal field reference. More...
 
autoPtr< fvFieldSource< Type > > clone () const
 Disallow clone without setting internal field reference. More...
 
 fvFieldSource (const fvFieldSource< Type > &, const DimensionedField< Type, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual autoPtr< fvFieldSource< Type > > clone (const DimensionedField< Type, volMesh > &) const =0
 Construct and return a clone setting internal field reference. More...
 
virtual ~fvFieldSource ()
 Destructor. More...
 
const objectRegistrydb () const
 Return the local object registry. More...
 
const DimensionedField< Type, volMesh > & internalField () const
 Return the internal field reference. More...
 
virtual tmp< Field< Type > > sourceValue (const fvSource &) const =0
 Return the source value. More...
 
virtual tmp< scalarFieldinternalCoeff (const fvSource &) const =0
 Return the internal coefficient. More...
 
tmp< Field< Type > > sourceCoeff (const fvSource &) const
 Return the source coefficient. More...
 
tmp< Field< Type > > value (const fvSource &) const
 Return the value. More...
 
template<class OtherType >
const fvFieldSource< OtherType > & fieldSource (const word &name, const fvSource &) const
 Lookup and return another field source. More...
 
template<class OtherType >
tmp< Field< OtherType > > value (const word &name, const fvSource &) const
 Lookup and return the value of another field source. More...
 
virtual void write (Ostream &) const
 Write. More...
 
template<class OtherType >
const Foam::fvFieldSource< OtherType > & fieldSource (const word &name, const fvSource &source) const
 
template<class OtherType >
Foam::tmp< Foam::Field< OtherType > > value (const word &name, const fvSource &source) const
 

Static Public Member Functions

static autoPtr< fvFieldSource< Type > > New (const word &fieldSourceType, const DimensionedField< Type, volMesh > &)
 Return a pointer to a new field source. More...
 
static autoPtr< fvFieldSource< Type > > New (const DimensionedField< Type, volMesh > &, const dictionary &)
 Return a pointer to a new field source created from a dictionary. More...
 

Static Public Attributes

static int disallowGenericFvFieldSource
 Debug switch to disallow the use of genericFvFieldSource. More...
 

Friends

Ostreamoperator (Ostream &, const fvFieldSource< Type > &)
 Ostream operator. More...
 

Detailed Description

template<class Type>
class Foam::fvFieldSource< Type >

Base class for finite-volume field sources.

Source files

Definition at line 61 of file fvFieldSource.H.

Constructor & Destructor Documentation

◆ fvFieldSource() [1/4]

fvFieldSource ( const DimensionedField< Type, volMesh > &  iF)

Construct from internal field.

Definition at line 33 of file fvFieldSource.C.

◆ fvFieldSource() [2/4]

fvFieldSource ( const DimensionedField< Type, volMesh > &  iF,
const dictionary dict 
)

Construct from internal field and dictionary.

Definition at line 44 of file fvFieldSource.C.

◆ fvFieldSource() [3/4]

fvFieldSource ( const fvFieldSource< Type > &  )
delete

Disallow copy without setting internal field reference.

◆ fvFieldSource() [4/4]

fvFieldSource ( const fvFieldSource< Type > &  field,
const DimensionedField< Type, volMesh > &  iF 
)

Copy constructor setting internal field reference.

Definition at line 56 of file fvFieldSource.C.

◆ ~fvFieldSource()

~fvFieldSource
virtual

Destructor.

Definition at line 133 of file fvFieldSource.C.

Member Function Documentation

◆ TypeName()

TypeName ( "fvFieldSource< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

declareRunTimeSelectionTable ( autoPtr  ,
fvFieldSource< Type >  ,
null  ,
(const DimensionedField< Type, volMesh > &iF)  ,
(iF)   
)

Select given internal field.

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr  ,
fvFieldSource< Type >  ,
dictionary  ,
(const DimensionedField< Type, volMesh > &iF, const dictionary &dict ,
(iF, dict  
)

Select given internal field and dictionary.

◆ clone() [1/2]

autoPtr<fvFieldSource<Type> > clone ( ) const
inline

Disallow clone without setting internal field reference.

Definition at line 123 of file fvFieldSource.H.

References NotImplemented.

◆ clone() [2/2]

virtual autoPtr<fvFieldSource<Type> > clone ( const DimensionedField< Type, volMesh > &  ) const
pure virtual

Construct and return a clone setting internal field reference.

Implemented in genericFvFieldSource< Type >, uniformInletOutletFvFieldSource< Type >, uniformFixedValueFvFieldSource< Type >, and internalFvFieldSource< Type >.

◆ New() [1/2]

Foam::autoPtr< Foam::fvFieldSource< Type > > New ( const word fieldSourceType,
const DimensionedField< Type, volMesh > &  iF 
)
static

Return a pointer to a new field source.

Definition at line 71 of file fvFieldSource.C.

References Foam::endl(), Foam::exit(), FatalErrorInFunction, Foam::FatalIOError, and Foam::nl.

Here is the call graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::fvFieldSource< Type > > New ( const DimensionedField< Type, volMesh > &  iF,
const dictionary dict 
)
static

Return a pointer to a new field source created from a dictionary.

Definition at line 95 of file fvFieldSource.C.

References dict, dictionaryName::dictName(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::libs, dictionary::lookup(), Foam::nl, and dlLibraryTable::open().

Here is the call graph for this function:

◆ db()

Return the local object registry.

Definition at line 140 of file fvFieldSource.C.

◆ internalField()

const Foam::DimensionedField< Type, Foam::volMesh > & internalField

Return the internal field reference.

Definition at line 148 of file fvFieldSource.C.

◆ sourceValue()

virtual tmp<Field<Type> > sourceValue ( const fvSource ) const
pure virtual

◆ internalCoeff()

virtual tmp<scalarField> internalCoeff ( const fvSource ) const
pure virtual

◆ sourceCoeff()

Foam::tmp< Foam::Field< Type > > sourceCoeff ( const fvSource source) const

Return the source coefficient.

Definition at line 155 of file fvFieldSource.C.

◆ value() [1/3]

Foam::tmp< Foam::Field< Type > > value ( const fvSource source) const

Return the value.

Definition at line 165 of file fvFieldSource.C.

References fvSource::cells().

Here is the call graph for this function:

◆ fieldSource() [1/2]

const fvFieldSource<OtherType>& fieldSource ( const word name,
const fvSource  
) const

Lookup and return another field source.

◆ value() [2/3]

tmp<Field<OtherType> > value ( const word name,
const fvSource  
) const

Lookup and return the value of another field source.

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in genericFvFieldSource< Type >, uniformInletOutletFvFieldSource< Type >, and uniformFixedValueFvFieldSource< Type >.

Definition at line 207 of file fvFieldSource.C.

References Foam::type(), and Foam::writeEntry().

Referenced by uniformFixedValueFvFieldSource< Type >::write(), and uniformInletOutletFvFieldSource< Type >::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fieldSource() [2/2]

const Foam::fvFieldSource<OtherType>& fieldSource ( const word name,
const fvSource source 
) const

Definition at line 181 of file fvFieldSource.C.

References fvModel::name(), Foam::name(), and GeometricField< Type, PatchField, GeoMesh >::sources().

Here is the call graph for this function:

◆ value() [3/3]

Foam::tmp<Foam::Field<OtherType> > value ( const word name,
const fvSource source 
) const

Definition at line 196 of file fvFieldSource.C.

References Foam::name().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const fvFieldSource< Type > &   
)
friend

Ostream operator.

Member Data Documentation

◆ disallowGenericFvFieldSource

int disallowGenericFvFieldSource
static

Debug switch to disallow the use of genericFvFieldSource.

Definition at line 78 of file fvFieldSource.H.


The documentation for this class was generated from the following files: