/* Initialize pointers in work array. *neq>=neqninrungek()below.Ifneq>neqn,unusedspace *isleftforextravariablesthatarenotactuallyintegrated.
*/
rkstart( neq, work ) int neq; double work[];
{ int m;
w = &work[0];
m = neq*inum;
au = &work[m];
m += neq;
ays = &work[m];
}
/* Make a step.
*/
rungek( neqn, x, yold, h, ynew, delta ) int neqn; /* number of first order equations */ double x; /* independent variable */ double yold[]; /* initial solution vector at x, size neqn */ double h; /* step to take in independent variable */ double ynew[]; /* output new solution vector at x+h, size neqn */ double delta[]; /* the step, size neqn */ /*double err[];*/ /* estimated error, size neqn */
{ double *pa, *pal, *pb, *per, *pw, *pb0, *pu, *pys; double xs, usum, esum; int i, j, m;
pb0 = &b[0];
pal = &al[0]; for( j=1; j<inum; j++ )
{
xs = x + h * *pal++;
pys = ays; for( i=0; i<neqn; i++ )
{
usum = 0.0;
pw = w + i*inum;
pb = pb0; for( m=0; m<j; m++ )
usum += (*pb++) * (*pw++);
*pys++ = yold[i] + h * usum;
}
func( xs, ays, au );
pw = w + j;
pu = au; for( i=0; i<neqn; i++ )
{
*pw = *pu++; /* w[j+i*inum] = u[i] */
pw += inum;
}
pb0 += j;
}
/* evaluate YNEW[i] and the error estimates EST[i] */
pw = w; for( i=0; i<neqn; i++ )
{
pa = &a[0]; #if ERRTERM
per = &er[0]; #endif
usum = 0.0;
esum = 0.0; for( j=0; j<inum; j++ )
{ if( *pa != 0 )
{ #if ERRTERM
esum += (*per++) * (*pw); #endif
usum += (*pa++) * (*pw++);
} else
{ /* skip if coefficient = 0 */
++pa; #if ERRTERM
++per; #endif
++pw;
}
}
xs = h * usum; /* the step in this coordinate */
delta[i] = xs;
ynew[i] = yold[i] + xs;
#if ERRTERM
err[i] = h * esum; #endif
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.13Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-14)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.