MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions
chrono::ChFxJavascript Class Reference

#include <CHfxJavascript.h>

Inheritance diagram for chrono::ChFxJavascript:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChFxJavascript:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChFxJavascript ()
virtual int SetFunction (char *mformula)
char * GetFunction ()
virtual void AddInVar (CHoptVar *newvar)
virtual void RemoveInVar (CHoptVar *newvar)
virtual CHoptVarGetVarList ()
virtual void SetVarList (CHoptVar *mv)
int GetNumOfVars ()
virtual int CompileInVar ()
int Vars_to_System (double x[])
int Vars_to_System (const ChMatrix<> *x)
int System_to_Vars (double x[])
int System_to_Vars (ChMatrix<> *x)
char * GetLastError ()
virtual void Eval (ChMatrix<> &A, const ChMatrix<> &B)

Detailed Description

Class for A=f(B) math functions, where the function is defined by a Javascript formula that returns a scalar value, and input variables are set from a list of Javascript names.


Member Function Documentation

void chrono::ChFxJavascript::Eval ( ChMatrix<> &  A,
const ChMatrix<> &  B 
) [virtual]

INTERFACE: Evaluate A=f(B)

Parameters:
Aresults here
Binput here

Implements chrono::ChFx.

int chrono::ChFxJavascript::SetFunction ( char *  mformula) [virtual]

Sets the objective function to maximize, as ASCII interpreted formula and also precompile it into a script for optimizing speed. If returns 0, script has syntax error.

int chrono::ChFxJavascript::System_to_Vars ( double  x[])

The in variables gets their corresponding values in Javascript environment. Return 0 if can't get values. Mostly not needed by user.

int chrono::ChFxJavascript::Vars_to_System ( double  x[])

The Javascript environment gets the current state of input variables. Ret. 0 if can't set values. Mostly not needed by user.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen