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)(double p[], void *my_data), int minvars, void *mdata=0)
 Create the function wrapper. More...
virtual void Eval (ChMatrix<> &A, const ChMatrix<> &B)
 INTERFACE: Evaluate A=f(B) More...

Constructor & Destructor Documentation

chrono::ChFxCfunctionS::ChFxCfunctionS ( double(*)(double p[], void *my_data)  mfunc,
int  minvars,
void *  mdata = 0 

Create the function wrapper.

mfuncthe pointer to the C function
minvarsthe number of input vars (the size of double p[])
mdatageneric user data, if needed as my_data for C function.

Member Function Documentation

virtual void chrono::ChFxCfunctionS::Eval ( ChMatrix<> &  A,
const ChMatrix<> &  B 

INTERFACE: Evaluate A=f(B)

Aresult here
Binput here

Implements chrono::ChFx.