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< DimensionedField< Type, volMesh > > sourceValue (const fvSource &model, const DimensionedField< scalar, volMesh > &source) const =0
 Return the source value. More...
 
virtual tmp< Field< Type > > sourceValue (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the source value. More...
 
virtual tmp< DimensionedField< scalar, volMesh > > internalCoeff (const fvSource &model, const DimensionedField< scalar, volMesh > &source) const =0
 Return the internal coefficient. More...
 
virtual tmp< scalarFieldinternalCoeff (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the internal coefficient. More...
 
virtual tmp< DimensionedField< Type, volMesh > > sourceCoeff (const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
 Return the source coefficient. More...
 
virtual tmp< Field< Type > > sourceCoeff (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the source coefficient. More...
 
tmp< DimensionedField< Type, volMesh > > value (const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
 Return the value. More...
 
tmp< Field< Type > > value (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the value. More...
 
template<class OtherType >
const fvFieldSource< OtherType > & fieldSource (const word &name, const fvSource &model) const
 Lookup and return another field source. More...
 
template<class OtherType >
tmp< DimensionedField< OtherType, volMesh > > value (const word &name, const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
 Lookup and return the value of another field source. More...
 
template<class OtherType >
tmp< Field< OtherType > > value (const word &name, const fvSource &model, const scalarField &source, const labelUList &cells) 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 &model) const
 
template<class OtherType >
Foam::tmp< Foam::DimensionedField< OtherType, Foam::volMesh > > value (const word &name, const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
 
template<class OtherType >
Foam::tmp< Foam::Field< OtherType > > value (const word &name, const fvSource &model, const scalarField &source, const labelUList &cells) 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 64 of file fvFieldSource.C.

◆ ~fvFieldSource()

~fvFieldSource
virtual

Destructor.

Definition at line 141 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

◆ 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 79 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 103 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 148 of file fvFieldSource.C.

◆ internalField()

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

Return the internal field reference.

Definition at line 156 of file fvFieldSource.C.

◆ sourceValue() [1/2]

virtual tmp<DimensionedField<Type, volMesh> > sourceValue ( const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const
pure virtual

◆ sourceValue() [2/2]

Foam::tmp< Foam::Field< Type > > sourceValue ( const fvSource model,
const scalarField source,
const labelUList cells 
) const
virtual

◆ internalCoeff() [1/2]

virtual tmp<DimensionedField<scalar, volMesh> > internalCoeff ( const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const
pure virtual

◆ internalCoeff() [2/2]

Foam::tmp< Foam::scalarField > internalCoeff ( const fvSource model,
const scalarField source,
const labelUList cells 
) const
virtual

◆ sourceCoeff() [1/2]

Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > sourceCoeff ( const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const
virtual

Return the source coefficient.

Definition at line 202 of file fvFieldSource.C.

◆ sourceCoeff() [2/2]

Foam::tmp< Foam::Field< Type > > sourceCoeff ( const fvSource model,
const scalarField source,
const labelUList cells 
) const
virtual

Return the source coefficient.

Definition at line 215 of file fvFieldSource.C.

References cells.

◆ value() [1/6]

Foam::tmp< Foam::DimensionedField< Type, Foam::volMesh > > value ( const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const

Return the value.

Definition at line 230 of file fvFieldSource.C.

◆ value() [2/6]

Foam::tmp< Foam::Field< Type > > value ( const fvSource model,
const scalarField source,
const labelUList cells 
) const

Return the value.

Definition at line 243 of file fvFieldSource.C.

References cells.

◆ fieldSource() [1/2]

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

Lookup and return another field source.

◆ value() [3/6]

tmp<DimensionedField<OtherType, volMesh> > value ( const word name,
const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const

Lookup and return the value of another field source.

◆ value() [4/6]

tmp<Field<OtherType> > value ( const word name,
const fvSource model,
const scalarField source,
const labelUList cells 
) 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 300 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 model 
) const

Definition at line 258 of file fvFieldSource.C.

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

Here is the call graph for this function:

◆ value() [5/6]

Foam::tmp<Foam::DimensionedField<OtherType, Foam::volMesh> > value ( const word name,
const fvSource model,
const DimensionedField< scalar, volMesh > &  source 
) const

Definition at line 274 of file fvFieldSource.C.

References Foam::name().

Here is the call graph for this function:

◆ value() [6/6]

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

Definition at line 287 of file fvFieldSource.C.

References cells, and 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: