BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
usermat::Table Class Reference

A two-column ( x, y ) text table with linear interpolation. More...

#include <user_table.hpp>

Public Member Functions

 Table (const std::string &File)
belfem::real operator() (const belfem::real x)

Detailed Description

A two-column ( x, y ) text table with linear interpolation.

The file is read on the first call and kept for the life of the process. Arguments outside the sampled range are clamped to the end values, which is what the original per-file loaders did.

Declare one as a function-local static:

real cu_cp( const Material* mat, real T )
{
    static usermat::Table tTable( "cp_Cu.txt" ) ;
    return tTable( T ) ;
}

Constructor & Destructor Documentation

◆ Table()

usermat::Table::Table ( const std::string & File)
inlineexplicit

Member Function Documentation

◆ operator()()

belfem::real usermat::Table::operator() ( const belfem::real x)
inline

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