# ifndef H_NEURAL_NET_PDE_H # define H_NEURAL_NET_PDE_H struct Neural_Net_PDE { double (*PDE)( double x, double y, double u, double u_x, double u_y, double u_xx, double u_xy, double u_yy ); void (*phi_func)( struct Neural_Net_PDE *nn, double x, double y ); double bb_xrange[2]; double bb_yrange[2]; int q; // number of units in the hidden layer int nu; // the number of training points double **training_points; // the array of training points double (*exact_sol)(double x, double y); // NULL if no exact solution available char *geomview_out; char *maple_out; char *matlab_out; int grid[2]; // // no user modifiable parts beyond this point! // int nweights; // 4*q double *weights; // the array of u, v, w double sigma[3]; // array to hold sigma, sigma', sigma'' double phi[3][3]; // array to hold phi and derivatives. double N[3][3]; }; void Neural_Net_end ( struct Neural_Net_PDE *nn ); double Neural_Net_error_vs_exact ( struct Neural_Net_PDE *nn, int m, int n ); void Neural_Net_eval ( struct Neural_Net_PDE *nn, double x, double y ); void Neural_Net_init ( struct Neural_Net_PDE *nn ); void Neural_Net_plot_with_maple ( struct Neural_Net_PDE *nn, int n, int m, char *outfile ); void Neural_Net_plot_with_matlab ( struct Neural_Net_PDE *nn, int n, int m, char *header ); double Neural_Net_residual ( double *weights, int nweights, void *params ); double residual_at_x_y ( struct Neural_Net_PDE *nn, double x, double y ); void show_usage ( char *progname ); void sigmoid ( double x, double *sigma ); void timestamp ( ); #endif