![]() |
Bachelor's degree final project
v1.0
Faculty of Mathematics, University of Barcelona
|
00001 00010 #ifndef NEWTON_H 00011 #define NEWTON_H 00012 00013 #ifdef DEBUG 00014 #define _NEWTON_DEBUG 00015 #endif 00016 00017 #include "linear_solve.h" 00018 00024 #define _OPENMP_NEWTON_METHOD 1e2 00025 00030 #define _FUNCTION_PROTOTYPE \ 00031 void (*f)(size_t, size_t, double * const, double * const, double ** const, double, double) 00032 00033 /* Function prototypes */ 00034 00035 unsigned int get_newton_max_iterations(); 00036 unsigned int set_newton_max_iterations(unsigned int newton_max_iter); 00037 00038 void * newton_execute(size_t n, size_t N, double * const x, double * const X, double ** const DF, 00039 double w, double tol, 00040 void (*f)(size_t, size_t, double * const, double * const, double ** const, double, double), 00041 void * (*solve)(size_t, size_t, double ** const, double * const, double * const, double), 00042 short unsigned int autonomous 00043 ); 00044 00045 // void differential_block(size_t m, size_t n, double * const x, 00046 // double * const f, double ** const df, 00047 // double w, double t); 00048 00049 void newton_differential(size_t n, size_t N, double * const x, double * const X, double ** const DF, 00050 void (*f)(size_t, size_t, double * const, double * const, double ** const, double, double), 00051 double w, double * h); 00052 00053 void dft_r2r_1d(size_t n, size_t N, double * const dft, double * const x, double theta); 00054 00055 int newton(size_t m, size_t n, double * const x, double * const f, double ** const df, 00056 void * (*solve)(size_t, size_t, double ** const, double * const, double * const, double), 00057 double tol); 00058 #endif