DACE 2.0 API Manual
Differential Algebra Core Engine
|
Data Structures | |
struct | dvariable |
struct | dmem |
struct | dcom |
struct | dcom_t |
struct | ddbg |
struct | dmonomial |
struct | dextendedmonomial |
struct | daceblob |
struct | errstrings |
Macros | |
#define | __STDC_WANT_LIB_EXT1__ 1 |
#define | _USE_MATH_DEFINES |
#define | M_PI (3.14159265358979323846) |
#define | M_PI_2 (1.57079632679489661923) |
#define | UNLIKELY(expr) expr |
#define | LIKELY(expr) expr |
#define | ERROR_FUN_SIZE 64 |
#define | ERROR_MSG_SIZE 256 |
#define | DACE_BINARY_MAGIC (0x1E304144) |
#define | DACE_STRLEN (140) |
#define | REF(x) *(x) |
#define | ARG(x) &(x) |
#define | DACE_INFO 1 |
#define | DACE_WARNING 3 |
#define | DACE_ERROR 6 |
#define | DACE_SEVERE 9 |
#define | DACE_PANIC 10 |
#define | daceini(no, nv) daceInitialize(no, nv) |
#define | dacever(imaj, imin, icos) daceGetVersion(imaj, imin, icos) |
#define | daceseteps(deps) daceSetEpsilon(deps) |
#define | dacegeteps() daceGetEpsilon() |
#define | dacegetepsmac() daceGetMachineEpsilon() |
#define | dacegetnomax() daceGetMaxOrder() |
#define | dacegetnvmax() daceGetMaxVariables() |
#define | dacegetnmmax() daceGetMaxMonomials() |
#define | dacegetnot() daceGetTruncationOrder() |
#define | dacesetnot(fnot) daceSetTruncationOrder(fnot) |
#define | dacegetxerr() daceGetErrorX() |
#define | dacegetyyerr() daceGetErrorYY() |
#define | daceclrerr() daceClearError() |
#define | daceall(inc, len) daceAllocateDA(inc, len) |
#define | dacedal(inc) daceFreeDA(ARG(inc)) |
#define | dacememdump(iunit) daceMemoryDump() |
#define | dacevar(ina, i, ckon) daceCreateVariable(ARG(ina), i, ckon) |
#define | dacecoef(ina, jj, ckon) daceCreateMonomial(ARG(ina), jj, ckon) |
#define | dacecon(ina, ckon) daceCreateConstant(ARG(ina), ckon) |
#define | daceran(ina, cm) daceCreateRandom(ARG(ina), cm) |
#define | daceconst(ina) daceGetConstant(ARG(ina)) |
#define | dacelinear(ina, c) daceGetLinear(ARG(ina), c) |
#define | dacepok(ina, jj, cjj) daceSetCoefficient(ARG(ina), jj, cjj) |
#define | dacelist(ina, npos, jj, cjj) daceGetCoefficientAt(ARG(ina), npos, jj, cjj) |
#define | dacecop(ina, inb) daceCopy(ARG(ina), ARG(inb)) |
#define | dacetrim(ina, imin, imax, inc) daceTrim(ARG(ina), imin, imax, ARG(inc)) |
#define | daceonorm(ina, ivar, ityp, onorm) daceOrderedNorm(ARG(ina), ivar, ityp, onorm) |
#define | daceest(ina, ivar, ityp, c, nc) daceEstimate(ARG(ina), ivar, ityp, c, NULL, nc) |
#define | dacebound(ina, alo, aup) daceGetBounds(ARG(ina), alo, aup) |
#define | daceplug(ina, nvar, val, inc) daceEvalVariable(ARG(ina), nvar, val, ARG(inc)) |
#define | dacewrite(ina, strs, nstrs) daceWrite(ARG(ina), strs, nstrs) |
#define | daceread(ina, strs, nstrs) daceRead(ARG(ina), strs, nstrs) |
#define | daceadd(ina, inb, inc) daceAdd(ARG(ina), ARG(inb), ARG(inc)) |
#define | dacesub(ina, inb, inc) daceSubtract(ARG(ina), ARG(inb), ARG(inc)) |
#define | dacemul(ina, inb, inc) daceMultiply(ARG(ina), ARG(inb), ARG(inc)) |
#define | dacediv(ina, inb, inc) daceDivide(ARG(ina), ARG(inb), ARG(inc)) |
#define | dacesqr(ina, inb) daceSquare(ARG(ina), ARG(inb)) |
#define | dacecadd(ina, ckon, inb) daceAddDouble(ARG(ina), ckon, ARG(inb)) |
#define | dacecsub(ina, ckon, inb) daceDoubleSubtract(ARG(ina), ckon, ARG(inb)) |
#define | dacesubc(ina, ckon, inb) daceSubtractDouble(ARG(ina), ckon, ARG(inb)) |
#define | dacecmul(ina, ckon, inb) daceMultiplyDouble(ARG(ina), ckon, ARG(inb)) |
#define | dacecdiv(ina, ckon, inb) daceDoubleDivide(ARG(ina), ckon, ARG(inb)) |
#define | dacedivc(ina, ckon, inb) daceDivideDouble(ARG(ina), ckon, ARG(inb)) |
#define | daceder(idif, ina, inc) daceDifferentiate(idif, ARG(ina), ARG(inc)) |
#define | daceint(iint, ina, inc) daceIntegrate(iint, ARG(ina), ARG(inc)) |
#define | dacetrunc(ina, inc) daceTruncate(ARG(ina), ARG(inc)) |
#define | daceround(ina, inc) daceRound(ARG(ina), ARG(inc)) |
#define | dacemod(ina, p, inc) daceModulo(ARG(ina), p, ARG(inc)) |
#define | dacepow(ina, np, inc) dacePower(ARG(ina), np, ARG(inc)) |
#define | daceroot(ina, np, inc) daceRoot(ARG(ina), np, ARG(inc)) |
#define | daceminv(ina, inc) daceMultiplicativeInverse(ARG(ina), ARG(inc)) |
#define | dacesqrt(ina, inc) daceSquareRoot(ARG(ina), ARG(inc)) |
#define | daceisrt(ina, inc) daceInverseSquareRoot(ARG(ina), ARG(inc)) |
#define | daceexp(ina, inc) daceExponential(ARG(ina), ARG(inc)) |
#define | dacelog(ina, inc) daceLogarithm(ARG(ina), ARG(inc)) |
#define | dacelogb(ina, b, inc) daceLogarithmBase(ARG(ina), b, ARG(inc)) |
#define | dacesin(ina, inc) daceSine(ARG(ina), ARG(inc)) |
#define | dacecos(ina, inc) daceCosine(ARG(ina), ARG(inc)) |
#define | dacetan(ina, inc) daceTangent(ARG(ina), ARG(inc)) |
#define | daceasin(ina, inc) daceArcSine(ARG(ina), ARG(inc)) |
#define | daceacos(ina, inc) daceArcCosine(ARG(ina), ARG(inc)) |
#define | daceatan(ina, inc) daceArcTangent(ARG(ina), ARG(inc)) |
#define | daceatan2(ina, inb, inc) daceArcTangent2(ARG(ina), ARG(inb), ARG(inc)) |
#define | dacesinh(ina, inc) daceHyperbolicSine(ARG(ina), ARG(inc)) |
#define | dacecosh(ina, inc) daceHyperbolicCosine(ARG(ina), ARG(inc)) |
#define | dacetanh(ina, inc) daceHyperbolicTangent(ARG(ina), ARG(inc)) |
#define | daceasinh(ina, inc) daceHyperbolicArcSine(ARG(ina), ARG(inc)) |
#define | daceacosh(ina, inc) daceHyperbolicArcCosine(ARG(ina), ARG(inc)) |
#define | daceatanh(ina, inc) daceHyperbolicArcTangent(ARG(ina), ARG(inc)) |
#define | DACE_API |
Typedefs | |
typedef struct dvariable | variable |
typedef struct dmem | dacemem |
typedef struct dcom | dacecom |
typedef struct dcom_t | dacecom_t |
typedef struct ddbg | dacedbg |
typedef struct dmonomial | monomial |
typedef struct dextendedmonomial | extended_monomial |
typedef int | DACEDA |
Functions | |
unsigned int | umin (const unsigned int a, const unsigned int b) |
unsigned int | umax (const unsigned int a, const unsigned int b) |
double | pown (double a, unsigned int b) |
int | npown (int a, unsigned int b) |
unsigned int | daceEncodeExponents (const unsigned int p[], const unsigned int no, const unsigned int nv) |
unsigned int | daceDecodeExponents (unsigned int ic, const unsigned int no, const unsigned int nv, unsigned int p[]) |
unsigned int | daceNextMonomial (unsigned int p[], const unsigned int no, const unsigned int nv) |
unsigned int | daceNextOrderedMonomial (unsigned int p[], const unsigned int no, const unsigned int nv) |
unsigned int | daceCountMonomials (unsigned int no, unsigned int nv) |
unsigned int | daceEncode (const unsigned int jj[]) |
void | daceDecode (const unsigned int jc, unsigned int jj[]) |
void | dacePack (double *restrict cc, DACEDA *restrict inc) |
double | daceRandom () |
void | daceCreateVariable (DACEDA *ina, const unsigned int i, const double ckon) |
void | daceCreateMonomial (DACEDA *ina, const unsigned int jj[], const double ckon) |
void | daceCreateFilled (DACEDA *ina, const double ckon) |
void | daceCreateConstant (DACEDA *ina, const double ckon) |
void | daceCreateRandom (DACEDA *ina, const double cm) |
double | daceGetConstant (const DACEDA *ina) |
void | daceGetLinear (const DACEDA *ina, double c[]) |
double | daceGetCoefficient (const DACEDA *ina, const unsigned int jj[]) |
double | daceGetCoefficient0 (const DACEDA *ina, const unsigned int ic) |
void | daceSetCoefficient (DACEDA *ina, const unsigned int jj[], const double cjj) |
void | daceSetCoefficient0 (DACEDA *ina, const unsigned int ic, const double cjj) |
void | daceGetCoefficientAt (const DACEDA *ina, const unsigned int npos, unsigned int jj[], double *cjj) |
unsigned int | daceGetLength (const DACEDA *ina) |
void | daceCopy (const DACEDA *ina, DACEDA *inb) |
void | daceCopyFiltering (const DACEDA *ina, DACEDA *inb) |
void | daceTrim (const DACEDA *ina, const unsigned int imin, const unsigned int imax, DACEDA *inc) |
void | daceFilter (const DACEDA *ina, DACEDA *inb, const DACEDA *inc) |
unsigned int | daceIsNan (const DACEDA *ina) |
unsigned int | daceIsInf (const DACEDA *ina) |
void | dacesize (const DACEDA *ina, unsigned int *size) |
void | dacepek (const DACEDA *ina, const unsigned int jj[], double *cjj) |
void | daceabs (const DACEDA *ina, double *anorm) |
void | dacenorm (const DACEDA *ina, const unsigned int ityp, double *anorm) |
void | dacetree (const DACEDA das[], const unsigned int count, double ac[], unsigned int *nterm, unsigned int *nvar, unsigned int *nord) |
unsigned int | daceGetError () |
unsigned int | daceGetErrorX () |
unsigned int | daceGetErrorYY () |
const char * | daceGetErrorFunName () |
const char * | daceGetErrorMSG () |
void | daceClearError () |
void | daceSetError (const char *c, const unsigned int ix, const unsigned int iyy) |
double | daceEvalMonomials (const DACEDA *ina, const DACEDA *inb) |
void | daceEvalVariable (const DACEDA *ina, const unsigned int nvar, const double val, DACEDA *inc) |
void | daceReplaceVariable (const DACEDA *ina, const unsigned int from, const unsigned int to, const double val, DACEDA *inc) |
void | daceScaleVariable (const DACEDA *ina, const unsigned int nvar, const double val, DACEDA *inc) |
void | daceTranslateVariable (const DACEDA *ina, const unsigned int nvar, const double a, const double c, DACEDA *inc) |
void | daceEvalTree (const DACEDA *das[], const unsigned int count, double ac[], unsigned int *nterm, unsigned int *nvar, unsigned int *nord) |
void | daceInitialize (unsigned int no, unsigned int nv) |
void | daceInitializeThread () |
void | daceCleanupThread () |
void | daceInitializeThread0 () |
void | daceGetVersion (int *imaj, int *imin, int *ipat) |
double | daceSetEpsilon (const double eps) |
double | daceGetEpsilon () |
double | daceGetMachineEpsilon () |
unsigned int | daceGetMaxOrder () |
unsigned int | daceGetMaxVariables () |
unsigned int | daceGetMaxMonomials () |
unsigned int | daceGetTruncationOrder () |
unsigned int | daceSetTruncationOrder (const unsigned int fnot) |
void | daceWrite (const DACEDA *ina, char *strs, unsigned int *nstrs) |
void | daceRead (DACEDA *ina, char *strs, unsigned int nstrs) |
void | dacePrint (const DACEDA *ina) |
unsigned int | daceExportBlob (const DACEDA *ina, void *blob, unsigned int *size) |
unsigned int | daceBlobSize (const void *blob) |
void | daceImportBlob (const void *blob, DACEDA *inc) |
void | daceAdd (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceSubtract (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceMultiply (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceMultiplyMonomials (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceDivide (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceSquare (const DACEDA *ina, DACEDA *inb) |
void | daceAddDouble (const DACEDA *ina, const double ckon, DACEDA *inb) |
void | daceDoubleSubtract (const DACEDA *ina, const double ckon, DACEDA *inb) |
void | daceSubtractDouble (const DACEDA *ina, const double ckon, DACEDA *inb) |
void | daceMultiplyDouble (const DACEDA *ina, const double ckon, DACEDA *inb) |
void | daceDivideDouble (const DACEDA *ina, const double ckon, DACEDA *inb) |
void | daceDoubleDivide (const DACEDA *ina, const double ckon, DACEDA *inc) |
void | daceDivideByVariable (const DACEDA *ina, const unsigned int var, const unsigned int p, DACEDA *inc) |
void | daceDifferentiate (const unsigned int idif, const DACEDA *ina, DACEDA *inc) |
void | daceIntegrate (const unsigned int iint, const DACEDA *ina, DACEDA *inc) |
void | daceTruncate (const DACEDA *ina, DACEDA *inc) |
void | daceRound (const DACEDA *ina, DACEDA *inc) |
void | daceModulo (const DACEDA *ina, const double p, DACEDA *inc) |
void | dacePowerDouble (const DACEDA *ina, const double p, DACEDA *inc) |
void | dacePower (const DACEDA *ina, const int np, DACEDA *inc) |
void | daceRoot (const DACEDA *ina, const int np, DACEDA *inc) |
void | daceMultiplicativeInverse (const DACEDA *ina, DACEDA *inc) |
void | daceMultiplicativeInverse0 (const DACEDA *ina, DACEDA *inc, const double a0) |
void | daceSquareRoot (const DACEDA *ina, DACEDA *inc) |
void | daceInverseSquareRoot (const DACEDA *ina, DACEDA *inc) |
void | daceCubicRoot (const DACEDA *ina, DACEDA *inc) |
void | daceInverseCubicRoot (const DACEDA *ina, DACEDA *inc) |
void | daceHypotenuse (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceExponential (const DACEDA *ina, DACEDA *inc) |
void | daceLogarithm (const DACEDA *ina, DACEDA *inc) |
void | daceLogarithmBase (const DACEDA *ina, const double b, DACEDA *inc) |
void | daceLogarithm10 (const DACEDA *ina, DACEDA *inc) |
void | daceLogarithm2 (const DACEDA *ina, DACEDA *inc) |
void | daceSine (const DACEDA *ina, DACEDA *inc) |
void | daceCosine (const DACEDA *ina, DACEDA *inc) |
void | daceTangent (const DACEDA *ina, DACEDA *inc) |
void | daceArcSine (const DACEDA *ina, DACEDA *inc) |
void | daceArcCosine (const DACEDA *ina, DACEDA *inc) |
void | daceArcTangent (const DACEDA *ina, DACEDA *inc) |
void | daceArcTangent2 (const DACEDA *ina, const DACEDA *inb, DACEDA *inc) |
void | daceHyperbolicSine (const DACEDA *ina, DACEDA *inc) |
void | daceHyperbolicCosine (const DACEDA *ina, DACEDA *inc) |
void | daceHyperbolicTangent (const DACEDA *ina, DACEDA *inc) |
void | daceHyperbolicArcSine (const DACEDA *ina, DACEDA *inc) |
void | daceHyperbolicArcCosine (const DACEDA *ina, DACEDA *inc) |
void | daceHyperbolicArcTangent (const DACEDA *ina, DACEDA *inc) |
void | daceErrorFunction (const DACEDA *ina, DACEDA *inc) |
void | daceComplementaryErrorFunction (const DACEDA *ina, DACEDA *inc) |
void | daceBesselIFunction (const DACEDA *ina, const int n, const bool scaled, DACEDA *inc) |
void | daceBesselKFunction (const DACEDA *ina, const int n, const bool scaled, DACEDA *inc) |
void | daceBesselJFunction (const DACEDA *ina, const int n, DACEDA *inc) |
void | daceBesselYFunction (const DACEDA *ina, const int n, DACEDA *inc) |
void | daceEvaluateBesselFunction (const DACEDA *ina, const double bz[], const double type, const double ktype, DACEDA *inc) |
void | daceEvaluateScaledModifiedBesselFunction (const DACEDA *ina, const double bz[], const double ktype, DACEDA *inc) |
void | daceLogGammaFunction0 (const DACEDA *ina, const double a0, DACEDA *inc) |
void | daceLogGammaFunction (const DACEDA *ina, DACEDA *inc) |
void | daceGammaFunction (const DACEDA *ina, DACEDA *inc) |
void | dacePsiFunction (const DACEDA *ina, const unsigned int n, DACEDA *inc) |
void | daceEvaluateSeries (const DACEDA *ina, const double xf[], DACEDA *inc) |
void | daceWeightedSum (const DACEDA *ina, const double afac, const DACEDA *inb, const double bfac, DACEDA *inc) |
void | daceReallocateMemory (const unsigned int nvar, const unsigned int nmem) |
void | daceAllocateDA (DACEDA *inc, const unsigned int len) |
void | daceFreeDA (DACEDA *inc) |
void | daceInvalidateDA (DACEDA *inc) |
void | daceMemoryDump () |
void | daceVariableInformation (const DACEDA *inc, monomial **ipoc, unsigned int *ilmc, unsigned int *illc) |
void | daceSetLength (DACEDA *inc, const size_t len) |
bool | daceIsSameObject (const DACEDA *ina, const DACEDA *inb) |
void | daceFreeMemory () |
double | daceAbsoluteValue (const DACEDA *ina) |
double | daceNorm (const DACEDA *ina, const unsigned int ityp) |
void | daceOrderedNorm (const DACEDA *ina, const unsigned int ivar, const unsigned int ityp, double onorm[]) |
void | daceEstimate (const DACEDA *ina, const unsigned int ivar, const unsigned int ityp, double c[], double err[], const unsigned int nc) |
void | daceGetBounds (const DACEDA *ina, double *alo, double *aup) |
DACE_API void | dacepek (const DACEDA REF(ina), const unsigned int jj[], double REF(cjj)) |
DACE_API void | dacesize (const DACEDA REF(ina), unsigned int REF(size)) |
DACE_API void | daceabs (const DACEDA REF(ina), double REF(anorm)) |
DACE_API void | dacenorm (const DACEDA REF(ina), const unsigned int ityp, double REF(anorm)) |
DACE_API void | dacetree (const DACEDA das[], const unsigned int count, double ac[], unsigned int REF(nterm), unsigned int REF(nvar), unsigned int REF(nord)) |
Variables | |
dacecom | DACECom = { 0 } |
DACE_THREAD_LOCAL dacecom_t | DACECom_t = { 0 } |
DACE_THREAD_LOCAL dacedbg | DACEDbg = { 0 } |
dacecom | DACECom |
DACE_THREAD_LOCAL dacecom_t | DACECom_t |
DACE_THREAD_LOCAL dacedbg | DACEDbg |
DACE_API const errstrings | DACEerr [] |
Variable containing all errors strings and codes. More... | |
#define __STDC_WANT_LIB_EXT1__ 1 |
#define _USE_MATH_DEFINES |
#define ARG | ( | x | ) | &(x) |
#define DACE_API |
#define DACE_BINARY_MAGIC (0x1E304144) |
#define DACE_ERROR 6 |
#define DACE_INFO 1 |
#define DACE_PANIC 10 |
#define DACE_SEVERE 9 |
#define DACE_STRLEN (140) |
#define DACE_WARNING 3 |
#define daceacos | ( | ina, | |
inc | |||
) | daceArcCosine(ARG(ina), ARG(inc)) |
#define daceacosh | ( | ina, | |
inc | |||
) | daceHyperbolicArcCosine(ARG(ina), ARG(inc)) |
#define daceall | ( | inc, | |
len | |||
) | daceAllocateDA(inc, len) |
#define daceasin | ( | ina, | |
inc | |||
) | daceArcSine(ARG(ina), ARG(inc)) |
#define daceasinh | ( | ina, | |
inc | |||
) | daceHyperbolicArcSine(ARG(ina), ARG(inc)) |
#define daceatan | ( | ina, | |
inc | |||
) | daceArcTangent(ARG(ina), ARG(inc)) |
#define daceatan2 | ( | ina, | |
inb, | |||
inc | |||
) | daceArcTangent2(ARG(ina), ARG(inb), ARG(inc)) |
#define daceatanh | ( | ina, | |
inc | |||
) | daceHyperbolicArcTangent(ARG(ina), ARG(inc)) |
#define dacebound | ( | ina, | |
alo, | |||
aup | |||
) | daceGetBounds(ARG(ina), alo, aup) |
#define dacecadd | ( | ina, | |
ckon, | |||
inb | |||
) | daceAddDouble(ARG(ina), ckon, ARG(inb)) |
#define dacecdiv | ( | ina, | |
ckon, | |||
inb | |||
) | daceDoubleDivide(ARG(ina), ckon, ARG(inb)) |
#define daceclrerr | ( | ) | daceClearError() |
#define dacecmul | ( | ina, | |
ckon, | |||
inb | |||
) | daceMultiplyDouble(ARG(ina), ckon, ARG(inb)) |
#define dacecoef | ( | ina, | |
jj, | |||
ckon | |||
) | daceCreateMonomial(ARG(ina), jj, ckon) |
#define dacecon | ( | ina, | |
ckon | |||
) | daceCreateConstant(ARG(ina), ckon) |
#define daceconst | ( | ina | ) | daceGetConstant(ARG(ina)) |
#define dacecos | ( | ina, | |
inc | |||
) | daceCosine(ARG(ina), ARG(inc)) |
#define dacecosh | ( | ina, | |
inc | |||
) | daceHyperbolicCosine(ARG(ina), ARG(inc)) |
#define dacecsub | ( | ina, | |
ckon, | |||
inb | |||
) | daceDoubleSubtract(ARG(ina), ckon, ARG(inb)) |
#define dacedal | ( | inc | ) | daceFreeDA(ARG(inc)) |
#define daceder | ( | idif, | |
ina, | |||
inc | |||
) | daceDifferentiate(idif, ARG(ina), ARG(inc)) |
#define dacediv | ( | ina, | |
inb, | |||
inc | |||
) | daceDivide(ARG(ina), ARG(inb), ARG(inc)) |
#define dacedivc | ( | ina, | |
ckon, | |||
inb | |||
) | daceDivideDouble(ARG(ina), ckon, ARG(inb)) |
#define daceest | ( | ina, | |
ivar, | |||
ityp, | |||
c, | |||
nc | |||
) | daceEstimate(ARG(ina), ivar, ityp, c, NULL, nc) |
#define daceexp | ( | ina, | |
inc | |||
) | daceExponential(ARG(ina), ARG(inc)) |
#define dacegeteps | ( | ) | daceGetEpsilon() |
#define dacegetepsmac | ( | ) | daceGetMachineEpsilon() |
#define dacegetnmmax | ( | ) | daceGetMaxMonomials() |
#define dacegetnomax | ( | ) | daceGetMaxOrder() |
#define dacegetnot | ( | ) | daceGetTruncationOrder() |
#define dacegetnvmax | ( | ) | daceGetMaxVariables() |
#define dacegetxerr | ( | ) | daceGetErrorX() |
#define dacegetyyerr | ( | ) | daceGetErrorYY() |
#define daceini | ( | no, | |
nv | |||
) | daceInitialize(no, nv) |
#define daceint | ( | iint, | |
ina, | |||
inc | |||
) | daceIntegrate(iint, ARG(ina), ARG(inc)) |
#define daceisrt | ( | ina, | |
inc | |||
) | daceInverseSquareRoot(ARG(ina), ARG(inc)) |
#define dacelinear | ( | ina, | |
c | |||
) | daceGetLinear(ARG(ina), c) |
#define dacelist | ( | ina, | |
npos, | |||
jj, | |||
cjj | |||
) | daceGetCoefficientAt(ARG(ina), npos, jj, cjj) |
#define dacelog | ( | ina, | |
inc | |||
) | daceLogarithm(ARG(ina), ARG(inc)) |
#define dacelogb | ( | ina, | |
b, | |||
inc | |||
) | daceLogarithmBase(ARG(ina), b, ARG(inc)) |
#define dacememdump | ( | iunit | ) | daceMemoryDump() |
#define daceminv | ( | ina, | |
inc | |||
) | daceMultiplicativeInverse(ARG(ina), ARG(inc)) |
#define dacemod | ( | ina, | |
p, | |||
inc | |||
) | daceModulo(ARG(ina), p, ARG(inc)) |
#define dacemul | ( | ina, | |
inb, | |||
inc | |||
) | daceMultiply(ARG(ina), ARG(inb), ARG(inc)) |
#define daceonorm | ( | ina, | |
ivar, | |||
ityp, | |||
onorm | |||
) | daceOrderedNorm(ARG(ina), ivar, ityp, onorm) |
#define daceplug | ( | ina, | |
nvar, | |||
val, | |||
inc | |||
) | daceEvalVariable(ARG(ina), nvar, val, ARG(inc)) |
#define dacepok | ( | ina, | |
jj, | |||
cjj | |||
) | daceSetCoefficient(ARG(ina), jj, cjj) |
#define daceran | ( | ina, | |
cm | |||
) | daceCreateRandom(ARG(ina), cm) |
#define daceseteps | ( | deps | ) | daceSetEpsilon(deps) |
#define dacesetnot | ( | fnot | ) | daceSetTruncationOrder(fnot) |
#define dacesinh | ( | ina, | |
inc | |||
) | daceHyperbolicSine(ARG(ina), ARG(inc)) |
#define dacesqr | ( | ina, | |
inb | |||
) | daceSquare(ARG(ina), ARG(inb)) |
#define dacesqrt | ( | ina, | |
inc | |||
) | daceSquareRoot(ARG(ina), ARG(inc)) |
#define dacesub | ( | ina, | |
inb, | |||
inc | |||
) | daceSubtract(ARG(ina), ARG(inb), ARG(inc)) |
#define dacesubc | ( | ina, | |
ckon, | |||
inb | |||
) | daceSubtractDouble(ARG(ina), ckon, ARG(inb)) |
#define dacetan | ( | ina, | |
inc | |||
) | daceTangent(ARG(ina), ARG(inc)) |
#define dacetanh | ( | ina, | |
inc | |||
) | daceHyperbolicTangent(ARG(ina), ARG(inc)) |
#define dacetrunc | ( | ina, | |
inc | |||
) | daceTruncate(ARG(ina), ARG(inc)) |
#define dacevar | ( | ina, | |
i, | |||
ckon | |||
) | daceCreateVariable(ARG(ina), i, ckon) |
#define dacever | ( | imaj, | |
imin, | |||
icos | |||
) | daceGetVersion(imaj, imin, icos) |
#define ERROR_FUN_SIZE 64 |
#define ERROR_MSG_SIZE 256 |
#define LIKELY | ( | expr | ) | expr |
#define M_PI (3.14159265358979323846) |
#define M_PI_2 (1.57079632679489661923) |
#define REF | ( | x | ) | *(x) |
#define UNLIKELY | ( | expr | ) | expr |
typedef int DACEDA |
typedef struct dextendedmonomial extended_monomial |
void daceabs | ( | const DACEDA * | ina, |
double * | anorm | ||
) |
Compute absolute value of a DA object.
[in] | ina | Pointer to DA object to take absolute value of |
[out] | anorm | Pointer where to store the absolute value |
double daceAbsoluteValue | ( | const DACEDA * | ina | ) |
Compute the absolute value (maximum coefficient norm) of a DA object.
[in] | ina | Pointer to the DA object to take absolute value of |
Perform addition of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the first DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Add constant to a DA object.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to add |
[out] | inb | Pointer to the DA object to store the result in |
void daceAllocateDA | ( | DACEDA * | inc, |
const unsigned int | len | ||
) |
Allocate storage for a DA vector with memory length len.
[out] | inc | Index of the newly created variable |
[in] | len | Length of the variable to allocate. If len = 0 the length is automatically determined to be large enough for any DA vector (i.e. len=nmmax). |
Compute the arccosine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the arcsine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the arctangent of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Arctangent of ina/inb with proper sign in [-pi, pi]. This function follows the C standard atan2(y,x) function syntax.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the second DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the modified Bessel function I_n of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part >= 0) |
[in] | n | Order of the Bessel function |
[in] | scaled | If true, the scaled Bessel function is computed (i.e. exp(-x)*I_n(x)) |
[out] | inc | Pointer to the DA object to store the result in |
Compute the Bessel function J_n of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part >= 0) |
[in] | n | Order of the Bessel function |
[out] | inc | Pointer to the DA object to store the result in |
Compute the modified Bessel function K_n of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part >= 0) |
[in] | n | Order of the Bessel function |
[in] | scaled | If true, the scaled Bessel function is computed (i.e. exp(x)*K_n(x)) |
[out] | inc | Pointer to the DA object to store the result in |
Compute the Bessel function Y_n of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part >= 0) |
[in] | n | Order of the Bessel function |
[out] | inc | Pointer to the DA object to store the result in |
unsigned int daceBlobSize | ( | const void * | blob | ) |
Determine the total size (in byte) of a DACE blob.
[in] | blob | Pointer to memory where the data is stored |
void daceCleanupThread | ( | ) |
Clean up thread local data structures at the end of thread's life time.
void daceClearError | ( | ) |
Clear the error code.
Compute the complementary error function of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Copy content of one DA object into another DA object.
[in] | ina | Pointer to DA object to copy from |
[in] | inb | Pointer to DA object to copy to |
Copy content of one DA object into another DA object filtering out terms below a certain threshold.
[in] | ina | Pointer to DA object to copy from |
[in] | inb | Pointer to DA object to copy to |
Compute the cosine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
unsigned int daceCountMonomials | ( | unsigned int | no, |
unsigned int | nv | ||
) |
Compute number of monomials of order no in nv variables.
[in] | no | Maximum order of monomials |
[in] | nv | Number of variables in monomials |
void daceCreateConstant | ( | DACEDA * | ina, |
const double | ckon | ||
) |
Create a DA object with constant part equal to ckon.
[in] | ina | Pointer to DA object to store the resulting DA in |
[in] | ckon | coefficient of the constant part of the result |
void daceCreateFilled | ( | DACEDA * | ina, |
const double | ckon | ||
) |
Create a DA object with all coefficients set to the constant value ckon.
[in] | ina | Pointer to DA object to store the resulting DA in |
[in] | ckon | coefficient of the monomials |
void daceCreateMonomial | ( | DACEDA * | ina, |
const unsigned int | jj[], | ||
const double | ckon | ||
) |
Create a DA object to be ckon times the monomial given by the exponents in jj[].
[in] | ina | Pointer to DA object to store the resulting DA in |
[in] | jj | C array with nvmax exponents indicating the monomial to create |
[in] | ckon | coefficient of the monomial created |
void daceCreateRandom | ( | DACEDA * | ina, |
const double | cm | ||
) |
Create a DA object with randomly filled coefficients.
[in] | ina | Pointer to DA object to store the resulting DA in |
[in] | cm | The filling factor between -1.0 and 1.0. The absolute value of the filling factor determines the fraction of non-zero coefficients. If cm is positive, the values are weighted by order such that the coefficients decay exponentially with the order from 1.0 towards the machine epsilon in the highest order. If cm is negative, all coefficients are chosen to be between -1.0 and 1.0. |
void daceCreateVariable | ( | DACEDA * | ina, |
const unsigned int | i, | ||
const double | ckon | ||
) |
Create a DA object to be ckon times the i-th independen variable.
[in] | ina | Pointer to DA object to store the resulting DA in |
[in] | i | number of the independent variable to create |
[in] | ckon | coefficient of the independent DA variable created |
Compute the cubic root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceDecode | ( | const unsigned int | jc, |
unsigned int | jj[] | ||
) |
Decode the given DA coding integer as stored in monomial.ii into jj[].
[in] | jc | DA coding integer as stored in monomial.ii to decode |
[out] | jj | C array of nvmax exponents |
unsigned int daceDecodeExponents | ( | unsigned int | ic, |
const unsigned int | no, | ||
const unsigned int | nv, | ||
unsigned int | p[] | ||
) |
Decode a single integer containing nv exponents of maximum order no into p[]
[in] | ic | Encoded integer to decode |
[in] | no | Maximum computation order used for encoding. Must be strictly positive! |
[in] | nv | Number of exponents in p. May be zero, in which case zero is returned. |
[out] | p | C array of nv exponents |
Derivative of DA object with respect to a given independent variable.
[in] | idif | Number of the independent variable with respect to which the derivative is taken |
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Perform division of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the first DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceDivideByVariable | ( | const DACEDA * | ina, |
const unsigned int | var, | ||
const unsigned int | p, | ||
DACEDA * | inc | ||
) |
Divide a DA vector by a single variable to some power, if possible.
[in] | ina | Pointer to the DA object to operate on |
[in] | var | Number of the independent variable by which to divide |
[in] | p | Power of independent variable |
[out] | inc | Pointer to the DA object to store the result in |
Divide DA object by a constant.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to divide by |
[out] | inb | Pointer to the DA object to store the result in |
Divide constant by DA object.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to divide |
[out] | inc | Pointer to the DA object to store the result in |
Subtract DA object from constant.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to subtract from |
[out] | inb | Pointer to the DA object to store the result in |
unsigned int daceEncode | ( | const unsigned int | jj[] | ) |
Encode the given exponents in jj[] into a DA coding integer as stored in monomial.ii.
[in] | jj | C array of nvmax exponents to encode |
unsigned int daceEncodeExponents | ( | const unsigned int | p[], |
const unsigned int | no, | ||
const unsigned int | nv | ||
) |
Return a single integer containing all nv exponents in p[] with maximum order no
[in] | p | C array of nv exponents |
[in] | no | Maximum computation order used for encoding. Must be strictly positive! |
[in] | nv | Number of exponents in p. May be zero, in which case zero is returned. |
Compute the error function of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceEstimate | ( | const DACEDA * | ina, |
const unsigned int | ivar, | ||
const unsigned int | ityp, | ||
double | c[], | ||
double | err[], | ||
const unsigned int | nc | ||
) |
Estimate order sorted norms of DA object ina up to given order.
[in] | ina | Pointer to the DA object to take norm of |
[in] | ivar | Independent variable with respect to which to group. 0 = group by monomial order >1 = group by given independent variable |
[in] | ityp | Type of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm |
[in] | nc | Maximum order to estimate |
[out] | c | C array of length nc+1 containing the grouped estimates |
[out] | err | C array of length min(nc, nomax)+1 containing the residuals of the exponential fit at each order. If NULL is passed in, no residuals are computed and returned. |
Evaluate DA object ina by providing the value to use for each monomial in DA object inb. This is equivalent to a monomial-wise DA dot product.
[in] | ina | Pointer to first DA object to evaluate |
[in] | inb | Pointer to second DA object to provide monomial values |
void daceEvalTree | ( | const DACEDA * | das[], |
const unsigned int | count, | ||
double | ac[], | ||
unsigned int * | nterm, | ||
unsigned int * | nvar, | ||
unsigned int * | nord | ||
) |
Compute an evaluation tree to efficiently evaluate several DA objects.
[in] | das | C array of pointers to DA objects to evaluate |
[in] | count | Number of DA objects in das[] |
[out] | ac | C array of doubles containing compiled coefficients |
[out] | nterm | Pointer where to store the total number of terms in evaluation tree |
[out] | nvar | Pointer where to store the total number of variables in evaluation tree |
[out] | nord | Pointer where to store the maximum order in evaluation tree |
void daceEvaluateBesselFunction | ( | const DACEDA * | ina, |
const double | bz[], | ||
const double | type, | ||
const double | ktype, | ||
DACEDA * | inc | ||
) |
Evaluate a Bessel function with coefficients bz with the non-constant part of ina.
[in] | ina | Pointer to the DA object to operate on |
[in] | bz | C array of 2*nocut+1 elements containing Bessel functions of orders n-nocut, ..., n+nocut |
[in] | type | Either -1.0 for normal Bessel functions, or +1.0 for modified Bessel functions. |
[in] | ktype | Either -1.0 for modified Bessel K function, or +1.0 for all other Bessel functions. |
[out] | inc | Pointer to the DA object to store the result in |
void daceEvaluateScaledModifiedBesselFunction | ( | const DACEDA * | ina, |
const double | bz[], | ||
const double | ktype, | ||
DACEDA * | inc | ||
) |
Evaluate a scaled modified Bessel function with coefficients bz with the non-constant part of ina.
[in] | ina | Pointer to the DA object to operate on |
[in] | bz | C array of 2*nocut+1 elements containing modified Bessel functions of orders n-nocut, ..., n+nocut |
[in] | ktype | Either -1.0 for scaled Bessel K function, or +1.0 for scaled Bessel I function |
[out] | inc | Pointer to the DA object to store the result in |
Evaluate a polynomial with coefficients xf with the non-constant part of ina.
[in] | ina | Pointer to the DA object to operate on |
[in] | xf | C array of nocut+1 elements containing the coefficients of the polynomial |
[out] | inc | Pointer to the DA object to store the result in |
void daceEvalVariable | ( | const DACEDA * | ina, |
const unsigned int | nvar, | ||
const double | val, | ||
DACEDA * | inc | ||
) |
Perform partial evaluation of DA object ina by replacing independent variable number nvar by the value val.
[in] | ina | Pointer to DA object to evaluate |
[in] | nvar | Number of the independent variable to replace (one-based) |
[in] | val | Value to replace independent variable with |
[out] | inc | Pointer to DA object to store the result of the partial evaluation |
Compute the exponential of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
unsigned int daceExportBlob | ( | const DACEDA * | ina, |
void * | blob, | ||
unsigned int * | size | ||
) |
Export a DA object in a binary format. The binary data is not supposed to be modified and its format is considered internal to the DACE. It is guaranteed that a binary representation can be read back into a DA object even with differently initialized settings.
[in] | ina | The DA object to export |
[in,out] | blob | Pointer to memory where to store the data |
[in,out] | size | On input contains the size (in bytes) of the memory pointed to by blob. On output contains the actual amount of memory used. |
Copy monomials from a DA object ina to DA object inb if the same monomial is non-zero in DA object inc, while filtering out terms below the current cutoff.
[in] | ina | Pointer to DA object to filter |
[in] | inb | Pointer to DA object to store the filtered result in |
[in] | inc | Pointer to DA object providing the filter template |
void daceFreeDA | ( | DACEDA * | inc | ) |
Deallocate DA vector inc.
[in] | inc | Index of the DA variable to free |
void daceFreeMemory | ( | ) |
Free the entire DACE memory and purge all DA objects that may have been allocated before.
Compute the Gamma function of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part != 0, -1, -2, ...) |
[out] | inc | Pointer to the DA object to store the result in |
void daceGetBounds | ( | const DACEDA * | ina, |
double * | alo, | ||
double * | aup | ||
) |
Compute an upper and lower bound of DA object ina over the domain [-1,1]^n.
[in] | ina | Pointer to the DA object to bound |
[out] | alo | Pointer where to store the lower bound |
[out] | aup | Pointer where to store the upper bound |
double daceGetCoefficient | ( | const DACEDA * | ina, |
const unsigned int | jj[] | ||
) |
Extract coefficient of a monomial in a DA object.
[in] | ina | Pointer to DA object to extract monomial coefficient from |
[in] | jj | C array of nvmax exponents identifying the monomial |
double daceGetCoefficient0 | ( | const DACEDA * | ina, |
const unsigned int | ic | ||
) |
Extract coefficient of a monomial in a DA object.
[in] | ina | Pointer to DA object to extract monomial coefficient from |
[in] | ic | DA coding integer of the monomial to extract |
void daceGetCoefficientAt | ( | const DACEDA * | ina, |
const unsigned int | npos, | ||
unsigned int | jj[], | ||
double * | cjj | ||
) |
Extract coefficient at position npos (starting with 1) in the list of non-zero coefficients in the DA object and return its exponents and coefficient. If the monomial does not exist, the value 0.0 is returned.
[in] | ina | Pointer to DA object to extract monomial from |
[in] | npos | Index of the monomial to extract |
[out] | jj | C array of nvmax elements for returning the exponents of the monomial |
[out] | cjj | Pointer where to store the value of the coefficient of the monomial |
double daceGetConstant | ( | const DACEDA * | ina | ) |
Extract the constant part from a DA object.
[in] | ina | Pointer to DA object to extract constant part from |
double daceGetEpsilon | ( | ) |
unsigned int daceGetError | ( | ) |
const char* daceGetErrorFunName | ( | ) |
Return the function name of current generated error.
const char* daceGetErrorMSG | ( | ) |
unsigned int daceGetErrorX | ( | ) |
unsigned int daceGetErrorYY | ( | ) |
unsigned int daceGetLength | ( | const DACEDA * | ina | ) |
Return the number of non-zero monomials in a DA object.
[in] | ina | Pointer to DA object to get length of |
void daceGetLinear | ( | const DACEDA * | ina, |
double | c[] | ||
) |
Extract the linear part of a DA object.
[in] | ina | Pointer to DA object to extract linear part from |
[in] | c | C array of length nvmax containing the linear coefficients in order |
double daceGetMachineEpsilon | ( | ) |
Get machine epsilon value.
unsigned int daceGetMaxMonomials | ( | ) |
Get the maximum number of monomials for the current setup.
unsigned int daceGetMaxOrder | ( | ) |
Get the maximum computation order set in the initialization routine.
unsigned int daceGetMaxVariables | ( | ) |
Get the maximum number of variables set in the initialization routine.
unsigned int daceGetTruncationOrder | ( | ) |
Get the current truncation order set for computations.
void daceGetVersion | ( | int * | imaj, |
int * | imin, | ||
int * | ipat | ||
) |
This subroutine returns the major and minor version number of the DACE. These values can be checked by the interface to ensure compatibility.
[out] | imaj | Major version number |
[out] | imin | Minor version number |
[out] | ipat | Patch version number |
Compute the hyperbolic arccosine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hyperbolic arcsince of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hyperbolic arctangent of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hyperbolic cosine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hyperbolic sine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hyperbolic tangent of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the hypothenuse of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the second DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceImportBlob | ( | const void * | blob, |
DACEDA * | inc | ||
) |
Import a DA object in a binary format.
[in] | blob | Pointer to memory where the data is stored |
[in] | inc | The DA object to import into |
void daceInitialize | ( | unsigned int | no, |
unsigned int | nv | ||
) |
Set up the ordering and addressing arrays in the common data structure and initialize DA memory.
[in] | no | order of the Taylor polynomials; |
[in] | nv | number of variables considered. |
void daceInitializeThread | ( | ) |
Set up thread local data structures at the beginning of a new thread.
void daceInitializeThread0 | ( | ) |
Set up thread local data structures without resetting error. Also initializes the truncation order to the maximum computation order and disables the DA epsilon cutoff by setting it to 0.0.
Integral of DA object with respect to a given independent variable.
[in] | iint | Number of the independent variable with respect to which the integral is taken |
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceInvalidateDA | ( | DACEDA * | inc | ) |
Invalidate DA vector inc without deallocating associated memory.
[in] | inc | Index of the DA variable to invalidate |
Compute the inverse cubic root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the inverse square root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
unsigned int daceIsInf | ( | const DACEDA * | ina | ) |
Check each coefficient of DA object ina to see if any of them are INF (infinity).
[in] | ina | Pointer to DA object to check |
unsigned int daceIsNan | ( | const DACEDA * | ina | ) |
Check each coefficient of DA object ina to see if any of them are NANs (not a number).
[in] | ina | Pointer to DA object to check |
Compute the natural logarithm root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the decadic logarithm of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the binary logarithm of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the logarithm with respect to base b of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[in] | b | Base of the logarithm to use |
[out] | inc | Pointer to the DA object to store the result in |
Compute the Logarithmic Gamma function of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part != 0, -1, -2, ...) |
[out] | inc | Pointer to the DA object to store the result in |
Compute the partial Logarithmic Gamma function of a DA object (without constant part).
[in] | ina | Pointer to the DA object to operate on |
[in] | a0 | Constant part |
[out] | inc | Pointer to the DA object to store the result in |
void daceMemoryDump | ( | ) |
Dump information about the current memory management status to stdout.
Modulo the constant part of a DA object by p.
[in] | ina | Pointer to the DA object to operate on |
[in] | p | Value with respect to which to compute the modulo |
[out] | inc | Pointer to the DA object to store the result in |
Compute the multiplicative inverse of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Compute the multiplicative inverse of a DA object using series expansion.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
[in] | a0 | Constant part of ina |
Perform multiplication of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the first DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Multiply constant and DA object.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to multiply by |
[out] | inb | Pointer to the DA object to store the result in |
Multiply two DA vectors component-wise, i.e. each monomial of ina with the corresponding monomial of inb
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the first DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
unsigned int daceNextMonomial | ( | unsigned int | p[], |
const unsigned int | no, | ||
const unsigned int | nv | ||
) |
Enumerate all monomials with nv variables and up to maximum order no in p. The sequence of monomials is deterministic but NOT sorted by order. It depends on both nv and no.
[out] | p | C array of nv exponents |
[in] | no | Maximum order of monomials being enumerated |
[in] | nv | Number of exponents in p |
unsigned int daceNextOrderedMonomial | ( | unsigned int | p[], |
const unsigned int | no, | ||
const unsigned int | nv | ||
) |
Enumerate all monomials with nv variables and up to maximum order no in p. The sequence of monomials is sorted by order, i.e. first all first order monomials are returned, then all second order and so on.
[out] | p | C array of nv exponents |
[in] | no | Maximum order of monomials being enumerated |
[in] | nv | Number of exponents in p |
double daceNorm | ( | const DACEDA * | ina, |
const unsigned int | ityp | ||
) |
Compute a norm of a DA object.
[in] | ina | Pointer to the DA object to take norm of |
[in] | ityp | Type of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm |
void dacenorm | ( | const DACEDA * | ina, |
const unsigned int | ityp, | ||
double * | anorm | ||
) |
Compute absolute value of a DA object.
[in] | ina | Pointer to DA object to take norm of |
[in] | ityp | Type of norm to take (see daceNorm()) |
[out] | anorm | Pointer where to store the norm |
void daceOrderedNorm | ( | const DACEDA * | ina, |
const unsigned int | ivar, | ||
const unsigned int | ityp, | ||
double | onorm[] | ||
) |
Compute an order sorted norm of a DA object.
[in] | ina | Pointer to the DA object to take norm of |
[in] | ivar | Independent variable with respect to which to group. 0 = group by monomial order >1 = group by given independent variable |
[in] | ityp | Type of norm to compute. 0 = max norm 1 = sum norm >1 = corresponding vector norm |
[out] | onorm | C array of length nomax+1 containing the grouped estimates |
void dacePack | ( | double *restrict | cc, |
DACEDA *restrict | inc | ||
) |
Pack monomials in cc[] into DA object inc.
[in] | cc | C array of nmmax monomials |
[in] | inc | Pointer to DA object to pack the monomials into |
void dacepek | ( | const DACEDA * | ina, |
const unsigned int | jj[], | ||
double * | cjj | ||
) |
Extract coefficient of a monomial in a DA object.
[in] | ina | Pointer to DA object to extract monomial coefficient from |
[in] | jj | C array of nvmax exponents identifying the monomial |
[out] | cjj | Pointer where to store the value of the coefficient |
Raise a DA object to the p-th integer power.
[in] | ina | Pointer to the DA object to operate on |
[in] | np | Power to which to raise the DA object |
[out] | inc | Pointer to the DA object to store the result in |
Raise a DA object to the p-th power.
[in] | ina | Pointer to the DA object to operate on |
[in] | p | Power to which to raise the DA object |
[out] | inc | Pointer to the DA object to store the result in |
void dacePrint | ( | const DACEDA * | ina | ) |
Compute the n-th Psi function (i.e. the n+1 derivative of the logarithmic gamma function) of a DA object.
[in] | ina | Pointer to the DA object to operate on (constant part != 0, -1, -2, ...) |
[in] | n | Order of the Psi function (n >= 0) |
[out] | inc | Pointer to the DA object to store the result in |
double daceRandom | ( | ) |
Return a pseudo-random number between 0.0 and 1.0.
void daceRead | ( | DACEDA * | ina, |
char * | strs, | ||
unsigned int | nstrs | ||
) |
Read a DA object ina from a human readable string representation in strs, containing nstrs contiguous zero-terminated lines of line length DACE_STRLEN.
[out] | ina | Pointer to the DA object to read into |
[in] | strs | C array of size nstrs*DACE_STRLEN containing the zero-terminated lines of length DACE_STRLEN |
[in] | nstrs | Number of lines in strs |
void daceReallocateMemory | ( | const unsigned int | nvar, |
const unsigned int | nmem | ||
) |
Reallocate DACE internal memory.
[in] | nvar | Minimum number of variables the new memory allocation should support |
[in] | nmem | Minimum amount of monomials the new memory allocation should support |
void daceReplaceVariable | ( | const DACEDA * | ina, |
const unsigned int | from, | ||
const unsigned int | to, | ||
const double | val, | ||
DACEDA * | inc | ||
) |
Replace independent variable with index from by val times the independent variable with index to.
[in] | ina | Pointer to DA object to evaluate |
[in] | from | Number of the independent variable to replace |
[in] | to | Number of the independent variable to change to |
[in] | val | Value to scale new independent variable with |
[out] | inc | Pointer to DA object to store the result of the replacement |
Take the np-th root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[in] | np | Root to take of the DA object |
[out] | inc | Pointer to the DA object to store the result in |
Round the constant part of a DA object to an integer.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceScaleVariable | ( | const DACEDA * | ina, |
const unsigned int | nvar, | ||
const double | val, | ||
DACEDA * | inc | ||
) |
Scale independent variable nvar by val.
[in] | ina | Pointer to DA object to scale |
[in] | nvar | Number of the independent variable to scale |
[in] | val | Value to scale independent variable with |
[out] | inc | Pointer to DA object to store the result of the scaling |
void daceSetCoefficient | ( | DACEDA * | ina, |
const unsigned int | jj[], | ||
const double | cjj | ||
) |
Set coefficient of a monomial in a DA object.
[in] | ina | Pointer to DA object to set monomial in |
[in] | jj | C array of nvmax exponents identifying the monomial |
[in] | cjj | Value of the corresponding coefficient |
void daceSetCoefficient0 | ( | DACEDA * | ina, |
const unsigned int | ic, | ||
const double | cjj | ||
) |
Set coefficient of a monomial in a DA object.
[in] | ina | Pointer to DA object to set monomial in |
[in] | ic | DA coding integer of the monomial to set |
[in] | cjj | Value of the corresponding coefficient |
double daceSetEpsilon | ( | const double | eps | ) |
Set cutoff value to eps and return the previous value.
[in] | eps | New cutoff value at or below which coefficients can be flushed to zero for efficiency purposes. |
void daceSetError | ( | const char * | c, |
const unsigned int | ix, | ||
const unsigned int | iyy | ||
) |
This subroutine serves as an error handler for errors within the dace. It is intended mostly for development and debugging. More descriptive error messages should be displayed by the user interface.
The error codes are defined as XYY with X indicating the severity and YY corresponding to the actual error code
Severity Levels X
1 = Info: Informative, no action required
3 = Warning: Serious, possibly incorrect use of DACE routines
6 = Error: Recoverable, result may not be correct or assumptions have been made
9 = Error: Unrecoverable, new call to DACEINI is required to reinitialize DACE, DACE objects are no longer valid
10 = Critical: Crash in the DACE, just printing as much as possible and dying
Currently used error codes XYY are defined in daceerror.h
[in] | c | an error string representing the error |
[in] | ix | is the error severity code |
[in] | iyy | is the error code |
void daceSetLength | ( | DACEDA * | inc, |
const size_t | len | ||
) |
unsigned int daceSetTruncationOrder | ( | const unsigned int | fnot | ) |
Set the current truncation order for future computations.
[in] | fnot | The new truncation order |
Compute the sine of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void dacesize | ( | const DACEDA * | ina, |
unsigned int * | size | ||
) |
Return the number of non-zero monomials in a DA object.
[in] | ina | Pointer to DA object to get length of |
[out] | size | Number of non-zero monomials |
Square a DA object.
[in] | ina | Pointer to the DA object to square |
[out] | inb | Pointer to the DA object to store the result in |
Compute the square root of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Perform subtraction of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | inb | Pointer to the first DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
Subtract constant from a DA object.
[in] | ina | Pointer to the first DA object to operate on |
[in] | ckon | Constant value to subtract |
[out] | inb | Pointer to the DA object to store the result in |
Compute the tangent of a DA object.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceTranslateVariable | ( | const DACEDA * | ina, |
const unsigned int | nvar, | ||
const double | a, | ||
const double | c, | ||
DACEDA * | inc | ||
) |
Translate independent variable nvar to (a*x + c).
[in] | ina | Pointer to DA object to translate |
[in] | nvar | Number of the independent variable to translate |
[in] | a | Linear value to scale independent variable by |
[in] | c | Constant value to translate independent variable by |
[out] | inc | Pointer to DA object to store the result of the translation |
DACE_API void dacetree | ( | const DACEDA | das[], |
const unsigned int | count, | ||
double | ac[], | ||
unsigned int | REFnterm, | ||
unsigned int | REFnvar, | ||
unsigned int | REFnord | ||
) |
void dacetree | ( | const DACEDA | das[], |
const unsigned int | count, | ||
double | ac[], | ||
unsigned int * | nterm, | ||
unsigned int * | nvar, | ||
unsigned int * | nord | ||
) |
Compute an evaluation tree for efficient evaluation of DA objects.
[in] | das | Pointers to DA objects to evaluate |
[in] | count | Number of DA objects in das[] |
[out] | ac | C array containing compiled evaluation tree data |
[out] | nterm | resulting number of terms in evaluation tree |
[out] | nvar | number of variables appearing in evaluation tree |
[out] | nord | maximum order appearing in evaluation tree |
void daceTrim | ( | const DACEDA * | ina, |
const unsigned int | imin, | ||
const unsigned int | imax, | ||
DACEDA * | inc | ||
) |
Truncate a DA object to contain only terms of order larger or equal to imin and less than or equal imax.
[in] | ina | Pointer to DA object to trim |
[in] | imin | Minimum order to keep |
[in] | imax | Maximum order to keep |
[in] | inc | Pointer to DA object to store the truncated result in |
Truncate the constant part of a DA object to an integer.
[in] | ina | Pointer to the DA object to operate on |
[out] | inc | Pointer to the DA object to store the result in |
void daceVariableInformation | ( | const DACEDA * | inc, |
monomial ** | ipoc, | ||
unsigned int * | ilmc, | ||
unsigned int * | illc | ||
) |
Extract internal information about a DA object.
[in] | inc | Pointer to the DA object to extract information from |
[out] | ipoc | Pointer to an array of monomials allocated for this variable |
[out] | ilmc | Pointer where to store the maximum number of monomials allocated in this DA object |
[out] | illc | Pointer where to store the currently used length of this DA object |
void daceWeightedSum | ( | const DACEDA * | ina, |
const double | afac, | ||
const DACEDA * | inb, | ||
const double | bfac, | ||
DACEDA * | inc | ||
) |
Compute the weighted sum of two DA objects.
[in] | ina | Pointer to the first DA object to operate on |
[in] | afac | Weighting factor to multiply ina by |
[in] | inb | Pointer to the second DA object to operate on |
[in] | bfac | Weighting factor to multiply inb by |
[out] | inc | Pointer to the DA object to store the result in |
void daceWrite | ( | const DACEDA * | ina, |
char * | strs, | ||
unsigned int * | nstrs | ||
) |
Print the DA object ina to string strs (of line length DACE_STRLEN).
[in] | ina | Pointer to the DA object to be printed |
[out] | strs | C array of size (nmmax+2)*DACE_STRLEN containing the zero-terminated lines of length DACE_STRLEN |
[out] | nstrs | Pointer where to store the final number of strings printed |
int npown | ( | int | a, |
unsigned int | b | ||
) |
Raise integer a to positive integer power b.
[in] | a | base value |
[in] | b | power |
double pown | ( | double | a, |
unsigned int | b | ||
) |
Raise double a to positive integer power b.
[in] | a | base value |
[in] | b | power |
unsigned int umax | ( | const unsigned int | a, |
const unsigned int | b | ||
) |
Return the maximum between two unsigned integer.
unsigned int umin | ( | const unsigned int | a, |
const unsigned int | b | ||
) |
Return the minimum between two unsigned integer.
dacecom DACECom = { 0 } |
dacecom DACECom |
DACE_THREAD_LOCAL dacecom_t DACECom_t = { 0 } |
DACE_THREAD_LOCAL dacecom_t DACECom_t |
DACE_THREAD_LOCAL dacedbg DACEDbg = { 0 } |
DACE_THREAD_LOCAL dacedbg DACEDbg |
DACE_API const errstrings DACEerr[] |
Variable containing all errors strings and codes.