示例#1
0
/*                                                   The interface function */
void tapingVectorFunction( int tag, double* indeps, double* deps ) {
    int i;
    trace_on(tag);
    adouble* activeIndeps = new adouble[indepDim];
    adouble* activeDeps   = new adouble[depDim];
    adouble* aIP = activeIndeps;
    double*  iP  = indeps;
    for (i=0; i<indepDim; i++)
        *aIP++ <<= *iP++;
    activeGearFunction(activeIndeps,activeDeps);
    aIP = activeDeps;
    iP  = deps;
    for (i=0; i<depDim; i++)
        *aIP++ >>= *iP++;
    trace_off();
}
示例#2
0
/*                                                   The interface function */
void tapingVectorFunction( int tag, double* indeps, double* deps ) {
    int i;
    trace_on(tag);
    adouble* activeIndeps = new adouble[indepDim];
    adouble* activeDeps   = new adouble[depDim];
    adouble* aIP = activeIndeps;
    double*  iP  = indeps;
    for (i=0; i<indepDim; i++)
        *aIP++ <<= *iP++;

    i = 3;
    adouble * activeRadMotCoeff = activeIndeps+i;
    i += radMotDegree;
    adouble * activeVerMotCoeff = activeIndeps+i;
    i += verMotDegree;
    adouble * activeHorMotCoeff = activeIndeps+i;
    i += horMotDegree;
    adouble * activeHelMotCoeff = activeIndeps+i;
    i += helMotDegree;
    adouble * activeAngMotCoeff = activeIndeps+i;
    i += angMotDegree;
    adouble * activeModRolCoeff = activeIndeps+i;

    activeGearFunction(
        activeIndeps,
        activeDeps,
        // jetzt kommen die ganzen Parameter
        xmk,    // Messerversatz
        ymk,    // MK-Versatz
        kopspw, // Kopfspanwinkel
        flaspw, // Flankenspanwinkel
        meschw, // Messerschwenkwinkel
        flkrrd, // Flugkreisradius
        e,      // Exzentrizitaet
        exzenw, // Exzentrizitaetswinkel
        thetas, // Messerkopfschwenkung
        thetan, // Messerkopfneigung
        xmw,    // MK-x
        ymw,    // MK-y
        zmw,    // MK-z
        thetaw, // Wiegenwinkel
        m,      // Achsversatz
        zwr,    // Verschiebung Werkradachse
        delta,  // Teilkegeloeffnungswinkel
        omega,  //
        c,
        r,      // Kopfradius
        rs,     // Sphaerikradius
        ys,     // Sphaerik-Mitte-Y
        zs,     // Sphaerik-Mitte-Z
        // jetzt die Zusatzbewegungen
        radMotDegree,
        activeRadMotCoeff,
        verMotDegree,
        activeVerMotCoeff,
        horMotDegree,
        activeHorMotCoeff,
        helMotDegree,
        activeHelMotCoeff,
        angMotDegree,
        activeAngMotCoeff,
        modRolDegree,
        activeModRolCoeff
    );

    aIP = activeDeps;
    iP  = deps;
    for (i=0; i<depDim; i++)
        *aIP++ >>= *iP++;
    trace_off();

    delete [] activeDeps;
    delete [] activeIndeps;
}