NuTo
Numerics Tool
Public Member Functions | List of all members
NaturalCoordinateMemoizer< TResult, TNaturalCoords, TIdHash > Class Template Reference

provides a memoization of the a std::function<TResult(TNaturalCoords)>, mainly used for element shape functions and their derivatives More...

Public Member Functions

 NaturalCoordinateMemoizer (std::function< TResult(TNaturalCoords)> function)
 ctor More...
 
const TResult & Get (const TNaturalCoords &v) const
 returns the value of the function for the given arguments. More...
 
void ClearCache () const
 

Detailed Description

template<typename TResult, typename TNaturalCoords, typename TIdHash = NaturalCoordianteToId<32>>
class NaturalCoordinateMemoizer< TResult, TNaturalCoords, TIdHash >

provides a memoization of the a std::function<TResult(TNaturalCoords)>, mainly used for element shape functions and their derivatives

Template Parameters
TResult... return type of the function
TNaturalCoords... vector type of natural coordinates
TIdHash... function object that transforms TNaturalCoords into a vector id

Constructor & Destructor Documentation

template<typename TResult , typename TNaturalCoords , typename TIdHash = NaturalCoordianteToId<32>>
NaturalCoordinateMemoizer< TResult, TNaturalCoords, TIdHash >::NaturalCoordinateMemoizer ( std::function< TResult(TNaturalCoords)>  function)
inline

ctor

Parameters
function... function for memoization

Member Function Documentation

template<typename TResult , typename TNaturalCoords , typename TIdHash = NaturalCoordianteToId<32>>
void NaturalCoordinateMemoizer< TResult, TNaturalCoords, TIdHash >::ClearCache ( ) const
inline
template<typename TResult , typename TNaturalCoords , typename TIdHash = NaturalCoordianteToId<32>>
const TResult& NaturalCoordinateMemoizer< TResult, TNaturalCoords, TIdHash >::Get ( const TNaturalCoords &  v) const
inline

returns the value of the function for the given arguments.

Repeated calls of Get() with the same arguments will return the memoized Eigen::MatrixXd.

Parameters
v... argument
Returns
reference to the 'memoized' Eigen::MatrixXd

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