From 86e25f127c3983cf26c05eada8321135abb9bc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 24 Aug 2012 19:28:08 +0200 Subject: [PATCH] Remove MEX support. This has not been used in a long time, and actually prevents using the module in MEX. --- opm/core/transport/reorder/nlsolvers.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/opm/core/transport/reorder/nlsolvers.c b/opm/core/transport/reorder/nlsolvers.c index df95d2b3..ae372eb2 100644 --- a/opm/core/transport/reorder/nlsolvers.c +++ b/opm/core/transport/reorder/nlsolvers.c @@ -26,24 +26,8 @@ SOFTWARE. #include #include -#ifdef MATLAB_MEX_FILE -#include "nlsolvers.h" - -#include -extern int interrupt_signal; -#define print mexPrintf -#define malloc mxMalloc -#define calloc mxCalloc -#define realloc mxRealloc -#define free mxFree - -#else /* MATLAB_MEX_FILE */ - -#define print printf #include -#endif /* MATLAB_MEX_FILE */ - static const char no_root_str[]= " In %s:\n" " With G(%5f) =% 5f, G(%5f) =% 5f, G(x) is not bracketed!\n"; @@ -100,7 +84,7 @@ ridders (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *ctr if (G0*G1 > 0) { - print(no_root_str, "ridder", s0, G0, s1, G1); + printf(no_root_str, "ridder", s0, G0, s1, G1); return -1.0; } @@ -157,7 +141,7 @@ ridders (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *ctr } else { - print("In ridder:\nG0=%10.10f, G1=%10.10f, " + printf("In ridder:\nG0=%10.10f, G1=%10.10f, " "G3=%10.10f\n", G0, G1, G3); } s2 = 0.5*(s0+s1); @@ -199,7 +183,7 @@ regulafalsi (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl if (G0*G1 > 0) { - print(no_root_str, "regulafalsi", s0, G0, s1, G1); + printf(no_root_str, "regulafalsi", s0, G0, s1, G1); return -1.0; } @@ -282,7 +266,7 @@ bisection (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *c if (G0*G1 > 0.0) { - print(no_root_str, "bisection", s0, G0, s1, G1); + printf(no_root_str, "bisection", s0, G0, s1, G1); return -1.0; } @@ -312,7 +296,7 @@ bisection (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *c } if (ctrl->iterations >= ctrl->maxiterations) { - print("Warning: convergence criterion not met\n"); + printf("Warning: convergence criterion not met\n"); } ctrl->residual = Gn; return sn;