FEDEM Solver  R8.0
Source code of the dynamics solver
Functions
FFa Namespace Reference

Various math utilities. More...

Functions

int cubicSolve (double A, double B, double C, double D, double *X)
 Solves the cubic equation A*x3 + B*x2 + C*x + D = 0. More...
 
int bilinearSolve (const double *A, const double *B, double *X, double *Y)
 Solves a bi-linear set of equations in X and Y. More...
 
void initBasicOps ()
 Initializes operations on basic algebra types. More...
 
void setSpecialResultValue (double value, double equiv)
 Defines a special result value and its associated equivalent value. More...
 

Detailed Description

Various math utilities.

Function Documentation

◆ bilinearSolve()

int FFa::bilinearSolve ( const double *  A,
const double *  B,
double *  X,
double *  Y 
)

Solves a bi-linear set of equations in X and Y.

The following set of equations are solved for the unknowns X and Y :

A0 * x*y + A1 * x + A2 * y = A3
B0 * x*y + B1 * x + B2 * y = B3
integer(ptr), save, private x
Definition: extCtrlSysRoutinesModule.f90:16
Parameters
[in]ACoefficients of the first equation
[in]BCoefficients of the second equation
[out]XSolution value(s) of the first unknown
[out]YSolution value(s) of the second unknown
Returns
Number of unique solutions found, negative on error

◆ cubicSolve()

int FFa::cubicSolve ( double  A,
double  B,
double  C,
double  D,
double *  X 
)

Solves the cubic equation A*x3 + B*x2 + C*x + D = 0.

See K. Rottmann, "Matematische Formelsammlung" (1960), pp. 13-16 for details.

Parameters
[in]ACoefficient of the cubic term
[in]BCoefficient of the quadratic term
[in]CCoefficient of the linear term
[in]DThe constant term
[out]XSolution(s)
Returns
Number of solutions found
  • -3 : No real solution, three complex roots detected
  • -2 : No real solution, two complex roots detected
  • 0 : No solutions at all (A, B and C were all zero)
  • 1 : One solution found (A and B were zero)
  • 2 : Two unique solution found (A was zero)
  • 3 : Three unique solutions found

◆ initBasicOps()

void FFa::initBasicOps ( )

Initializes operations on basic algebra types.

◆ setSpecialResultValue()

void FFa::setSpecialResultValue ( double  value,
double  equiv 
)

Defines a special result value and its associated equivalent value.

The special result value is used by some unary operations transforming result vectors into a double value. When value is encountered among the input values for an operation, it will be replaced by equiv before the actual operation is invoked.