/* File: _tripackmodule.c
 * This file is auto-generated with f2py (version:2).
 * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
 * written by Pearu Peterson <pearu@cens.ioc.ee>.
 * Generation date: Wed May 15 20:50:31 2019
 * Do not edit this file directly unless you know what you are doing!!!
 */

#ifdef __cplusplus
extern "C" {
#endif

/*********************** See f2py2e/cfuncs.py: includes ***********************/
#include "Python.h"
#include <stdarg.h>
#include "fortranobject.h"
#include <math.h>

/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/
static PyObject *_tripack_error;
static PyObject *_tripack_module;

/*********************** See f2py2e/cfuncs.py: typedefs ***********************/
/*need_typedefs*/

/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/
/*need_typedefs_generated*/

/********************** See f2py2e/cfuncs.py: cppmacros **********************/
#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F
#else
#define F_FUNC(f,F) _##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) _##F##_
#else
#define F_FUNC(f,F) _##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F
#else
#define F_FUNC(f,F) f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_FUNC(f,F) F##_
#else
#define F_FUNC(f,F) f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_FUNC_US(f,F) F_FUNC(f##_,F##_)
#else
#define F_FUNC_US(f,F) F_FUNC(f,F)
#endif

#define rank(var) var ## _Rank
#define shape(var,dim) var ## _Dims[dim]
#define old_rank(var) (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp)))
#define old_shape(var,dim) PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim)
#define fshape(var,dim) shape(var,rank(var)-dim-1)
#define len(var) shape(var,0)
#define flen(var) fshape(var,0)
#define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))
/* #define index(i) capi_i ## i */
#define slen(var) capi_ ## var ## _len
#define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)

#define CHECKSCALAR(check,tcheck,name,show,var)\
    if (!(check)) {\
        char errstring[256];\
        sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var);\
        PyErr_SetString(_tripack_error,errstring);\
        /*goto capi_fail;*/\
    } else 
#ifdef DEBUGCFUNCS
#define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess);
#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \
    PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\
    fprintf(stderr,"\n");
#else
#define CFUNCSMESS(mess)
#define CFUNCSMESSPY(mess,obj)
#endif

#ifndef max
#define max(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) ((a < b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) ((a > b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) ((a < b) ? (a) : (b))
#endif

#if defined(PREPEND_FORTRAN)
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) _f2pywrap##f##_
#endif
#endif
#else
#if defined(NO_APPEND_FORTRAN)
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f
#endif
#else
#if defined(UPPERCASE_FORTRAN)
#define F_WRAPPEDFUNC(f,F) F2PYWRAP##F##_
#else
#define F_WRAPPEDFUNC(f,F) f2pywrap##f##_
#endif
#endif
#endif
#if defined(UNDERSCORE_G77)
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f##_,F##_)
#else
#define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f,F)
#endif


/************************ See f2py2e/cfuncs.py: cfuncs ************************/
static int f2py_size(PyArrayObject* var, ...)
{
  npy_int sz = 0;
  npy_int dim;
  npy_int rank;
  va_list argp;
  va_start(argp, var);
  dim = va_arg(argp, npy_int);
  if (dim==-1)
    {
      sz = PyArray_SIZE(var);
    }
  else
    {
      rank = PyArray_NDIM(var);
      if (dim>=1 && dim<=rank)
        sz = PyArray_DIM(var, dim-1);
      else
        fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank);
    }
  va_end(argp);
  return sz;
}

static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) {
    PyObject* tmp = NULL;
    if (PyInt_Check(obj)) {
        *v = (int)PyInt_AS_LONG(obj);
        return 1;
    }
    tmp = PyNumber_Int(obj);
    if (tmp) {
        *v = PyInt_AS_LONG(tmp);
        Py_DECREF(tmp);
        return 1;
    }
    if (PyComplex_Check(obj))
        tmp = PyObject_GetAttrString(obj,"real");
    else if (PyString_Check(obj) || PyUnicode_Check(obj))
        /*pass*/;
    else if (PySequence_Check(obj))
        tmp = PySequence_GetItem(obj,0);
    if (tmp) {
        PyErr_Clear();
        if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
        Py_DECREF(tmp);
    }
    {
        PyObject* err = PyErr_Occurred();
        if (err==NULL) err = _tripack_error;
        PyErr_SetString(err,errmess);
    }
    return 0;
}

static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) {
    PyObject* tmp = NULL;
    if (PyFloat_Check(obj)) {
#ifdef __sgi
        *v = PyFloat_AsDouble(obj);
#else
        *v = PyFloat_AS_DOUBLE(obj);
#endif
        return 1;
    }
    tmp = PyNumber_Float(obj);
    if (tmp) {
#ifdef __sgi
        *v = PyFloat_AsDouble(tmp);
#else
        *v = PyFloat_AS_DOUBLE(tmp);
#endif
        Py_DECREF(tmp);
        return 1;
    }
    if (PyComplex_Check(obj))
        tmp = PyObject_GetAttrString(obj,"real");
    else if (PyString_Check(obj) || PyUnicode_Check(obj))
        /*pass*/;
    else if (PySequence_Check(obj))
        tmp = PySequence_GetItem(obj,0);
    if (tmp) {
        PyErr_Clear();
        if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;}
        Py_DECREF(tmp);
    }
    {
        PyObject* err = PyErr_Occurred();
        if (err==NULL) err = _tripack_error;
        PyErr_SetString(err,errmess);
    }
    return 0;
}

static struct { int nd;npy_intp *d;int *i,*i_tr,tr; } forcombcache;
static int initforcomb(npy_intp *dims,int nd,int tr) {
  int k;
  if (dims==NULL) return 0;
  if (nd<0) return 0;
  forcombcache.nd = nd;
  forcombcache.d = dims;
  forcombcache.tr = tr;
  if ((forcombcache.i = (int *)malloc(sizeof(int)*nd))==NULL) return 0;
  if ((forcombcache.i_tr = (int *)malloc(sizeof(int)*nd))==NULL) return 0;
  for (k=1;k<nd;k++) {
    forcombcache.i[k] = forcombcache.i_tr[nd-k-1] = 0;
  }
  forcombcache.i[0] = forcombcache.i_tr[nd-1] = -1;
  return 1;
}
static int *nextforcomb(void) {
  int j,*i,*i_tr,k;
  int nd=forcombcache.nd;
  if ((i=forcombcache.i) == NULL) return NULL;
  if ((i_tr=forcombcache.i_tr) == NULL) return NULL;
  if (forcombcache.d == NULL) return NULL;
  i[0]++;
  if (i[0]==forcombcache.d[0]) {
    j=1;
    while ((j<nd) && (i[j]==forcombcache.d[j]-1)) j++;
    if (j==nd) {
      free(i);
      free(i_tr);
      return NULL;
    }
    for (k=0;k<j;k++) i[k] = i_tr[nd-k-1] = 0;
    i[j]++;
    i_tr[nd-j-1]++;
  } else
    i_tr[nd-1]++;
  if (forcombcache.tr) return i_tr;
  return i;
}

/********************* See f2py2e/cfuncs.py: userincludes *********************/
/*need_userincludes*/

/********************* See f2py2e/capi_rules.py: usercode *********************/


