/* nag_ode_bvp_fd_lin_gen(d02gbc) Example Program * * Copyright 1992 Numerical Algorithms Group. * * Mark 3, 1992. * Mark 7 revised, 2001. * */ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif static void fcnf(Integer neq, double x, double f[], Nag_User *comm); #ifdef __cplusplus } #endif #define NEQ 2 #define MNP 70 int main(void) { double a, b, c[NEQ][NEQ], d[NEQ][NEQ]; Integer i, j; double eps; double x[MNP], y[NEQ][MNP]; Integer neq, mnp, np; double gam[NEQ], tol; Nag_User comm; Vprintf("d02gbc Example Program Results\n"); /* For communication with function fcnf() * assign address of eps to comm.p. */ comm.p = (Pointer)&eps; neq = NEQ; mnp = MNP; tol = 1.0e-3; np = 0; a = 0.0; b = 1.0; for (i=0; ip; F(0,0) = 0.0; F(0,1) = 1.0; F(1,0) = 0.0; F(1,1) = -1.0/ *eps; }