added construct by components

This commit is contained in:
andy
2009-03-26 11:34:13 +00:00
parent f02101b644
commit f8c6cfe0b5
2 changed files with 25 additions and 3 deletions

View File

@ -67,11 +67,25 @@ Foam::interpolationTable<Type>::interpolationTable()
template<class Type> template<class Type>
Foam::interpolationTable<Type>::interpolationTable(const fileName& fn) Foam::interpolationTable<Type>::interpolationTable
(
const List<Tuple2<scalar, Type> >& values,
const boundsHandling bounds,
const fileName& fName
)
:
List<Tuple2<scalar, Type> >(values),
boundsHandling_(bounds),
fileName_(fName)
{}
template<class Type>
Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
: :
List<Tuple2<scalar, Type> >(), List<Tuple2<scalar, Type> >(),
boundsHandling_(interpolationTable::WARN), boundsHandling_(interpolationTable::WARN),
fileName_(fn) fileName_(fName)
{ {
readTable(); readTable();
} }

View File

@ -102,8 +102,16 @@ public:
//- Construct null //- Construct null
interpolationTable(); interpolationTable();
//- Construct from components
interpolationTable
(
const List<Tuple2<scalar, Type> >& values,
const boundsHandling bounds,
const fileName& fName
);
//- Construct given the name of the file containing the table of data //- Construct given the name of the file containing the table of data
interpolationTable(const fileName& fn); interpolationTable(const fileName& fName);
//- Construct by reading the fileName and boundsHandling from dictionary //- Construct by reading the fileName and boundsHandling from dictionary
// and read the table from that file. // and read the table from that file.