/* --------------------------------------------------- */ /* Automatically generated by mwrap */ /* --------------------------------------------------- */ /* Code generated by mwrap */ /* Copyright statement for mwrap: mwrap -- MEX file generation for MATLAB and Octave Copyright (c) 2007-2008 David Bindel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. You may distribute a work that contains part or all of the source code generated by mwrap under the terms of your choice. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #ifndef ulong # define ulong unsigned long #endif #ifndef uint # define uint unsigned int #endif #ifndef uchar # define uchar unsigned char #endif /* * Support for 32-bit and 64-bit MEX files */ #ifndef mwSize # define mwSize int #endif #ifndef mwIndex # define mwIndex int #endif #ifndef mwSignedIndex # define mwSignedIndex int #endif /* * Records for call profile. */ int* mexprofrecord_= NULL; /* * Support routines for copying data into and out of the MEX stubs */ void* mxWrapGetP(const mxArray* a, const char* fmt, const char** e) { void* p = 0; mxArray* ap; if (mxGetClassID(a) == mxDOUBLE_CLASS && mxGetM(a)*mxGetN(a) == 1 && *mxGetPr(a) == 0) return p; if (mxIsChar(a)) { char pbuf[128]; mxGetString(a, pbuf, sizeof(pbuf)); sscanf(pbuf, fmt, &p); } #ifdef R2008OO else if (ap = mxGetProperty(a, 0, "mwptr")) { return mxWrapGetP(ap, fmt, e); } #endif if (p == 0) *e = "Invalid pointer"; return p; } mxArray* mxWrapCreateP(void* p, const char* fmt) { if (p == 0) { mxArray* z = mxCreateDoubleMatrix(1,1, mxREAL); *mxGetPr(z) = 0; return z; } else { char pbuf[128]; sprintf(pbuf, fmt, p); return mxCreateString(pbuf); } } mxArray* mxWrapStrncpy(const char* s) { if (s) { return mxCreateString(s); } else { mxArray* z = mxCreateDoubleMatrix(1,1, mxREAL); *mxGetPr(z) = 0; return z; } } double mxWrapGetScalar(const mxArray* a, const char** e) { if (!a || mxGetClassID(a) != mxDOUBLE_CLASS || mxGetM(a)*mxGetN(a) != 1) { *e = "Invalid scalar argument"; return 0; } return *mxGetPr(a); } char* mxWrapGetString(const mxArray* a, const char** e) { char* s; mwSize slen; if (!a || (!mxIsChar(a) && mxGetM(a)*mxGetN(a) > 0)) { *e = "Invalid string argument"; return NULL; } slen = mxGetM(a)*mxGetN(a) + 1; s = (char*) mxMalloc(slen); if (mxGetM(a)*mxGetN(a) == 0) *s = 0; else mxGetString(a, s, slen); return s; } #define mxWrapGetArrayDef(func, T) \ T* func(const mxArray* a, const char** e) \ { \ T* array; \ mwSize arraylen; \ mwIndex i; \ T* p; \ double* q; \ if (!a || mxGetClassID(a) != mxDOUBLE_CLASS) { \ *e = "Invalid array argument"; \ return 0; \ } \ arraylen = mxGetM(a)*mxGetN(a); \ array = (T*) mxMalloc(mxGetM(a)*mxGetN(a) * sizeof(T)); \ p = array; \ q = mxGetPr(a); \ for (i = 0; i < arraylen; ++i) \ *p++ = (T) (*q++); \ return array; \ } #define mxWrapCopyDef(func, T) \ void func(mxArray* a, const T* q, mwSize n) \ { \ mwIndex i; \ double* p = mxGetPr(a); \ for (i = 0; i < n; ++i) \ *p++ = *q++; \ } #define mxWrapReturnDef(func, T) \ mxArray* func(const T* q, mwSize m, mwSize n) \ { \ mwIndex i; \ double* p; \ if (!q) { \ return mxCreateDoubleMatrix(0,0, mxREAL); \ } else { \ mxArray* a = mxCreateDoubleMatrix(m,n, mxREAL); \ p = mxGetPr(a); \ for (i = 0; i < m*n; ++i) \ *p++ = *q++; \ return a; \ } \ } #define mxWrapGetScalarZDef(func, T, ZT, setz) \ void func(T* z, const mxArray* a) \ { \ double* pr = mxGetPr(a); \ double* pi = mxGetPi(a); \ setz(z, (ZT) *pr, (pi ? (ZT) *pi : (ZT) 0)); \ } #define mxWrapGetArrayZDef(func, T, ZT, setz) \ T* func(const mxArray* a, const char** e) \ { \ T* array; \ mwSize arraylen; \ mwIndex i; \ T* p; \ double* qr; \ double* qi; \ if (!a || mxGetClassID(a) != mxDOUBLE_CLASS) { \ *e = "Invalid array argument"; \ return 0; \ } \ arraylen = mxGetM(a)*mxGetN(a); \ array = (T*) mxMalloc(mxGetM(a)*mxGetN(a) * sizeof(T)); \ p = array; \ qr = mxGetPr(a); \ qi = mxGetPi(a); \ for (i = 0; i < arraylen; ++i) { \ ZT val_qr = *qr++; \ ZT val_qi = (qi ? (ZT) *qi++ : (ZT) 0); \ setz(p, val_qr, val_qi); \ ++p; \ } \ return array; \ } #define mxWrapCopyZDef(func, T, real, imag) \ void func(mxArray* a, const T* q, mwSize n) \ { \ mwIndex i; \ double* pr = mxGetPr(a); \ double* pi = mxGetPi(a); \ for (i = 0; i < n; ++i) { \ *pr++ = real(*q); \ *pi++ = imag(*q); \ ++q; \ } \ } #define mxWrapReturnZDef(func, T, real, imag) \ mxArray* func(const T* q, mwSize m, mwSize n) \ { \ mwIndex i; \ double* pr; \ double* pi; \ if (!q) { \ return mxCreateDoubleMatrix(0,0, mxCOMPLEX); \ } else { \ mxArray* a = mxCreateDoubleMatrix(m,n, mxCOMPLEX); \ pr = mxGetPr(a); \ pi = mxGetPi(a); \ for (i = 0; i < m*n; ++i) { \ *pr++ = real(*q); \ *pi++ = imag(*q); \ ++q; \ } \ return a; \ } \ } #include typedef _Complex double dcomplex; #define real_dcomplex(z) creal(z) #define imag_dcomplex(z) cimag(z) #define setz_dcomplex(z,r,i) *z = r + i*_Complex_I typedef _Complex float fcomplex; #define real_fcomplex(z) crealf(z) #define imag_fcomplex(z) cimagf(z) #define setz_fcomplex(z,r,i) *z = r + i*_Complex_I /* Array copier definitions */ mxWrapGetArrayDef(mxWrapGetArray_bool, bool) mxWrapCopyDef (mxWrapCopy_bool, bool) mxWrapReturnDef (mxWrapReturn_bool, bool) mxWrapGetArrayDef(mxWrapGetArray_char, char) mxWrapCopyDef (mxWrapCopy_char, char) mxWrapReturnDef (mxWrapReturn_char, char) mxWrapGetArrayDef(mxWrapGetArray_double, double) mxWrapCopyDef (mxWrapCopy_double, double) mxWrapReturnDef (mxWrapReturn_double, double) mxWrapGetArrayDef(mxWrapGetArray_float, float) mxWrapCopyDef (mxWrapCopy_float, float) mxWrapReturnDef (mxWrapReturn_float, float) mxWrapGetArrayDef(mxWrapGetArray_int, int) mxWrapCopyDef (mxWrapCopy_int, int) mxWrapReturnDef (mxWrapReturn_int, int) mxWrapGetArrayDef(mxWrapGetArray_long, long) mxWrapCopyDef (mxWrapCopy_long, long) mxWrapReturnDef (mxWrapReturn_long, long) mxWrapGetArrayDef(mxWrapGetArray_mwIndex, mwIndex) mxWrapCopyDef (mxWrapCopy_mwIndex, mwIndex) mxWrapReturnDef (mxWrapReturn_mwIndex, mwIndex) mxWrapGetArrayDef(mxWrapGetArray_mwSignedIndex, mwSignedIndex) mxWrapCopyDef (mxWrapCopy_mwSignedIndex, mwSignedIndex) mxWrapReturnDef (mxWrapReturn_mwSignedIndex, mwSignedIndex) mxWrapGetArrayDef(mxWrapGetArray_mwSize, mwSize) mxWrapCopyDef (mxWrapCopy_mwSize, mwSize) mxWrapReturnDef (mxWrapReturn_mwSize, mwSize) mxWrapGetArrayDef(mxWrapGetArray_size_t, size_t) mxWrapCopyDef (mxWrapCopy_size_t, size_t) mxWrapReturnDef (mxWrapReturn_size_t, size_t) mxWrapGetArrayDef(mxWrapGetArray_uchar, uchar) mxWrapCopyDef (mxWrapCopy_uchar, uchar) mxWrapReturnDef (mxWrapReturn_uchar, uchar) mxWrapGetArrayDef(mxWrapGetArray_uint, uint) mxWrapCopyDef (mxWrapCopy_uint, uint) mxWrapReturnDef (mxWrapReturn_uint, uint) mxWrapGetArrayDef(mxWrapGetArray_ulong, ulong) mxWrapCopyDef (mxWrapCopy_ulong, ulong) mxWrapReturnDef (mxWrapReturn_ulong, ulong) mxWrapGetScalarZDef(mxWrapGetScalar_fcomplex, fcomplex, float, setz_fcomplex) mxWrapGetArrayZDef (mxWrapGetArray_fcomplex, fcomplex, float, setz_fcomplex) mxWrapCopyZDef (mxWrapCopy_fcomplex, fcomplex, real_fcomplex, imag_fcomplex) mxWrapReturnZDef (mxWrapReturn_fcomplex, fcomplex, real_fcomplex, imag_fcomplex) mxWrapGetScalarZDef(mxWrapGetScalar_dcomplex, dcomplex, double, setz_dcomplex) mxWrapGetArrayZDef (mxWrapGetArray_dcomplex, dcomplex, double, setz_dcomplex) mxWrapCopyZDef (mxWrapCopy_dcomplex, dcomplex, real_dcomplex, imag_dcomplex) mxWrapReturnZDef (mxWrapReturn_dcomplex, dcomplex, real_dcomplex, imag_dcomplex) #if defined(MWF77_CAPS) #define MWF77_hfmm2dpartself HFMM2DPARTSELF #define MWF77_hfmm2dparttarg HFMM2DPARTTARG #define MWF77_h2dpartdirect H2DPARTDIRECT #define MWF77_lfmm2dpartself LFMM2DPARTSELF #define MWF77_lfmm2dparttarg LFMM2DPARTTARG #define MWF77_l2dpartdirect L2DPARTDIRECT #define MWF77_zfmm2dpartself ZFMM2DPARTSELF #define MWF77_zfmm2dparttarg ZFMM2DPARTTARG #define MWF77_z2dpartdirect Z2DPARTDIRECT #define MWF77_cfmm2dpartself CFMM2DPARTSELF #define MWF77_cfmm2dparttarg CFMM2DPARTTARG #define MWF77_c2dpartdirect C2DPARTDIRECT #define MWF77_rfmm2dpartself RFMM2DPARTSELF #define MWF77_rfmm2dparttarg RFMM2DPARTTARG #define MWF77_r2dpartdirect R2DPARTDIRECT #define MWF77_prini PRINI #define MWF77_d2tstrcr D2TSTRCR #define MWF77_d2tstrcrem D2TSTRCREM #define MWF77_d2tgetb D2TGETB #define MWF77_d2tgetl D2TGETL #elif defined(MWF77_UNDERSCORE1) #define MWF77_hfmm2dpartself hfmm2dpartself_ #define MWF77_hfmm2dparttarg hfmm2dparttarg_ #define MWF77_h2dpartdirect h2dpartdirect_ #define MWF77_lfmm2dpartself lfmm2dpartself_ #define MWF77_lfmm2dparttarg lfmm2dparttarg_ #define MWF77_l2dpartdirect l2dpartdirect_ #define MWF77_zfmm2dpartself zfmm2dpartself_ #define MWF77_zfmm2dparttarg zfmm2dparttarg_ #define MWF77_z2dpartdirect z2dpartdirect_ #define MWF77_cfmm2dpartself cfmm2dpartself_ #define MWF77_cfmm2dparttarg cfmm2dparttarg_ #define MWF77_c2dpartdirect c2dpartdirect_ #define MWF77_rfmm2dpartself rfmm2dpartself_ #define MWF77_rfmm2dparttarg rfmm2dparttarg_ #define MWF77_r2dpartdirect r2dpartdirect_ #define MWF77_prini prini_ #define MWF77_d2tstrcr d2tstrcr_ #define MWF77_d2tstrcrem d2tstrcrem_ #define MWF77_d2tgetb d2tgetb_ #define MWF77_d2tgetl d2tgetl_ #else /* f2c convention */ #define MWF77_hfmm2dpartself hfmm2dpartself_ #define MWF77_hfmm2dparttarg hfmm2dparttarg_ #define MWF77_h2dpartdirect h2dpartdirect_ #define MWF77_lfmm2dpartself lfmm2dpartself_ #define MWF77_lfmm2dparttarg lfmm2dparttarg_ #define MWF77_l2dpartdirect l2dpartdirect_ #define MWF77_zfmm2dpartself zfmm2dpartself_ #define MWF77_zfmm2dparttarg zfmm2dparttarg_ #define MWF77_z2dpartdirect z2dpartdirect_ #define MWF77_cfmm2dpartself cfmm2dpartself_ #define MWF77_cfmm2dparttarg cfmm2dparttarg_ #define MWF77_c2dpartdirect c2dpartdirect_ #define MWF77_rfmm2dpartself rfmm2dpartself_ #define MWF77_rfmm2dparttarg rfmm2dparttarg_ #define MWF77_r2dpartdirect r2dpartdirect_ #define MWF77_prini prini_ #define MWF77_d2tstrcr d2tstrcr_ #define MWF77_d2tstrcrem d2tstrcrem_ #define MWF77_d2tgetb d2tgetb_ #define MWF77_d2tgetl d2tgetl_ #endif #ifdef __cplusplus extern "C" { /* Prevent C++ name mangling */ #endif #ifndef MWF77_RETURN #define MWF77_RETURN int #endif MWF77_RETURN MWF77_hfmm2dpartself(int*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_hfmm2dparttarg(int*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_h2dpartdirect(dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_lfmm2dpartself(int*, int*, int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_lfmm2dparttarg(int*, int*, int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_l2dpartdirect(int*, double*, int*, dcomplex*, int*, dcomplex*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_zfmm2dpartself(int*, int*, int*, double*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_zfmm2dparttarg(int*, int*, int*, double*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_z2dpartdirect(int*, double*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_cfmm2dpartself(int*, int*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_cfmm2dparttarg(int*, int*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_c2dpartdirect(int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*, int*, double*, int*, dcomplex*, int*, dcomplex*, int*, dcomplex*); MWF77_RETURN MWF77_rfmm2dpartself(int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, double*, int*, double*); MWF77_RETURN MWF77_rfmm2dparttarg(int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*); MWF77_RETURN MWF77_r2dpartdirect(int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*); MWF77_RETURN MWF77_prini(int*, int*); MWF77_RETURN MWF77_d2tstrcr(int*, double*, int*, int*, int*, int*, int*, int*, double*, double*, double*, int*, int*, double*, int*, int*); MWF77_RETURN MWF77_d2tstrcrem(int*, double*, int*, int*, int*, int*, int*, int*, double*, double*, double*, int*, int*, double*, int*, int*, int*, int*, int*); MWF77_RETURN MWF77_d2tgetb(int*, int*, int*, double*, double*, double*); MWF77_RETURN MWF77_d2tgetl(int*, int*, int*, int*, int*, double*); #ifdef __cplusplus } /* end extern C */ #endif /* ---- fmm2d_r2012a.mw: 163 ---- * hfmm2dpartself(inout int[1] ier, int[1] iprec, dcomplex[1] zk, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess); */ const char* stubids1_ = "hfmm2dpartself(io int[x], i int[x], i dcomplex[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub1(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ dcomplex* in2_ =0; /* zk */ int* in3_ =0; /* nsource */ double* in4_ =0; /* source */ int* in5_ =0; /* ifcharge */ dcomplex* in6_ =0; /* charge */ int* in7_ =0; /* ifdipole */ dcomplex* in8_ =0; /* dipstr */ double* in9_ =0; /* dipvec */ int* in10_ =0; /* ifpot */ dcomplex* in11_ =0; /* pot */ int* in12_ =0; /* ifgrad */ dcomplex* in13_ =0; /* grad */ int* in14_ =0; /* ifhess */ dcomplex* in15_ =0; /* hess */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 1 */ mwSize dim19_; /* 1 */ mwSize dim20_; /* 2 */ mwSize dim21_; /* nsource */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 2 */ mwSize dim25_; /* nsource */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 1 */ dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim16_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim17_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim18_) { mw_err_txt_ = "Bad argument size: zk"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim19_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[4]) != dim20_ || mxGetN(prhs[4]) != dim21_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim22_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim23_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[9]) != dim24_ || mxGetN(prhs[9]) != dim25_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim26_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim27_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim28_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_dcomplex(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxGetPr(prhs[4]); } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxGetPr(prhs[9]); } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_dcomplex(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_dcomplex(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mexprofrecord_) mexprofrecord_[1]++; MWF77_hfmm2dpartself(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_); plhs[0] = mxCreateDoubleMatrix(dim16_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim16_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[15]), mxGetN(prhs[15]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in15_, mxGetM(prhs[15])*mxGetN(prhs[15])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 165 ---- * hfmm2dparttarg(inout int[1] ier, int[1] iprec, dcomplex[1] zk, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids2_ = "hfmm2dparttarg(io int[x], i int[x], i dcomplex[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub2(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ dcomplex* in2_ =0; /* zk */ int* in3_ =0; /* nsource */ double* in4_ =0; /* source */ int* in5_ =0; /* ifcharge */ dcomplex* in6_ =0; /* charge */ int* in7_ =0; /* ifdipole */ dcomplex* in8_ =0; /* dipstr */ double* in9_ =0; /* dipvec */ int* in10_ =0; /* ifpot */ dcomplex* in11_ =0; /* pot */ int* in12_ =0; /* ifgrad */ dcomplex* in13_ =0; /* grad */ int* in14_ =0; /* ifhess */ dcomplex* in15_ =0; /* hess */ int* in16_ =0; /* ntarget */ double* in17_ =0; /* target */ int* in18_ =0; /* ifpottarg */ dcomplex* in19_ =0; /* pottarg */ int* in20_ =0; /* ifgradtarg */ dcomplex* in21_ =0; /* gradtarg */ int* in22_ =0; /* ifhesstarg */ dcomplex* in23_ =0; /* hesstarg */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 2 */ mwSize dim29_; /* nsource */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ mwSize dim32_; /* 2 */ mwSize dim33_; /* nsource */ mwSize dim34_; /* 1 */ mwSize dim35_; /* 1 */ mwSize dim36_; /* 1 */ mwSize dim37_; /* 1 */ mwSize dim38_; /* 1 */ mwSize dim39_; /* 1 */ mwSize dim40_; /* 1 */ dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); dim35_ = (mwSize) mxWrapGetScalar(prhs[35], &mw_err_txt_); dim36_ = (mwSize) mxWrapGetScalar(prhs[36], &mw_err_txt_); dim37_ = (mwSize) mxWrapGetScalar(prhs[37], &mw_err_txt_); dim38_ = (mwSize) mxWrapGetScalar(prhs[38], &mw_err_txt_); dim39_ = (mwSize) mxWrapGetScalar(prhs[39], &mw_err_txt_); dim40_ = (mwSize) mxWrapGetScalar(prhs[40], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim24_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim25_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim26_) { mw_err_txt_ = "Bad argument size: zk"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim27_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[4]) != dim28_ || mxGetN(prhs[4]) != dim29_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim30_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim31_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[9]) != dim32_ || mxGetN(prhs[9]) != dim33_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim34_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim35_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim36_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[16])*mxGetN(prhs[16]) != dim37_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[18])*mxGetN(prhs[18]) != dim38_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[20])*mxGetN(prhs[20]) != dim39_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[22])*mxGetN(prhs[22]) != dim40_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_dcomplex(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxGetPr(prhs[4]); } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxGetPr(prhs[9]); } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_dcomplex(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_dcomplex(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_int(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxGetPr(prhs[17]); } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_int(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_dcomplex(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_int(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mxGetM(prhs[21])*mxGetN(prhs[21]) != 0) { in21_ = mxWrapGetArray_dcomplex(prhs[21], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in21_ = NULL; if (mxGetM(prhs[22])*mxGetN(prhs[22]) != 0) { in22_ = mxWrapGetArray_int(prhs[22], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in22_ = NULL; if (mxGetM(prhs[23])*mxGetN(prhs[23]) != 0) { in23_ = mxWrapGetArray_dcomplex(prhs[23], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in23_ = NULL; if (mexprofrecord_) mexprofrecord_[2]++; MWF77_hfmm2dparttarg(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_, in21_, in22_, in23_); plhs[0] = mxCreateDoubleMatrix(dim24_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim24_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[15]), mxGetN(prhs[15]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in15_, mxGetM(prhs[15])*mxGetN(prhs[15])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[19]), mxGetN(prhs[19]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in19_, mxGetM(prhs[19])*mxGetN(prhs[19])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[21]), mxGetN(prhs[21]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in21_, mxGetM(prhs[21])*mxGetN(prhs[21])); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[23]), mxGetN(prhs[23]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[6], in23_, mxGetM(prhs[23])*mxGetN(prhs[23])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (in21_) mxFree(in21_); if (in22_) mxFree(in22_); if (in23_) mxFree(in23_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 305 ---- * h2dpartdirect(dcomplex[1] zk, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids3_ = "h2dpartdirect(i dcomplex[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub3(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; dcomplex* in0_ =0; /* zk */ int* in1_ =0; /* nsource */ double* in2_ =0; /* source */ int* in3_ =0; /* ifcharge */ dcomplex* in4_ =0; /* charge */ int* in5_ =0; /* ifdipole */ dcomplex* in6_ =0; /* dipstr */ double* in7_ =0; /* dipvec */ int* in8_ =0; /* ifpot */ dcomplex* in9_ =0; /* pot */ int* in10_ =0; /* ifgrad */ dcomplex* in11_ =0; /* grad */ int* in12_ =0; /* ifhess */ dcomplex* in13_ =0; /* hess */ int* in14_ =0; /* ntarget */ double* in15_ =0; /* target */ int* in16_ =0; /* ifpottarg */ dcomplex* in17_ =0; /* pottarg */ int* in18_ =0; /* ifgradtarg */ dcomplex* in19_ =0; /* gradtarg */ int* in20_ =0; /* ifhesstarg */ dcomplex* in21_ =0; /* hesstarg */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 2 */ mwSize dim25_; /* nsource */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 2 */ mwSize dim29_; /* nsource */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ mwSize dim35_; /* 1 */ mwSize dim36_; /* 1 */ dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); dim35_ = (mwSize) mxWrapGetScalar(prhs[35], &mw_err_txt_); dim36_ = (mwSize) mxWrapGetScalar(prhs[36], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim22_) { mw_err_txt_ = "Bad argument size: zk"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim23_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[2]) != dim24_ || mxGetN(prhs[2]) != dim25_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim26_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim27_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[7]) != dim28_ || mxGetN(prhs[7]) != dim29_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[8])*mxGetN(prhs[8]) != dim30_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim31_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim32_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim33_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[16])*mxGetN(prhs[16]) != dim34_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[18])*mxGetN(prhs[18]) != dim35_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[20])*mxGetN(prhs[20]) != dim36_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_dcomplex(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxGetPr(prhs[2]); } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_dcomplex(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxGetPr(prhs[7]); } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_int(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_dcomplex(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_dcomplex(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxGetPr(prhs[15]); } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_int(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_dcomplex(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_int(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_dcomplex(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_int(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mxGetM(prhs[21])*mxGetN(prhs[21]) != 0) { in21_ = mxWrapGetArray_dcomplex(prhs[21], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in21_ = NULL; if (mexprofrecord_) mexprofrecord_[3]++; MWF77_h2dpartdirect(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_, in21_); plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[0], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[17]), mxGetN(prhs[17]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in17_, mxGetM(prhs[17])*mxGetN(prhs[17])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[19]), mxGetN(prhs[19]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in19_, mxGetM(prhs[19])*mxGetN(prhs[19])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[21]), mxGetN(prhs[21]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in21_, mxGetM(prhs[21])*mxGetN(prhs[21])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (in21_) mxFree(in21_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 460 ---- * lfmm2dpartself(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess); */ const char* stubids4_ = "lfmm2dpartself(io int[x], i int[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub4(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ dcomplex* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ dcomplex* in7_ =0; /* dipstr */ double* in8_ =0; /* dipvec */ int* in9_ =0; /* ifpot */ dcomplex* in10_ =0; /* pot */ int* in11_ =0; /* ifgrad */ dcomplex* in12_ =0; /* grad */ int* in13_ =0; /* ifhess */ dcomplex* in14_ =0; /* hess */ mwSize dim15_; /* 1 */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 2 */ mwSize dim19_; /* nsource */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 2 */ mwSize dim23_; /* nsource */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ dim15_ = (mwSize) mxWrapGetScalar(prhs[15], &mw_err_txt_); dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim15_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim16_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim17_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim18_ || mxGetN(prhs[3]) != dim19_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim20_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim21_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8]) != dim22_ || mxGetN(prhs[8]) != dim23_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim24_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim25_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim26_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_dcomplex(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxGetPr(prhs[8]); } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_dcomplex(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_dcomplex(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_dcomplex(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mexprofrecord_) mexprofrecord_[4]++; MWF77_lfmm2dpartself(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_); plhs[0] = mxCreateDoubleMatrix(dim15_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim15_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 462 ---- * lfmm2dparttarg(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids5_ = "lfmm2dparttarg(io int[x], i int[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub5(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ dcomplex* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ dcomplex* in7_ =0; /* dipstr */ double* in8_ =0; /* dipvec */ int* in9_ =0; /* ifpot */ dcomplex* in10_ =0; /* pot */ int* in11_ =0; /* ifgrad */ dcomplex* in12_ =0; /* grad */ int* in13_ =0; /* ifhess */ dcomplex* in14_ =0; /* hess */ int* in15_ =0; /* ntarget */ double* in16_ =0; /* target */ int* in17_ =0; /* ifpottarg */ dcomplex* in18_ =0; /* pottarg */ int* in19_ =0; /* ifgradtarg */ dcomplex* in20_ =0; /* gradtarg */ int* in21_ =0; /* ifhesstarg */ dcomplex* in22_ =0; /* hesstarg */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 2 */ mwSize dim27_; /* nsource */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 2 */ mwSize dim31_; /* nsource */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ mwSize dim35_; /* 1 */ mwSize dim36_; /* 1 */ mwSize dim37_; /* 1 */ mwSize dim38_; /* 1 */ dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); dim35_ = (mwSize) mxWrapGetScalar(prhs[35], &mw_err_txt_); dim36_ = (mwSize) mxWrapGetScalar(prhs[36], &mw_err_txt_); dim37_ = (mwSize) mxWrapGetScalar(prhs[37], &mw_err_txt_); dim38_ = (mwSize) mxWrapGetScalar(prhs[38], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim23_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim24_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim25_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim26_ || mxGetN(prhs[3]) != dim27_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim28_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim29_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8]) != dim30_ || mxGetN(prhs[8]) != dim31_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim32_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim33_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim34_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim35_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim36_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[19])*mxGetN(prhs[19]) != dim37_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[21])*mxGetN(prhs[21]) != dim38_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_dcomplex(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxGetPr(prhs[8]); } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_dcomplex(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_dcomplex(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_dcomplex(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxGetPr(prhs[16]); } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_dcomplex(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_int(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_dcomplex(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mxGetM(prhs[21])*mxGetN(prhs[21]) != 0) { in21_ = mxWrapGetArray_int(prhs[21], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in21_ = NULL; if (mxGetM(prhs[22])*mxGetN(prhs[22]) != 0) { in22_ = mxWrapGetArray_dcomplex(prhs[22], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in22_ = NULL; if (mexprofrecord_) mexprofrecord_[5]++; MWF77_lfmm2dparttarg(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_, in21_, in22_); plhs[0] = mxCreateDoubleMatrix(dim23_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim23_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[18]), mxGetN(prhs[18]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in18_, mxGetM(prhs[18])*mxGetN(prhs[18])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[20]), mxGetN(prhs[20]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in20_, mxGetM(prhs[20])*mxGetN(prhs[20])); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[22]), mxGetN(prhs[22]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[6], in22_, mxGetM(prhs[22])*mxGetN(prhs[22])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (in21_) mxFree(in21_); if (in22_) mxFree(in22_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 601 ---- * l2dpartdirect(int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids6_ = "l2dpartdirect(i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i double[xx], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub6(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* nsource */ double* in1_ =0; /* source */ int* in2_ =0; /* ifcharge */ dcomplex* in3_ =0; /* charge */ int* in4_ =0; /* ifdipole */ dcomplex* in5_ =0; /* dipstr */ double* in6_ =0; /* dipvec */ int* in7_ =0; /* ifpot */ dcomplex* in8_ =0; /* pot */ int* in9_ =0; /* ifgrad */ dcomplex* in10_ =0; /* grad */ int* in11_ =0; /* ifhess */ dcomplex* in12_ =0; /* hess */ int* in13_ =0; /* ntarget */ double* in14_ =0; /* target */ int* in15_ =0; /* ifpottarg */ dcomplex* in16_ =0; /* pottarg */ int* in17_ =0; /* ifgradtarg */ dcomplex* in18_ =0; /* gradtarg */ int* in19_ =0; /* ifhesstarg */ dcomplex* in20_ =0; /* hesstarg */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 2 */ mwSize dim23_; /* nsource */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 2 */ mwSize dim27_; /* nsource */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim21_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[1]) != dim22_ || mxGetN(prhs[1]) != dim23_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim24_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim25_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[6]) != dim26_ || mxGetN(prhs[6]) != dim27_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim28_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim29_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim30_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim31_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim32_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim33_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[19])*mxGetN(prhs[19]) != dim34_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_dcomplex(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxGetPr(prhs[6]); } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_dcomplex(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_dcomplex(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxGetPr(prhs[14]); } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_dcomplex(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_dcomplex(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_int(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_dcomplex(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mexprofrecord_) mexprofrecord_[6]++; MWF77_l2dpartdirect(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_); plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[0], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[16]), mxGetN(prhs[16]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in16_, mxGetM(prhs[16])*mxGetN(prhs[16])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[18]), mxGetN(prhs[18]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in18_, mxGetM(prhs[18])*mxGetN(prhs[18])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[20]), mxGetN(prhs[20]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in20_, mxGetM(prhs[20])*mxGetN(prhs[20])); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 737 ---- * zfmm2dpartself(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess); */ const char* stubids7_ = "zfmm2dpartself(io int[x], i int[x], i int[x], i double[xx], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub7(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ dcomplex* in4_ =0; /* dipstr */ int* in5_ =0; /* ifpot */ dcomplex* in6_ =0; /* pot */ int* in7_ =0; /* ifgrad */ dcomplex* in8_ =0; /* grad */ int* in9_ =0; /* ifhess */ dcomplex* in10_ =0; /* hess */ mwSize dim11_; /* 1 */ mwSize dim12_; /* 1 */ mwSize dim13_; /* 1 */ mwSize dim14_; /* 2 */ mwSize dim15_; /* nsource */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 1 */ dim11_ = (mwSize) mxWrapGetScalar(prhs[11], &mw_err_txt_); dim12_ = (mwSize) mxWrapGetScalar(prhs[12], &mw_err_txt_); dim13_ = (mwSize) mxWrapGetScalar(prhs[13], &mw_err_txt_); dim14_ = (mwSize) mxWrapGetScalar(prhs[14], &mw_err_txt_); dim15_ = (mwSize) mxWrapGetScalar(prhs[15], &mw_err_txt_); dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim11_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim12_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim13_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim14_ || mxGetN(prhs[3]) != dim15_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim16_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim17_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim18_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_dcomplex(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_dcomplex(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mexprofrecord_) mexprofrecord_[7]++; MWF77_zfmm2dpartself(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_); plhs[0] = mxCreateDoubleMatrix(dim11_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim11_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[6]), mxGetN(prhs[6]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in6_, mxGetM(prhs[6])*mxGetN(prhs[6])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 739 ---- * zfmm2dparttarg(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids8_ = "zfmm2dparttarg(io int[x], i int[x], i int[x], i double[xx], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub8(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ dcomplex* in4_ =0; /* dipstr */ int* in5_ =0; /* ifpot */ dcomplex* in6_ =0; /* pot */ int* in7_ =0; /* ifgrad */ dcomplex* in8_ =0; /* grad */ int* in9_ =0; /* ifhess */ dcomplex* in10_ =0; /* hess */ int* in11_ =0; /* ntarget */ double* in12_ =0; /* target */ int* in13_ =0; /* ifpottarg */ dcomplex* in14_ =0; /* pottarg */ int* in15_ =0; /* ifgradtarg */ dcomplex* in16_ =0; /* gradtarg */ int* in17_ =0; /* ifhesstarg */ dcomplex* in18_ =0; /* hesstarg */ mwSize dim19_; /* 1 */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 2 */ mwSize dim23_; /* nsource */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 1 */ dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim19_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim20_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim21_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim22_ || mxGetN(prhs[3]) != dim23_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim24_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim25_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim26_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim27_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim28_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim29_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim30_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_dcomplex(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_dcomplex(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxGetPr(prhs[12]); } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_dcomplex(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_dcomplex(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_dcomplex(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mexprofrecord_) mexprofrecord_[8]++; MWF77_zfmm2dparttarg(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_); plhs[0] = mxCreateDoubleMatrix(dim19_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim19_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[6]), mxGetN(prhs[6]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in6_, mxGetM(prhs[6])*mxGetN(prhs[6])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[16]), mxGetN(prhs[16]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in16_, mxGetM(prhs[16])*mxGetN(prhs[16])); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[18]), mxGetN(prhs[18]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[6], in18_, mxGetM(prhs[18])*mxGetN(prhs[18])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 859 ---- * z2dpartdirect(int[1] nsource, double[2, nsource] source, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids9_ = "z2dpartdirect(i int[x], i double[xx], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub9(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* nsource */ double* in1_ =0; /* source */ dcomplex* in2_ =0; /* dipstr */ int* in3_ =0; /* ifpot */ dcomplex* in4_ =0; /* pot */ int* in5_ =0; /* ifgrad */ dcomplex* in6_ =0; /* grad */ int* in7_ =0; /* ifhess */ dcomplex* in8_ =0; /* hess */ int* in9_ =0; /* ntarget */ double* in10_ =0; /* target */ int* in11_ =0; /* ifpottarg */ dcomplex* in12_ =0; /* pottarg */ int* in13_ =0; /* ifgradtarg */ dcomplex* in14_ =0; /* gradtarg */ int* in15_ =0; /* ifhesstarg */ dcomplex* in16_ =0; /* hesstarg */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 2 */ mwSize dim19_; /* nsource */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim17_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[1]) != dim18_ || mxGetN(prhs[1]) != dim19_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim20_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[5])*mxGetN(prhs[5]) != dim21_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim22_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim23_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim24_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim25_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim26_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_dcomplex(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_dcomplex(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_dcomplex(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_dcomplex(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxGetPr(prhs[10]); } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_dcomplex(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_dcomplex(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_dcomplex(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mexprofrecord_) mexprofrecord_[9]++; MWF77_z2dpartdirect(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_); plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[4]), mxGetN(prhs[4]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[0], in4_, mxGetM(prhs[4])*mxGetN(prhs[4])); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[6]), mxGetN(prhs[6]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in6_, mxGetM(prhs[6])*mxGetN(prhs[6])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[16]), mxGetN(prhs[16]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in16_, mxGetM(prhs[16])*mxGetN(prhs[16])); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1010 ---- * cfmm2dpartself(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess); */ const char* stubids10_ = "cfmm2dpartself(io int[x], i int[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub10(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ dcomplex* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ dcomplex* in7_ =0; /* dipstr */ int* in8_ =0; /* ifpot */ dcomplex* in9_ =0; /* pot */ int* in10_ =0; /* ifgrad */ dcomplex* in11_ =0; /* grad */ int* in12_ =0; /* ifhess */ dcomplex* in13_ =0; /* hess */ mwSize dim14_; /* 1 */ mwSize dim15_; /* 1 */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 2 */ mwSize dim18_; /* nsource */ mwSize dim19_; /* 1 */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ dim14_ = (mwSize) mxWrapGetScalar(prhs[14], &mw_err_txt_); dim15_ = (mwSize) mxWrapGetScalar(prhs[15], &mw_err_txt_); dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim14_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim15_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim16_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim17_ || mxGetN(prhs[3]) != dim18_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim19_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim20_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8])*mxGetN(prhs[8]) != dim21_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim22_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim23_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_dcomplex(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_int(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_dcomplex(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_dcomplex(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mexprofrecord_) mexprofrecord_[10]++; MWF77_cfmm2dpartself(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_); plhs[0] = mxCreateDoubleMatrix(dim14_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim14_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1012 ---- * cfmm2dparttarg(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids11_ = "cfmm2dparttarg(io int[x], i int[x], i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub11(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ dcomplex* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ dcomplex* in7_ =0; /* dipstr */ int* in8_ =0; /* ifpot */ dcomplex* in9_ =0; /* pot */ int* in10_ =0; /* ifgrad */ dcomplex* in11_ =0; /* grad */ int* in12_ =0; /* ifhess */ dcomplex* in13_ =0; /* hess */ int* in14_ =0; /* ntarget */ double* in15_ =0; /* target */ int* in16_ =0; /* ifpottarg */ dcomplex* in17_ =0; /* pottarg */ int* in18_ =0; /* ifgradtarg */ dcomplex* in19_ =0; /* gradtarg */ int* in20_ =0; /* ifhesstarg */ dcomplex* in21_ =0; /* hesstarg */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 2 */ mwSize dim26_; /* nsource */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ mwSize dim35_; /* 1 */ dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); dim35_ = (mwSize) mxWrapGetScalar(prhs[35], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim22_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim23_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim24_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim25_ || mxGetN(prhs[3]) != dim26_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim27_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim28_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8])*mxGetN(prhs[8]) != dim29_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim30_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim31_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim32_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[16])*mxGetN(prhs[16]) != dim33_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[18])*mxGetN(prhs[18]) != dim34_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[20])*mxGetN(prhs[20]) != dim35_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_dcomplex(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_int(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_dcomplex(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_dcomplex(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxGetPr(prhs[15]); } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_int(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_dcomplex(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_int(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_dcomplex(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_int(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mxGetM(prhs[21])*mxGetN(prhs[21]) != 0) { in21_ = mxWrapGetArray_dcomplex(prhs[21], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in21_ = NULL; if (mexprofrecord_) mexprofrecord_[11]++; MWF77_cfmm2dparttarg(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_, in21_); plhs[0] = mxCreateDoubleMatrix(dim22_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim22_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[17]), mxGetN(prhs[17]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in17_, mxGetM(prhs[17])*mxGetN(prhs[17])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[19]), mxGetN(prhs[19]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in19_, mxGetM(prhs[19])*mxGetN(prhs[19])); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[21]), mxGetN(prhs[21]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[6], in21_, mxGetM(prhs[21])*mxGetN(prhs[21])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (in21_) mxFree(in21_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1147 ---- * c2dpartdirect(int[1] nsource, double[2, nsource] source, int[1] ifcharge, dcomplex[] charge, int[1] ifdipole, dcomplex[] dipstr, int[1] ifpot, inout dcomplex[] pot, int[1] ifgrad, inout dcomplex[] grad, int[1] ifhess, inout dcomplex[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout dcomplex[] pottarg, int[1] ifgradtarg, inout dcomplex[] gradtarg, int[1] ifhesstarg, inout dcomplex[] hesstarg); */ const char* stubids12_ = "c2dpartdirect(i int[x], i double[xx], i int[x], i dcomplex[], i int[x], i dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], i double[], i int[x], io dcomplex[], i int[x], io dcomplex[], i int[x], io dcomplex[])"; void mexStub12(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* nsource */ double* in1_ =0; /* source */ int* in2_ =0; /* ifcharge */ dcomplex* in3_ =0; /* charge */ int* in4_ =0; /* ifdipole */ dcomplex* in5_ =0; /* dipstr */ int* in6_ =0; /* ifpot */ dcomplex* in7_ =0; /* pot */ int* in8_ =0; /* ifgrad */ dcomplex* in9_ =0; /* grad */ int* in10_ =0; /* ifhess */ dcomplex* in11_ =0; /* hess */ int* in12_ =0; /* ntarget */ double* in13_ =0; /* target */ int* in14_ =0; /* ifpottarg */ dcomplex* in15_ =0; /* pottarg */ int* in16_ =0; /* ifgradtarg */ dcomplex* in17_ =0; /* gradtarg */ int* in18_ =0; /* ifhesstarg */ dcomplex* in19_ =0; /* hesstarg */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 2 */ mwSize dim22_; /* nsource */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim20_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[1]) != dim21_ || mxGetN(prhs[1]) != dim22_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim23_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim24_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim25_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[8])*mxGetN(prhs[8]) != dim26_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[10])*mxGetN(prhs[10]) != dim27_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[12])*mxGetN(prhs[12]) != dim28_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim29_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[16])*mxGetN(prhs[16]) != dim30_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[18])*mxGetN(prhs[18]) != dim31_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_dcomplex(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_dcomplex(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_dcomplex(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_int(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_dcomplex(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_int(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_dcomplex(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxGetPr(prhs[13]); } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_dcomplex(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_int(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_dcomplex(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_int(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_dcomplex(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mexprofrecord_) mexprofrecord_[12]++; MWF77_c2dpartdirect(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_); plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[7]), mxGetN(prhs[7]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[0], in7_, mxGetM(prhs[7])*mxGetN(prhs[7])); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[1], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[11]), mxGetN(prhs[11]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[2], in11_, mxGetM(prhs[11])*mxGetN(prhs[11])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[15]), mxGetN(prhs[15]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[3], in15_, mxGetM(prhs[15])*mxGetN(prhs[15])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[17]), mxGetN(prhs[17]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[4], in17_, mxGetM(prhs[17])*mxGetN(prhs[17])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[19]), mxGetN(prhs[19]), mxCOMPLEX); mxWrapCopy_dcomplex(plhs[5], in19_, mxGetM(prhs[19])*mxGetN(prhs[19])); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1302 ---- * rfmm2dpartself(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, double[] charge, int[1] ifdipole, double[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout double[] pot, int[1] ifgrad, inout double[] grad, int[1] ifhess, inout double[] hess); */ const char* stubids13_ = "rfmm2dpartself(io int[x], i int[x], i int[x], i double[xx], i int[x], i double[], i int[x], i double[], i double[xx], i int[x], io double[], i int[x], io double[], i int[x], io double[])"; void mexStub13(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ double* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ double* in7_ =0; /* dipstr */ double* in8_ =0; /* dipvec */ int* in9_ =0; /* ifpot */ double* in10_ =0; /* pot */ int* in11_ =0; /* ifgrad */ double* in12_ =0; /* grad */ int* in13_ =0; /* ifhess */ double* in14_ =0; /* hess */ mwSize dim15_; /* 1 */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 2 */ mwSize dim19_; /* nsource */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 2 */ mwSize dim23_; /* nsource */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ dim15_ = (mwSize) mxWrapGetScalar(prhs[15], &mw_err_txt_); dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim15_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim16_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim17_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim18_ || mxGetN(prhs[3]) != dim19_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim20_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim21_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8]) != dim22_ || mxGetN(prhs[8]) != dim23_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim24_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim25_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim26_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxGetPr(prhs[5]); } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxGetPr(prhs[7]); } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxGetPr(prhs[8]); } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_double(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_double(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_double(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mexprofrecord_) mexprofrecord_[13]++; MWF77_rfmm2dpartself(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_); plhs[0] = mxCreateDoubleMatrix(dim15_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim15_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxREAL); mxWrapCopy_double(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxREAL); mxWrapCopy_double(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxREAL); mxWrapCopy_double(plhs[3], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in6_) mxFree(in6_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1304 ---- * rfmm2dparttarg(inout int[1] ier, int[1] iprec, int[1] nsource, double[2, nsource] source, int[1] ifcharge, double[] charge, int[1] ifdipole, double[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout double[] pot, int[1] ifgrad, inout double[] grad, int[1] ifhess, inout double[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout double[] pottarg, int[1] ifgradtarg, inout double[] gradtarg, int[1] ifhesstarg, inout double[] hesstarg); */ const char* stubids14_ = "rfmm2dparttarg(io int[x], i int[x], i int[x], i double[xx], i int[x], i double[], i int[x], i double[], i double[xx], i int[x], io double[], i int[x], io double[], i int[x], io double[], i int[x], i double[], i int[x], io double[], i int[x], io double[], i int[x], io double[])"; void mexStub14(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* iprec */ int* in2_ =0; /* nsource */ double* in3_ =0; /* source */ int* in4_ =0; /* ifcharge */ double* in5_ =0; /* charge */ int* in6_ =0; /* ifdipole */ double* in7_ =0; /* dipstr */ double* in8_ =0; /* dipvec */ int* in9_ =0; /* ifpot */ double* in10_ =0; /* pot */ int* in11_ =0; /* ifgrad */ double* in12_ =0; /* grad */ int* in13_ =0; /* ifhess */ double* in14_ =0; /* hess */ int* in15_ =0; /* ntarget */ double* in16_ =0; /* target */ int* in17_ =0; /* ifpottarg */ double* in18_ =0; /* pottarg */ int* in19_ =0; /* ifgradtarg */ double* in20_ =0; /* gradtarg */ int* in21_ =0; /* ifhesstarg */ double* in22_ =0; /* hesstarg */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 2 */ mwSize dim27_; /* nsource */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 2 */ mwSize dim31_; /* nsource */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ mwSize dim35_; /* 1 */ mwSize dim36_; /* 1 */ mwSize dim37_; /* 1 */ mwSize dim38_; /* 1 */ dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); dim35_ = (mwSize) mxWrapGetScalar(prhs[35], &mw_err_txt_); dim36_ = (mwSize) mxWrapGetScalar(prhs[36], &mw_err_txt_); dim37_ = (mwSize) mxWrapGetScalar(prhs[37], &mw_err_txt_); dim38_ = (mwSize) mxWrapGetScalar(prhs[38], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim23_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim24_) { mw_err_txt_ = "Bad argument size: iprec"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim25_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3]) != dim26_ || mxGetN(prhs[3]) != dim27_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim28_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[6])*mxGetN(prhs[6]) != dim29_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[8]) != dim30_ || mxGetN(prhs[8]) != dim31_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim32_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim33_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim34_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim35_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim36_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[19])*mxGetN(prhs[19]) != dim37_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[21])*mxGetN(prhs[21]) != dim38_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxGetPr(prhs[5]); } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxGetPr(prhs[7]); } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxGetPr(prhs[8]); } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_double(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_double(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_double(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxGetPr(prhs[16]); } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_double(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_int(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_double(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mxGetM(prhs[21])*mxGetN(prhs[21]) != 0) { in21_ = mxWrapGetArray_int(prhs[21], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in21_ = NULL; if (mxGetM(prhs[22])*mxGetN(prhs[22]) != 0) { in22_ = mxWrapGetArray_double(prhs[22], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in22_ = NULL; if (mexprofrecord_) mexprofrecord_[14]++; MWF77_rfmm2dparttarg(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_, in21_, in22_); plhs[0] = mxCreateDoubleMatrix(dim23_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim23_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxREAL); mxWrapCopy_double(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxREAL); mxWrapCopy_double(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[14]), mxGetN(prhs[14]), mxREAL); mxWrapCopy_double(plhs[3], in14_, mxGetM(prhs[14])*mxGetN(prhs[14])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[18]), mxGetN(prhs[18]), mxREAL); mxWrapCopy_double(plhs[4], in18_, mxGetM(prhs[18])*mxGetN(prhs[18])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[20]), mxGetN(prhs[20]), mxREAL); mxWrapCopy_double(plhs[5], in20_, mxGetM(prhs[20])*mxGetN(prhs[20])); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[22]), mxGetN(prhs[22]), mxREAL); mxWrapCopy_double(plhs[6], in22_, mxGetM(prhs[22])*mxGetN(prhs[22])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in6_) mxFree(in6_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (in21_) mxFree(in21_); if (in22_) mxFree(in22_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1443 ---- * r2dpartdirect(int[1] nsource, double[2, nsource] source, int[1] ifcharge, double[] charge, int[1] ifdipole, double[] dipstr, double[2, nsource] dipvec, int[1] ifpot, inout double[] pot, int[1] ifgrad, inout double[] grad, int[1] ifhess, inout double[] hess, int[1] ntarget, double[] target, int[1] ifpottarg, inout double[] pottarg, int[1] ifgradtarg, inout double[] gradtarg, int[1] ifhesstarg, inout double[] hesstarg); */ const char* stubids15_ = "r2dpartdirect(i int[x], i double[xx], i int[x], i double[], i int[x], i double[], i double[xx], i int[x], io double[], i int[x], io double[], i int[x], io double[], i int[x], i double[], i int[x], io double[], i int[x], io double[], i int[x], io double[])"; void mexStub15(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* nsource */ double* in1_ =0; /* source */ int* in2_ =0; /* ifcharge */ double* in3_ =0; /* charge */ int* in4_ =0; /* ifdipole */ double* in5_ =0; /* dipstr */ double* in6_ =0; /* dipvec */ int* in7_ =0; /* ifpot */ double* in8_ =0; /* pot */ int* in9_ =0; /* ifgrad */ double* in10_ =0; /* grad */ int* in11_ =0; /* ifhess */ double* in12_ =0; /* hess */ int* in13_ =0; /* ntarget */ double* in14_ =0; /* target */ int* in15_ =0; /* ifpottarg */ double* in16_ =0; /* pottarg */ int* in17_ =0; /* ifgradtarg */ double* in18_ =0; /* gradtarg */ int* in19_ =0; /* ifhesstarg */ double* in20_ =0; /* hesstarg */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 2 */ mwSize dim23_; /* nsource */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 2 */ mwSize dim27_; /* nsource */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ mwSize dim30_; /* 1 */ mwSize dim31_; /* 1 */ mwSize dim32_; /* 1 */ mwSize dim33_; /* 1 */ mwSize dim34_; /* 1 */ dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); dim30_ = (mwSize) mxWrapGetScalar(prhs[30], &mw_err_txt_); dim31_ = (mwSize) mxWrapGetScalar(prhs[31], &mw_err_txt_); dim32_ = (mwSize) mxWrapGetScalar(prhs[32], &mw_err_txt_); dim33_ = (mwSize) mxWrapGetScalar(prhs[33], &mw_err_txt_); dim34_ = (mwSize) mxWrapGetScalar(prhs[34], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim21_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[1]) != dim22_ || mxGetN(prhs[1]) != dim23_) { mw_err_txt_ = "Bad argument size: source"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim24_) { mw_err_txt_ = "Bad argument size: ifcharge"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim25_) { mw_err_txt_ = "Bad argument size: ifdipole"; goto mw_err_label; } if (mxGetM(prhs[6]) != dim26_ || mxGetN(prhs[6]) != dim27_) { mw_err_txt_ = "Bad argument size: dipvec"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim28_) { mw_err_txt_ = "Bad argument size: ifpot"; goto mw_err_label; } if (mxGetM(prhs[9])*mxGetN(prhs[9]) != dim29_) { mw_err_txt_ = "Bad argument size: ifgrad"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim30_) { mw_err_txt_ = "Bad argument size: ifhess"; goto mw_err_label; } if (mxGetM(prhs[13])*mxGetN(prhs[13]) != dim31_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim32_) { mw_err_txt_ = "Bad argument size: ifpottarg"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim33_) { mw_err_txt_ = "Bad argument size: ifgradtarg"; goto mw_err_label; } if (mxGetM(prhs[19])*mxGetN(prhs[19]) != dim34_) { mw_err_txt_ = "Bad argument size: ifhesstarg"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxGetPr(prhs[3]); } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxGetPr(prhs[5]); } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxGetPr(prhs[6]); } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_double(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_int(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxWrapGetArray_double(prhs[10], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_double(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_int(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxGetPr(prhs[14]); } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_double(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_double(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mxGetM(prhs[19])*mxGetN(prhs[19]) != 0) { in19_ = mxWrapGetArray_int(prhs[19], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in19_ = NULL; if (mxGetM(prhs[20])*mxGetN(prhs[20]) != 0) { in20_ = mxWrapGetArray_double(prhs[20], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in20_ = NULL; if (mexprofrecord_) mexprofrecord_[15]++; MWF77_r2dpartdirect(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_, in19_, in20_); plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxREAL); mxWrapCopy_double(plhs[0], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[10]), mxGetN(prhs[10]), mxREAL); mxWrapCopy_double(plhs[1], in10_, mxGetM(prhs[10])*mxGetN(prhs[10])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxREAL); mxWrapCopy_double(plhs[2], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[16]), mxGetN(prhs[16]), mxREAL); mxWrapCopy_double(plhs[3], in16_, mxGetM(prhs[16])*mxGetN(prhs[16])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[18]), mxGetN(prhs[18]), mxREAL); mxWrapCopy_double(plhs[4], in18_, mxGetM(prhs[18])*mxGetN(prhs[18])); plhs[5] = mxCreateDoubleMatrix(mxGetM(prhs[20]), mxGetN(prhs[20]), mxREAL); mxWrapCopy_double(plhs[5], in20_, mxGetM(prhs[20])*mxGetN(prhs[20])); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in4_) mxFree(in4_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in10_) mxFree(in10_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (in19_) mxFree(in19_); if (in20_) mxFree(in20_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1466 ---- * prini(int[1] unit1, int[1] unit2); */ const char* stubids16_ = "prini(i int[x], i int[x])"; void mexStub16(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* unit1 */ int* in1_ =0; /* unit2 */ mwSize dim2_; /* 1 */ mwSize dim3_; /* 1 */ dim2_ = (mwSize) mxWrapGetScalar(prhs[2], &mw_err_txt_); dim3_ = (mwSize) mxWrapGetScalar(prhs[3], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim2_) { mw_err_txt_ = "Bad argument size: unit1"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim3_) { mw_err_txt_ = "Bad argument size: unit2"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mexprofrecord_) mexprofrecord_[16]++; MWF77_prini(in0_, in1_); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1557 ---- * d2tstrcr(inout int[1] ier, double[] source, int[1] nsource, inout int[1] nbox, inout int[1] nboxes, inout int[] isource, inout int[] laddr, inout int[1] nlev, inout double[] center, inout double[] size, double[] target, int[1] ntarget, inout int[] itarget, inout double[] w, int[1] lw, inout int[1] lused); */ const char* stubids17_ = "d2tstrcr(io int[x], i double[], i int[x], io int[x], io int[x], io int[], io int[], io int[x], io double[], io double[], i double[], i int[x], io int[], io double[], i int[x], io int[x])"; void mexStub17(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ double* in1_ =0; /* source */ int* in2_ =0; /* nsource */ int* in3_ =0; /* nbox */ int* in4_ =0; /* nboxes */ int* in5_ =0; /* isource */ int* in6_ =0; /* laddr */ int* in7_ =0; /* nlev */ double* in8_ =0; /* center */ double* in9_ =0; /* size */ double* in10_ =0; /* target */ int* in11_ =0; /* ntarget */ int* in12_ =0; /* itarget */ double* in13_ =0; /* w */ int* in14_ =0; /* lw */ int* in15_ =0; /* lused */ mwSize dim16_; /* 1 */ mwSize dim17_; /* 1 */ mwSize dim18_; /* 1 */ mwSize dim19_; /* 1 */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ dim16_ = (mwSize) mxWrapGetScalar(prhs[16], &mw_err_txt_); dim17_ = (mwSize) mxWrapGetScalar(prhs[17], &mw_err_txt_); dim18_ = (mwSize) mxWrapGetScalar(prhs[18], &mw_err_txt_); dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim16_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim17_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim18_) { mw_err_txt_ = "Bad argument size: nbox"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim19_) { mw_err_txt_ = "Bad argument size: nboxes"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim20_) { mw_err_txt_ = "Bad argument size: nlev"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim21_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim22_) { mw_err_txt_ = "Bad argument size: lw"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim23_) { mw_err_txt_ = "Bad argument size: lused"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_double(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_double(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxGetPr(prhs[10]); } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_double(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mexprofrecord_) mexprofrecord_[17]++; MWF77_d2tstrcr(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_); plhs[0] = mxCreateDoubleMatrix(dim16_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim16_); plhs[1] = mxCreateDoubleMatrix(dim18_, 1, mxREAL); mxWrapCopy_int(plhs[1], in3_, dim18_); plhs[2] = mxCreateDoubleMatrix(dim19_, 1, mxREAL); mxWrapCopy_int(plhs[2], in4_, dim19_); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[5]), mxGetN(prhs[5]), mxREAL); mxWrapCopy_int(plhs[3], in5_, mxGetM(prhs[5])*mxGetN(prhs[5])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[6]), mxGetN(prhs[6]), mxREAL); mxWrapCopy_int(plhs[4], in6_, mxGetM(prhs[6])*mxGetN(prhs[6])); plhs[5] = mxCreateDoubleMatrix(dim20_, 1, mxREAL); mxWrapCopy_int(plhs[5], in7_, dim20_); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxREAL); mxWrapCopy_double(plhs[6], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[7] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxREAL); mxWrapCopy_double(plhs[7], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[8] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxREAL); mxWrapCopy_int(plhs[8], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[9] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxREAL); mxWrapCopy_double(plhs[9], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[10] = mxCreateDoubleMatrix(dim23_, 1, mxREAL); mxWrapCopy_int(plhs[10], in15_, dim23_); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1690 ---- * d2tstrcrem(inout int[1] ier, double[] source, int[1] nsource, inout int[1] nbox, inout int[1] nboxes, inout int[] isource, inout int[] laddr, inout int[1] nlev, inout double[] center, inout double[] size, double[] target, int[1] ntarget, inout int[] itarget, inout double[] w, int[1] lw, inout int[1] lused, int[1] ifempty, int[1] minvel, int[1] maxlev); */ const char* stubids18_ = "d2tstrcrem(io int[x], i double[], i int[x], io int[x], io int[x], io int[], io int[], io int[x], io double[], io double[], i double[], i int[x], io int[], io double[], i int[x], io int[x], i int[x], i int[x], i int[x])"; void mexStub18(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ double* in1_ =0; /* source */ int* in2_ =0; /* nsource */ int* in3_ =0; /* nbox */ int* in4_ =0; /* nboxes */ int* in5_ =0; /* isource */ int* in6_ =0; /* laddr */ int* in7_ =0; /* nlev */ double* in8_ =0; /* center */ double* in9_ =0; /* size */ double* in10_ =0; /* target */ int* in11_ =0; /* ntarget */ int* in12_ =0; /* itarget */ double* in13_ =0; /* w */ int* in14_ =0; /* lw */ int* in15_ =0; /* lused */ int* in16_ =0; /* ifempty */ int* in17_ =0; /* minvel */ int* in18_ =0; /* maxlev */ mwSize dim19_; /* 1 */ mwSize dim20_; /* 1 */ mwSize dim21_; /* 1 */ mwSize dim22_; /* 1 */ mwSize dim23_; /* 1 */ mwSize dim24_; /* 1 */ mwSize dim25_; /* 1 */ mwSize dim26_; /* 1 */ mwSize dim27_; /* 1 */ mwSize dim28_; /* 1 */ mwSize dim29_; /* 1 */ dim19_ = (mwSize) mxWrapGetScalar(prhs[19], &mw_err_txt_); dim20_ = (mwSize) mxWrapGetScalar(prhs[20], &mw_err_txt_); dim21_ = (mwSize) mxWrapGetScalar(prhs[21], &mw_err_txt_); dim22_ = (mwSize) mxWrapGetScalar(prhs[22], &mw_err_txt_); dim23_ = (mwSize) mxWrapGetScalar(prhs[23], &mw_err_txt_); dim24_ = (mwSize) mxWrapGetScalar(prhs[24], &mw_err_txt_); dim25_ = (mwSize) mxWrapGetScalar(prhs[25], &mw_err_txt_); dim26_ = (mwSize) mxWrapGetScalar(prhs[26], &mw_err_txt_); dim27_ = (mwSize) mxWrapGetScalar(prhs[27], &mw_err_txt_); dim28_ = (mwSize) mxWrapGetScalar(prhs[28], &mw_err_txt_); dim29_ = (mwSize) mxWrapGetScalar(prhs[29], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim19_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim20_) { mw_err_txt_ = "Bad argument size: nsource"; goto mw_err_label; } if (mxGetM(prhs[3])*mxGetN(prhs[3]) != dim21_) { mw_err_txt_ = "Bad argument size: nbox"; goto mw_err_label; } if (mxGetM(prhs[4])*mxGetN(prhs[4]) != dim22_) { mw_err_txt_ = "Bad argument size: nboxes"; goto mw_err_label; } if (mxGetM(prhs[7])*mxGetN(prhs[7]) != dim23_) { mw_err_txt_ = "Bad argument size: nlev"; goto mw_err_label; } if (mxGetM(prhs[11])*mxGetN(prhs[11]) != dim24_) { mw_err_txt_ = "Bad argument size: ntarget"; goto mw_err_label; } if (mxGetM(prhs[14])*mxGetN(prhs[14]) != dim25_) { mw_err_txt_ = "Bad argument size: lw"; goto mw_err_label; } if (mxGetM(prhs[15])*mxGetN(prhs[15]) != dim26_) { mw_err_txt_ = "Bad argument size: lused"; goto mw_err_label; } if (mxGetM(prhs[16])*mxGetN(prhs[16]) != dim27_) { mw_err_txt_ = "Bad argument size: ifempty"; goto mw_err_label; } if (mxGetM(prhs[17])*mxGetN(prhs[17]) != dim28_) { mw_err_txt_ = "Bad argument size: minvel"; goto mw_err_label; } if (mxGetM(prhs[18])*mxGetN(prhs[18]) != dim29_) { mw_err_txt_ = "Bad argument size: maxlev"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxGetPr(prhs[1]); } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxWrapGetArray_int(prhs[5], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in5_ = NULL; if (mxGetM(prhs[6])*mxGetN(prhs[6]) != 0) { in6_ = mxWrapGetArray_int(prhs[6], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in6_ = NULL; if (mxGetM(prhs[7])*mxGetN(prhs[7]) != 0) { in7_ = mxWrapGetArray_int(prhs[7], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in7_ = NULL; if (mxGetM(prhs[8])*mxGetN(prhs[8]) != 0) { in8_ = mxWrapGetArray_double(prhs[8], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in8_ = NULL; if (mxGetM(prhs[9])*mxGetN(prhs[9]) != 0) { in9_ = mxWrapGetArray_double(prhs[9], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in9_ = NULL; if (mxGetM(prhs[10])*mxGetN(prhs[10]) != 0) { in10_ = mxGetPr(prhs[10]); } else in10_ = NULL; if (mxGetM(prhs[11])*mxGetN(prhs[11]) != 0) { in11_ = mxWrapGetArray_int(prhs[11], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in11_ = NULL; if (mxGetM(prhs[12])*mxGetN(prhs[12]) != 0) { in12_ = mxWrapGetArray_int(prhs[12], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in12_ = NULL; if (mxGetM(prhs[13])*mxGetN(prhs[13]) != 0) { in13_ = mxWrapGetArray_double(prhs[13], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in13_ = NULL; if (mxGetM(prhs[14])*mxGetN(prhs[14]) != 0) { in14_ = mxWrapGetArray_int(prhs[14], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in14_ = NULL; if (mxGetM(prhs[15])*mxGetN(prhs[15]) != 0) { in15_ = mxWrapGetArray_int(prhs[15], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in15_ = NULL; if (mxGetM(prhs[16])*mxGetN(prhs[16]) != 0) { in16_ = mxWrapGetArray_int(prhs[16], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in16_ = NULL; if (mxGetM(prhs[17])*mxGetN(prhs[17]) != 0) { in17_ = mxWrapGetArray_int(prhs[17], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in17_ = NULL; if (mxGetM(prhs[18])*mxGetN(prhs[18]) != 0) { in18_ = mxWrapGetArray_int(prhs[18], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in18_ = NULL; if (mexprofrecord_) mexprofrecord_[18]++; MWF77_d2tstrcrem(in0_, in1_, in2_, in3_, in4_, in5_, in6_, in7_, in8_, in9_, in10_, in11_, in12_, in13_, in14_, in15_, in16_, in17_, in18_); plhs[0] = mxCreateDoubleMatrix(dim19_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim19_); plhs[1] = mxCreateDoubleMatrix(dim21_, 1, mxREAL); mxWrapCopy_int(plhs[1], in3_, dim21_); plhs[2] = mxCreateDoubleMatrix(dim22_, 1, mxREAL); mxWrapCopy_int(plhs[2], in4_, dim22_); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[5]), mxGetN(prhs[5]), mxREAL); mxWrapCopy_int(plhs[3], in5_, mxGetM(prhs[5])*mxGetN(prhs[5])); plhs[4] = mxCreateDoubleMatrix(mxGetM(prhs[6]), mxGetN(prhs[6]), mxREAL); mxWrapCopy_int(plhs[4], in6_, mxGetM(prhs[6])*mxGetN(prhs[6])); plhs[5] = mxCreateDoubleMatrix(dim23_, 1, mxREAL); mxWrapCopy_int(plhs[5], in7_, dim23_); plhs[6] = mxCreateDoubleMatrix(mxGetM(prhs[8]), mxGetN(prhs[8]), mxREAL); mxWrapCopy_double(plhs[6], in8_, mxGetM(prhs[8])*mxGetN(prhs[8])); plhs[7] = mxCreateDoubleMatrix(mxGetM(prhs[9]), mxGetN(prhs[9]), mxREAL); mxWrapCopy_double(plhs[7], in9_, mxGetM(prhs[9])*mxGetN(prhs[9])); plhs[8] = mxCreateDoubleMatrix(mxGetM(prhs[12]), mxGetN(prhs[12]), mxREAL); mxWrapCopy_int(plhs[8], in12_, mxGetM(prhs[12])*mxGetN(prhs[12])); plhs[9] = mxCreateDoubleMatrix(mxGetM(prhs[13]), mxGetN(prhs[13]), mxREAL); mxWrapCopy_double(plhs[9], in13_, mxGetM(prhs[13])*mxGetN(prhs[13])); plhs[10] = mxCreateDoubleMatrix(dim26_, 1, mxREAL); mxWrapCopy_int(plhs[10], in15_, dim26_); mw_err_label: if (in0_) mxFree(in0_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (in5_) mxFree(in5_); if (in6_) mxFree(in6_); if (in7_) mxFree(in7_); if (in8_) mxFree(in8_); if (in9_) mxFree(in9_); if (in11_) mxFree(in11_); if (in12_) mxFree(in12_); if (in13_) mxFree(in13_); if (in14_) mxFree(in14_); if (in15_) mxFree(in15_); if (in16_) mxFree(in16_); if (in17_) mxFree(in17_); if (in18_) mxFree(in18_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1773 ---- * d2tgetb(inout int[1] ier, int[1] ibox, inout int[] box, inout double[] center, inout double[] corners, double[] lists); */ const char* stubids19_ = "d2tgetb(io int[x], i int[x], io int[], io double[], io double[], i double[])"; void mexStub19(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* ibox */ int* in2_ =0; /* box */ double* in3_ =0; /* center */ double* in4_ =0; /* corners */ double* in5_ =0; /* lists */ mwSize dim6_; /* 1 */ mwSize dim7_; /* 1 */ dim6_ = (mwSize) mxWrapGetScalar(prhs[6], &mw_err_txt_); dim7_ = (mwSize) mxWrapGetScalar(prhs[7], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim6_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim7_) { mw_err_txt_ = "Bad argument size: ibox"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_double(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_double(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxGetPr(prhs[5]); } else in5_ = NULL; if (mexprofrecord_) mexprofrecord_[19]++; MWF77_d2tgetb(in0_, in1_, in2_, in3_, in4_, in5_); plhs[0] = mxCreateDoubleMatrix(dim6_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim6_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[2]), mxGetN(prhs[2]), mxREAL); mxWrapCopy_int(plhs[1], in2_, mxGetM(prhs[2])*mxGetN(prhs[2])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[3]), mxGetN(prhs[3]), mxREAL); mxWrapCopy_double(plhs[2], in3_, mxGetM(prhs[3])*mxGetN(prhs[3])); plhs[3] = mxCreateDoubleMatrix(mxGetM(prhs[4]), mxGetN(prhs[4]), mxREAL); mxWrapCopy_double(plhs[3], in4_, mxGetM(prhs[4])*mxGetN(prhs[4])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- fmm2d_r2012a.mw: 1801 ---- * d2tgetl(inout int[1] ier, int[1] ibox, int[1] itype, inout int[] list, inout int[] nlist, double[] lists); */ const char* stubids20_ = "d2tgetl(io int[x], i int[x], i int[x], io int[], io int[], i double[])"; void mexStub20(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { const char* mw_err_txt_ = 0; int* in0_ =0; /* ier */ int* in1_ =0; /* ibox */ int* in2_ =0; /* itype */ int* in3_ =0; /* list */ int* in4_ =0; /* nlist */ double* in5_ =0; /* lists */ mwSize dim6_; /* 1 */ mwSize dim7_; /* 1 */ mwSize dim8_; /* 1 */ dim6_ = (mwSize) mxWrapGetScalar(prhs[6], &mw_err_txt_); dim7_ = (mwSize) mxWrapGetScalar(prhs[7], &mw_err_txt_); dim8_ = (mwSize) mxWrapGetScalar(prhs[8], &mw_err_txt_); if (mxGetM(prhs[0])*mxGetN(prhs[0]) != dim6_) { mw_err_txt_ = "Bad argument size: ier"; goto mw_err_label; } if (mxGetM(prhs[1])*mxGetN(prhs[1]) != dim7_) { mw_err_txt_ = "Bad argument size: ibox"; goto mw_err_label; } if (mxGetM(prhs[2])*mxGetN(prhs[2]) != dim8_) { mw_err_txt_ = "Bad argument size: itype"; goto mw_err_label; } if (mxGetM(prhs[0])*mxGetN(prhs[0]) != 0) { in0_ = mxWrapGetArray_int(prhs[0], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in0_ = NULL; if (mxGetM(prhs[1])*mxGetN(prhs[1]) != 0) { in1_ = mxWrapGetArray_int(prhs[1], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in1_ = NULL; if (mxGetM(prhs[2])*mxGetN(prhs[2]) != 0) { in2_ = mxWrapGetArray_int(prhs[2], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in2_ = NULL; if (mxGetM(prhs[3])*mxGetN(prhs[3]) != 0) { in3_ = mxWrapGetArray_int(prhs[3], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in3_ = NULL; if (mxGetM(prhs[4])*mxGetN(prhs[4]) != 0) { in4_ = mxWrapGetArray_int(prhs[4], &mw_err_txt_); if (mw_err_txt_) goto mw_err_label; } else in4_ = NULL; if (mxGetM(prhs[5])*mxGetN(prhs[5]) != 0) { in5_ = mxGetPr(prhs[5]); } else in5_ = NULL; if (mexprofrecord_) mexprofrecord_[20]++; MWF77_d2tgetl(in0_, in1_, in2_, in3_, in4_, in5_); plhs[0] = mxCreateDoubleMatrix(dim6_, 1, mxREAL); mxWrapCopy_int(plhs[0], in0_, dim6_); plhs[1] = mxCreateDoubleMatrix(mxGetM(prhs[3]), mxGetN(prhs[3]), mxREAL); mxWrapCopy_int(plhs[1], in3_, mxGetM(prhs[3])*mxGetN(prhs[3])); plhs[2] = mxCreateDoubleMatrix(mxGetM(prhs[4]), mxGetN(prhs[4]), mxREAL); mxWrapCopy_int(plhs[2], in4_, mxGetM(prhs[4])*mxGetN(prhs[4])); mw_err_label: if (in0_) mxFree(in0_); if (in1_) mxFree(in1_); if (in2_) mxFree(in2_); if (in3_) mxFree(in3_); if (in4_) mxFree(in4_); if (mw_err_txt_) mexErrMsgTxt(mw_err_txt_); } /* ---- */ void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { char id[512]; if (nrhs == 0) { mexPrintf("Mex function installed\n"); return; } if (mxGetString(prhs[0], id, sizeof(id)) != 0) mexErrMsgTxt("Identifier should be a string"); else if (strcmp(id, stubids1_) == 0) mexStub1(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids2_) == 0) mexStub2(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids3_) == 0) mexStub3(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids4_) == 0) mexStub4(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids5_) == 0) mexStub5(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids6_) == 0) mexStub6(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids7_) == 0) mexStub7(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids8_) == 0) mexStub8(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids9_) == 0) mexStub9(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids10_) == 0) mexStub10(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids11_) == 0) mexStub11(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids12_) == 0) mexStub12(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids13_) == 0) mexStub13(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids14_) == 0) mexStub14(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids15_) == 0) mexStub15(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids16_) == 0) mexStub16(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids17_) == 0) mexStub17(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids18_) == 0) mexStub18(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids19_) == 0) mexStub19(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, stubids20_) == 0) mexStub20(nlhs,plhs, nrhs-1,prhs+1); else if (strcmp(id, "*profile on*") == 0) { if (!mexprofrecord_) { mexprofrecord_ = (int*) malloc(21 * sizeof(int)); mexLock(); } memset(mexprofrecord_, 0, 21 * sizeof(int)); } else if (strcmp(id, "*profile off*") == 0) { if (mexprofrecord_) { free(mexprofrecord_); mexUnlock(); } mexprofrecord_ = NULL; } else if (strcmp(id, "*profile report*") == 0) { if (!mexprofrecord_) mexPrintf("Profiler inactive\n"); mexPrintf("%d calls to fmm2d_r2012a.mw:163\n", mexprofrecord_[1]); mexPrintf("%d calls to fmm2d_r2012a.mw:165\n", mexprofrecord_[2]); mexPrintf("%d calls to fmm2d_r2012a.mw:305\n", mexprofrecord_[3]); mexPrintf("%d calls to fmm2d_r2012a.mw:460\n", mexprofrecord_[4]); mexPrintf("%d calls to fmm2d_r2012a.mw:462\n", mexprofrecord_[5]); mexPrintf("%d calls to fmm2d_r2012a.mw:601\n", mexprofrecord_[6]); mexPrintf("%d calls to fmm2d_r2012a.mw:737\n", mexprofrecord_[7]); mexPrintf("%d calls to fmm2d_r2012a.mw:739\n", mexprofrecord_[8]); mexPrintf("%d calls to fmm2d_r2012a.mw:859\n", mexprofrecord_[9]); mexPrintf("%d calls to fmm2d_r2012a.mw:1010\n", mexprofrecord_[10]); mexPrintf("%d calls to fmm2d_r2012a.mw:1012\n", mexprofrecord_[11]); mexPrintf("%d calls to fmm2d_r2012a.mw:1147\n", mexprofrecord_[12]); mexPrintf("%d calls to fmm2d_r2012a.mw:1302\n", mexprofrecord_[13]); mexPrintf("%d calls to fmm2d_r2012a.mw:1304\n", mexprofrecord_[14]); mexPrintf("%d calls to fmm2d_r2012a.mw:1443\n", mexprofrecord_[15]); mexPrintf("%d calls to fmm2d_r2012a.mw:1466\n", mexprofrecord_[16]); mexPrintf("%d calls to fmm2d_r2012a.mw:1557\n", mexprofrecord_[17]); mexPrintf("%d calls to fmm2d_r2012a.mw:1690\n", mexprofrecord_[18]); mexPrintf("%d calls to fmm2d_r2012a.mw:1773\n", mexprofrecord_[19]); mexPrintf("%d calls to fmm2d_r2012a.mw:1801\n", mexprofrecord_[20]); } else if (strcmp(id, "*profile log*") == 0) { FILE* logfp; if (nrhs != 2 || mxGetString(prhs[1], id, sizeof(id)) != 0) mexErrMsgTxt("Must have two string arguments"); logfp = fopen(id, "w+"); if (!logfp) mexErrMsgTxt("Cannot open log for output"); if (!mexprofrecord_) fprintf(logfp, "Profiler inactive\n"); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:163\n", mexprofrecord_[1]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:165\n", mexprofrecord_[2]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:305\n", mexprofrecord_[3]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:460\n", mexprofrecord_[4]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:462\n", mexprofrecord_[5]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:601\n", mexprofrecord_[6]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:737\n", mexprofrecord_[7]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:739\n", mexprofrecord_[8]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:859\n", mexprofrecord_[9]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1010\n", mexprofrecord_[10]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1012\n", mexprofrecord_[11]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1147\n", mexprofrecord_[12]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1302\n", mexprofrecord_[13]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1304\n", mexprofrecord_[14]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1443\n", mexprofrecord_[15]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1466\n", mexprofrecord_[16]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1557\n", mexprofrecord_[17]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1690\n", mexprofrecord_[18]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1773\n", mexprofrecord_[19]); fprintf(logfp, "%d calls to fmm2d_r2012a.mw:1801\n", mexprofrecord_[20]); fclose(logfp); } else mexErrMsgTxt("Unknown identifier"); }