A list of lists. Interpolates based on the first dimension. The values must be positive and monotonically increasing in each dimension. More...
Public Member Functions | |
interpolationLookUpTable () | |
Construct null. More... | |
interpolationLookUpTable (const fileName &, const word &instance, const objectRegistry &) | |
Construct given the name of the file containing the table of data. More... | |
interpolationLookUpTable (const dictionary &) | |
Construct from dictionary. More... | |
interpolationLookUpTable (const interpolationLookUpTable &) | |
Construct copy. More... | |
bool | found (const word &fieldName) const |
Return true if the field exists in the table. More... | |
const List< scalar > & | lookUp (const scalar) |
Return the output list given a single input scalar. More... | |
void | write (Ostream &, const fileName &, const word &instance, const objectRegistry &) const |
Write lookup table to filename. More... | |
label | findFieldIndex (const word &fieldName) const |
Return the index of a field by name. More... | |
const List< dictionary > & | output () const |
Return const access to the output dictionaries. More... | |
const List< dictionary > & | entries () const |
Return const access tp the dictionary entries. More... | |
const List< scalar > & | min () const |
Return const access to the list of min dimensions. More... | |
const List< label > & | dim () const |
Return const access to the list of dimensions. More... | |
const List< scalar > & | delta () const |
Return const access to the deltas in each dimension. More... | |
const List< scalar > & | max () const |
Return const access to the list of max dimensions. More... | |
word | tableName () const |
Return const access to the table name. More... | |
const scalarField & | operator[] (const label) const |
Return an element of constant List<scalar, Type> More... | |
scalarField & | operator[] (const label) |
Return an element of List<scalar, Type> More... | |
![]() | |
label | size () const |
Return the number of elements in the UList. More... | |
List () | |
Null constructor. More... | |
List (const label) | |
Construct with given size. More... | |
List (const label, const T &) | |
Construct with given size and value for all elements. More... | |
List (const List< T > &) | |
Copy constructor. More... | |
List (const Xfer< List< T > > &) | |
Construct by transferring the parameter contents. More... | |
List (List< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
List (const UList< T > &, const labelUList &mapAddressing) | |
Construct as subset. More... | |
List (InputIterator first, InputIterator last) | |
Construct given start and end iterators. More... | |
List (const FixedList< T, Size > &) | |
Construct as copy of FixedList<T, Size> More... | |
List (const PtrList< T > &) | |
Construct as copy of PtrList<T> More... | |
List (const SLList< T > &) | |
Construct as copy of SLList<T> More... | |
List (const UIndirectList< T > &) | |
Construct as copy of UIndirectList<T> More... | |
List (const BiIndirectList< T > &) | |
Construct as copy of BiIndirectList<T> More... | |
List (Istream &) | |
Construct from Istream. More... | |
List (const label s) | |
List (const label s, const T &a) | |
List (const List< T > &a) | |
List (const Xfer< List< T > > &lst) | |
List (List< T > &a, bool reUse) | |
List (const UList< T > &a, const labelUList &map) | |
List (const PtrList< T > &lst) | |
List (const SLList< T > &lst) | |
List (const UIndirectList< T > &lst) | |
List (const BiIndirectList< T > &lst) | |
List () | |
List (Istream &is) | |
autoPtr< List< T > > | clone () const |
Clone. More... | |
~List () | |
Destructor. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | resize (const label, const T &) |
Alias for setSize(const label, const T&) More... | |
void | setSize (const label) |
Reset size of List. More... | |
void | setSize (const label, const T &) |
Reset size of List and value for new elements. More... | |
void | clear () |
Clear the list, i.e. set size to zero. More... | |
void | append (const T &) |
Append an element at the end of the list. More... | |
void | append (const UList< T > &) |
Append a List at the end of this list. More... | |
void | append (const UIndirectList< T > &) |
Append a UIndirectList at the end of this list. More... | |
void | transfer (List< T > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (SortableList< T > &) |
Transfer the contents of the argument List into this list. More... | |
void | transfer (List< T > &a) |
void | transfer (SortableList< T > &a) |
Xfer< List< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
T & | newElmt (const label) |
Return subscript-checked element of UList. More... | |
void | operator= (const UList< T > &) |
Assignment from UList operator. Takes linear time. More... | |
void | operator= (const List< T > &) |
Assignment operator. Takes linear time. More... | |
void | operator= (const SLList< T > &) |
Assignment from SLList operator. Takes linear time. More... | |
void | operator= (const UIndirectList< T > &) |
Assignment from UIndirectList operator. Takes linear time. More... | |
void | operator= (const BiIndirectList< T > &) |
Assignment from BiIndirectList operator. Takes linear time. More... | |
void | operator= (const T &) |
Assignment of all entries to the given value. More... | |
Private Member Functions | |
void | readTable (const word &instance, const objectRegistry &) |
Read the table of data from file. More... | |
void | dimensionTable () |
Dimension table from dictionaries input and output. More... | |
label | index (const List< scalar > &, const bool lastDim=true) const |
Find table index by scalarList. More... | |
label | index (const scalar) const |
Find table index by scalar. More... | |
bool | checkRange (const scalar, const label) const |
Check range of lookup value. More... | |
scalar | interpolate (const label lo, const label hi, const scalar lookUpValue, const label ofield, const label interfield) const |
Interpolate function returning a scalar. More... | |
void | check () const |
void | findHi (const label lo, const scalar retvals) |
Private Attributes | |
fileName | fileName_ |
File name. More... | |
List< label > | dim_ |
Table dimensions. More... | |
List< scalar > | min_ |
Min on each dimension. More... | |
List< scalar > | delta_ |
Deltas on each dimension. More... | |
List< scalar > | max_ |
Maximum on each dimension. More... | |
List< dictionary > | entries_ |
Dictionary entries. More... | |
List< dictionary > | output_ |
Output dictionaries. More... | |
List< label > | entryIndices_ |
Input indices from the lookup table. More... | |
List< label > | outputIndices_ |
Output indices from the lookup Table. More... | |
HashTable< label > | fieldIndices_ |
Field names and indices. More... | |
List< scalar > | interpOutput_ |
Output list containing input and interpolation values of outputs. More... | |
Additional Inherited Members | |
![]() | |
typedef SubList< T > | subList |
Declare type of subList. More... | |
![]() | |
static const List< T > & | null () |
Return a null List. More... | |
![]() | |
void | size (const label) |
Override size to be inconsistent with allocated storage. More... | |
A list of lists. Interpolates based on the first dimension. The values must be positive and monotonically increasing in each dimension.
Definition at line 61 of file interpolationLookUpTable.H.
Construct null.
Definition at line 229 of file interpolationLookUpTable.C.
interpolationLookUpTable | ( | const fileName & | fn, |
const word & | instance, | ||
const objectRegistry & | obr | ||
) |
Construct given the name of the file containing the table of data.
Definition at line 238 of file interpolationLookUpTable.C.
interpolationLookUpTable | ( | const dictionary & | dict | ) |
Construct from dictionary.
Definition at line 282 of file interpolationLookUpTable.C.
interpolationLookUpTable | ( | const interpolationLookUpTable< Type > & | interpTable | ) |
Construct copy.
Definition at line 262 of file interpolationLookUpTable.C.
|
private |
Read the table of data from file.
Definition at line 193 of file interpolationLookUpTable.C.
|
private |
Dimension table from dictionaries input and output.
Definition at line 148 of file interpolationLookUpTable.C.
|
private |
Find table index by scalarList.
Definition at line 31 of file interpolationLookUpTable.C.
|
private |
Find table index by scalar.
Definition at line 75 of file interpolationLookUpTable.C.
|
private |
Check range of lookup value.
Definition at line 97 of file interpolationLookUpTable.C.
|
private |
Interpolate function returning a scalar.
Definition at line 108 of file interpolationLookUpTable.C.
|
private |
Definition at line 306 of file interpolationLookUpTable.C.
|
private |
Definition at line 447 of file interpolationLookUpTable.C.
bool found | ( | const word & | fieldName | ) | const |
Return true if the field exists in the table.
Definition at line 429 of file interpolationLookUpTable.C.
const Foam::scalarList & lookUp | ( | const scalar | retvals | ) |
Return the output list given a single input scalar.
Definition at line 437 of file interpolationLookUpTable.C.
void write | ( | Ostream & | os, |
const fileName & | fn, | ||
const word & | instance, | ||
const objectRegistry & | obr | ||
) | const |
Write lookup table to filename.
Definition at line 336 of file interpolationLookUpTable.C.
|
inline |
Return the index of a field by name.
Definition at line 29 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the output dictionaries.
Definition at line 39 of file interpolationLookUpTableI.H.
|
inline |
Return const access tp the dictionary entries.
Definition at line 47 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the list of min dimensions.
Definition at line 55 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the list of dimensions.
Definition at line 63 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the deltas in each dimension.
Definition at line 71 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the list of max dimensions.
Definition at line 79 of file interpolationLookUpTableI.H.
|
inline |
Return const access to the table name.
Definition at line 86 of file interpolationLookUpTableI.H.
const Foam::scalarField & operator[] | ( | const label | i | ) | const |
Return an element of constant List<scalar, Type>
Definition at line 403 of file interpolationLookUpTable.C.
Foam::scalarField & operator[] | ( | const label | i | ) |
Return an element of List<scalar, Type>
Definition at line 377 of file interpolationLookUpTable.C.
|
private |
File name.
Definition at line 70 of file interpolationLookUpTable.H.
Table dimensions.
Definition at line 73 of file interpolationLookUpTable.H.
|
private |
Min on each dimension.
Definition at line 76 of file interpolationLookUpTable.H.
|
private |
Deltas on each dimension.
Definition at line 79 of file interpolationLookUpTable.H.
|
private |
Maximum on each dimension.
Definition at line 82 of file interpolationLookUpTable.H.
|
private |
Dictionary entries.
Definition at line 85 of file interpolationLookUpTable.H.
|
private |
Output dictionaries.
Definition at line 88 of file interpolationLookUpTable.H.
Input indices from the lookup table.
Definition at line 91 of file interpolationLookUpTable.H.
Output indices from the lookup Table.
Definition at line 94 of file interpolationLookUpTable.H.
Field names and indices.
Definition at line 97 of file interpolationLookUpTable.H.
|
private |
Output list containing input and interpolation values of outputs.
Definition at line 100 of file interpolationLookUpTable.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.