/* See f2py2e/rules.py */
extern void F_FUNC(addcst,ADDCST)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(addnod,ADDNOD)(int*,double*,double*,int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*);
extern void F_WRAPPEDFUNC(areap,AREAP)(double*,double*,double*,int*,int*);
extern void F_FUNC(bnodes,BNODES)(int*,int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(circum,CIRCUM)(double*,double*,double*,double*,double*,double*,int*,double*,double*,double*,double*,double*);
extern void F_FUNC(delarc,DELARC)(int*,int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(delnod,DELNOD)(int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(edge,EDGE)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(getnp,GETNP)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,double*,int*);
extern void F_WRAPPEDFUNC(nearnd,NEARND)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*);
extern void F_FUNC(nearnds,NEARNDS)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*);
extern void F_FUNC(trfind,TRFIND)(int*,double*,double*,int*,double*,double*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(trlist,TRLIST)(int*,int*,int*,int*,int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(trlist2,TRLIST2)(int*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(trlprt,TRLPRT)(int*,int*,int*,double*,double*,int*,int*,int*,int*);
extern void F_FUNC(trmesh,TRMESH)(int*,double*,double*,int*,int*,int*,int*,int*,int*,double*,int*);
extern void F_FUNC(trmshr,TRMSHR)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*);
extern void F_FUNC(trprnt,TRPRNT)(int*,int*,int*,double*,double*,int*,int*,int*,int*);
/*eof externroutines*/

/******************** See f2py2e/capi_rules.py: usercode1 ********************/


/******************* See f2py2e/cb_rules.py: buildcallback *******************/
/*need_callbacks*/

/*********************** See f2py2e/rules.py: buildapi ***********************/

/*********************************** addcst ***********************************/
static char doc_f2py_rout__tripack_addcst[] = "\
lwk,iwk,list,lptr,lend,ier = addcst(lcc,x,y,lwk,list,lptr,lend,[ncc])\n\nWrapper for ``addcst``.\
\n\nParameters\n----------\n"
"lcc : input rank-1 array('i') with bounds (ncc)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"lwk : input int\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"ncc : input int, optional\n    Default: len(lcc)\n"
"\nReturns\n-------\n"
"lwk : int\n"
"iwk : rank-1 array('i') with bounds (lwk)\n"
"list : rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : rank-1 array('i') with bounds (n)\n"
"ier : int";
/* extern void F_FUNC(addcst,ADDCST)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_addcst(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int lwk = 0;
  PyObject *lwk_capi = Py_None;
  int *iwk = NULL;
  npy_intp iwk_Dims[1] = {-1};
  const int iwk_Rank = 1;
  PyArrayObject *capi_iwk_tmp = NULL;
  int capi_iwk_intent = 0;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int ier = 0;
  static char *capi_kwlist[] = {"lcc","x","y","lwk","list","lptr","lend","ncc",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOO|O:_tripack.addcst",\
    capi_kwlist,&lcc_capi,&x_capi,&y_capi,&lwk_capi,&list_capi,&lptr_capi,&lend_capi,&ncc_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable lcc */
  ;
  capi_lcc_intent |= F2PY_INTENT_IN;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `lcc' of _tripack.addcst to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `x' of _tripack.addcst to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable lwk */
    f2py_success = int_from_pyobj(&lwk,lwk_capi,"_tripack.addcst() 4th argument (lwk) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ier */
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = len(lcc); else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.addcst() 1st keyword (ncc) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(lcc)>=ncc,"len(lcc)>=ncc","1st keyword ncc","addcst:ncc=%d",ncc) {
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `y' of _tripack.addcst to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable iwk */
  iwk_Dims[0]=lwk;
  capi_iwk_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_iwk_tmp = array_from_pyobj(NPY_INT,iwk_Dims,iwk_Rank,capi_iwk_intent,Py_None);
  if (capi_iwk_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `iwk' of _tripack.addcst to C/Fortran array" );
  } else {
    iwk = (int *)(PyArray_DATA(capi_iwk_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `list' of _tripack.addcst to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `lptr' of _tripack.addcst to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lend' of _tripack.addcst to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&ncc,lcc,&n,x,y,&lwk,iwk,list,lptr,lend,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iNNNNi",lwk,capi_iwk_tmp,capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  }  /*if (capi_iwk_tmp == NULL) ... else of iwk*/
  /* End of cleaning variable iwk */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  } /*CHECKSCALAR(len(lcc)>=ncc)*/
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
  /* End of cleaning variable ier */
  } /*if (f2py_success) of lwk*/
  /* End of cleaning variable lwk */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lcc_tmp!=lcc_capi) {
    Py_XDECREF(capi_lcc_tmp); }
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of addcst *******************************/

/*********************************** addnod ***********************************/
static char doc_f2py_rout__tripack_addnod[] = "\
list,lptr,lend,lnew,ier = addnod(k,xk,yk,lcc,x,y,list,lptr,lend,lnew,ier,[ist,ncc])\n\nWrapper for ``addnod``.\
\n\nParameters\n----------\n"
"k : input int\n"
"xk : input float\n"
"yk : input float\n"
"lcc : input rank-1 array('i') with bounds (ncc)\n"
"x : input rank-1 array('d') with bounds (n + 1)\n"
"y : input rank-1 array('d') with bounds (n + 1)\n"
"list : input rank-1 array('i') with bounds (6 * n - 6)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 6)\n"
"lend : input rank-1 array('i') with bounds (n + 1)\n"
"lnew : input int\n"
"ier : input int\n"
"\nOther Parameters\n----------------\n"
"ist : input int, optional\n    Default: 0\n"
"ncc : input int, optional\n    Default: len(lcc)\n"
"\nReturns\n-------\n"
"list : rank-1 array('i') with bounds (6 * n - 6)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 6)\n"
"lend : rank-1 array('i') with bounds (n + 1)\n"
"lnew : int\n"
"ier : int";
/* extern void F_FUNC(addnod,ADDNOD)(int*,double*,double*,int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_addnod(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,double*,double*,int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int k = 0;
  PyObject *k_capi = Py_None;
  double xk = 0;
  PyObject *xk_capi = Py_None;
  double yk = 0;
  PyObject *yk_capi = Py_None;
  int ist = 0;
  PyObject *ist_capi = Py_None;
  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int lnew = 0;
  PyObject *lnew_capi = Py_None;
  int ier = 0;
  PyObject *ier_capi = Py_None;
  static char *capi_kwlist[] = {"k","xk","yk","lcc","x","y","list","lptr","lend","lnew","ier","ist","ncc",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOOOOO|OO:_tripack.addnod",\
    capi_kwlist,&k_capi,&xk_capi,&yk_capi,&lcc_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi,&lnew_capi,&ier_capi,&ist_capi,&ncc_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable k */
    f2py_success = int_from_pyobj(&k,k_capi,"_tripack.addnod() 1st argument (k) can't be converted to int");
  if (f2py_success) {
  /* Processing variable xk */
    f2py_success = double_from_pyobj(&xk,xk_capi,"_tripack.addnod() 2nd argument (xk) can't be converted to double");
  if (f2py_success) {
  /* Processing variable yk */
    f2py_success = double_from_pyobj(&yk,yk_capi,"_tripack.addnod() 3rd argument (yk) can't be converted to double");
  if (f2py_success) {
  /* Processing variable ist */
  if (ist_capi == Py_None) ist = 0; else
    f2py_success = int_from_pyobj(&ist,ist_capi,"_tripack.addnod() 1st keyword (ist) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lcc */
  ;
  capi_lcc_intent |= F2PY_INTENT_IN;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `lcc' of _tripack.addnod to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `x' of _tripack.addnod to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable lnew */
    f2py_success = int_from_pyobj(&lnew,lnew_capi,"_tripack.addnod() 10th argument (lnew) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ier */
    f2py_success = int_from_pyobj(&ier,ier_capi,"_tripack.addnod() 11st argument (ier) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = len(lcc); else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.addnod() 2nd keyword (ncc) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(lcc)>=ncc,"len(lcc)>=ncc","2nd keyword ncc","addnod:ncc=%d",ncc) {
  /* Processing variable n */
  n = len(x)-1;
  /* Processing variable y */
  y_Dims[0]=n + 1;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `y' of _tripack.addnod to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 6;
  capi_list_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `list' of _tripack.addnod to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 6;
  capi_lptr_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `lptr' of _tripack.addnod to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n + 1;
  capi_lend_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 9th argument `lend' of _tripack.addnod to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&k,&xk,&yk,&ist,&ncc,lcc,&n,x,y,list,lptr,lend,&lnew,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNNii",capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,lnew,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  } /*CHECKSCALAR(len(lcc)>=ncc)*/
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
  } /*if (f2py_success) of ier*/
  /* End of cleaning variable ier */
  } /*if (f2py_success) of lnew*/
  /* End of cleaning variable lnew */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lcc_tmp!=lcc_capi) {
    Py_XDECREF(capi_lcc_tmp); }
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
  } /*if (f2py_success) of ist*/
  /* End of cleaning variable ist */
  } /*if (f2py_success) of yk*/
  /* End of cleaning variable yk */
  } /*if (f2py_success) of xk*/
  /* End of cleaning variable xk */
  } /*if (f2py_success) of k*/
  /* End of cleaning variable k */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of addnod *******************************/

/*********************************** areap ***********************************/
static char doc_f2py_rout__tripack_areap[] = "\
areap = areap(x,y,nodes)\n\nWrapper for ``areap``.\
\n\nParameters\n----------\n"
"x : input rank-1 array('d') with bounds (*)\n"
"y : input rank-1 array('d') with bounds (*)\n"
"nodes : input rank-1 array('i') with bounds (nb)\n"
"\nReturns\n-------\n"
"areap : float";
/* extern void F_WRAPPEDFUNC(areap,AREAP)(double*,double*,double*,int*,int*); */
static PyObject *f2py_rout__tripack_areap(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(double*,double*,double*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  double areap = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int nb = 0;
  int *nodes = NULL;
  npy_intp nodes_Dims[1] = {-1};
  const int nodes_Rank = 1;
  PyArrayObject *capi_nodes_tmp = NULL;
  int capi_nodes_intent = 0;
  PyObject *nodes_capi = Py_None;
  static char *capi_kwlist[] = {"x","y","nodes",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO:_tripack.areap",\
    capi_kwlist,&x_capi,&y_capi,&nodes_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `x' of _tripack.areap to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable y */
  ;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `y' of _tripack.areap to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable nodes */
  ;
  capi_nodes_intent |= F2PY_INTENT_IN;
  capi_nodes_tmp = array_from_pyobj(NPY_INT,nodes_Dims,nodes_Rank,capi_nodes_intent,nodes_capi);
  if (capi_nodes_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `nodes' of _tripack.areap to C/Fortran array" );
  } else {
    nodes = (int *)(PyArray_DATA(capi_nodes_tmp));

  /* Processing variable areap */
  /* Processing variable nb */
  nb = len(nodes);
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
  (*f2py_func)(&areap,x,y,&nb,nodes);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("d",areap);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable nb */
  /* End of cleaning variable areap */
  if((PyObject *)capi_nodes_tmp!=nodes_capi) {
    Py_XDECREF(capi_nodes_tmp); }
  }  /*if (capi_nodes_tmp == NULL) ... else of nodes*/
  /* End of cleaning variable nodes */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************** end of areap ********************************/

/*********************************** bnodes ***********************************/
static char doc_f2py_rout__tripack_bnodes[] = "\
nodes,nb,na,nt = bnodes(list,lptr,lend,nb)\n\nWrapper for ``bnodes``.\
\n\nParameters\n----------\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"nb : input int\n"
"\nReturns\n-------\n"
"nodes : rank-1 array('i') with bounds (nb)\n"
"nb : int\n"
"na : int\n"
"nt : int";
/* extern void F_FUNC(bnodes,BNODES)(int*,int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_bnodes(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int n = 0;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int *nodes = NULL;
  npy_intp nodes_Dims[1] = {-1};
  const int nodes_Rank = 1;
  PyArrayObject *capi_nodes_tmp = NULL;
  int capi_nodes_intent = 0;
  int nb = 0;
  PyObject *nb_capi = Py_None;
  int na = 0;
  int nt = 0;
  static char *capi_kwlist[] = {"list","lptr","lend","nb",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOO:_tripack.bnodes",\
    capi_kwlist,&list_capi,&lptr_capi,&lend_capi,&nb_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable lend */
  ;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `lend' of _tripack.bnodes to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable nb */
    f2py_success = int_from_pyobj(&nb,nb_capi,"_tripack.bnodes() 4th argument (nb) can't be converted to int");
  if (f2py_success) {
  /* Processing variable na */
  /* Processing variable nt */
  /* Processing variable n */
  n = len(lend);
  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `list' of _tripack.bnodes to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `lptr' of _tripack.bnodes to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable nodes */
  nodes_Dims[0]=nb;
  capi_nodes_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_nodes_tmp = array_from_pyobj(NPY_INT,nodes_Dims,nodes_Rank,capi_nodes_intent,Py_None);
  if (capi_nodes_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `nodes' of _tripack.bnodes to C/Fortran array" );
  } else {
    nodes = (int *)(PyArray_DATA(capi_nodes_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&n,list,lptr,lend,nodes,&nb,&na,&nt);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("Niii",capi_nodes_tmp,nb,na,nt);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_nodes_tmp == NULL) ... else of nodes*/
  /* End of cleaning variable nodes */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  /* End of cleaning variable n */
  /* End of cleaning variable nt */
  /* End of cleaning variable na */
  } /*if (f2py_success) of nb*/
  /* End of cleaning variable nb */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of bnodes *******************************/

/*********************************** circum ***********************************/
static char doc_f2py_rout__tripack_circum[] = "\
xc,yc,cr,sa,ar = circum(x1,y1,x2,y2,x3,y3,ratio)\n\nWrapper for ``circum``.\
\n\nParameters\n----------\n"
"x1 : input float\n"
"y1 : input float\n"
"x2 : input float\n"
"y2 : input float\n"
"x3 : input float\n"
"y3 : input float\n"
"ratio : input int\n"
"\nReturns\n-------\n"
"xc : float\n"
"yc : float\n"
"cr : float\n"
"sa : float\n"
"ar : float";
/* extern void F_FUNC(circum,CIRCUM)(double*,double*,double*,double*,double*,double*,int*,double*,double*,double*,double*,double*); */
static PyObject *f2py_rout__tripack_circum(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(double*,double*,double*,double*,double*,double*,int*,double*,double*,double*,double*,double*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  double x1 = 0;
  PyObject *x1_capi = Py_None;
  double y1 = 0;
  PyObject *y1_capi = Py_None;
  double x2 = 0;
  PyObject *x2_capi = Py_None;
  double y2 = 0;
  PyObject *y2_capi = Py_None;
  double x3 = 0;
  PyObject *x3_capi = Py_None;
  double y3 = 0;
  PyObject *y3_capi = Py_None;
  int ratio = 0;
  PyObject *ratio_capi = Py_None;
  double xc = 0;
  double yc = 0;
  double cr = 0;
  double sa = 0;
  double ar = 0;
  static char *capi_kwlist[] = {"x1","y1","x2","y2","x3","y3","ratio",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOO:_tripack.circum",\
    capi_kwlist,&x1_capi,&y1_capi,&x2_capi,&y2_capi,&x3_capi,&y3_capi,&ratio_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable x1 */
    f2py_success = double_from_pyobj(&x1,x1_capi,"_tripack.circum() 1st argument (x1) can't be converted to double");
  if (f2py_success) {
  /* Processing variable y1 */
    f2py_success = double_from_pyobj(&y1,y1_capi,"_tripack.circum() 2nd argument (y1) can't be converted to double");
  if (f2py_success) {
  /* Processing variable x2 */
    f2py_success = double_from_pyobj(&x2,x2_capi,"_tripack.circum() 3rd argument (x2) can't be converted to double");
  if (f2py_success) {
  /* Processing variable y2 */
    f2py_success = double_from_pyobj(&y2,y2_capi,"_tripack.circum() 4th argument (y2) can't be converted to double");
  if (f2py_success) {
  /* Processing variable x3 */
    f2py_success = double_from_pyobj(&x3,x3_capi,"_tripack.circum() 5th argument (x3) can't be converted to double");
  if (f2py_success) {
  /* Processing variable y3 */
    f2py_success = double_from_pyobj(&y3,y3_capi,"_tripack.circum() 6th argument (y3) can't be converted to double");
  if (f2py_success) {
  /* Processing variable ratio */
    ratio = (int)PyObject_IsTrue(ratio_capi);
    f2py_success = 1;
  if (f2py_success) {
  /* Processing variable xc */
  /* Processing variable yc */
  /* Processing variable cr */
  /* Processing variable sa */
  /* Processing variable ar */
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&x1,&y1,&x2,&y2,&x3,&y3,&ratio,&xc,&yc,&cr,&sa,&ar);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("ddddd",xc,yc,cr,sa,ar);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  /* End of cleaning variable ar */
  /* End of cleaning variable sa */
  /* End of cleaning variable cr */
  /* End of cleaning variable yc */
  /* End of cleaning variable xc */
  } /*if (f2py_success) of ratio*/
  /* End of cleaning variable ratio */
  } /*if (f2py_success) of y3*/
  /* End of cleaning variable y3 */
  } /*if (f2py_success) of x3*/
  /* End of cleaning variable x3 */
  } /*if (f2py_success) of y2*/
  /* End of cleaning variable y2 */
  } /*if (f2py_success) of x2*/
  /* End of cleaning variable x2 */
  } /*if (f2py_success) of y1*/
  /* End of cleaning variable y1 */
  } /*if (f2py_success) of x1*/
  /* End of cleaning variable x1 */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of circum *******************************/

/*********************************** delarc ***********************************/
static char doc_f2py_rout__tripack_delarc[] = "\
list,lptr,lend,lnew,ier = delarc(io1,io2,list,lptr,lend,lnew)\n\nWrapper for ``delarc``.\
\n\nParameters\n----------\n"
"io1 : input int\n"
"io2 : input int\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"lnew : input int\n"
"\nReturns\n-------\n"
"list : rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : rank-1 array('i') with bounds (n)\n"
"lnew : int\n"
"ier : int";
/* extern void F_FUNC(delarc,DELARC)(int*,int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_delarc(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int n = 0;
  int io1 = 0;
  PyObject *io1_capi = Py_None;
  int io2 = 0;
  PyObject *io2_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int lnew = 0;
  PyObject *lnew_capi = Py_None;
  int ier = 0;
  static char *capi_kwlist[] = {"io1","io2","list","lptr","lend","lnew",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO:_tripack.delarc",\
    capi_kwlist,&io1_capi,&io2_capi,&list_capi,&lptr_capi,&lend_capi,&lnew_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable io1 */
    f2py_success = int_from_pyobj(&io1,io1_capi,"_tripack.delarc() 1st argument (io1) can't be converted to int");
  if (f2py_success) {
  /* Processing variable io2 */
    f2py_success = int_from_pyobj(&io2,io2_capi,"_tripack.delarc() 2nd argument (io2) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lend */
  ;
  capi_lend_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `lend' of _tripack.delarc to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable lnew */
    f2py_success = int_from_pyobj(&lnew,lnew_capi,"_tripack.delarc() 6th argument (lnew) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ier */
  /* Processing variable n */
  n = len(lend);
  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `list' of _tripack.delarc to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `lptr' of _tripack.delarc to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&n,&io1,&io2,list,lptr,lend,&lnew,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNNii",capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,lnew,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  /* End of cleaning variable n */
  /* End of cleaning variable ier */
  } /*if (f2py_success) of lnew*/
  /* End of cleaning variable lnew */
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  } /*if (f2py_success) of io2*/
  /* End of cleaning variable io2 */
  } /*if (f2py_success) of io1*/
  /* End of cleaning variable io1 */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of delarc *******************************/

/*********************************** delnod ***********************************/
static char doc_f2py_rout__tripack_delnod[] = "\
lcc,x,y,list,lptr,lend,lnew,lwk,iwk,ier = delnod(k,lcc,x,y,list,lptr,lend,lnew,lwk,[ncc])\n\nWrapper for ``delnod``.\
\n\nParameters\n----------\n"
"k : input int\n"
"lcc : input rank-1 array('i') with bounds (ncc)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"lnew : input int\n"
"lwk : input int\n"
"\nOther Parameters\n----------------\n"
"ncc : input int, optional\n    Default: len(lcc)\n"
"\nReturns\n-------\n"
"lcc : rank-1 array('i') with bounds (ncc)\n"
"x : rank-1 array('d') with bounds (n)\n"
"y : rank-1 array('d') with bounds (n)\n"
"list : rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : rank-1 array('i') with bounds (n)\n"
"lnew : int\n"
"lwk : int\n"
"iwk : rank-2 array('i') with bounds (2,lwk)\n"
"ier : int";
/* extern void F_FUNC(delnod,DELNOD)(int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_delnod(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int k = 0;
  PyObject *k_capi = Py_None;
  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int lnew = 0;
  PyObject *lnew_capi = Py_None;
  int lwk = 0;
  PyObject *lwk_capi = Py_None;
  int *iwk = NULL;
  npy_intp iwk_Dims[2] = {-1, -1};
  const int iwk_Rank = 2;
  PyArrayObject *capi_iwk_tmp = NULL;
  int capi_iwk_intent = 0;
  int ier = 0;
  static char *capi_kwlist[] = {"k","lcc","x","y","list","lptr","lend","lnew","lwk","ncc",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOOO|O:_tripack.delnod",\
    capi_kwlist,&k_capi,&lcc_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi,&lnew_capi,&lwk_capi,&ncc_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable k */
    f2py_success = int_from_pyobj(&k,k_capi,"_tripack.delnod() 1st argument (k) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lcc */
  ;
  capi_lcc_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `lcc' of _tripack.delnod to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `x' of _tripack.delnod to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable lnew */
    f2py_success = int_from_pyobj(&lnew,lnew_capi,"_tripack.delnod() 8th argument (lnew) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lwk */
    f2py_success = int_from_pyobj(&lwk,lwk_capi,"_tripack.delnod() 9th argument (lwk) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ier */
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = len(lcc); else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.delnod() 1st keyword (ncc) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(lcc)>=ncc,"len(lcc)>=ncc","1st keyword ncc","delnod:ncc=%d",ncc) {
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `y' of _tripack.delnod to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `list' of _tripack.delnod to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `lptr' of _tripack.delnod to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lend' of _tripack.delnod to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable iwk */
  iwk_Dims[0]=2,iwk_Dims[1]=lwk;
  capi_iwk_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_iwk_tmp = array_from_pyobj(NPY_INT,iwk_Dims,iwk_Rank,capi_iwk_intent,Py_None);
  if (capi_iwk_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `iwk' of _tripack.delnod to C/Fortran array" );
  } else {
    iwk = (int *)(PyArray_DATA(capi_iwk_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&k,&ncc,lcc,&n,x,y,list,lptr,lend,&lnew,&lwk,iwk,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNNNNNiiNi",capi_lcc_tmp,capi_x_tmp,capi_y_tmp,capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,lnew,lwk,capi_iwk_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_iwk_tmp == NULL) ... else of iwk*/
  /* End of cleaning variable iwk */
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  } /*CHECKSCALAR(len(lcc)>=ncc)*/
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
  /* End of cleaning variable ier */
  } /*if (f2py_success) of lwk*/
  /* End of cleaning variable lwk */
  } /*if (f2py_success) of lnew*/
  /* End of cleaning variable lnew */
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
  } /*if (f2py_success) of k*/
  /* End of cleaning variable k */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of delnod *******************************/

/************************************ edge ************************************/
static char doc_f2py_rout__tripack_edge[] = "\
lwk,iwk,ier = edge(in1,in2,x,y,lwk,list,lptr,lend)\n\nWrapper for ``edge``.\
\n\nParameters\n----------\n"
"in1 : input int\n"
"in2 : input int\n"
"x : input rank-1 array('d') with bounds (len(lend))\n"
"y : input rank-1 array('d') with bounds (len(lend))\n"
"lwk : input int\n"
"list : input rank-1 array('i') with bounds (6*len(x)-12)\n"
"lptr : input rank-1 array('i') with bounds (6*len(x)-12)\n"
"lend : input rank-1 array('i') with bounds (len(x))\n"
"\nReturns\n-------\n"
"lwk : int\n"
"iwk : rank-2 array('i') with bounds (2,lwk)\n"
"ier : int";
/* extern void F_FUNC(edge,EDGE)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_edge(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int in1 = 0;
  PyObject *in1_capi = Py_None;
  int in2 = 0;
  PyObject *in2_capi = Py_None;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int lwk = 0;
  PyObject *lwk_capi = Py_None;
  int *iwk = NULL;
  npy_intp iwk_Dims[2] = {-1, -1};
  const int iwk_Rank = 2;
  PyArrayObject *capi_iwk_tmp = NULL;
  int capi_iwk_intent = 0;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int ier = 0;
  static char *capi_kwlist[] = {"in1","in2","x","y","lwk","list","lptr","lend",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_tripack.edge",\
    capi_kwlist,&in1_capi,&in2_capi,&x_capi,&y_capi,&lwk_capi,&list_capi,&lptr_capi,&lend_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable in1 */
    f2py_success = int_from_pyobj(&in1,in1_capi,"_tripack.edge() 1st argument (in1) can't be converted to int");
  if (f2py_success) {
  /* Processing variable in2 */
    f2py_success = int_from_pyobj(&in2,in2_capi,"_tripack.edge() 2nd argument (in2) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lwk */
    f2py_success = int_from_pyobj(&lwk,lwk_capi,"_tripack.edge() 5th argument (lwk) can't be converted to int");
  if (f2py_success) {
  /* Processing variable ier */
  /* Processing variable iwk */
  iwk_Dims[0]=2,iwk_Dims[1]=lwk;
  capi_iwk_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_iwk_tmp = array_from_pyobj(NPY_INT,iwk_Dims,iwk_Rank,capi_iwk_intent,Py_None);
  if (capi_iwk_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `iwk' of _tripack.edge to C/Fortran array" );
  } else {
    iwk = (int *)(PyArray_DATA(capi_iwk_tmp));

  /* Processing variable lptr */
  ;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lptr' of _tripack.edge to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  ;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `lend' of _tripack.edge to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable x */
  x_Dims[0]=len(lend);
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `x' of _tripack.edge to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable y */
  y_Dims[0]=len(lend);
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `y' of _tripack.edge to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6*len(x)-12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `list' of _tripack.edge to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&in1,&in2,x,y,&lwk,iwk,list,lptr,lend,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iNi",lwk,capi_iwk_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_iwk_tmp == NULL) ... else of iwk*/
  /* End of cleaning variable iwk */
  /* End of cleaning variable ier */
  } /*if (f2py_success) of lwk*/
  /* End of cleaning variable lwk */
  } /*if (f2py_success) of in2*/
  /* End of cleaning variable in2 */
  } /*if (f2py_success) of in1*/
  /* End of cleaning variable in1 */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************** end of edge ********************************/

/*********************************** getnp ***********************************/
static char doc_f2py_rout__tripack_getnp[] = "\
npts,ds,ier = getnp(lcc,x,y,list,lptr,lend,npts,ds,[ncc])\n\nWrapper for ``getnp``.\
\n\nParameters\n----------\n"
"lcc : input rank-1 array('i') with bounds (ncc)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"npts : input rank-1 array('i') with bounds (l)\n"
"ds : input rank-1 array('d') with bounds (l)\n"
"\nOther Parameters\n----------------\n"
"ncc : input int, optional\n    Default: len(lcc)\n"
"\nReturns\n-------\n"
"npts : rank-1 array('i') with bounds (l)\n"
"ds : rank-1 array('d') with bounds (l)\n"
"ier : int";
/* extern void F_FUNC(getnp,GETNP)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,double*,int*); */
static PyObject *f2py_rout__tripack_getnp(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,double*,double*,int*,int*,int*,int*,int*,double*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int l = 0;
  int *npts = NULL;
  npy_intp npts_Dims[1] = {-1};
  const int npts_Rank = 1;
  PyArrayObject *capi_npts_tmp = NULL;
  int capi_npts_intent = 0;
  PyObject *npts_capi = Py_None;
  double *ds = NULL;
  npy_intp ds_Dims[1] = {-1};
  const int ds_Rank = 1;
  PyArrayObject *capi_ds_tmp = NULL;
  int capi_ds_intent = 0;
  PyObject *ds_capi = Py_None;
  int ier = 0;
  static char *capi_kwlist[] = {"lcc","x","y","list","lptr","lend","npts","ds","ncc",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO|O:_tripack.getnp",\
    capi_kwlist,&lcc_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi,&npts_capi,&ds_capi,&ncc_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable lcc */
  ;
  capi_lcc_intent |= F2PY_INTENT_IN;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `lcc' of _tripack.getnp to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `x' of _tripack.getnp to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable npts */
  ;
  capi_npts_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_npts_tmp = array_from_pyobj(NPY_INT,npts_Dims,npts_Rank,capi_npts_intent,npts_capi);
  if (capi_npts_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `npts' of _tripack.getnp to C/Fortran array" );
  } else {
    npts = (int *)(PyArray_DATA(capi_npts_tmp));

  /* Processing variable ier */
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = len(lcc); else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.getnp() 1st keyword (ncc) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(lcc)>=ncc,"len(lcc)>=ncc","1st keyword ncc","getnp:ncc=%d",ncc) {
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `y' of _tripack.getnp to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `list' of _tripack.getnp to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `lptr' of _tripack.getnp to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `lend' of _tripack.getnp to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable l */
  l = len(npts);
  /* Processing variable ds */
  ds_Dims[0]=l;
  capi_ds_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_ds_tmp = array_from_pyobj(NPY_DOUBLE,ds_Dims,ds_Rank,capi_ds_intent,ds_capi);
  if (capi_ds_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `ds' of _tripack.getnp to C/Fortran array" );
  } else {
    ds = (double *)(PyArray_DATA(capi_ds_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&ncc,lcc,&n,x,y,list,lptr,lend,&l,npts,ds,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNi",capi_npts_tmp,capi_ds_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_ds_tmp == NULL) ... else of ds*/
  /* End of cleaning variable ds */
  /* End of cleaning variable l */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  } /*CHECKSCALAR(len(lcc)>=ncc)*/
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
  /* End of cleaning variable ier */
  }  /*if (capi_npts_tmp == NULL) ... else of npts*/
  /* End of cleaning variable npts */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lcc_tmp!=lcc_capi) {
    Py_XDECREF(capi_lcc_tmp); }
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************** end of getnp ********************************/

/*********************************** nearnd ***********************************/
static char doc_f2py_rout__tripack_nearnd[] = "\
nearnd,dsq = nearnd(xp,yp,ist,x,y,list,lptr,lend)\n\nWrapper for ``nearnd``.\
\n\nParameters\n----------\n"
"xp : input float\n"
"yp : input float\n"
"ist : input int\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nReturns\n-------\n"
"nearnd : int\n"
"dsq : float";
/* extern void F_WRAPPEDFUNC(nearnd,NEARND)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*); */
static PyObject *f2py_rout__tripack_nearnd(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int nearnd = 0;
  double xp = 0;
  PyObject *xp_capi = Py_None;
  double yp = 0;
  PyObject *yp_capi = Py_None;
  int ist = 0;
  PyObject *ist_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  double dsq = 0;
  static char *capi_kwlist[] = {"xp","yp","ist","x","y","list","lptr","lend",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_tripack.nearnd",\
    capi_kwlist,&xp_capi,&yp_capi,&ist_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable xp */
    f2py_success = double_from_pyobj(&xp,xp_capi,"_tripack.nearnd() 1st argument (xp) can't be converted to double");
  if (f2py_success) {
  /* Processing variable yp */
    f2py_success = double_from_pyobj(&yp,yp_capi,"_tripack.nearnd() 2nd argument (yp) can't be converted to double");
  if (f2py_success) {
  /* Processing variable ist */
    f2py_success = int_from_pyobj(&ist,ist_capi,"_tripack.nearnd() 3rd argument (ist) can't be converted to int");
  if (f2py_success) {
  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `x' of _tripack.nearnd to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable dsq */
  /* Processing variable nearnd */
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `y' of _tripack.nearnd to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `list' of _tripack.nearnd to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lptr' of _tripack.nearnd to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `lend' of _tripack.nearnd to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
  (*f2py_func)(&nearnd,&xp,&yp,&ist,&n,x,y,list,lptr,lend,&dsq);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("id",nearnd,dsq);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  /* End of cleaning variable nearnd */
  /* End of cleaning variable dsq */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  } /*if (f2py_success) of ist*/
  /* End of cleaning variable ist */
  } /*if (f2py_success) of yp*/
  /* End of cleaning variable yp */
  } /*if (f2py_success) of xp*/
  /* End of cleaning variable xp */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of nearnd *******************************/

/********************************** nearnds **********************************/
static char doc_f2py_rout__tripack_nearnds[] = "\
ist,dsqs = nearnds(xp,yp,ist,x,y,list,lptr,lend)\n\nWrapper for ``nearnds``.\
\n\nParameters\n----------\n"
"xp : input rank-1 array('d') with bounds (l)\n"
"yp : input rank-1 array('d') with bounds (l)\n"
"ist : input rank-1 array('i') with bounds (l)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nReturns\n-------\n"
"ist : rank-1 array('i') with bounds (l)\n"
"dsqs : rank-1 array('d') with bounds (l)";
/* extern void F_FUNC(nearnds,NEARNDS)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*); */
static PyObject *f2py_rout__tripack_nearnds(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,double*,double*,int*,int*,double*,double*,int*,int*,int*,double*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int l = 0;
  double *xp = NULL;
  npy_intp xp_Dims[1] = {-1};
  const int xp_Rank = 1;
  PyArrayObject *capi_xp_tmp = NULL;
  int capi_xp_intent = 0;
  PyObject *xp_capi = Py_None;
  double *yp = NULL;
  npy_intp yp_Dims[1] = {-1};
  const int yp_Rank = 1;
  PyArrayObject *capi_yp_tmp = NULL;
  int capi_yp_intent = 0;
  PyObject *yp_capi = Py_None;
  int *ist = NULL;
  npy_intp ist_Dims[1] = {-1};
  const int ist_Rank = 1;
  PyArrayObject *capi_ist_tmp = NULL;
  int capi_ist_intent = 0;
  PyObject *ist_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  double *dsqs = NULL;
  npy_intp dsqs_Dims[1] = {-1};
  const int dsqs_Rank = 1;
  PyArrayObject *capi_dsqs_tmp = NULL;
  int capi_dsqs_intent = 0;
  static char *capi_kwlist[] = {"xp","yp","ist","x","y","list","lptr","lend",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_tripack.nearnds",\
    capi_kwlist,&xp_capi,&yp_capi,&ist_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable xp */
  ;
  capi_xp_intent |= F2PY_INTENT_IN;
  capi_xp_tmp = array_from_pyobj(NPY_DOUBLE,xp_Dims,xp_Rank,capi_xp_intent,xp_capi);
  if (capi_xp_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `xp' of _tripack.nearnds to C/Fortran array" );
  } else {
    xp = (double *)(PyArray_DATA(capi_xp_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `x' of _tripack.nearnds to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable l */
  l = len(xp);
  /* Processing variable yp */
  yp_Dims[0]=l;
  capi_yp_intent |= F2PY_INTENT_IN;
  capi_yp_tmp = array_from_pyobj(NPY_DOUBLE,yp_Dims,yp_Rank,capi_yp_intent,yp_capi);
  if (capi_yp_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `yp' of _tripack.nearnds to C/Fortran array" );
  } else {
    yp = (double *)(PyArray_DATA(capi_yp_tmp));

  /* Processing variable ist */
  ist_Dims[0]=l;
  capi_ist_intent |= F2PY_INTENT_IN|F2PY_INTENT_OUT;
  capi_ist_tmp = array_from_pyobj(NPY_INT,ist_Dims,ist_Rank,capi_ist_intent,ist_capi);
  if (capi_ist_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `ist' of _tripack.nearnds to C/Fortran array" );
  } else {
    ist = (int *)(PyArray_DATA(capi_ist_tmp));

  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `y' of _tripack.nearnds to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `list' of _tripack.nearnds to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lptr' of _tripack.nearnds to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `lend' of _tripack.nearnds to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable dsqs */
  dsqs_Dims[0]=l;
  capi_dsqs_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_dsqs_tmp = array_from_pyobj(NPY_DOUBLE,dsqs_Dims,dsqs_Rank,capi_dsqs_intent,Py_None);
  if (capi_dsqs_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `dsqs' of _tripack.nearnds to C/Fortran array" );
  } else {
    dsqs = (double *)(PyArray_DATA(capi_dsqs_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&l,xp,yp,ist,&n,x,y,list,lptr,lend,dsqs);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NN",capi_ist_tmp,capi_dsqs_tmp);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_dsqs_tmp == NULL) ... else of dsqs*/
  /* End of cleaning variable dsqs */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  }  /*if (capi_ist_tmp == NULL) ... else of ist*/
  /* End of cleaning variable ist */
  if((PyObject *)capi_yp_tmp!=yp_capi) {
    Py_XDECREF(capi_yp_tmp); }
  }  /*if (capi_yp_tmp == NULL) ... else of yp*/
  /* End of cleaning variable yp */
  /* End of cleaning variable l */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_xp_tmp!=xp_capi) {
    Py_XDECREF(capi_xp_tmp); }
  }  /*if (capi_xp_tmp == NULL) ... else of xp*/
  /* End of cleaning variable xp */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of nearnds *******************************/

/*********************************** trfind ***********************************/
static char doc_f2py_rout__tripack_trfind[] = "\
i1,i2,i3 = trfind(nst,px,py,x,y,list,lptr,lend)\n\nWrapper for ``trfind``.\
\n\nParameters\n----------\n"
"nst : input int\n"
"px : input float\n"
"py : input float\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nReturns\n-------\n"
"i1 : int\n"
"i2 : int\n"
"i3 : int";
/* extern void F_FUNC(trfind,TRFIND)(int*,double*,double*,int*,double*,double*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trfind(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,double*,double*,int*,double*,double*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int nst = 0;
  PyObject *nst_capi = Py_None;
  double px = 0;
  PyObject *px_capi = Py_None;
  double py = 0;
  PyObject *py_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int i1 = 0;
  int i2 = 0;
  int i3 = 0;
  static char *capi_kwlist[] = {"nst","px","py","x","y","list","lptr","lend",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOOOO:_tripack.trfind",\
    capi_kwlist,&nst_capi,&px_capi,&py_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable nst */
    f2py_success = int_from_pyobj(&nst,nst_capi,"_tripack.trfind() 1st argument (nst) can't be converted to int");
  if (f2py_success) {
  /* Processing variable px */
    f2py_success = double_from_pyobj(&px,px_capi,"_tripack.trfind() 2nd argument (px) can't be converted to double");
  if (f2py_success) {
  /* Processing variable py */
    f2py_success = double_from_pyobj(&py,py_capi,"_tripack.trfind() 3rd argument (py) can't be converted to double");
  if (f2py_success) {
  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `x' of _tripack.trfind to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable i1 */
  /* Processing variable i2 */
  /* Processing variable i3 */
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `y' of _tripack.trfind to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `list' of _tripack.trfind to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 7th argument `lptr' of _tripack.trfind to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 8th argument `lend' of _tripack.trfind to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&nst,&px,&py,&n,x,y,list,lptr,lend,&i1,&i2,&i3);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iii",i1,i2,i3);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  /* End of cleaning variable i3 */
  /* End of cleaning variable i2 */
  /* End of cleaning variable i1 */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  } /*if (f2py_success) of py*/
  /* End of cleaning variable py */
  } /*if (f2py_success) of px*/
  /* End of cleaning variable px */
  } /*if (f2py_success) of nst*/
  /* End of cleaning variable nst */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trfind *******************************/

/*********************************** trlist ***********************************/
static char doc_f2py_rout__tripack_trlist[] = "\
nt,ltri,lct,ier = trlist(list,lptr,lend,[ncc,lcc,nrow])\n\nWrapper for ``trlist``.\
\n\nParameters\n----------\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"ncc : input int, optional\n    Default: 0\n"
"lcc : input rank-1 array('i') with bounds (ncc + 1), optional\n    Default: 0\n"
"nrow : input int, optional\n    Default: 6\n"
"\nReturns\n-------\n"
"nt : int\n"
"ltri : rank-2 array('i') with bounds (nrow,2 * n - 4)\n"
"lct : rank-1 array('i') with bounds (ncc + 1)\n"
"ier : int";
/* extern void F_FUNC(trlist,TRLIST)(int*,int*,int*,int*,int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trlist(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int nrow = 0;
  PyObject *nrow_capi = Py_None;
  int nt = 0;
  int *ltri = NULL;
  npy_intp ltri_Dims[2] = {-1, -1};
  const int ltri_Rank = 2;
  PyArrayObject *capi_ltri_tmp = NULL;
  int capi_ltri_intent = 0;
  int *lct = NULL;
  npy_intp lct_Dims[1] = {-1};
  const int lct_Rank = 1;
  PyArrayObject *capi_lct_tmp = NULL;
  int capi_lct_intent = 0;
  int ier = 0;
  static char *capi_kwlist[] = {"list","lptr","lend","ncc","lcc","nrow",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO|OOO:_tripack.trlist",\
    capi_kwlist,&list_capi,&lptr_capi,&lend_capi,&ncc_capi,&lcc_capi,&nrow_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = 0; else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.trlist() 1st keyword (ncc) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lend */
  ;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `lend' of _tripack.trlist to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable nrow */
  if (nrow_capi == Py_None) nrow = 6; else
    f2py_success = int_from_pyobj(&nrow,nrow_capi,"_tripack.trlist() 3rd keyword (nrow) can't be converted to int");
  if (f2py_success) {
  /* Processing variable nt */
  /* Processing variable ier */
  /* Processing variable lcc */
  lcc_Dims[0]=ncc + 1;
  capi_lcc_intent |= F2PY_INTENT_IN|F2PY_OPTIONAL;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd keyword `lcc' of _tripack.trlist to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  if (lcc_capi == Py_None) {


    int *_i,capi_i=0;
    CFUNCSMESS("trlist: Initializing lcc=0\n");
    if (initforcomb(PyArray_DIMS(capi_lcc_tmp),PyArray_NDIM(capi_lcc_tmp),1)) {
      while ((_i = nextforcomb()))
        lcc[capi_i++] = 0; /* fortran way */
    } else {
      if (!PyErr_Occurred())
        PyErr_SetString(_tripack_error,"Initialization of 2nd keyword lcc failed (initforcomb).");
      f2py_success = 0;
    }
  }
  if (f2py_success) {
  /* Processing variable n */
  n = len(lend);
  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `list' of _tripack.trlist to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `lptr' of _tripack.trlist to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable ltri */
  ltri_Dims[0]=nrow,ltri_Dims[1]=2 * n - 4;
  capi_ltri_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_ltri_tmp = array_from_pyobj(NPY_INT,ltri_Dims,ltri_Rank,capi_ltri_intent,Py_None);
  if (capi_ltri_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `ltri' of _tripack.trlist to C/Fortran array" );
  } else {
    ltri = (int *)(PyArray_DATA(capi_ltri_tmp));

  /* Processing variable lct */
  lct_Dims[0]=ncc + 1;
  capi_lct_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_lct_tmp = array_from_pyobj(NPY_INT,lct_Dims,lct_Rank,capi_lct_intent,Py_None);
  if (capi_lct_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `lct' of _tripack.trlist to C/Fortran array" );
  } else {
    lct = (int *)(PyArray_DATA(capi_lct_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&ncc,lcc,&n,list,lptr,lend,&nrow,&nt,ltri,lct,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iNNi",nt,capi_ltri_tmp,capi_lct_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_lct_tmp == NULL) ... else of lct*/
  /* End of cleaning variable lct */
  }  /*if (capi_ltri_tmp == NULL) ... else of ltri*/
  /* End of cleaning variable ltri */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  /* End of cleaning variable n */
  }  /*if (f2py_success) of lcc init*/
  if((PyObject *)capi_lcc_tmp!=lcc_capi) {
    Py_XDECREF(capi_lcc_tmp); }
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
  /* End of cleaning variable ier */
  /* End of cleaning variable nt */
  } /*if (f2py_success) of nrow*/
  /* End of cleaning variable nrow */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trlist *******************************/

/********************************** trlist2 **********************************/
static char doc_f2py_rout__tripack_trlist2[] = "\
nt,ltri,ier = trlist2(list,lptr,lend)\n\nWrapper for ``trlist2``.\
\n\nParameters\n----------\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nReturns\n-------\n"
"nt : int\n"
"ltri : rank-2 array('i') with bounds (3,2 * n - 4)\n"
"ier : int";
/* extern void F_FUNC(trlist2,TRLIST2)(int*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trlist2(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int n = 0;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int nt = 0;
  int *ltri = NULL;
  npy_intp ltri_Dims[2] = {-1, -1};
  const int ltri_Rank = 2;
  PyArrayObject *capi_ltri_tmp = NULL;
  int capi_ltri_intent = 0;
  int ier = 0;
  static char *capi_kwlist[] = {"list","lptr","lend",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO:_tripack.trlist2",\
    capi_kwlist,&list_capi,&lptr_capi,&lend_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable lend */
  ;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `lend' of _tripack.trlist2 to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable nt */
  /* Processing variable ier */
  /* Processing variable n */
  n = len(lend);
  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `list' of _tripack.trlist2 to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `lptr' of _tripack.trlist2 to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable ltri */
  ltri_Dims[0]=3,ltri_Dims[1]=2 * n - 4;
  capi_ltri_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_ltri_tmp = array_from_pyobj(NPY_INT,ltri_Dims,ltri_Rank,capi_ltri_intent,Py_None);
  if (capi_ltri_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `ltri' of _tripack.trlist2 to C/Fortran array" );
  } else {
    ltri = (int *)(PyArray_DATA(capi_ltri_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&n,list,lptr,lend,&nt,ltri,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("iNi",nt,capi_ltri_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_ltri_tmp == NULL) ... else of ltri*/
  /* End of cleaning variable ltri */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  /* End of cleaning variable n */
  /* End of cleaning variable ier */
  /* End of cleaning variable nt */
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trlist2 *******************************/

/*********************************** trlprt ***********************************/
static char doc_f2py_rout__tripack_trlprt[] = "\
trlprt(ncc,lct,x,y,ltri,prntx,[n,nrow,nt])\n\nWrapper for ``trlprt``.\
\n\nParameters\n----------\n"
"ncc : input int\n"
"lct : input rank-1 array('i') with bounds (*)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"ltri : input rank-2 array('i') with bounds (nrow,nt)\n"
"prntx : input int\n"
"\nOther Parameters\n----------------\n"
"n : input int, optional\n    Default: len(x)\n"
"nrow : input int, optional\n    Default: shape(ltri,0)\n"
"nt : input int, optional\n    Default: shape(ltri,1)";
/* extern void F_FUNC(trlprt,TRLPRT)(int*,int*,int*,double*,double*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trlprt(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,double*,double*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lct = NULL;
  npy_intp lct_Dims[1] = {-1};
  const int lct_Rank = 1;
  PyArrayObject *capi_lct_tmp = NULL;
  int capi_lct_intent = 0;
  PyObject *lct_capi = Py_None;
  int n = 0;
  PyObject *n_capi = Py_None;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int nrow = 0;
  PyObject *nrow_capi = Py_None;
  int nt = 0;
  PyObject *nt_capi = Py_None;
  int *ltri = NULL;
  npy_intp ltri_Dims[2] = {-1, -1};
  const int ltri_Rank = 2;
  PyArrayObject *capi_ltri_tmp = NULL;
  int capi_ltri_intent = 0;
  PyObject *ltri_capi = Py_None;
  int prntx = 0;
  PyObject *prntx_capi = Py_None;
  static char *capi_kwlist[] = {"ncc","lct","x","y","ltri","prntx","n","nrow","nt",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO|OOO:_tripack.trlprt",\
    capi_kwlist,&ncc_capi,&lct_capi,&x_capi,&y_capi,&ltri_capi,&prntx_capi,&n_capi,&nrow_capi,&nt_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable ncc */
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.trlprt() 1st argument (ncc) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lct */
  ;
  capi_lct_intent |= F2PY_INTENT_IN;
  capi_lct_tmp = array_from_pyobj(NPY_INT,lct_Dims,lct_Rank,capi_lct_intent,lct_capi);
  if (capi_lct_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `lct' of _tripack.trlprt to C/Fortran array" );
  } else {
    lct = (int *)(PyArray_DATA(capi_lct_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `x' of _tripack.trlprt to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable ltri */
  ;
  capi_ltri_intent |= F2PY_INTENT_IN;
  capi_ltri_tmp = array_from_pyobj(NPY_INT,ltri_Dims,ltri_Rank,capi_ltri_intent,ltri_capi);
  if (capi_ltri_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `ltri' of _tripack.trlprt to C/Fortran array" );
  } else {
    ltri = (int *)(PyArray_DATA(capi_ltri_tmp));

  /* Processing variable prntx */
    prntx = (int)PyObject_IsTrue(prntx_capi);
    f2py_success = 1;
  if (f2py_success) {
  /* Processing variable n */
  if (n_capi == Py_None) n = len(x); else
    f2py_success = int_from_pyobj(&n,n_capi,"_tripack.trlprt() 1st keyword (n) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(x)>=n,"len(x)>=n","1st keyword n","trlprt:n=%d",n) {
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `y' of _tripack.trlprt to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable nrow */
  if (nrow_capi == Py_None) nrow = shape(ltri,0); else
    f2py_success = int_from_pyobj(&nrow,nrow_capi,"_tripack.trlprt() 2nd keyword (nrow) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(shape(ltri,0)==nrow,"shape(ltri,0)==nrow","2nd keyword nrow","trlprt:nrow=%d",nrow) {
  /* Processing variable nt */
  if (nt_capi == Py_None) nt = shape(ltri,1); else
    f2py_success = int_from_pyobj(&nt,nt_capi,"_tripack.trlprt() 3rd keyword (nt) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(shape(ltri,1)==nt,"shape(ltri,1)==nt","3rd keyword nt","trlprt:nt=%d",nt) {
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&ncc,lct,&n,x,y,&nrow,&nt,ltri,&prntx);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("");
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  } /*CHECKSCALAR(shape(ltri,1)==nt)*/
  } /*if (f2py_success) of nt*/
  /* End of cleaning variable nt */
  } /*CHECKSCALAR(shape(ltri,0)==nrow)*/
  } /*if (f2py_success) of nrow*/
  /* End of cleaning variable nrow */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  } /*CHECKSCALAR(len(x)>=n)*/
  } /*if (f2py_success) of n*/
  /* End of cleaning variable n */
  } /*if (f2py_success) of prntx*/
  /* End of cleaning variable prntx */
  if((PyObject *)capi_ltri_tmp!=ltri_capi) {
    Py_XDECREF(capi_ltri_tmp); }
  }  /*if (capi_ltri_tmp == NULL) ... else of ltri*/
  /* End of cleaning variable ltri */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lct_tmp!=lct_capi) {
    Py_XDECREF(capi_lct_tmp); }
  }  /*if (capi_lct_tmp == NULL) ... else of lct*/
  /* End of cleaning variable lct */
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trlprt *******************************/

/*********************************** trmesh ***********************************/
static char doc_f2py_rout__tripack_trmesh[] = "\
list,lptr,lend,ier = trmesh(x,y)\n\nWrapper for ``trmesh``.\
\n\nParameters\n----------\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"\nReturns\n-------\n"
"list : rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : rank-1 array('i') with bounds (n)\n"
"ier : int";
/* extern void F_FUNC(trmesh,TRMESH)(int*,double*,double*,int*,int*,int*,int*,int*,int*,double*,int*); */
static PyObject *f2py_rout__tripack_trmesh(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,double*,double*,int*,int*,int*,int*,int*,int*,double*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  int lnew = 0;
  int *near = NULL;
  npy_intp near_Dims[1] = {-1};
  const int near_Rank = 1;
  PyArrayObject *capi_near_tmp = NULL;
  int capi_near_intent = 0;
  int *next = NULL;
  npy_intp next_Dims[1] = {-1};
  const int next_Rank = 1;
  PyArrayObject *capi_next_tmp = NULL;
  int capi_next_intent = 0;
  double *dist = NULL;
  npy_intp dist_Dims[1] = {-1};
  const int dist_Rank = 1;
  PyArrayObject *capi_dist_tmp = NULL;
  int capi_dist_intent = 0;
  int ier = 0;
  static char *capi_kwlist[] = {"x","y",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OO:_tripack.trmesh",\
    capi_kwlist,&x_capi,&y_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `x' of _tripack.trmesh to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable lnew */
  /* Processing variable ier */
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `y' of _tripack.trmesh to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,Py_None);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `list' of _tripack.trmesh to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,Py_None);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `lptr' of _tripack.trmesh to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,Py_None);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `lend' of _tripack.trmesh to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

  /* Processing variable near */
  near_Dims[0]=n;
  capi_near_intent |= F2PY_INTENT_HIDE;
  capi_near_tmp = array_from_pyobj(NPY_INT,near_Dims,near_Rank,capi_near_intent,Py_None);
  if (capi_near_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `near' of _tripack.trmesh to C/Fortran array" );
  } else {
    near = (int *)(PyArray_DATA(capi_near_tmp));

  /* Processing variable next */
  next_Dims[0]=n;
  capi_next_intent |= F2PY_INTENT_HIDE;
  capi_next_tmp = array_from_pyobj(NPY_INT,next_Dims,next_Rank,capi_next_intent,Py_None);
  if (capi_next_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `next' of _tripack.trmesh to C/Fortran array" );
  } else {
    next = (int *)(PyArray_DATA(capi_next_tmp));

  /* Processing variable dist */
  dist_Dims[0]=n;
  capi_dist_intent |= F2PY_INTENT_HIDE;
  capi_dist_tmp = array_from_pyobj(NPY_DOUBLE,dist_Dims,dist_Rank,capi_dist_intent,Py_None);
  if (capi_dist_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `dist' of _tripack.trmesh to C/Fortran array" );
  } else {
    dist = (double *)(PyArray_DATA(capi_dist_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&n,x,y,list,lptr,lend,&lnew,near,next,dist,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNNi",capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
    Py_XDECREF(capi_dist_tmp);
  }  /*if (capi_dist_tmp == NULL) ... else of dist*/
  /* End of cleaning variable dist */
    Py_XDECREF(capi_next_tmp);
  }  /*if (capi_next_tmp == NULL) ... else of next*/
  /* End of cleaning variable next */
    Py_XDECREF(capi_near_tmp);
  }  /*if (capi_near_tmp == NULL) ... else of near*/
  /* End of cleaning variable near */
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  /* End of cleaning variable ier */
  /* End of cleaning variable lnew */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trmesh *******************************/

/*********************************** trmshr ***********************************/
static char doc_f2py_rout__tripack_trmshr[] = "\
list,lptr,lend,ier = trmshr(nx,x,y,[nit])\n\nWrapper for ``trmshr``.\
\n\nParameters\n----------\n"
"nx : input int\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"nit : input int, optional\n    Default: 1\n"
"\nReturns\n-------\n"
"list : rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : rank-1 array('i') with bounds (n)\n"
"ier : int";
/* extern void F_FUNC(trmshr,TRMSHR)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trmshr(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,double*,double*,int*,int*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int n = 0;
  int nx = 0;
  PyObject *nx_capi = Py_None;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int nit = 0;
  PyObject *nit_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  int lnew = 0;
  int ier = 0;
  static char *capi_kwlist[] = {"nx","x","y","nit",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOO|O:_tripack.trmshr",\
    capi_kwlist,&nx_capi,&x_capi,&y_capi,&nit_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable nx */
    f2py_success = int_from_pyobj(&nx,nx_capi,"_tripack.trmshr() 1st argument (nx) can't be converted to int");
  if (f2py_success) {
  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `x' of _tripack.trmshr to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable nit */
  if (nit_capi == Py_None) nit = 1; else
    f2py_success = int_from_pyobj(&nit,nit_capi,"_tripack.trmshr() 1st keyword (nit) can't be converted to int");
  if (f2py_success) {
  /* Processing variable lnew */
  /* Processing variable ier */
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `y' of _tripack.trmshr to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,Py_None);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `list' of _tripack.trmshr to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,Py_None);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `lptr' of _tripack.trmshr to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_OUT|F2PY_INTENT_HIDE;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,Py_None);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting hidden `lend' of _tripack.trmshr to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&n,&nx,x,y,&nit,list,lptr,lend,&lnew,&ier);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("NNNi",capi_list_tmp,capi_lptr_tmp,capi_lend_tmp,ier);
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  /* End of cleaning variable ier */
  /* End of cleaning variable lnew */
  } /*if (f2py_success) of nit*/
  /* End of cleaning variable nit */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  } /*if (f2py_success) of nx*/
  /* End of cleaning variable nx */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trmshr *******************************/

/*********************************** trprnt ***********************************/
static char doc_f2py_rout__tripack_trprnt[] = "\
trprnt(lcc,x,y,list,lptr,lend,[ncc,prntx])\n\nWrapper for ``trprnt``.\
\n\nParameters\n----------\n"
"lcc : input rank-1 array('i') with bounds (ncc)\n"
"x : input rank-1 array('d') with bounds (n)\n"
"y : input rank-1 array('d') with bounds (n)\n"
"list : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lptr : input rank-1 array('i') with bounds (6 * n - 12)\n"
"lend : input rank-1 array('i') with bounds (n)\n"
"\nOther Parameters\n----------------\n"
"ncc : input int, optional\n    Default: len(lcc)\n"
"prntx : input int, optional\n    Default: 1";
/* extern void F_FUNC(trprnt,TRPRNT)(int*,int*,int*,double*,double*,int*,int*,int*,int*); */
static PyObject *f2py_rout__tripack_trprnt(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           void (*f2py_func)(int*,int*,int*,double*,double*,int*,int*,int*,int*)) {
  PyObject * volatile capi_buildvalue = NULL;
  volatile int f2py_success = 1;
/*decl*/

  int ncc = 0;
  PyObject *ncc_capi = Py_None;
  int *lcc = NULL;
  npy_intp lcc_Dims[1] = {-1};
  const int lcc_Rank = 1;
  PyArrayObject *capi_lcc_tmp = NULL;
  int capi_lcc_intent = 0;
  PyObject *lcc_capi = Py_None;
  int n = 0;
  double *x = NULL;
  npy_intp x_Dims[1] = {-1};
  const int x_Rank = 1;
  PyArrayObject *capi_x_tmp = NULL;
  int capi_x_intent = 0;
  PyObject *x_capi = Py_None;
  double *y = NULL;
  npy_intp y_Dims[1] = {-1};
  const int y_Rank = 1;
  PyArrayObject *capi_y_tmp = NULL;
  int capi_y_intent = 0;
  PyObject *y_capi = Py_None;
  int *list = NULL;
  npy_intp list_Dims[1] = {-1};
  const int list_Rank = 1;
  PyArrayObject *capi_list_tmp = NULL;
  int capi_list_intent = 0;
  PyObject *list_capi = Py_None;
  int *lptr = NULL;
  npy_intp lptr_Dims[1] = {-1};
  const int lptr_Rank = 1;
  PyArrayObject *capi_lptr_tmp = NULL;
  int capi_lptr_intent = 0;
  PyObject *lptr_capi = Py_None;
  int *lend = NULL;
  npy_intp lend_Dims[1] = {-1};
  const int lend_Rank = 1;
  PyArrayObject *capi_lend_tmp = NULL;
  int capi_lend_intent = 0;
  PyObject *lend_capi = Py_None;
  int prntx = 0;
  PyObject *prntx_capi = Py_None;
  static char *capi_kwlist[] = {"lcc","x","y","list","lptr","lend","ncc","prntx",NULL};

/*routdebugenter*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
  if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
    "OOOOOO|OO:_tripack.trprnt",\
    capi_kwlist,&lcc_capi,&x_capi,&y_capi,&list_capi,&lptr_capi,&lend_capi,&ncc_capi,&prntx_capi))
    return NULL;
/*frompyobj*/
  /* Processing variable lcc */
  ;
  capi_lcc_intent |= F2PY_INTENT_IN;
  capi_lcc_tmp = array_from_pyobj(NPY_INT,lcc_Dims,lcc_Rank,capi_lcc_intent,lcc_capi);
  if (capi_lcc_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 1st argument `lcc' of _tripack.trprnt to C/Fortran array" );
  } else {
    lcc = (int *)(PyArray_DATA(capi_lcc_tmp));

  /* Processing variable x */
  ;
  capi_x_intent |= F2PY_INTENT_IN;
  capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);
  if (capi_x_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 2nd argument `x' of _tripack.trprnt to C/Fortran array" );
  } else {
    x = (double *)(PyArray_DATA(capi_x_tmp));

  /* Processing variable prntx */
  if (prntx_capi == Py_None) prntx = 1; else
    prntx = (int)PyObject_IsTrue(prntx_capi);
    f2py_success = 1;
  if (f2py_success) {
  /* Processing variable ncc */
  if (ncc_capi == Py_None) ncc = len(lcc); else
    f2py_success = int_from_pyobj(&ncc,ncc_capi,"_tripack.trprnt() 1st keyword (ncc) can't be converted to int");
  if (f2py_success) {
  CHECKSCALAR(len(lcc)>=ncc,"len(lcc)>=ncc","1st keyword ncc","trprnt:ncc=%d",ncc) {
  /* Processing variable n */
  n = len(x);
  /* Processing variable y */
  y_Dims[0]=n;
  capi_y_intent |= F2PY_INTENT_IN;
  capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi);
  if (capi_y_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 3rd argument `y' of _tripack.trprnt to C/Fortran array" );
  } else {
    y = (double *)(PyArray_DATA(capi_y_tmp));

  /* Processing variable list */
  list_Dims[0]=6 * n - 12;
  capi_list_intent |= F2PY_INTENT_IN;
  capi_list_tmp = array_from_pyobj(NPY_INT,list_Dims,list_Rank,capi_list_intent,list_capi);
  if (capi_list_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 4th argument `list' of _tripack.trprnt to C/Fortran array" );
  } else {
    list = (int *)(PyArray_DATA(capi_list_tmp));

  /* Processing variable lptr */
  lptr_Dims[0]=6 * n - 12;
  capi_lptr_intent |= F2PY_INTENT_IN;
  capi_lptr_tmp = array_from_pyobj(NPY_INT,lptr_Dims,lptr_Rank,capi_lptr_intent,lptr_capi);
  if (capi_lptr_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 5th argument `lptr' of _tripack.trprnt to C/Fortran array" );
  } else {
    lptr = (int *)(PyArray_DATA(capi_lptr_tmp));

  /* Processing variable lend */
  lend_Dims[0]=n;
  capi_lend_intent |= F2PY_INTENT_IN;
  capi_lend_tmp = array_from_pyobj(NPY_INT,lend_Dims,lend_Rank,capi_lend_intent,lend_capi);
  if (capi_lend_tmp == NULL) {
    if (!PyErr_Occurred())
      PyErr_SetString(_tripack_error,"failed in converting 6th argument `lend' of _tripack.trprnt to C/Fortran array" );
  } else {
    lend = (int *)(PyArray_DATA(capi_lend_tmp));

/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
/*callfortranroutine*/
        (*f2py_func)(&ncc,lcc,&n,x,y,list,lptr,lend,&prntx);
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
    if (f2py_success) {
/*pyobjfrom*/
/*end of pyobjfrom*/
    CFUNCSMESS("Building return value.\n");
    capi_buildvalue = Py_BuildValue("");
/*closepyobjfrom*/
/*end of closepyobjfrom*/
    } /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
  if((PyObject *)capi_lend_tmp!=lend_capi) {
    Py_XDECREF(capi_lend_tmp); }
  }  /*if (capi_lend_tmp == NULL) ... else of lend*/
  /* End of cleaning variable lend */
  if((PyObject *)capi_lptr_tmp!=lptr_capi) {
    Py_XDECREF(capi_lptr_tmp); }
  }  /*if (capi_lptr_tmp == NULL) ... else of lptr*/
  /* End of cleaning variable lptr */
  if((PyObject *)capi_list_tmp!=list_capi) {
    Py_XDECREF(capi_list_tmp); }
  }  /*if (capi_list_tmp == NULL) ... else of list*/
  /* End of cleaning variable list */
  if((PyObject *)capi_y_tmp!=y_capi) {
    Py_XDECREF(capi_y_tmp); }
  }  /*if (capi_y_tmp == NULL) ... else of y*/
  /* End of cleaning variable y */
  /* End of cleaning variable n */
  } /*CHECKSCALAR(len(lcc)>=ncc)*/
  } /*if (f2py_success) of ncc*/
  /* End of cleaning variable ncc */
  } /*if (f2py_success) of prntx*/
  /* End of cleaning variable prntx */
  if((PyObject *)capi_x_tmp!=x_capi) {
    Py_XDECREF(capi_x_tmp); }
  }  /*if (capi_x_tmp == NULL) ... else of x*/
  /* End of cleaning variable x */
  if((PyObject *)capi_lcc_tmp!=lcc_capi) {
    Py_XDECREF(capi_lcc_tmp); }
  }  /*if (capi_lcc_tmp == NULL) ... else of lcc*/
  /* End of cleaning variable lcc */
/*end of cleanupfrompyobj*/
  if (capi_buildvalue == NULL) {
/*routdebugfailure*/
  } else {
/*routdebugleave*/
  }
  CFUNCSMESS("Freeing memory.\n");
/*freemem*/
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
  return capi_buildvalue;
}
/******************************* end of trprnt *******************************/
/*eof body*/

/******************* See f2py2e/f90mod_rules.py: buildhooks *******************/
/*need_f90modhooks*/

/************** See f2py2e/rules.py: module_rules['modulebody'] **************/

/******************* See f2py2e/common_rules.py: buildhooks *******************/

/*need_commonhooks*/

/**************************** See f2py2e/rules.py ****************************/

static FortranDataDef f2py_routine_defs[] = {
  {"addcst",-1,{{-1}},0,(char *)F_FUNC(addcst,ADDCST),(f2py_init_func)f2py_rout__tripack_addcst,doc_f2py_rout__tripack_addcst},
  {"addnod",-1,{{-1}},0,(char *)F_FUNC(addnod,ADDNOD),(f2py_init_func)f2py_rout__tripack_addnod,doc_f2py_rout__tripack_addnod},
  {"areap",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(areap,AREAP),(f2py_init_func)f2py_rout__tripack_areap,doc_f2py_rout__tripack_areap},
  {"bnodes",-1,{{-1}},0,(char *)F_FUNC(bnodes,BNODES),(f2py_init_func)f2py_rout__tripack_bnodes,doc_f2py_rout__tripack_bnodes},
  {"circum",-1,{{-1}},0,(char *)F_FUNC(circum,CIRCUM),(f2py_init_func)f2py_rout__tripack_circum,doc_f2py_rout__tripack_circum},
  {"delarc",-1,{{-1}},0,(char *)F_FUNC(delarc,DELARC),(f2py_init_func)f2py_rout__tripack_delarc,doc_f2py_rout__tripack_delarc},
  {"delnod",-1,{{-1}},0,(char *)F_FUNC(delnod,DELNOD),(f2py_init_func)f2py_rout__tripack_delnod,doc_f2py_rout__tripack_delnod},
  {"edge",-1,{{-1}},0,(char *)F_FUNC(edge,EDGE),(f2py_init_func)f2py_rout__tripack_edge,doc_f2py_rout__tripack_edge},
  {"getnp",-1,{{-1}},0,(char *)F_FUNC(getnp,GETNP),(f2py_init_func)f2py_rout__tripack_getnp,doc_f2py_rout__tripack_getnp},
  {"nearnd",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(nearnd,NEARND),(f2py_init_func)f2py_rout__tripack_nearnd,doc_f2py_rout__tripack_nearnd},
  {"nearnds",-1,{{-1}},0,(char *)F_FUNC(nearnds,NEARNDS),(f2py_init_func)f2py_rout__tripack_nearnds,doc_f2py_rout__tripack_nearnds},
  {"trfind",-1,{{-1}},0,(char *)F_FUNC(trfind,TRFIND),(f2py_init_func)f2py_rout__tripack_trfind,doc_f2py_rout__tripack_trfind},
  {"trlist",-1,{{-1}},0,(char *)F_FUNC(trlist,TRLIST),(f2py_init_func)f2py_rout__tripack_trlist,doc_f2py_rout__tripack_trlist},
  {"trlist2",-1,{{-1}},0,(char *)F_FUNC(trlist2,TRLIST2),(f2py_init_func)f2py_rout__tripack_trlist2,doc_f2py_rout__tripack_trlist2},
  {"trlprt",-1,{{-1}},0,(char *)F_FUNC(trlprt,TRLPRT),(f2py_init_func)f2py_rout__tripack_trlprt,doc_f2py_rout__tripack_trlprt},
  {"trmesh",-1,{{-1}},0,(char *)F_FUNC(trmesh,TRMESH),(f2py_init_func)f2py_rout__tripack_trmesh,doc_f2py_rout__tripack_trmesh},
  {"trmshr",-1,{{-1}},0,(char *)F_FUNC(trmshr,TRMSHR),(f2py_init_func)f2py_rout__tripack_trmshr,doc_f2py_rout__tripack_trmshr},
  {"trprnt",-1,{{-1}},0,(char *)F_FUNC(trprnt,TRPRNT),(f2py_init_func)f2py_rout__tripack_trprnt,doc_f2py_rout__tripack_trprnt},

/*eof routine_defs*/
  {NULL}
};

static PyMethodDef f2py_module_methods[] = {

  {NULL,NULL}
};

#if PY_VERSION_HEX >= 0x03000000
static struct PyModuleDef moduledef = {
  PyModuleDef_HEAD_INIT,
  "_tripack",
  NULL,
  -1,
  f2py_module_methods,
  NULL,
  NULL,
  NULL,
  NULL
};
#endif

#if PY_VERSION_HEX >= 0x03000000
#define RETVAL m
PyMODINIT_FUNC PyInit__tripack(void) {
#else
#define RETVAL
PyMODINIT_FUNC init_tripack(void) {
#endif
  int i;
  PyObject *m,*d, *s;
#if PY_VERSION_HEX >= 0x03000000
  m = _tripack_module = PyModule_Create(&moduledef);
#else
  m = _tripack_module = Py_InitModule("_tripack", f2py_module_methods);
#endif
  Py_TYPE(&PyFortran_Type) = &PyType_Type;
  import_array();
  if (PyErr_Occurred())
    {PyErr_SetString(PyExc_ImportError, "can't initialize module _tripack (failed to import numpy)"); return RETVAL;}
  d = PyModule_GetDict(m);
  s = PyString_FromString("$Revision: $");
  PyDict_SetItemString(d, "__version__", s);
#if PY_VERSION_HEX >= 0x03000000
  s = PyUnicode_FromString(
#else
  s = PyString_FromString(
#endif
    "This module '_tripack' is auto-generated with f2py (version:2).\nFunctions:\n"
"  lwk,iwk,list,lptr,lend,ier = addcst(lcc,x,y,lwk,list,lptr,lend,ncc=len(lcc))\n"
"  list,lptr,lend,lnew,ier = addnod(k,xk,yk,lcc,x,y,list,lptr,lend,lnew,ier,ist=0,ncc=len(lcc))\n"
"  areap = areap(x,y,nodes)\n"
"  nodes,nb,na,nt = bnodes(list,lptr,lend,nb)\n"
"  xc,yc,cr,sa,ar = circum(x1,y1,x2,y2,x3,y3,ratio)\n"
"  list,lptr,lend,lnew,ier = delarc(io1,io2,list,lptr,lend,lnew)\n"
"  lcc,x,y,list,lptr,lend,lnew,lwk,iwk,ier = delnod(k,lcc,x,y,list,lptr,lend,lnew,lwk,ncc=len(lcc))\n"
"  lwk,iwk,ier = edge(in1,in2,x,y,lwk,list,lptr,lend)\n"
"  npts,ds,ier = getnp(lcc,x,y,list,lptr,lend,npts,ds,ncc=len(lcc))\n"
"  nearnd,dsq = nearnd(xp,yp,ist,x,y,list,lptr,lend)\n"
"  ist,dsqs = nearnds(xp,yp,ist,x,y,list,lptr,lend)\n"
"  i1,i2,i3 = trfind(nst,px,py,x,y,list,lptr,lend)\n"
"  nt,ltri,lct,ier = trlist(list,lptr,lend,ncc=0,lcc=0,nrow=6)\n"
"  nt,ltri,ier = trlist2(list,lptr,lend)\n"
"  trlprt(ncc,lct,x,y,ltri,prntx,n=len(x),nrow=shape(ltri,0),nt=shape(ltri,1))\n"
"  list,lptr,lend,ier = trmesh(x,y)\n"
"  list,lptr,lend,ier = trmshr(nx,x,y,nit=1)\n"
"  trprnt(lcc,x,y,list,lptr,lend,ncc=len(lcc),prntx=1)\n"
".");
  PyDict_SetItemString(d, "__doc__", s);
  _tripack_error = PyErr_NewException ("_tripack.error", NULL, NULL);
  Py_DECREF(s);
  for(i=0;f2py_routine_defs[i].name!=NULL;i++)
    PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));



    {
      extern double F_FUNC(areap,AREAP)(void);
      PyObject* o = PyDict_GetItemString(d,"areap");
      PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(areap,AREAP),NULL));
#if PY_VERSION_HEX >= 0x03000000
      PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("areap"));
#else
      PyObject_SetAttrString(o,"__name__", PyString_FromString("areap"));
#endif
    }
    







    {
      extern int F_FUNC(nearnd,NEARND)(void);
      PyObject* o = PyDict_GetItemString(d,"nearnd");
      PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(nearnd,NEARND),NULL));
#if PY_VERSION_HEX >= 0x03000000
      PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("nearnd"));
#else
      PyObject_SetAttrString(o,"__name__", PyString_FromString("nearnd"));
#endif
    }
    








/*eof initf2pywraphooks*/
/*eof initf90modhooks*/

/*eof initcommonhooks*/


#ifdef F2PY_REPORT_ATEXIT
  if (! PyErr_Occurred())
    on_exit(f2py_report_on_exit,(void*)"_tripack");
#endif

  return RETVAL;
}
#ifdef __cplusplus
}
#endif
