OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

interpolationLookUpTable< Type > Class Template Reference

A list of lists. Interpolates based on the first dimension. The values must be positive and monotonically increasing in each dimension. More...

Inheritance diagram for interpolationLookUpTable< Type >:
Collaboration diagram for interpolationLookUpTable< Type >:

List of all members.


Public Member Functions

 interpolationLookUpTable ()
 Construct null.
 interpolationLookUpTable (const fileName &fn, const word &instance, const fvMesh &mesh)
 Construct given the name of the file containing the table of data.
 interpolationLookUpTable (const dictionary &dict)
 Construct from dictionary.
 interpolationLookUpTable (const interpolationLookUpTable &interpTable)
 Construct copy.
bool found (const word &fieldName) const
 Return true if the filed exists in the table.
const List< scalar > & lookUp (const scalar)
 Return the output list given a single input scalar.
void write (Ostream &os, const fileName &fn, const word &instance, const fvMesh &mesh) const
 Write Look Up Table to filename.
label findFieldIndex (const word &fieldName) const
 Return the index of a field by name.
const List< dictionary > & output () const
 Return const access to the output dictionaries.
const List< dictionary > & entries () const
 Return const access tp the dictionary entries.
const List< scalar > & min () const
 Return const access to the list of min dimensions.
const List< label > & dim () const
 Return const access to the list of dimensions.
const List< scalar > & delta () const
 Return const access to the deltas in each dimension.
const List< scalar > & max () const
 Return const access to the list of max dimensions.
word tableName () const
 Return const access to the table name.
const scalarField & operator[] (const label) const
 Return an element of constant List<scalar, Type>.
scalarField & operator[] (const label)
 Return an element of List<scalar, Type>.

Detailed Description

template<class Type>
class Foam::interpolationLookUpTable< Type >

A list of lists. Interpolates based on the first dimension. The values must be positive and monotonically increasing in each dimension.

Note:
  • Accessing an empty list results in an error.
  • Accessing a list with a single element always returns the same value.
Source files

Definition at line 55 of file interpolationLookUpTable.H.


Constructor & Destructor Documentation

interpolationLookUpTable (  )  [inline]

Construct null.

Definition at line 231 of file interpolationLookUpTable.C.

interpolationLookUpTable ( const fileName &  fn,
const word &  instance,
const fvMesh &  mesh 
) [inline]

Construct given the name of the file containing the table of data.

Definition at line 240 of file interpolationLookUpTable.C.

interpolationLookUpTable ( const dictionary &  dict  )  [inline]

Construct from dictionary.

Definition at line 282 of file interpolationLookUpTable.C.

interpolationLookUpTable ( const interpolationLookUpTable< Type > &  interpTable  )  [inline]

Construct copy.

Definition at line 262 of file interpolationLookUpTable.C.


Member Function Documentation

bool found ( const word &  fieldName  )  const [inline]

Return true if the filed exists in the table.

Definition at line 451 of file interpolationLookUpTable.C.

const Foam::scalarList & lookUp ( const scalar  retvals  )  [inline]

Return the output list given a single input scalar.

Definition at line 459 of file interpolationLookUpTable.C.

References HashTable< T, Key, Hash >::found().

Here is the call graph for this function:

void write ( Ostream &  os,
const fileName &  fn,
const word &  instance,
const fvMesh &  mesh 
) const [inline]

Write Look Up Table to filename.

Definition at line 338 of file interpolationLookUpTable.C.

Foam::label findFieldIndex ( const word &  fieldName  )  const [inline]

Return the index of a field by name.

Definition at line 21 of file interpolationLookUpTableI.H.

const Foam::List< Foam::dictionary > & output (  )  const [inline]

Return const access to the output dictionaries.

Definition at line 31 of file interpolationLookUpTableI.H.

const Foam::List< Foam::dictionary > & entries (  )  const [inline]

Return const access tp the dictionary entries.

Definition at line 39 of file interpolationLookUpTableI.H.

const Foam::List< Foam::scalar > & min (  )  const [inline]

Return const access to the list of min dimensions.

Definition at line 47 of file interpolationLookUpTableI.H.

const Foam::List< Foam::label > & dim (  )  const [inline]

Return const access to the list of dimensions.

Definition at line 55 of file interpolationLookUpTableI.H.

const Foam::List< Foam::scalar > & delta (  )  const [inline]

Return const access to the deltas in each dimension.

Definition at line 63 of file interpolationLookUpTableI.H.

const Foam::List< Foam::scalar > & max (  )  const [inline]

Return const access to the list of max dimensions.

Definition at line 71 of file interpolationLookUpTableI.H.

Foam::word tableName (  )  const [inline]

Return const access to the table name.

Definition at line 78 of file interpolationLookUpTableI.H.

const Foam::scalarField & operator[] ( const label  i  )  const [inline]

Return an element of constant List<scalar, Type>.

Reimplemented from UList< scalarField >.

Definition at line 414 of file interpolationLookUpTable.C.

Foam::scalarField & operator[] ( const label  i  )  [inline]

Return an element of List<scalar, Type>.

Reimplemented from UList< scalarField >.

Definition at line 381 of file interpolationLookUpTable.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd