chrono::ChFxCfunctionS Class Reference


Class for A=f(B) math functions, where the function is defined by wrapping a C function of the 'old' type, i.e.

a pointer to simple C call that works over arrays of doubles and return one value: double (func)(double p[], void my_data); as often used in C/C++ math libraries.

#include <ChFx.h>

Inheritance diagram for chrono::ChFxCfunctionS:
Collaboration diagram for chrono::ChFxCfunctionS:

Public Member Functions

 ChFxCfunctionS (double(*mfunc)(const double *p, void *my_data), void *mdata=nullptr)
virtual void Eval (ChVectorDynamic<> &A, const ChVectorDynamic<> &B)
 Evaluate A=f(B).

Constructor & Destructor Documentation

chrono::ChFxCfunctionS::ChFxCfunctionS ( double(*)(const double *p, void *my_data)  mfunc,
void *  mdata = nullptr 
mfuncthe pointer to the C function
mdatauser data, passed to C function.